Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,21 @@ anyhow = "1.0"

qp-plonky2 = { version = "1.5.5", default-features = false, features = ["rand", "std"] }
qp-plonky2-verifier = { version = "1.5.5", default-features = false }
qp-wormhole-aggregator = { version = "4.2.0", default-features = false, features = ["rayon", "std"] }
qp-wormhole-circuit = { version = "4.2.0", default-features = false, features = ["std"] }
qp-wormhole-circuit-builder = { version = "4.2.0" }
qp-wormhole-inputs = { version = "4.2.0", default-features = false, features = ["std"] }
qp-wormhole-prover = { version = "4.2.0", default-features = false, features = ["std"] }
qp-wormhole-verifier = { version = "4.2.0", default-features = false, features = ["std"] }
qp-zk-circuits-common = { version = "4.2.0", default-features = false, features = ["std"] }
qp-wormhole-aggregator = { version = "4.3.0", default-features = false, features = ["rayon", "std"] }
qp-wormhole-circuit = { version = "4.3.0", default-features = false, features = ["std"] }
qp-wormhole-circuit-builder = { version = "4.3.0" }
qp-wormhole-inputs = { version = "4.3.0", default-features = false, features = ["std"] }
qp-wormhole-prover = { version = "4.3.0", default-features = false, features = ["std"] }
qp-wormhole-verifier = { version = "4.3.0", default-features = false, features = ["std"] }
qp-zk-circuits-common = { version = "4.3.0", default-features = false, features = ["std"] }

[target.'cfg(unix)'.dependencies]
libc = "0.2"

[build-dependencies]
hex = "0.4"
qp-poseidon-core = "3.1.0"
qp-wormhole-circuit-builder = { version = "4.2.0" }
qp-wormhole-circuit-builder = { version = "4.3.0" }
sha2 = "0.10"

[dev-dependencies]
Expand Down
9 changes: 5 additions & 4 deletions src/cli/wormhole.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4786,13 +4786,13 @@ mod tests {
use qp_wormhole_inputs::{
ASSET_ID_INDEX, BLOCK_HASH_END_INDEX, BLOCK_HASH_START_INDEX, BLOCK_NUMBER_INDEX,
EXIT_ACCOUNT_1_END_INDEX, EXIT_ACCOUNT_1_START_INDEX, EXIT_ACCOUNT_2_END_INDEX,
EXIT_ACCOUNT_2_START_INDEX, NULLIFIER_END_INDEX, NULLIFIER_START_INDEX,
OUTPUT_AMOUNT_1_INDEX, OUTPUT_AMOUNT_2_INDEX, PUBLIC_INPUTS_FELTS_LEN,
VOLUME_FEE_BPS_INDEX,
EXIT_ACCOUNT_2_START_INDEX, INPUT_AMOUNT_INDEX, NULLIFIER_END_INDEX,
NULLIFIER_START_INDEX, OUTPUT_AMOUNT_1_INDEX, OUTPUT_AMOUNT_2_INDEX,
PUBLIC_INPUTS_FELTS_LEN, VOLUME_FEE_BPS_INDEX,
};

// Verify expected public inputs layout for dual-output circuit
assert_eq!(PUBLIC_INPUTS_FELTS_LEN, 21, "Public inputs should be 21 field elements");
assert_eq!(PUBLIC_INPUTS_FELTS_LEN, 22, "Public inputs should be 22 field elements");
assert_eq!(ASSET_ID_INDEX, 0, "Asset ID should be first");
assert_eq!(OUTPUT_AMOUNT_1_INDEX, 1, "Output amount 1 should be at index 1");
assert_eq!(OUTPUT_AMOUNT_2_INDEX, 2, "Output amount 2 should be at index 2");
Expand All @@ -4806,6 +4806,7 @@ mod tests {
assert_eq!(BLOCK_HASH_START_INDEX, 16, "Block hash should start at index 16");
assert_eq!(BLOCK_HASH_END_INDEX, 20, "Block hash should end at index 20");
assert_eq!(BLOCK_NUMBER_INDEX, 20, "Block number should be at index 20");
assert_eq!(INPUT_AMOUNT_INDEX, 21, "Input amount should be at index 21");
}

/// Test that constants match expected on-chain configuration
Expand Down
2 changes: 1 addition & 1 deletion src/wormhole_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ fn generate_proof_inner(input: &ProofGenerationInput) -> Result<ProofGenerationO
exit_account_2,
block_hash,
block_number: input.block_number,
input_amount: input.input_amount,
},
private: PrivateCircuitInputs {
secret: Secret::from(secret_digest.0),
Expand All @@ -333,7 +334,6 @@ fn generate_proof_inner(input: &ProofGenerationInput) -> Result<ProofGenerationO
state_root,
extrinsics_root,
digest: digest_padded,
input_amount: input.input_amount,
zk_tree_root: input.zk_tree_root,
zk_merkle_siblings: input.zk_merkle_siblings.clone(),
zk_merkle_positions: input.zk_merkle_positions.clone(),
Expand Down
Loading