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
@@ -737,7 +736,7 @@ proc getPayload*(
737736
738737proc waitELToSyncDeposits (
739738 connection: ELConnection ,
740- minimalRequiredBlock: BlockHash
739+ minimalRequiredBlock: Hash32
741740) {.async : (raises: [CancelledError ]).} =
742741 var rpcClient: RpcClient = nil
743742
@@ -783,7 +782,7 @@ proc waitELToSyncDeposits(
783782func networkHasDepositContract (m: ELManager ): bool =
784783 not m.cfg.DEPOSIT_CONTRACT_ADDRESS .isDefaultValue
785784
786- func mostRecentKnownBlock (m: ELManager ): BlockHash =
785+ func mostRecentKnownBlock (m: ELManager ): Hash32 =
787786 if m.eth1Chain.finalizedDepositsMerkleizer.getChunkCount () > 0 :
788787 m.eth1Chain.finalizedBlockHash.asBlockHash
789788 else :
@@ -1118,7 +1117,7 @@ proc forkchoiceUpdated*(
11181117 Opt [PayloadAttributesV3 ],
11191118 deadlineObj: DeadlineObject ,
11201119 maxRetriesCount: int
1121- ): Future [(PayloadExecutionStatus , Opt [BlockHash ])] {.
1120+ ): Future [(PayloadExecutionStatus , Opt [Hash32 ])] {.
11221121 async : (raises: [CancelledError ]).} =
11231122
11241123 doAssert not headBlockHash.isZero
@@ -1136,7 +1135,7 @@ proc forkchoiceUpdated*(
11361135 # payload (`Hash32()` if none yet finalized)"
11371136
11381137 if m.elConnections.len == 0 :
1139- return (PayloadExecutionStatus .syncing, Opt .none BlockHash )
1138+ return (PayloadExecutionStatus .syncing, Opt .none Hash32 )
11401139
11411140 when payloadAttributes is Opt [PayloadAttributesV3 ]:
11421141 template payloadAttributesV3 (): auto =
@@ -1245,7 +1244,7 @@ proc forkchoiceUpdated*(
12451244 pendingRequests.filterIt (not (it.finished ())).
12461245 mapIt (it.cancelAndWait ())
12471246 await noCancel allFutures (pending)
1248- return (PayloadExecutionStatus .invalid, Opt .none BlockHash )
1247+ return (PayloadExecutionStatus .invalid, Opt .none Hash32 )
12491248 elif responseProcessor.selectedResponse.isSome:
12501249 # We spawn task which will wait for all other responses which are
12511250 # still pending, after 30.seconds all pending requests will be
@@ -1260,14 +1259,14 @@ proc forkchoiceUpdated*(
12601259 pendingRequests.filterIt (not (it.finished ())).
12611260 mapIt (it.cancelAndWait ())
12621261 await noCancel allFutures (pending)
1263- return (PayloadExecutionStatus .syncing, Opt .none BlockHash )
1262+ return (PayloadExecutionStatus .syncing, Opt .none Hash32 )
12641263
12651264 if len (pendingRequests) == 0 :
12661265 # All requests failed, we will continue our attempts until deadline
12671266 # is not finished.
12681267 inc (retriesCount)
12691268 if retriesCount == maxRetriesCount:
1270- return (PayloadExecutionStatus .syncing, Opt .none BlockHash )
1269+ return (PayloadExecutionStatus .syncing, Opt .none Hash32 )
12711270
12721271 # To avoid continous spam of requests when EL node is offline we
12731272 # going to sleep until next attempt.
@@ -1280,7 +1279,7 @@ proc forkchoiceUpdated*(
12801279 payloadAttributes: Opt [PayloadAttributesV1 ] |
12811280 Opt [PayloadAttributesV2 ] |
12821281 Opt [PayloadAttributesV3 ]
1283- ): Future [(PayloadExecutionStatus , Opt [BlockHash ])] {.
1282+ ): Future [(PayloadExecutionStatus , Opt [Hash32 ])] {.
12841283 async : (raises: [CancelledError ], raw: true ).} =
12851284 forkchoiceUpdated (
12861285 m, headBlockHash, safeBlockHash, finalizedBlockHash,
@@ -1396,7 +1395,7 @@ func depositEventsToBlocks(
13961395 let
13971396 logEvent = JrpcConv .decode (logEventData.string , LogObject )
13981397 blockNumber = Eth1BlockNumber readJsonField (logEvent, blockNumber, Quantity )
1399- blockHash = readJsonField (logEvent, blockHash, BlockHash )
1398+ blockHash = readJsonField (logEvent, blockHash, Hash32 )
14001399
14011400 if lastEth1Block == nil or lastEth1Block.number != blockNumber:
14021401 lastEth1Block = Eth1Block (
0 commit comments