mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-09 03:01:19 +00:00
616e5f55e3
Former-commit-id: e54d9c64425c9337618628b567a539c9cdf8b739 [formerly 079b4d5a8f02c32b20bb8964443b9bf154dfdd28] Former-commit-id: 43251f050a4b9acbf01af1c1cf8639b3d7099953
51 lines
1.5 KiB
Go
51 lines
1.5 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 (
|
|
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.DepositFlag},
|
|
Category: "SHARDING COMMANDS",
|
|
Description: `
|
|
Launches a sharding collator client that connects to a running geth node and submit collations to a Sharding Manager Contract. This feature is a work in progress.
|
|
`,
|
|
}
|
|
proposerClientCommand = cli.Command{
|
|
Action: utils.MigrateFlags(proposerClient),
|
|
Name: "sharding-proposer",
|
|
Aliases: []string{"shard-proposer"},
|
|
Usage: "Start a sharding proposer client",
|
|
ArgsUsage: "[endpoint]",
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag},
|
|
Category: "SHARDING COMMANDS",
|
|
Description: `
|
|
Launches a sharding proposer client that connects to a running geth node and proposes collations to collator node. This feature is a work in progress.
|
|
`,
|
|
}
|
|
)
|
|
|
|
func collatorClient(ctx *cli.Context) error {
|
|
c := sharding.MakeCollatorClient(ctx)
|
|
if err := c.Start(); err != nil {
|
|
return err
|
|
}
|
|
c.Wait()
|
|
return nil
|
|
}
|
|
|
|
func proposerClient(ctx *cli.Context) error {
|
|
fmt.Println("Starting proposer client")
|
|
return nil
|
|
}
|