这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Lazar955
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings July 31, 2025 13:18
Copy link
Contributor

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 fixes the logic for determining when context signing should be enabled in the finality provider service. The change corrects conditional statements that control whether signing operations use additional context information.

  • Inverts comparison logic from ContextSigningHeight > currentHeight to currentHeight >= ContextSigningHeight
  • Removes explicit setting of ContextSigningHeight to max uint64 value in test configurations
  • Simplifies conditional logic in the proof-of-possession creation method

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
itest/babylon/babylon_test_manager.go Removes explicit max uint64 assignment for context signing height
finality-provider/service/rand_committer.go Fixes comparison logic for context signing activation
finality-provider/service/fp_test_helper.go Corrects conditional logic for context-aware signing
finality-provider/service/finality_submitter.go Updates comparison operator for context signing threshold
finality-provider/service/eots_manager_adapter.go Fixes both commit and finality signature context logic
finality-provider/service/app.go Simplifies proof-of-possession context signing condition
bsn/rollup/e2e/rollup_test_manager.go Removes max uint64 context signing height assignment
bsn/cosmos/e2e/bcd_test_manager.go Removes max uint64 context signing height assignment

Comment on lines 539 to +540
// nextHeight-1 might underflow if the nextHeight is 0
if (nextHeight == 0 && app.config.ContextSigningHeight > 0) ||
(nextHeight > 0 && app.config.ContextSigningHeight > nextHeight-1) {
if nextHeight >= app.config.ContextSigningHeight {
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplified condition may not handle the edge case where nextHeight is 0 and ContextSigningHeight is 0. The original logic explicitly handled nextHeight == 0 as a special case, but this new condition would evaluate to true when both values are 0, which may not be the intended behavior.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed condition looks good 👍 it would be great to add some tests catching this (can be done in subsequent prs though)

@Lazar955 Lazar955 merged commit 679050b into main Jul 31, 2025
57 of 60 checks passed
@Lazar955 Lazar955 deleted the lazar/fix-ctx-start branch July 31, 2025 15:39
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.

3 participants