Skip to content

Conversation

@ekrembal
Copy link
Member

@ekrembal ekrembal commented Oct 7, 2025

No description provided.

atacann and others added 18 commits October 7, 2025 09:40
(cherry picked from commit ca4847d)
(cherry picked from commit a67ef17)
(cherry picked from commit 9fd73bd)
(cherry picked from commit 5218bf6)
(cherry picked from commit af8cb5f)
(cherry picked from commit 301dcf6)
(cherry picked from commit bfb3d8e)
(cherry picked from commit eb5843f)
(cherry picked from commit 0f14130)
(cherry picked from commit a77117d)
(cherry picked from commit f360533)
(cherry picked from commit fcdc72b)
Copilot AI review requested due to automatic review settings October 7, 2025 13:45
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

A comprehensive update that implements better error propagation from background tasks to RPC streams. The change replaces blocking error handling with stream-based error forwarding to prevent tasks from silently failing in the background.

  • Modifies signature and nonce generation methods to return Result<T, BridgeError> instead of T
  • Updates error monitoring to propagate errors through channels instead of just logging them
  • Enhances partial signature verification with optional environment variable controls

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
core/src/verifier.rs Updated deposit_sign to return error results and added error monitoring
core/src/utils.rs Enhanced monitor_standalone_task to forward errors through channels
core/src/test/musig2.rs Updated test signatures to include public nonces for verification
core/src/rpc/verifier.rs Added error handling for partial signature results and improved logging
core/src/rpc/parser/verifier.rs Enhanced error messages with context information
core/src/rpc/parser/mod.rs Simplified optional message parsing
core/src/rpc/operator.rs Updated deposit_sign to return error results and added monitoring
core/src/rpc/aggregator.rs Extensive refactoring for error propagation and signature verification
core/src/operator.rs Updated deposit_sign signature and added error monitoring
core/src/musig2.rs Added optional partial signature verification and updated function signatures
core/src/header_chain_prover.rs Temporarily commented out genesis chain state hash validation
core/src/errors.rs Added full internal status conversion methods
core/src/aggregator.rs Removed unused aggregate_move_partial_sigs method

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

}

/// For each expected sighash, we collect a batch of public nonces from all verifiers. We aggregate and send to the agg_nonce_sender. Then repeat for the next sighash.
/// For each expected sighash, we collect a batch of public nonces from all verifiers. We aggregate and send aggregatod nonce and all public nonces (needed for partial signature verification) to the agg_nonce_sender. Then repeat for the next sighash.
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'aggregatod' to 'aggregated'.

Suggested change
/// For each expected sighash, we collect a batch of public nonces from all verifiers. We aggregate and send aggregatod nonce and all public nonces (needed for partial signature verification) to the agg_nonce_sender. Then repeat for the next sighash.
/// For each expected sighash, we collect a batch of public nonces from all verifiers. We aggregate and send aggregated nonce and all public nonces (needed for partial signature verification) to the agg_nonce_sender. Then repeat for the next sighash.

Copilot uses AI. Check for mistakes.
}

/// Reroutes aggregated nonces to the signature aggregator.
/// Reroutes aggregated nonces and public nonces for each aggregatedd nonce to the signature aggregator.
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'aggregatedd' to 'aggregated'.

Suggested change
/// Reroutes aggregated nonces and public nonces for each aggregatedd nonce to the signature aggregator.
/// Reroutes aggregated nonces and public nonces for each aggregated nonce to the signature aggregator.

Copilot uses AI. Check for mistakes.
}

/// Collects partial signatures from given stream and aggregates them.
/// Collects partial signatures and the corresponding public nonce from given stream and aggregates them, while aggregating each partial signature will also be verified if PARTIAL_SIG_VERIFICATION is set to true.
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

[nitpick] The sentence structure is unclear. Consider: 'Collects partial signatures and corresponding public nonces from given stream and aggregates them. Each partial signature is also verified if PARTIAL_SIG_VERIFICATION is set to true.'

Suggested change
/// Collects partial signatures and the corresponding public nonce from given stream and aggregates them, while aggregating each partial signature will also be verified if PARTIAL_SIG_VERIFICATION is set to true.
/// Collects partial signatures and corresponding public nonces from given stream and aggregates them.
/// Each partial signature is also verified if PARTIAL_SIG_VERIFICATION is set to true.

Copilot uses AI. Check for mistakes.
}

// Aggregates the partial signatures into a single aggregated signature.
/// Aggregates the partial signatures into a single aggregated signature and verifies the aggregated signature. If PARTIAL_SIG_VERIFICATION is set to true, each partial signature will also be verified.
Copy link

Copilot AI Oct 7, 2025

Choose a reason for hiding this comment

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

[nitpick] The sentence structure could be improved. Consider: 'Aggregates partial signatures into a single signature and verifies it. If PARTIAL_SIG_VERIFICATION is set to true, each partial signature is also verified individually.'

Suggested change
/// Aggregates the partial signatures into a single aggregated signature and verifies the aggregated signature. If PARTIAL_SIG_VERIFICATION is set to true, each partial signature will also be verified.
/// Aggregates partial signatures into a single signature and verifies it. If PARTIAL_SIG_VERIFICATION is set to true, each partial signature is also verified individually.

Copilot uses AI. Check for mistakes.
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.

4 participants