-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(eth): use F3 for "finalized" and "safe" resolution in v1 APIs #13298
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
Conversation
4577557
to
2d2c0ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the v1 Ethereum APIs to use F3 (Fast Finality) for "finalized" and "safe" block resolution, bringing v1 APIs in line with v2 APIs. The change includes a temporary environment variable to disable F3 finality resolution if needed.
- Updated v1 TipSetResolver to use F3 certificate provider with fallback behavior
- Added temporary environment variable
LOTUS_ETH_V1_DISABLE_F3_FINALITY_RESOLUTION
to revert to old resolution rules - Updated test cases to reflect unified v1/v2 behavior expectations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
node/modules/eth.go | Modified v1 TipSetResolver to use F3 certificate provider with environment variable override |
itests/eth_api_f3_test.go | Updated test expectations to reflect unified v1/v2 F3 finality behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fce4729
to
3a1deeb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, especially given we have the escape hatch. I'll create an issue for the followup work if @Kubuxu is on board with this change.
3a1deeb
to
40621a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a good way to approach it
Same rules as v2: * "finalized" and "safe" resolve to whatever F3 has finalized * Fall-back for "safe" is to 200 epochs behind head when F3 isn't operating * Fall-back for "finalized" is 900 epochs behind head when F3 isn't operating Run with LOTUS_ETH_V1_DISABLE_F3_FINALITY_RESOLUTION=1 to revert to the old resolution rules. Future clean-up required: * Remove LOTUS_ETH_V1_DISABLE_F3_FINALITY_RESOLUTION option * Remove builder_chain.go split paths for v1 and v2 Eth module building - reuse same modules across v1 and v2. * Simplify eth_api_f3_test.go to remove special rules for v1 vs v2 - test same rules
40621a4
to
425eb14
Compare
Cleanup work being tracked in #13315 |
As per chat with @BigLep, this is how we backport F3 finalisation rules to v1 Eth APIs if we want to go with that path. It also comes with a future clean-up task that we should open an issue for if we merge this.
Same rules as v2:
Run with LOTUS_ETH_V1_DISABLE_F3_FINALITY_RESOLUTION=1 to revert to the old resolution rules.
Future clean-up required: