Skip to content

weth gateway setup taking long time to complete #92

@antonio-altr

Description

@antonio-altr

Previously, this issue was reported: OffchainLabs/arbitrum-chain-sdk#205.
It was then fixed in the SDK by letting createRollupFetchTransactionHash accept a more recent fromBlock, in this PR: OffchainLabs/arbitrum-chain-sdk#213.
This allows us to make this part of the bridge setup run faster by adding a fromBlock (setting it to deployedAtBlockNumber).

However, there is this earlier part of the bridge setup that also eventually calls createRollupFetchTransactionHash, and right now it doesn't include the fromBlock.
It would be great if we can also input deployedAtBlockNumber here so that the entire bridge setup runs much faster.

The complete call path is:

createNewTokenBridge (orbit-setup-script)
   -> createTokenBridgePrepareSetWethGatewayTransactionRequest (arbitrum-orbit-sdk)
        -> createRollupFetchCoreContracts
              -> createRollupFetchTransactionHash

Here is a sample log (notice how fromBlock is different between calls):

Network 53456 already included
[getLogsWithBatching] Now batching requests: RPC Request failed.

URL: https://<redacted>
Request body: {"method":"eth_getLogs","params":[{"address":"0x4BB5E86b2506C2E8537e50d2596D4af89Dd54307","topics":["0xfc1b83c11d99d08a938e0b82a0bd45f822f71ff5abf23f999c93c4533d752464"],"fromBlock":"0x8f9f7a0","toBlock":"0x11cd54f4"}]}

Details: eth_getLogs is limited to a 10,000 range
Version: viem@1.21.3
Weth gateway set in tx 0x78bc5803eafd167b716e635c077d6c63876b8de62892378b52868319f4676086
Waiting for retryables...
Retryable #1: 0x8ac352ad2942c591d71416f2e917c8576bdd74dbc96768ea676a4163ae2ab6e4
Done!
[getLogsWithBatching] Now batching requests: RPC Request failed.

URL: https://<redacted>
Request body: {"method":"eth_getLogs","params":[{"address":"0x4BB5E86b2506C2E8537e50d2596D4af89Dd54307","topics":["0xfc1b83c11d99d08a938e0b82a0bd45f822f71ff5abf23f999c93c4533d752464"],"fromBlock":"0x11cd0884","toBlock":"0x11cda906"}]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions