2018-01-15 00:10:02 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2018-04-26 18:10:31 +00:00
|
|
|
"github.com/ethereum/go-ethereum/sharding/notary"
|
2018-03-31 21:04:22 +00:00
|
|
|
"github.com/ethereum/go-ethereum/sharding/proposer"
|
2018-01-15 00:10:02 +00:00
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/cmd/utils"
|
|
|
|
cli "gopkg.in/urfave/cli.v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2018-04-26 18:10:31 +00:00
|
|
|
notaryClientCommand = cli.Command{
|
|
|
|
Action: utils.MigrateFlags(notaryClient),
|
|
|
|
Name: "sharding-notary",
|
|
|
|
Aliases: []string{"shard-notary"},
|
|
|
|
Usage: "Start a sharding notary client",
|
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-04-26 18:10:31 +00:00
|
|
|
Launches a sharding notary client that connects to a running geth node and submit collations to a Sharding Manager Contract. This feature is a work in progress.
|
2018-03-06 05:57:42 +00:00
|
|
|
`,
|
|
|
|
}
|
2018-03-08 19:18:20 +00:00
|
|
|
proposerClientCommand = cli.Command{
|
|
|
|
Action: utils.MigrateFlags(proposerClient),
|
|
|
|
Name: "sharding-proposer",
|
|
|
|
Aliases: []string{"shard-proposer"},
|
|
|
|
Usage: "Start a sharding proposer client",
|
2018-03-06 05:57:42 +00:00
|
|
|
ArgsUsage: "[endpoint]",
|
2018-03-06 16:28:23 +00:00
|
|
|
Flags: []cli.Flag{utils.DataDirFlag, utils.PasswordFileFlag, utils.NetworkIdFlag, utils.IPCPathFlag},
|
2018-03-06 05:57:42 +00:00
|
|
|
Category: "SHARDING COMMANDS",
|
|
|
|
Description: `
|
2018-04-26 18:10:31 +00:00
|
|
|
Launches a sharding proposer client that connects to a running geth node and proposes collations to notary node. This feature is a work in progress.
|
2018-01-21 00:07:41 +00:00
|
|
|
`,
|
2018-01-15 00:10:02 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2018-04-26 18:10:31 +00:00
|
|
|
func notaryClient(ctx *cli.Context) error {
|
2018-04-28 01:10:37 +00:00
|
|
|
c := notary.NewNotary(ctx)
|
2018-03-31 18:25:39 +00:00
|
|
|
return c.Start()
|
2018-01-15 00:10:02 +00:00
|
|
|
}
|
2018-03-06 05:57:42 +00:00
|
|
|
|
2018-03-08 19:18:20 +00:00
|
|
|
func proposerClient(ctx *cli.Context) error {
|
2018-03-31 21:04:22 +00:00
|
|
|
p := proposer.NewProposer(ctx)
|
|
|
|
return p.Start()
|
2018-03-06 05:57:42 +00:00
|
|
|
}
|