diff --git a/beacon_chain/libnimbus_lc/libnimbus_lc.nim b/beacon_chain/libnimbus_lc/libnimbus_lc.nim index 6204a0244..e60b8ff36 100644 --- a/beacon_chain/libnimbus_lc/libnimbus_lc.nim +++ b/beacon_chain/libnimbus_lc/libnimbus_lc.nim @@ -1258,7 +1258,7 @@ proc ETHExecutionBlockHeaderCreateFromJson( blockNumber: distinctBase(data.number).u256, gasLimit: cast[int64](data.gasLimit), gasUsed: cast[int64](data.gasUsed), - timestamp: fromUnix(int64.saturate distinctBase(data.timestamp)), + timestamp: EthTime(int64.saturate distinctBase(data.timestamp)), extraData: distinctBase(data.extraData), mixDigest: data.mixHash.asEth2Digest, nonce: distinctBase(data.nonce.get), @@ -1413,7 +1413,7 @@ type value: UInt256 input: seq[byte] accessList: seq[ETHAccessTuple] - maxFeePerBlobGas: uint64 + maxFeePerBlobGas: UInt256 blobVersionedHashes: seq[Eth2Digest] signature: seq[byte] bytes: TypedTransaction @@ -1500,7 +1500,7 @@ proc ETHTransactionsCreateFromJson( doAssert sizeof(uint64) == sizeof(ChainId) doAssert sizeof(int64) == sizeof(data.gasPrice) doAssert sizeof(int64) == sizeof(data.maxPriorityFeePerGas.get) - doAssert sizeof(int64) == sizeof(data.maxFeePerBlobGas.get) + doAssert sizeof(UInt256) == sizeof(data.maxFeePerBlobGas.get) if data.chainId.get(default(UInt256)) > distinctBase(ChainId.high).u256: return nil if distinctBase(data.gasPrice) > int64.high.uint64: @@ -1510,8 +1510,8 @@ proc ETHTransactionsCreateFromJson( if distinctBase(data.maxPriorityFeePerGas.get(0.Quantity)) > int64.high.uint64: return nil - if distinctBase(data.maxFeePerBlobGas.get(0.Quantity)) > - int64.high.uint64: + if data.maxFeePerBlobGas.get(0.u256) > + uint64.high.u256: return nil if distinctBase(data.gas) > int64.high.uint64: return nil @@ -1542,7 +1542,7 @@ proc ETHTransactionsCreateFromJson( else: @[], maxFeePerBlobGas: - distinctBase(data.maxFeePerBlobGas.get(0.Quantity)).GasInt, + data.maxFeePerBlobGas.get(0.u256), versionedHashes: if data.blobVersionedHashes.isSome: data.blobVersionedHashes.get.mapIt( @@ -1618,7 +1618,7 @@ proc ETHTransactionsCreateFromJson( accessList: tx.accessList.mapIt(ETHAccessTuple( address: ExecutionAddress(data: it.address), storageKeys: it.storageKeys.mapIt(Eth2Digest(data: it)))), - maxFeePerBlobGas: tx.maxFeePerBlobGas.uint64, + maxFeePerBlobGas: tx.maxFeePerBlobGas, blobVersionedHashes: tx.versionedHashes, signature: @rawSig, bytes: rlpBytes.TypedTransaction) @@ -1946,7 +1946,7 @@ func ETHAccessTupleGetStorageKey( addr accessTuple[].storageKeys[storageKeyIndex.int] func ETHTransactionGetMaxFeePerBlobGas( - transaction: ptr ETHTransaction): ptr uint64 {.exported.} = + transaction: ptr ETHTransaction): ptr UInt256 {.exported.} = ## Obtains the max fee per blob gas of a transaction. ## ## * The returned value is allocated in the given transaction. diff --git a/beacon_chain/spec/helpers.nim b/beacon_chain/spec/helpers.nim index 3b1f3770e..7b321b66d 100644 --- a/beacon_chain/spec/helpers.nim +++ b/beacon_chain/spec/helpers.nim @@ -464,7 +464,7 @@ proc blockToBlockHeader*(blck: ForkyBeaconBlock): ExecutionBlockHeader = blockNumber : payload.block_number.u256, gasLimit : cast[GasInt](payload.gas_limit), gasUsed : cast[GasInt](payload.gas_used), - timestamp : fromUnix(int64.saturate payload.timestamp), + timestamp : EthTime(int64.saturate payload.timestamp), extraData : payload.extra_data.asSeq, mixDigest : payload.prev_randao, # EIP-4399 `mixDigest` -> `prevRandao` nonce : default(BlockNonce), diff --git a/vendor/nim-eth b/vendor/nim-eth index 894ec07d9..e34a9c4e5 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit 894ec07d9f977a5ef9487630b71764df9163982f +Subproject commit e34a9c4e5daee654d6ea16f6c4595253548ffb17 diff --git a/vendor/nim-web3 b/vendor/nim-web3 index 70f22351c..ebf4a12cb 160000 --- a/vendor/nim-web3 +++ b/vendor/nim-web3 @@ -1 +1 @@ -Subproject commit 70f22351c44b849a321b78b94dc0f9cd4ac9a5e1 +Subproject commit ebf4a12cbaf8d07c2a6c315adf6278a67c1fdc54