Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add p2p.sync.onlyreqtostatic flag to p2p flags #11011

Merged
merged 2 commits into from
Jun 29, 2024

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Jun 26, 2024

This PR adds a p2p.sync.onlyreqtostatic flag to op-node so that when enabled, RequestL2Range will only forward requests to static peers.

This is handy for new nodes to increase the success rate for checkForGapInUnsafeQueue, otherwise it often happens that bad peers received the request(peers race to handle the request by receiving from peerRequests channel) and thus report "failed to check for unsafe L2 blocks to sync".

This flag is especially useful for opstack instances with large batcher submit interval(e.g, 12h).

(The big flag diff is caused by goformat, only a new flag SyncOnlyReqToStaticName was added)

@zhiqiangxu zhiqiangxu requested a review from a team as a code owner June 26, 2024 13:01
@zhiqiangxu zhiqiangxu requested a review from refcell June 26, 2024 13:01
@zhiqiangxu zhiqiangxu force-pushed the only_req_to_static branch 3 times, most recently from b26db71 to 95325d9 Compare June 26, 2024 13:32
Copy link
Contributor

@protolambda protolambda left a comment

Choose a reason for hiding this comment

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

LGTM, just a few nits to fix.

op-node/p2p/sync.go Outdated Show resolved Hide resolved
op-node/p2p/sync.go Show resolved Hide resolved
@protolambda protolambda added this pull request to the merge queue Jun 29, 2024
Merged via the queue into ethereum-optimism:develop with commit 4a525b5 Jun 29, 2024
60 checks passed
blockchaindevsh pushed a commit to blockchaindevsh/optimism that referenced this pull request Jul 10, 2024
…1011)

* add p2p.sync.onlyreqtostatic flag to p2p flags

* fix for review
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.

2 participants