Skip to content

Conversation

@yoshidan
Copy link
Contributor

@yoshidan yoshidan commented Nov 8, 2025

Testnet Fermi HF started from
https://testnet.bscscan.com/block/71859053

Naohiro Yoshida added 9 commits November 3, 2025 16:59
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]>
@yoshidan yoshidan marked this pull request as draft November 8, 2025 07:03
Naohiro Yoshida added 2 commits November 8, 2025 19:14
Signed-off-by: Naohiro Yoshida <[email protected]>
Signed-off-by: Naohiro Yoshida <[email protected]>
@yoshidan yoshidan marked this pull request as ready for review November 10, 2025 03:32
Signed-off-by: Naohiro Yoshida <[email protected]>
@yoshidan yoshidan requested review from 3100 and siburu November 14, 2025 13:13
@3100 3100 requested a review from Copilot November 26, 2025 03:50
Copilot finished reviewing on behalf of 3100 November 26, 2025 03:52
Copy link

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 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_depth field 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
Copy link

Copilot AI Nov 26, 2025

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.

Suggested change
// TODO
// TODO: Add Fermi HF height once mainnet activation is scheduled

Copilot uses AI. Check for mistakes.
if err != nil {
return nil, err
}
if k-j > uint64(currentForkSpec.KAncestorGenerationDepth) {
Copy link

Copilot AI Nov 26, 2025

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.

Suggested change
if k-j > uint64(currentForkSpec.KAncestorGenerationDepth) {
if k-i > uint64(currentForkSpec.KAncestorGenerationDepth) {

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

@yoshidan yoshidan Nov 26, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants