-
Notifications
You must be signed in to change notification settings - Fork 47
feat: F3 e2e lifecycle #1469
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
base: main
Are you sure you want to change the base?
feat: F3 e2e lifecycle #1469
Conversation
fbaa095 to
b34142d
Compare
b34142d to
31feb85
Compare
91db005 to
cbce51c
Compare
39e59d6 to
bfdc6f7
Compare
93a1066 to
1747f78
Compare
…t and execute logic
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| // | ||
| // Note: the first epoch proven in a certificate does not have a previous cursor. |
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.
We should be able to initialize the cursor from the base tipset's storage commitment (used only as parent here), which is the same as the last tipset in the previous cert (used as child there). WDYT?
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.
As a workaround, maybe we could fetch parent tipsets (which are not very useful anyway) right in generate_proof_for_epoch, call it for the base tipset, get the nonces from the resulting proof bundle and discard the proof. Perhaps, we can do this only once and then maintain the cursor in ProofGeneratorService struct.
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 think the best way here is to store it on L2 ledger...
sergefdrv
left a comment
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 think it should work, so we can test it against calibration and finally get merged 🚀 Good job! 💪
| verify_sequence_against_storage_next( | ||
| "top-down message nonces", | ||
| next_topdown, | ||
| cursor.as_ref().map(|c| c.next_topdown_message_nonce), | ||
| Some(cursor.next_parent_topdown_nonce), | ||
| &nums.topdown_nonces, | ||
| )?; | ||
| verify_sequence_against_storage_next( | ||
| "power-change configuration numbers", | ||
| next_cfg, | ||
| cursor.as_ref().map(|c| c.next_power_change_config_number), | ||
| Some(cursor.next_parent_power_change_config_number), | ||
| &nums.config_numbers, | ||
| )?; |
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.
Maybe verify_sequence_against_storage_next could also require the nonce rather than taking it wrapped in Option.
Closes #1441 and #1442
Note
High Risk
Touches consensus-critical top-down finality (new F3 mode, proof cache/service, startup gating) and changes the on-chain F3 light-client state shape/serialization (HAMT power table + new fields), which can affect chain compatibility and finality behavior.
Overview
Adds an end-to-end F3 proof-based top-down finality path, including new
ipc.topdown.f3settings (proof-service + execution retry/backoff), default config examples, and startup wiring that selects legacy vote-based vs F3 proof-based topdown with fail-fast checks against committed/genesis state.Updates the F3 light-client actor to store the validator power table as an on-chain HAMT (CID root + materialized
get_state), switch power values to big-endian bytes, and enforce monotonicprocessed_instance_idupdates (no rewinds, idempotent allowed); genesis-from-parent now fetches the relevant F3 certificate to derivebase_epoch/ETH block hash and parses parent power viaBigInt.Introduces shared EVM log decoding helpers (
fendermint_vm_evm_event_utils) and new interpreter event extraction from F3 proof bundles (topdown messages + power-change requests), and refactors node startup by moving topdown/resolver/voting/polling-syncer orchestration into a dedicatedservice/topdown.rsmodule; also updates golden genesis fixtures and lockfile deps accordingly.Written by Cursor Bugbot for commit fbeabf4. This will update automatically on new commits. Configure here.