diff --git a/beacon_chain/libnimbus_lc/libnimbus_lc.nim b/beacon_chain/libnimbus_lc/libnimbus_lc.nim index a77de39dbd..20ad5baca2 100644 --- a/beacon_chain/libnimbus_lc/libnimbus_lc.nim +++ b/beacon_chain/libnimbus_lc/libnimbus_lc.nim @@ -1421,7 +1421,7 @@ type storageKeys: seq[Eth2Digest] ETHAuthorization = object - chainId: uint64 + chainId: UInt256 address: ExecutionAddress nonce: uint64 authority: ExecutionAddress @@ -1429,7 +1429,7 @@ type ETHTransaction = object hash: Eth2Digest - chainId: uint64 + chainId: UInt256 `from`: ExecutionAddress nonce: uint64 maxPriorityFeePerGas: uint64 @@ -1539,8 +1539,8 @@ proc ETHTransactionsCreateFromJson( # Construct transaction static: - doAssert sizeof(uint64) == sizeof(ChainId) - doAssert sizeof(uint64) == sizeof(data.chainId.get) + doAssert sizeof(UInt256) == sizeof(ChainId) + doAssert sizeof(UInt256) == sizeof(data.chainId.get) doAssert sizeof(uint64) == sizeof(data.gas) doAssert sizeof(uint64) == sizeof(data.gasPrice) doAssert sizeof(uint64) == sizeof(data.maxPriorityFeePerGas.get) @@ -1556,13 +1556,13 @@ proc ETHTransactionsCreateFromJson( return nil if data.authorizationList.isSome: for authorization in data.authorizationList.get: - static: doAssert sizeof(uint64) == sizeof(authorization.chainId) + static: doAssert sizeof(UInt256) == sizeof(authorization.chainId) if authorization.v > uint8.high: return nil let tx = eth_types.EthTransaction( txType: txType, - chainId: data.chainId.get(0.Quantity).ChainId, + chainId: data.chainId.get(0.u256), nonce: distinctBase(data.nonce), gasPrice: data.gasPrice.GasInt, maxPriorityFeePerGas: @@ -1663,7 +1663,7 @@ proc ETHTransactionsCreateFromJson( authority = recoverSignerAddress(sig, auth.rlpHashForSigning).valueOr: return nil authorizationList.add ETHAuthorization( - chainId: distinctBase(auth.chainId), + chainId: auth.chainId, address: ExecutionAddress(data: auth.address.data), nonce: auth.nonce, authority: ExecutionAddress(data: authority), @@ -1671,7 +1671,7 @@ proc ETHTransactionsCreateFromJson( txs.add ETHTransaction( hash: keccak256(rlpBytes), - chainId: distinctBase(tx.chainId), + chainId: tx.chainId, `from`: ExecutionAddress(data: fromAddress), nonce: tx.nonce, maxPriorityFeePerGas: tx.maxPriorityFeePerGas.uint64, @@ -1755,7 +1755,7 @@ func ETHTransactionGetHash( addr transaction[].hash func ETHTransactionGetChainId( - transaction: ptr ETHTransaction): ptr uint64 {.exported.} = + transaction: ptr ETHTransaction): ptr UInt256 {.exported.} = ## Obtains the chain ID of a transaction. ## ## * The returned value is allocated in the given transaction. @@ -2115,7 +2115,7 @@ func ETHAuthorizationListGet( addr authorizationList[][authorizationIndex.int] func ETHAuthorizationGetChainId( - authorization: ptr ETHAuthorization): ptr uint64 {.exported.} = + authorization: ptr ETHAuthorization): ptr UInt256 {.exported.} = ## Obtains the chain ID of an authorization tuple. ## ## * The returned value is allocated in the given authorization tuple. diff --git a/research/fakeee.nim b/research/fakeee.nim index ab2cddab3a..eed1764746 100644 --- a/research/fakeee.nim +++ b/research/fakeee.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2022-2024 Status Research & Development GmbH +# Copyright (c) 2022-2025 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). @@ -45,15 +45,6 @@ proc setupEngineAPI*(server: RpcServer) = msg: "Unknown payload" ) - # 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, - number = uint64(conf.terminalBlockNumber), - blockHash = conf.terminalBlockHash - - return conf - # 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, diff --git a/vendor/nim-eth b/vendor/nim-eth index ac1be3135a..57fa21263a 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit ac1be3135a7f41d2822544a7c0b7b498c5b824da +Subproject commit 57fa21263a50a325e80636280f976e8077f6627c diff --git a/vendor/nim-web3 b/vendor/nim-web3 index a3bc5ad48e..d20c21e90b 160000 --- a/vendor/nim-web3 +++ b/vendor/nim-web3 @@ -1 +1 @@ -Subproject commit a3bc5ad48e2b05fa253ba68bbd5b84e4ea234f50 +Subproject commit d20c21e90b74d4b74cd98deaac080d8757f37bbd