-
Notifications
You must be signed in to change notification settings - Fork 1
Support Fermi HF #96
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
Support Fermi HF #96
Conversation
Signed-off-by: yoshidan <naohiro.y@gmail.com>
Signed-off-by: yoshidan <naohiro.y@gmail.com>
Signed-off-by: yoshidan <naohiro.y@gmail.com>
Signed-off-by: yoshidan <naohiro.y@gmail.com>
Signed-off-by: yoshidan <naohiro.y@gmail.com>
Signed-off-by: yoshidan <naohiro.y@gmail.com>
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 adds support for the Fermi Hard Fork (HF) by introducing the k_ancestor_generation_depth parameter to the finalization verification logic. The parameter allows for a configurable depth when searching for valid child/grandchild attestation relationships, enabling more flexible block finalization rules. Additionally, the PR updates dependencies (LCP from v0.2.12 to v0.2.17), applies modern Rust idioms as required by newer clippy versions, and modernizes the CI workflow.
Key Changes:
- Added
k_ancestor_generation_depthfield toForkSpecandETHHeaderstructures to support Fermi HF finalization rules - Refactored
verify_finalized()to use nested loops with distance checking based onk_ancestor_generation_depth - Renamed
set_boundary_epochs()toassign_fork_spec()for better clarity and consistency
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
proto/definitions/ibc/lightclients/parlia/v1/parlia.proto |
Added k_ancestor_generation_depth field to ForkSpec message |
proto/src/prost/ibc.lightclients.parlia.v1.rs |
Regenerated Rust code from proto with new field |
light-client/src/header/eth_headers.rs |
Rewrote verify_finalized() with nested loops and k_ancestor_generation_depth constraint |
light-client/src/header/eth_header.rs |
Added k_ancestor_generation_depth field and renamed method to assign_fork_spec() |
light-client/src/fork_spec.rs |
Added k_ancestor_generation_depth to ForkSpec struct with comment typo fix |
light-client/src/fixture/mod.rs |
Renamed method calls and added Fermi fork spec fixtures |
light-client/src/misc.rs |
Applied clippy suggestions (ok_or, div_ceil) |
light-client/src/errors.rs |
Updated Display implementations to use modern string interpolation |
light-client/Cargo.toml |
Updated LCP dependency to v0.2.17 and bumped version to 0.4.0 |
.github/workflows/ci.yaml |
Modernized CI workflow with updated actions and added cargo-machete |
rust-toolchain |
Updated toolchain from nightly-2024-09-05 to nightly-2025-05-01 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| for j in (i + 1)..self.all.len() - 1 { | ||
| let child = &self.all[j]; | ||
|
|
||
| // Ensure the relation between child and finalized is collect |
Copilot
AI
Nov 25, 2025
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.
Typo in comment: "collect" should be "correct"
| // Ensure the relation between child and finalized is collect | |
| // Ensure the relation between child and finalized is correct |
| break; | ||
| } | ||
|
|
||
| // Ensure the relation between grand child and child is collect |
Copilot
AI
Nov 25, 2025
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.
Typo in comment: "collect" should be "correct"
| // Ensure the relation between grand child and child is collect | |
| // Ensure the relation between grand child and child is correct |
| for j in (i + 1)..self.all.len() - 1 { | ||
| let child = &self.all[j]; | ||
|
|
||
| // Ensure the relation between child and finalized is collect |
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.
| // Ensure the relation between child and finalized is collect | |
| // Ensure the relation between child and finalized is correct |
There are several other similar typos.
3100
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.
LGTM. Accurately follows BEP-590 and looks functionally good.
Signed-off-by: yoshidan <naohiro.y@gmail.com>
verify_finalziedwithk_ancestor_generation_depthto follow Fermi HF