Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ Once the JSON-RPC daemon is running, all you need to do is point your beacon cha
where `<ip address>` is either localhost or the IP address of the device running the JSON-RPC daemon.

Erigon has been tested with Lighthouse however all other clients that support JSON-RPC should also work.

### Authentication API

In order to establish a secure connection beetwen the Consensus Layer and the Execution Layer, a JWT secret key is automatically generated.

The JWT secret key will be present in the datadir by default under the name of `jwt.hex` and its path can be specified with the flag `--authrpc.jwtsecret`.

This piece of info needs to be specified in the Consensus Layer as well in order to establish connection successfully. More information can be found [here](https://github.com/ethereum/execution-apis/blob/main/src/engine/authentication.md)

### Multiple Instances / One Machine

Expand Down
4 changes: 2 additions & 2 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ var (

JWTSecretPath = cli.StringFlag{
Name: "authrpc.jwtsecret",
Usage: "Token to ensure safe connection between CL and EL",
Value: "jwt.hex",
Usage: "Path to the token that ensures safe connection between CL and EL",
Value: "",
}

HttpCompressionFlag = cli.BoolFlag{
Expand Down
6 changes: 5 additions & 1 deletion turbo/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ func ApplyFlagsForNodeConfig(ctx *cli.Context, cfg *node.Config) {
}

func setEmbeddedRpcDaemon(ctx *cli.Context, cfg *node.Config) {
jwtSecretPath := ctx.GlobalString(utils.JWTSecretPath.Name)
if jwtSecretPath == "" {
jwtSecretPath = cfg.DataDir + "/jwt.hex"
}
c := &httpcfg.HttpCfg{
Enabled: ctx.GlobalBool(utils.HTTPEnabledFlag.Name),
DataDir: cfg.DataDir,
Expand All @@ -298,7 +302,7 @@ func setEmbeddedRpcDaemon(ctx *cli.Context, cfg *node.Config) {
HttpPort: ctx.GlobalInt(utils.HTTPPortFlag.Name),
EngineHTTPListenAddress: ctx.GlobalString(utils.EngineAddr.Name),
EnginePort: ctx.GlobalInt(utils.EnginePort.Name),
JWTSecretPath: ctx.GlobalString(utils.JWTSecretPath.Name),
JWTSecretPath: jwtSecretPath,
HttpCORSDomain: strings.Split(ctx.GlobalString(utils.HTTPCORSDomainFlag.Name), ","),
HttpVirtualHost: strings.Split(ctx.GlobalString(utils.HTTPVirtualHostsFlag.Name), ","),
API: strings.Split(ctx.GlobalString(utils.HTTPApiFlag.Name), ","),
Expand Down