2018-01-15 00:10:02 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
2018-05-20 22:47:47 +00:00
|
|
|
"github.com/ethereum/go-ethereum/sharding/client"
|
2018-01-15 00:10:02 +00:00
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2018-05-20 22:47:47 +00:00
|
|
|
shardingCommand = cli.Command{
|
|
|
|
Action: utils.MigrateFlags(shardingClient),
|
|
|
|
Name: "sharding",
|
|
|
|
Usage: "Start a sharding-enabled node",
|
2018-01-21 00:07:41 +00:00
|
|
|
ArgsUsage: "[endpoint]",
|
2018-03-06 04:17:55 +00:00
|
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag, utils.DepositFlag},
|
2018-01-21 00:07:41 +00:00
|
|
|
Category: "SHARDING COMMANDS",
|
|
|
|
Description: `
|
2018-05-20 22:47:47 +00:00
|
|
|
Launches a sharding client that submits collations to a Sharding Manager Contract, handles notary and proposer services, and manages shardp2p connections. This feature is a work in progress.
|
2018-01-21 00:07:41 +00:00
|
|
|
`,
|
2018-01-15 00:10:02 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2018-05-20 22:47:47 +00:00
|
|
|
func shardingClient(ctx *cli.Context) error {
|
|
|
|
// configures a sharding-enabled node using the cli's context.
|
|
|
|
shardingNode := client.NewClient(ctx)
|
|
|
|
return shardingNode.Start()
|
2018-01-15 00:10:02 +00:00
|
|
|
}
|
2018-03-06 05:57:42 +00:00
|
|
|
|
2018-05-20 22:47:47 +00:00
|
|
|
// func notaryClient(ctx *cli.Context) error {
|
|
|
|
// c := notary.NewNotary(ctx)
|
|
|
|
// return c.Start()
|
|
|
|
// }
|
|
|
|
|
|
|
|
// func proposerClient(ctx *cli.Context) error {
|
|
|
|
// p := proposer.NewProposer(ctx)
|
|
|
|
// return p.Start()
|
|
|
|
// }
|