mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-22 03:08:30 +00:00
update engine API URLs to v1.0.0-alpha.9 (#3654)
This commit is contained in:
parent
c808f17a37
commit
5773f71ac0
@ -195,7 +195,7 @@ type
|
||||
desc: "Number of worker threads (\"0\" = use as many threads as there are CPU cores available)"
|
||||
name: "num-threads" }: int
|
||||
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.8/src/engine/authentication.md#key-distribution
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.9/src/engine/authentication.md#key-distribution
|
||||
jwtSecret* {.
|
||||
desc: "A file containing the hex-encoded 256 bit secret key to be used for verifying/generating jwt tokens"
|
||||
name: "jwt-secret" .}: Option[string]
|
||||
|
@ -20,7 +20,7 @@ proc base64urlEncode(x: auto): string =
|
||||
base64.encode(x, safe = true).replace("=", "")
|
||||
|
||||
func getIatToken*(time: int64): JsonNode =
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.8/src/engine/authentication.md#jwt-claims
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.9/src/engine/authentication.md#jwt-claims
|
||||
# "Required: iat (issued-at) claim. The EL SHOULD only accept iat timestamps
|
||||
# which are within +-5 seconds from the current time."
|
||||
#
|
||||
@ -32,7 +32,7 @@ func getIatToken*(time: int64): JsonNode =
|
||||
%* {"iat": time}
|
||||
|
||||
proc getSignedToken*(key: openArray[byte], payload: string): string =
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.8/src/engine/authentication.md#jwt-specifications
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.9/src/engine/authentication.md#jwt-specifications
|
||||
# "The EL MUST support at least the following alg: HMAC + SHA256 (HS256)"
|
||||
|
||||
# https://datatracker.ietf.org/doc/html/rfc7515#appendix-A.1.1
|
||||
@ -65,7 +65,7 @@ proc checkJwtSecret*(
|
||||
# hex-encoded secret as a jwt.hex file on the filesystem. This file can
|
||||
# then be used to provision the counterpart client.
|
||||
#
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.8/src/engine/authentication.md#key-distribution
|
||||
# https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.9/src/engine/authentication.md#key-distribution
|
||||
const jwtSecretFilename = "jwt.hex"
|
||||
let jwtSecretPath = dataDir / jwtSecretFilename
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user