Skip to content

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Sep 3, 2025

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:

  • "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

@Copilot Copilot AI review requested due to automatic review settings September 3, 2025 02:40
@github-project-automation github-project-automation bot moved this to Todo in F3 Sep 3, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Sep 3, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

Copy link
Member

@BigLep BigLep left a 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.

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Sep 3, 2025
@github-project-automation github-project-automation bot moved this from Todo to In review in F3 Sep 3, 2025
Copy link
Contributor

@Kubuxu Kubuxu left a 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
@BigLep BigLep merged commit cae9537 into master Sep 4, 2025
98 checks passed
@BigLep BigLep deleted the rvagg/eth-v1-f3 branch September 4, 2025 14:33
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Sep 4, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in F3 Sep 4, 2025
@BigLep
Copy link
Member

BigLep commented Sep 4, 2025

Cleanup work being tracked in #13315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

3 participants