2018-01-15 00:10:02 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ethereum/go-ethereum/sharding"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
shardingClientCommand = cli.Command{
|
2018-01-21 00:07:41 +00:00
|
|
|
Action: utils.MigrateFlags(shardingClient),
|
|
|
|
Name: "sharding",
|
|
|
|
Aliases: []string{"shard"},
|
|
|
|
Usage: "Start a sharding client",
|
|
|
|
ArgsUsage: "[endpoint]",
|
2018-02-10 01:09:08 +00:00
|
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag},
|
2018-01-21 00:07:41 +00:00
|
|
|
Category: "SHARDING COMMANDS",
|
|
|
|
Description: `
|
2018-02-06 20:08:28 +00:00
|
|
|
Launches a sharding client that connects to a running geth node and proposes collations to a Validator Manager Contract. This feature is a work in progress.
|
2018-01-21 00:07:41 +00:00
|
|
|
`,
|
2018-02-24 17:58:10 +00:00
|
|
|
Subcommands: []cli.Command{
|
|
|
|
{
|
|
|
|
Name: "joinvalidatorset",
|
|
|
|
Usage: "Join validator set",
|
|
|
|
ArgsUsage: "",
|
|
|
|
Action: utils.MigrateFlags(joinValidatorSet),
|
|
|
|
Category: "SHARDING COMMANDS",
|
|
|
|
Description: `
|
2018-02-24 20:48:34 +00:00
|
|
|
Participate in validator set, client will deposit 100ETH from user's account into VMC validator set, which can be withdrawn at any time. This feature is a work in progress.
|
2018-02-24 17:58:10 +00:00
|
|
|
`,
|
|
|
|
},
|
|
|
|
},
|
2018-01-15 00:10:02 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
func shardingClient(ctx *cli.Context) error {
|
|
|
|
c := sharding.MakeShardingClient(ctx)
|
|
|
|
if err := c.Start(); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
c.Wait()
|
|
|
|
return nil
|
|
|
|
}
|
2018-02-24 17:58:10 +00:00
|
|
|
|
|
|
|
func joinValidatorSet(ctx *cli.Context) error {
|
|
|
|
return nil
|
|
|
|
}
|