bump nim-web3 to switch payload ID from uint64 to 8-byte buffer (#3103)
This commit is contained in:
parent
5e62df5ad5
commit
fde73b5a70
|
@ -412,8 +412,8 @@ proc getBlockByNumber*(p: Web3DataProviderRef,
|
||||||
p.web3.provider.eth_getBlockByNumber(hexNumber, false)
|
p.web3.provider.eth_getBlockByNumber(hexNumber, false)
|
||||||
|
|
||||||
proc getPayload*(p: Web3DataProviderRef,
|
proc getPayload*(p: Web3DataProviderRef,
|
||||||
payloadId: Quantity): Future[engine_api.ExecutionPayloadV1] =
|
payloadId: merge.PayloadID): Future[engine_api.ExecutionPayloadV1] =
|
||||||
p.web3.provider.engine_getPayloadV1(payloadId)
|
p.web3.provider.engine_getPayloadV1(FixedBytes[8] payloadId)
|
||||||
|
|
||||||
proc executePayload*(p: Web3DataProviderRef,
|
proc executePayload*(p: Web3DataProviderRef,
|
||||||
payload: engine_api.ExecutionPayloadV1): Future[ExecutePayloadResponse] =
|
payload: engine_api.ExecutionPayloadV1): Future[ExecutePayloadResponse] =
|
||||||
|
|
|
@ -40,6 +40,8 @@ type
|
||||||
BloomLogs* = object
|
BloomLogs* = object
|
||||||
data*: array[BYTES_PER_LOGS_BLOOM, byte]
|
data*: array[BYTES_PER_LOGS_BLOOM, byte]
|
||||||
|
|
||||||
|
PayloadID* = array[8, byte]
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/specs/merge/beacon-chain.md#executionpayload
|
# https://github.com/ethereum/consensus-specs/blob/v1.1.3/specs/merge/beacon-chain.md#executionpayload
|
||||||
ExecutionPayload* = object
|
ExecutionPayload* = object
|
||||||
parent_hash*: Eth2Digest
|
parent_hash*: Eth2Digest
|
||||||
|
|
|
@ -12,7 +12,7 @@ import
|
||||||
|
|
||||||
suite "Merge test vectors":
|
suite "Merge test vectors":
|
||||||
let web3Provider = (waitFor Web3DataProvider.new(
|
let web3Provider = (waitFor Web3DataProvider.new(
|
||||||
default(Eth1Address), "ws://127.0.0.1:8546")).get
|
default(Eth1Address), "ws://127.0.0.1:8551")).get
|
||||||
|
|
||||||
test "getPayload, executePayload, and forkchoiceUpdated":
|
test "getPayload, executePayload, and forkchoiceUpdated":
|
||||||
const feeRecipient =
|
const feeRecipient =
|
||||||
|
@ -26,7 +26,7 @@ suite "Merge test vectors":
|
||||||
default(Eth2Digest).data, # Random
|
default(Eth2Digest).data, # Random
|
||||||
feeRecipient)
|
feeRecipient)
|
||||||
payload = waitFor web3Provider.getPayload(
|
payload = waitFor web3Provider.getPayload(
|
||||||
Quantity(payloadId.payloadId.get))
|
array[8, byte] (payloadId.payloadId.get))
|
||||||
payloadStatus = waitFor web3Provider.executePayload(payload)
|
payloadStatus = waitFor web3Provider.executePayload(payload)
|
||||||
fcupdatedStatus = waitFor web3Provider.forkchoiceUpdated(
|
fcupdatedStatus = waitFor web3Provider.forkchoiceUpdated(
|
||||||
payload.blockHash.asEth2Digest,
|
payload.blockHash.asEth2Digest,
|
||||||
|
@ -36,7 +36,7 @@ suite "Merge test vectors":
|
||||||
feeRecipient)
|
feeRecipient)
|
||||||
|
|
||||||
payload2 = waitFor web3Provider.getPayload(
|
payload2 = waitFor web3Provider.getPayload(
|
||||||
Quantity(fcupdatedStatus.payloadId.get))
|
array[8, byte] (fcupdatedStatus.payloadId.get))
|
||||||
payloadStatus2 = waitFor web3Provider.executePayload(payload2)
|
payloadStatus2 = waitFor web3Provider.executePayload(payload2)
|
||||||
fcupdatedStatus2 = waitFor web3Provider.forkchoiceUpdated(
|
fcupdatedStatus2 = waitFor web3Provider.forkchoiceUpdated(
|
||||||
payload2.blockHash.asEth2Digest,
|
payload2.blockHash.asEth2Digest,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 183cc8f407082a44fec18492a8c18a8261cdd27f
|
Subproject commit 41fc21595c1882ee4aaa92217f9d8d950864f9f2
|
Loading…
Reference in New Issue