-
Couldn't load subscription status.
- Fork 28
[DONT MERGE] Better-error-from-v0.4.1 #1180
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
(cherry picked from commit cf52a55)
(cherry picked from commit ca4847d)
(cherry picked from commit 2870736)
(cherry picked from commit 9fd73bd)
(cherry picked from commit c18b2b4)
(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 1a4edb9)
(cherry picked from commit 0f14130)
(cherry picked from commit a77117d)
(cherry picked from commit f360533)
(cherry picked from commit 5984323)
(cherry picked from commit fcdc72b)
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
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 ofT - 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. |
Copilot
AI
Oct 7, 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.
Corrected spelling of 'aggregatod' to 'aggregated'.
| /// 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. |
| } | ||
|
|
||
| /// Reroutes aggregated nonces to the signature aggregator. | ||
| /// Reroutes aggregated nonces and public nonces for each aggregatedd nonce to the signature aggregator. |
Copilot
AI
Oct 7, 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.
Corrected spelling of 'aggregatedd' to 'aggregated'.
| /// 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. |
| } | ||
|
|
||
| /// 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. |
Copilot
AI
Oct 7, 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.
[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.'
| /// 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. |
| } | ||
|
|
||
| // 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. |
Copilot
AI
Oct 7, 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.
[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.'
| /// 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. |
No description provided.