Skip to content

Conversation

@lesterli
Copy link
Member

@lesterli lesterli commented Nov 26, 2024

Summary

This PR updates the docker services for L2:

  • add restart: unless-stopped to avoid downtime
  • add the env var L1_RPC_KIND: "standard" for the op-node to optimize block receipts fetching

more context:

Based on the OP code, the default behavior uses the RPC method eth_getTransactionReceipt to fetch block receipts.

In the case of L1 block 7142979, which includes 878 txs, this would require 878 RPC requests to fetch the block's receipts, potentially hitting RPC limits. To address this, we set the env var L1_RPC_KIND: "standard", which switches to using the eth_getBlockReceipts method, this would only require 1 RPC request which offers better performance in terms of RPC limits.

Test Plan

updated for devnet 7, restart works fine, and will check the op-node's log on the RPC requests for block receipts

@lesterli lesterli requested a review from a team as a code owner November 26, 2024 03:03
@bap2pecs
Copy link
Member

add the env var L1_RPC_KIND: "standard" for the op-node to optimize block receipts fetching

Could you add more context why the change?

As discussed with Noderpc, isn't the issue due to rate limiting? Then why does switching the RPC method fix it? Is it because the other RPC has a different limit?

@lesterli
Copy link
Member Author

Could you add more context why the change?

added more context

As discussed with Noderpc, isn't the issue due to rate limiting?

after checking the logs, most of the failed blocks have over 400 txs, so the issue is likely caused by hitting the RPC limit

Then why does switching the RPC method fix it? Is it because the other RPC has a different limit?

eth_getBlockReceipts only requires a single RPC request compared to eth_getTransactionReceipt, even though it has a lower rate limit as it is computationally more intensive.

@bap2pecs
Copy link
Member

Could you add more context why the change?

added more context

As discussed with Noderpc, isn't the issue due to rate limiting?

after checking the logs, most of the failed blocks have over 400 txs, so the issue is likely caused by hitting the RPC limit

Then why does switching the RPC method fix it? Is it because the other RPC has a different limit?

eth_getBlockReceipts only requires a single RPC request compared to eth_getTransactionReceipt, even though it has a lower rate limit as it is computationally more intensive.

thanks this context is very clear to understand. all makes sense now.

Copy link
Member

@bap2pecs bap2pecs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dog Man Reaction - l4HnKwxpPDoPmL9bG

@lesterli lesterli merged commit 3acd825 into main Nov 27, 2024
1 check passed
@lesterli lesterli deleted the chore/docker-services branch November 27, 2024 01:14
@bap2pecs bap2pecs changed the title chore: add restart for the docker services chore: add restart for the docker services and set L1_RPC_KIND for op-node Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants