-
Notifications
You must be signed in to change notification settings - Fork 2
Flexible Aggregator #62
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
|
Gemini Here is a review of the changes: 🛑 Blockers
|
|
Opus Pro 4.6 Here's my review of PR #62. This is a substantial PR that touches the wormhole module, wallet layer, and developer tooling. I'll break it down by severity. PR #62 ReviewWhat This PR Does
Critical Issues1. The [patch."https://github.com/Quantus-Network/qp-zk-circuits"]
qp-wormhole-circuit = { path = "../qp-zk-circuits/wormhole/circuit" }
...
[patch.crates-io]
qp-dilithium-crypto = { path = "../chain/primitives/dilithium-crypto" }This will break builds for anyone who doesn't have sibling repos at those exact paths. This looks like development-only config that should be removed before merge. 2. Balance verification math appears incorrect in The let partition_amounts = random_partition(amount, num_proofs, min_per_proof);So let total_sent = (num_proofs as u128) * amount; // Bug: should just be `amount`
let final_round_amount = calculate_round_amount(amount, rounds);
let total_received = (num_proofs as u128) * final_round_amount; // Bug: same issueThis multiplies by DRY Violations (High Priority)3. Both functions:
The only difference is how 4. Both submit unsigned aggregated proof transactions and watch for status. 5.
This is inconsistent and means the binary must be compiled with Medium Issues6. The old code had 7. This function is very long and handles wallet loading, secret derivation, transfers, proof generation, aggregation, on-chain verification, balance tracking, and cleanup. Breaking it into clearly named phase functions would improve readability and testability. 8. CLI arg description mismatch /// Amount per transfer in planck (default: 10 DEV)
#[arg(short, long, default_value = "10000000000000")]
amount: u128,The help says "per transfer" but the code uses it as a total that gets partitioned. This will confuse users. 9. At line ~2001 in the new code, Minor / Nits10. 11. 12. No tests for the new functions: 13. The Summary
The main blockers are the |
Summary
Adds dual-output support and random partitioning to the wormhole multiround flow, plus developer tooling improvements.
Key Changes
Dual Output Random Partitioning
compute_random_output_assignments()randomly distributes outputs across targetsNew Developer Command
Builds circuit binaries and copies to CLI/chain directories.
Simplified Verification
verifycommand (useverify-aggregated)--verifyflag toparse-prooffor local cryptographic verificationCleanup
multisendcommandTesting
NativeTransferredevents)