mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 11:11:20 +00:00
9a56a56e62
Former-commit-id: fbe2f866e25778d1123f7bc494b18c67c7f6db89 [formerly b4197c2938959c5c623e425a81783f33869d0666] Former-commit-id: a3eb74969066891766a3cbea3499c7a143dd009f
51 lines
1.6 KiB
Go
51 lines
1.6 KiB
Go
package main
|
|
|
|
import (
|
|
"github.com/ethereum/go-ethereum/sharding"
|
|
|
|
"fmt"
|
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
)
|
|
|
|
var (
|
|
validatorClientCommand = cli.Command{
|
|
Action: utils.MigrateFlags(validatorClient),
|
|
Name: "sharding-validator",
|
|
Aliases: []string{"shard-validator"},
|
|
Usage: "Start a sharding validator client",
|
|
ArgsUsage: "[endpoint]",
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag, utils.DepositFlag},
|
|
Category: "SHARDING COMMANDS",
|
|
Description: `
|
|
Launches a sharding validator client that connects to a running geth node and proposes collations to a Validator Manager Contract. This feature is a work in progress.
|
|
`,
|
|
}
|
|
collatorClientCommand = cli.Command{
|
|
Action: utils.MigrateFlags(collatorClient),
|
|
Name: "sharding-collator",
|
|
Aliases: []string{"shard-collator"},
|
|
Usage: "Start a sharding collator client",
|
|
ArgsUsage: "[endpoint]",
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag, utils.CollateFlag},
|
|
Category: "SHARDING COMMANDS",
|
|
Description: `
|
|
Launches a sharding collator client that connects to a running geth node and proposes collations to validator node. This feature is a work in progress.
|
|
`,
|
|
}
|
|
)
|
|
|
|
func validatorClient(ctx *cli.Context) error {
|
|
c := sharding.MakeShardingClient(ctx)
|
|
if err := c.Start(); err != nil {
|
|
return err
|
|
}
|
|
c.Wait()
|
|
return nil
|
|
}
|
|
|
|
func collatorClient(ctx *cli.Context) error {
|
|
fmt.Println("Starting collator client")
|
|
return nil
|
|
}
|