4545 SignatureBytes = DynamicBytes [96 , 96 ]
4646 Int64LeBytes = DynamicBytes [8 , 8 ]
4747 WithoutTimeout * = distinct int
48- Address = web3.Address
4948
5049 DeadlineObject * = object
5150 # TODO (cheatfate): This object declaration could be removed when
130129
131130 depositContractAddress* : Eth1Address
132131 depositContractBlockNumber: uint64
133- depositContractBlockHash: BlockHash
132+ depositContractBlockHash: Hash32
134133
135134 blocksPerLogsRequest: uint64
136135 # # This value is used to dynamically adjust the number of
199198
200199 FullBlockId * = object
201200 number: Eth1BlockNumber
202- hash: BlockHash
201+ hash: Hash32
203202
204203 DataProviderFailure * = object of CatchableError
205204 CorruptDataProvider * = object of DataProviderFailure
@@ -458,7 +457,7 @@ proc connectedRpcClient(connection: ELConnection): Future[RpcClient] {.
458457
459458proc getBlockByHash (
460459 rpcClient: RpcClient ,
461- hash: BlockHash
460+ hash: Hash32
462461): Future [BlockObject ] {.async : (raises: [CatchableError ]).} =
463462 await rpcClient.eth_getBlockByHash (hash, false )
464463
@@ -730,7 +729,7 @@ proc getPayload*(
730729
731730proc waitELToSyncDeposits (
732731 connection: ELConnection ,
733- minimalRequiredBlock: BlockHash
732+ minimalRequiredBlock: Hash32
734733) {.async : (raises: [CancelledError ]).} =
735734 var rpcClient: RpcClient = nil
736735
@@ -776,7 +775,7 @@ proc waitELToSyncDeposits(
776775func networkHasDepositContract (m: ELManager ): bool =
777776 not m.cfg.DEPOSIT_CONTRACT_ADDRESS .isDefaultValue
778777
779- func mostRecentKnownBlock (m: ELManager ): BlockHash =
778+ func mostRecentKnownBlock (m: ELManager ): Hash32 =
780779 if m.eth1Chain.finalizedDepositsMerkleizer.getChunkCount () > 0 :
781780 m.eth1Chain.finalizedBlockHash.asBlockHash
782781 else :
@@ -1111,7 +1110,7 @@ proc forkchoiceUpdated*(
11111110 Opt [PayloadAttributesV3 ],
11121111 deadlineObj: DeadlineObject ,
11131112 maxRetriesCount: int
1114- ): Future [(PayloadExecutionStatus , Opt [BlockHash ])] {.
1113+ ): Future [(PayloadExecutionStatus , Opt [Hash32 ])] {.
11151114 async : (raises: [CancelledError ]).} =
11161115
11171116 doAssert not headBlockHash.isZero
@@ -1129,7 +1128,7 @@ proc forkchoiceUpdated*(
11291128 # payload (`Hash32()` if none yet finalized)"
11301129
11311130 if m.elConnections.len == 0 :
1132- return (PayloadExecutionStatus .syncing, Opt .none BlockHash )
1131+ return (PayloadExecutionStatus .syncing, Opt .none Hash32 )
11331132
11341133 when payloadAttributes is Opt [PayloadAttributesV3 ]:
11351134 template payloadAttributesV3 (): auto =
@@ -1238,7 +1237,7 @@ proc forkchoiceUpdated*(
12381237 pendingRequests.filterIt (not (it.finished ())).
12391238 mapIt (it.cancelAndWait ())
12401239 await noCancel allFutures (pending)
1241- return (PayloadExecutionStatus .invalid, Opt .none BlockHash )
1240+ return (PayloadExecutionStatus .invalid, Opt .none Hash32 )
12421241 elif responseProcessor.selectedResponse.isSome:
12431242 # We spawn task which will wait for all other responses which are
12441243 # still pending, after 30.seconds all pending requests will be
@@ -1253,14 +1252,14 @@ proc forkchoiceUpdated*(
12531252 pendingRequests.filterIt (not (it.finished ())).
12541253 mapIt (it.cancelAndWait ())
12551254 await noCancel allFutures (pending)
1256- return (PayloadExecutionStatus .syncing, Opt .none BlockHash )
1255+ return (PayloadExecutionStatus .syncing, Opt .none Hash32 )
12571256
12581257 if len (pendingRequests) == 0 :
12591258 # All requests failed, we will continue our attempts until deadline
12601259 # is not finished.
12611260 inc (retriesCount)
12621261 if retriesCount == maxRetriesCount:
1263- return (PayloadExecutionStatus .syncing, Opt .none BlockHash )
1262+ return (PayloadExecutionStatus .syncing, Opt .none Hash32 )
12641263
12651264 # To avoid continous spam of requests when EL node is offline we
12661265 # going to sleep until next attempt.
@@ -1273,7 +1272,7 @@ proc forkchoiceUpdated*(
12731272 payloadAttributes: Opt [PayloadAttributesV1 ] |
12741273 Opt [PayloadAttributesV2 ] |
12751274 Opt [PayloadAttributesV3 ]
1276- ): Future [(PayloadExecutionStatus , Opt [BlockHash ])] {.
1275+ ): Future [(PayloadExecutionStatus , Opt [Hash32 ])] {.
12771276 async : (raises: [CancelledError ], raw: true ).} =
12781277 forkchoiceUpdated (
12791278 m, headBlockHash, safeBlockHash, finalizedBlockHash,
@@ -1389,7 +1388,7 @@ func depositEventsToBlocks(
13891388 let
13901389 logEvent = JrpcConv .decode (logEventData.string , LogObject )
13911390 blockNumber = Eth1BlockNumber readJsonField (logEvent, blockNumber, Quantity )
1392- blockHash = readJsonField (logEvent, blockHash, BlockHash )
1391+ blockHash = readJsonField (logEvent, blockHash, Hash32 )
13931392
13941393 if lastEth1Block == nil or lastEth1Block.number != blockNumber:
13951394 lastEth1Block = Eth1Block (
0 commit comments