From dbbdbea7da4fa88b53dfded7f26a49fb91c2f5e9 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sun, 10 Oct 2021 13:35:06 +0200 Subject: [PATCH] Hotfix: Revert a nim-web3 change that interferes with Eth1 deposit syncing --- beacon_chain/eth1/eth1_monitor.nim | 34 +----------------------------- vendor/nim-web3 | 2 +- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/beacon_chain/eth1/eth1_monitor.nim b/beacon_chain/eth1/eth1_monitor.nim index 5eb2c1a42..ca673f543 100644 --- a/beacon_chain/eth1/eth1_monitor.nim +++ b/beacon_chain/eth1/eth1_monitor.nim @@ -12,7 +12,7 @@ import typetraits, uri, json], # Nimble packages: chronos, json, metrics, chronicles/timings, - web3, web3/ethtypes as web3Types, web3/ethhexstrings, web3/engine_api, + web3, web3/ethtypes as web3Types, web3/ethhexstrings, eth/common/eth_types, eth/async_utils, stew/byteutils, # Local modules: @@ -403,38 +403,6 @@ proc getBlockByNumber*(p: Web3DataProviderRef, except ValueError as exc: raiseAssert exc.msg # Never fails p.web3.provider.eth_getBlockByNumber(hexNumber, false) -proc preparePayload*(p: Web3DataProviderRef, - parentHash: Eth2Digest, - timestamp: uint64, - randomData: array[32, byte], - feeRecipient: Eth1Address): Future[PreparePayloadResponse] = - p.web3.provider.engine_preparePayload(PayloadAttributes( - parentHash: parentHash.asBlockHash, - timestamp: Quantity timestamp, - random: FixedBytes[32] randomData, - feeRecipient: feeRecipient)) - -proc getPayload*(p: Web3DataProviderRef, - payloadId: Quantity): Future[engine_api.ExecutionPayload] = - p.web3.provider.engine_getPayload(payloadId) - -proc executePayload*(p: Web3DataProviderRef, - payload: engine_api.ExecutionPayload): Future[ExecutePayloadResponse] = - p.web3.provider.engine_executePayload(payload) - -proc consensusValidated*(p: Web3DataProviderRef, - blockHash: BlockHash, - status: BlockValidationStatus): Future[JsonNode] = - p.web3.provider.engine_consensusValidated(BlockValidationResult( - blockHash: blockHash, - status: $status)) - -proc forkchoiceUpdated*(p: Web3DataProviderRef, - headBlock, finalizedBlock: Eth2Digest): Future[JsonNode] = - p.web3.provider.engine_forkchoiceUpdated(ForkChoiceUpdate( - headBlockHash: headBlock.asBlockHash, - finalizedBlockHash: finalizedBlock.asBlockHash)) - template readJsonField(j: JsonNode, fieldName: string, ValueType: type): untyped = var res: ValueType fromJson(j[fieldName], fieldName, res) diff --git a/vendor/nim-web3 b/vendor/nim-web3 index 9a23474af..97e05aea6 160000 --- a/vendor/nim-web3 +++ b/vendor/nim-web3 @@ -1 +1 @@ -Subproject commit 9a23474afb7e2a14798ec0bf0e69e96cd5895e55 +Subproject commit 97e05aea6573d2630e318e7777a54d95db6ec40e