diff --git a/beacon_chain/conf.nim b/beacon_chain/conf.nim index 4c6d3b184..5439f4e65 100644 --- a/beacon_chain/conf.nim +++ b/beacon_chain/conf.nim @@ -240,7 +240,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-beta.2/src/engine/authentication.md#key-distribution + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/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[InputFile] diff --git a/beacon_chain/eth1/eth1_monitor.nim b/beacon_chain/eth1/eth1_monitor.nim index 942ff0d30..886cc3cee 100644 --- a/beacon_chain/eth1/eth1_monitor.nim +++ b/beacon_chain/eth1/eth1_monitor.nim @@ -84,10 +84,11 @@ const engineApiConnectionTimeout = 5.seconds # How much we wait before giving up connecting to the Engine API web3RequestsTimeout* = 8.seconds # How much we wait for eth_* requests (e.g. eth_getBlockByHash) - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/specification.md#request-2 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#request-2 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/shanghai.md#request-2 GETPAYLOAD_TIMEOUT = 1.seconds - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/experimental/blob-extension.md#engine_getblobsbundlev1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/experimental/blob-extension.md#request-2 GETBLOBS_TIMEOUT = 1.seconds type @@ -1353,7 +1354,7 @@ proc exchangeConfigWithSingleEL(m: ELManager, connection: ELConnection) {.async. debug "Failed to obtain eth_chainId", error = exc.msg - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/specification.md#engine_exchangetransitionconfigurationv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#engine_exchangetransitionconfigurationv1 let ourConf = TransitionConfigurationV1( terminalTotalDifficulty: m.eth1Chain.cfg.TERMINAL_TOTAL_DIFFICULTY, @@ -1997,7 +1998,7 @@ proc startExchangeTransitionConfigurationLoop(m: ELManager) {.async.} = debug "Starting exchange transition configuration loop" while true: - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/specification.md#engine_exchangetransitionconfigurationv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#specification-3 debug "Exchange transition configuration tick" traceAsyncErrors m.exchangeTransitionConfiguration() await sleepAsync(60.seconds) diff --git a/beacon_chain/gossip_processing/block_processor.nim b/beacon_chain/gossip_processing/block_processor.nim index 8434cc31d..a3edf35bf 100644 --- a/beacon_chain/gossip_processing/block_processor.nim +++ b/beacon_chain/gossip_processing/block_processor.nim @@ -413,9 +413,9 @@ proc storeBlock*( # When the execution layer is not available to verify the payload, we do the # required check on the CL side instead and proceed as if the EL was syncing - # Client software MUST validate blockHash value as being equivalent to - # Keccak256(RLP(ExecutionBlockHeader)) - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#specification + # Client software MUST validate `blockHash` value as being equivalent to + # `Keccak256(RLP(ExecutionBlockHeader))` + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#specification when typeof(signedBlock).toFork() >= ConsensusFork.Bellatrix: template payload(): auto = signedBlock.message.body.execution_payload if signedBlock.message.is_execution_block and diff --git a/beacon_chain/spec/datatypes/bellatrix.nim b/beacon_chain/spec/datatypes/bellatrix.nim index 71c7b90a0..fefa89bc3 100644 --- a/beacon_chain/spec/datatypes/bellatrix.nim +++ b/beacon_chain/spec/datatypes/bellatrix.nim @@ -25,12 +25,12 @@ import export json_serialization, base const - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#request-1 - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/shanghai.md#request-1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#request-1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/shanghai.md#request-1 FORKCHOICEUPDATED_TIMEOUT* = 8.seconds - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#request - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/shanghai.md#request + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#request + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/shanghai.md#request NEWPAYLOAD_TIMEOUT* = 8.seconds type diff --git a/beacon_chain/spec/engine_authentication.nim b/beacon_chain/spec/engine_authentication.nim index a07c16e0c..a26d7d076 100644 --- a/beacon_chain/spec/engine_authentication.nim +++ b/beacon_chain/spec/engine_authentication.nim @@ -30,7 +30,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-beta.2/src/engine/authentication.md#jwt-claims + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/authentication.md#jwt-claims # "Required: `iat` (issued-at) claim. The execution layer client **SHOULD** # only accept `iat` timestamps which are within +-60 seconds from the current # time." @@ -43,7 +43,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-beta.2/src/engine/authentication.md#jwt-specifications + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/authentication.md#jwt-specifications # "The execution layer client **MUST** support at least the following `alg` # `HMAC + SHA256` (`HS256`)" @@ -95,7 +95,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-beta.2/src/engine/authentication.md#key-distribution + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/authentication.md#key-distribution const jwtSecretFilename = "jwt.hex" let jwtSecretPath = dataDir / jwtSecretFilename diff --git a/research/fakeee.nim b/research/fakeee.nim index 1e7bcd8cf..57339c99d 100644 --- a/research/fakeee.nim +++ b/research/fakeee.nim @@ -16,7 +16,7 @@ import chronicles proc setupEngineAPI*(server: RpcServer) = - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#engine_newpayloadv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#engine_newpayloadv1 # cannot use `params` as param name. see https:#github.com/status-im/nim-json-rpc/issues/128 server.rpc("engine_newPayloadV1") do(payload: ExecutionPayloadV1) -> PayloadStatusV1: info "engine_newPayloadV1", @@ -26,7 +26,7 @@ proc setupEngineAPI*(server: RpcServer) = status: PayloadExecutionStatus.syncing, ) - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#engine_getpayloadv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#engine_getpayloadv1 server.rpc("engine_getPayloadV1") do(payloadId: PayloadID) -> ExecutionPayloadV1: info "engine_getPayloadV1", id = payloadId.toHex @@ -36,7 +36,7 @@ proc setupEngineAPI*(server: RpcServer) = msg: "Unkown payload" ) - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#engine_exchangetransitionconfigurationv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#engine_exchangetransitionconfigurationv1 server.rpc("engine_exchangeTransitionConfigurationV1") do(conf: TransitionConfigurationV1) -> TransitionConfigurationV1: info "engine_exchangeTransitionConfigurationV1", ttd = conf.terminalTotalDifficulty, @@ -45,7 +45,7 @@ proc setupEngineAPI*(server: RpcServer) = return conf - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/paris.md#engine_forkchoiceupdatedv1 + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/paris.md#engine_forkchoiceupdatedv1 server.rpc("engine_forkchoiceUpdatedV1") do( update: ForkchoiceStateV1, payloadAttributes: Option[PayloadAttributesV1]) -> ForkchoiceUpdatedResponse: diff --git a/scripts/test_merge_node.nim b/scripts/test_merge_node.nim index d6e1e8472..1769fbf77 100644 --- a/scripts/test_merge_node.nim +++ b/scripts/test_merge_node.nim @@ -26,9 +26,9 @@ from ../beacon_chain/spec/presets import Eth1Address, defaultRuntimeConfig # TODO factor this out and have a version with the result of the JWT secret # slurp for testing purposes proc readJwtSecret(jwtSecretFile: string): Result[seq[byte], cstring] = - # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.2/src/engine/authentication.md#key-distribution + # https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.3/src/engine/authentication.md#key-distribution # If such a parameter is given, but the file cannot be read, or does not - # contain a hex-encoded key of 256 bits, the client should treat this as an + # contain a hex-encoded key of 256 bits, the client SHOULD treat this as an # error: either abort the startup, or show error and continue without # exposing the authenticated port. const MIN_SECRET_LEN = 32