-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Beacon Node gRPC Server and Client Services #364
Beacon Node gRPC Server and Client Services #364
Conversation
Use ethereum prefix for proto package
beacon-chain/utils/flags.go
Outdated
@@ -26,4 +26,10 @@ var ( | |||
Name: "pubkey", | |||
Usage: "Validator's public key. Beacon chain node will listen to VRC log to determine when registration has completed based on this public key address.", | |||
} | |||
// BeaconRPCPort defines a beacon node RPC port to open. | |||
BeaconRPCPort = cli.StringFlag{ | |||
Name: "beacon-rpc-port", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's think the name here, do we really need beacon? If a beacon code only opens up one kind of rpc port, it should just be rpc-port
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, will change
beacon-chain/rpc/service.go
Outdated
|
||
var log = logrus.WithField("prefix", "rpc") | ||
|
||
// Service hi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we put hi
there? and for all the comments too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, forgot to change lol
beacon-chain/main.go
Outdated
@@ -58,7 +58,7 @@ VERSION: | |||
app.Usage = "this is a beacon chain implementation for Ethereum 2.0" | |||
app.Action = startNode | |||
|
|||
app.Flags = []cli.Flag{utils.SimulatorFlag, utils.VrcContractFlag, utils.PubKeyFlag, utils.Web3ProviderFlag, cmd.DataDirFlag, cmd.VerbosityFlag, debug.PProfFlag, debug.PProfAddrFlag, debug.PProfPortFlag, debug.MemProfileRateFlag, debug.CPUProfileFlag, debug.TraceFlag} | |||
app.Flags = []cli.Flag{utils.SimulatorFlag, utils.VrcContractFlag, utils.PubKeyFlag, utils.Web3ProviderFlag, utils.BeaconRPCPort, cmd.DataDirFlag, cmd.VerbosityFlag, debug.PProfFlag, debug.PProfAddrFlag, debug.PProfPortFlag, debug.MemProfileRateFlag, debug.CPUProfileFlag, debug.TraceFlag} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change BeaconRPCPort
to RPCPort
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work on this PR!
Hi all,
This implements a beacon node gRPC server as a service alongside a gRPC client for a sharding client and beacon node to communicate effectively. Setting this up is important for us to deprecate the Sharding Manager Contract and update our client code to the latest spec. #315.
To get this working, just run the beacon node with the flag
--beacon-rpc-port 4000
and a sharding client with--beacon-rpc-provider http://localhost:4000
.