-
Notifications
You must be signed in to change notification settings - Fork 1
Support Fermi HF for testnet #77
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?
Conversation
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
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) to the testnet at block height 71859053. The key change is the introduction of a new k_ancestor_generation_depth parameter that controls the maximum distance between blocks when validating finalized headers using vote attestations.
Key changes:
- Adds new
k_ancestor_generation_depthfield to the ForkSpec protobuf definition - Updates the header query logic to use the new parameter when searching for finalized headers
- Adds Fermi HF configuration for testnet and localnet networks
- Updates test cases to cover the new finalization logic with different depth values
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| proto/ibc/lightclients/parlia/v1/parlia.proto | Adds k_ancestor_generation_depth field to ForkSpec message |
| module/parlia.pb.go | Generated protobuf code for the new field |
| module/fork_spec.go | Adds Fermi HF configuration with depth=3 for all networks |
| module/header_query.go | Refactors finalized header query to enforce depth constraint |
| module/header_query_test.go | Adds comprehensive tests for Fermi HF finalization logic |
| module/prover.go | Updates function calls to include forkSpecs parameter |
| tool/testdata/internal/update_client.go | Fixes GetBoundaryHeight and GetBoundaryEpochs call signatures |
| tool/testdata/internal/misbehavior.go | Fixes GetBoundaryHeight and GetBoundaryEpochs call signatures |
| module/facade.go | Removes unused QueryFinalizedHeader facade function |
| e2e/chains/bsc/genesis/genesis-template.template | Adds fermiTime configuration for genesis |
| e2e/chains/bsc/docker-compose.bsc.yml | Updates BSC version to v1.6.3 |
| e2e/chains/bsc/Dockerfile.bootstrap | Updates genesis contract commit hash |
| .github/workflows/ci.yml | Adjusts sleep time for faster block production |
💡 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.
| // https://bscscan.com/block/52337091 | ||
| // https://github.com/bnb-chain/bsc/releases/tag/v1.5.16 | ||
| hardForks[indexMaxwellHF].HeightOrTimestamp = &ForkSpec_Height{Height: 52337091} | ||
| // TODO |
Copilot
AI
Nov 26, 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.
The TODO comment for Mainnet Fermi HF configuration should specify what needs to be done, such as 'TODO: Add Fermi HF height once mainnet activation is scheduled' to provide clear guidance.
| // TODO | |
| // TODO: Add Fermi HF height once mainnet activation is scheduled |
| if err != nil { | ||
| return nil, err | ||
| } | ||
| if k-j > uint64(currentForkSpec.KAncestorGenerationDepth) { |
Copilot
AI
Nov 26, 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.
The comparison uses k-j which represents the distance from child to grandchild, but should use k-i to represent the distance from the finalized block. This would incorrectly limit the search space. The condition should be k-i > uint64(currentForkSpec.KAncestorGenerationDepth) to properly enforce the depth constraint from the finalized block.
| if k-j > uint64(currentForkSpec.KAncestorGenerationDepth) { | |
| if k-i > uint64(currentForkSpec.KAncestorGenerationDepth) { |
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 have to check distance beween grandchild(k) and child(j).
@copilot
Testnet Fermi HF started from
https://testnet.bscscan.com/block/71859053