diff --git a/src/circuit/gadget/poseidon/pow5.rs b/src/circuit/gadget/poseidon/pow5.rs index f8ba67c4..639a4545 100644 --- a/src/circuit/gadget/poseidon/pow5.rs +++ b/src/circuit/gadget/poseidon/pow5.rs @@ -823,6 +823,22 @@ mod tests { assert_eq!(prover.verify(), Ok(())) } + #[test] + fn poseidon_hash_longer_input() { + let message = [Fp::rand(), Fp::rand(), Fp::rand()]; + let output = + poseidon::Hash::<_, OrchardNullifier, ConstantLength<3>, 3, 2>::init().hash(message); + + let k = 7; + let circuit = HashCircuit:: { + message: Some(message), + output: Some(output), + _spec: PhantomData, + }; + let prover = MockProver::run(k, &circuit, vec![]).unwrap(); + assert_eq!(prover.verify(), Ok(())) + } + #[test] fn hash_test_vectors() { for tv in crate::primitives::poseidon::test_vectors::fp::hash() {