However, the current Bridge.requestTimeout on mainnet is set to max(uint32) as redemptions are not yet enabled. That means the requestTimeoutBlocks is higher than currentBlock and produces a negative startBlock which is eventually set to max(uint64) due to being an unsigned type. The startBlock is then converted to int64 within go-ethereum library which produces the invalid argument 0: block number larger than int64 error as a result.
In order to fix this problem, we are introducing an additional check that ensures the minimum possible value of startBlock is 0.
Refs: https://github.com/keep-network/keep-core/issues/3614
While running the redemption task, the wallet maintainer fetches past
RedemptionRequested
events using a filter whose start block is calculated as:where
requestTimeoutBlocks
is computed as:However, the current
Bridge.requestTimeout
on mainnet is set tomax(uint32)
as redemptions are not yet enabled. That means therequestTimeoutBlocks
is higher thancurrentBlock
and produces a negativestartBlock
which is eventually set tomax(uint64)
due to being an unsigned type. ThestartBlock
is then converted toint64
withingo-ethereum
library which produces theinvalid argument 0: block number larger than int64
error as a result.In order to fix this problem, we are introducing an additional check that ensures the minimum possible value of
startBlock
is0
.