From a6492aaf74923fc37827dbdd79ae831a0bf863e6 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 9 Feb 2026 19:54:28 +0800 Subject: [PATCH 1/2] lock --- Cargo.lock | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index e37322ff..93152343 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -78,6 +78,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", + "const-random", "getrandom 0.3.4", "once_cell", "version_check", @@ -8924,6 +8925,7 @@ dependencies = [ "p3-symmetric", "plonky2_maybe_rayon", "plonky2_util", + "qp-plonky2-core", "qp-plonky2-field", "qp-plonky2-verifier", "qp-poseidon-constants", @@ -8935,6 +8937,30 @@ dependencies = [ "web-time", ] +[[package]] +name = "qp-plonky2-core" +version = "1.0.0" +dependencies = [ + "ahash", + "anyhow", + "hashbrown 0.14.5", + "itertools 0.11.0", + "keccak-hash 0.8.0", + "log", + "num", + "p3-field", + "p3-goldilocks", + "p3-poseidon2", + "p3-symmetric", + "plonky2_util", + "qp-plonky2-field", + "qp-poseidon-constants", + "rand 0.8.5", + "serde", + "static_assertions", + "unroll", +] + [[package]] name = "qp-plonky2-field" version = "1.1.3" @@ -8966,6 +8992,7 @@ dependencies = [ "p3-poseidon2", "p3-symmetric", "plonky2_util", + "qp-plonky2-core", "qp-plonky2-field", "qp-poseidon-constants", "serde", From 427b21def07c065206126b7dda0666c58e8dcdda Mon Sep 17 00:00:00 2001 From: illuzen Date: Wed, 11 Feb 2026 06:10:42 +0800 Subject: [PATCH 2/2] new agg logic --- pallets/wormhole/src/lib.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pallets/wormhole/src/lib.rs b/pallets/wormhole/src/lib.rs index ecc31340..39e55200 100644 --- a/pallets/wormhole/src/lib.rs +++ b/pallets/wormhole/src/lib.rs @@ -566,6 +566,17 @@ pub mod pallet { )> = Vec::with_capacity(aggregated_inputs.account_data.len()); for account_data in &aggregated_inputs.account_data { + // Skip dummy account slots (exit_account == 0 with zero amount) + // Dummy proofs from aggregation padding have all-zero exit accounts + let exit_account_bytes: [u8; 32] = (*account_data.exit_account) + .as_ref() + .try_into() + .map_err(|_| Error::::InvalidAggregatedPublicInputs)?; + + if exit_account_bytes == [0u8; 32] && account_data.summed_output_amount == 0 { + continue; + } + // Convert output amount to Balance type (scale up from quantized value) let exit_balance_u128 = (account_data.summed_output_amount as u128) .saturating_mul(crate::SCALE_DOWN_FACTOR); @@ -574,10 +585,6 @@ pub mod pallet { .map_err(|_| Error::::InvalidAggregatedPublicInputs)?; // Decode exit account from public inputs - let exit_account_bytes: [u8; 32] = (*account_data.exit_account) - .as_ref() - .try_into() - .map_err(|_| Error::::InvalidAggregatedPublicInputs)?; let exit_account = ::AccountId::decode(&mut &exit_account_bytes[..]) .map_err(|_| Error::::InvalidAggregatedPublicInputs)?;