#![allow(non_snake_case)] use curve25519_dalek::ristretto::RistrettoPoint as G; use sigma_compiler::*; /// A statement with no variables and no equations binds nothing, so it is /// satisfied by the empty witness. sigma-proofs refuses to compile one: as a /// branch of a disjunction it would make the whole proof forgeable. /// /// The generated prover unwraps `compile`, so the refusal arrives as a panic /// rather than an `Err`. #[test] #[should_panic(expected = "the statement has no content")] fn emptystatement_test() { sigma_compiler! { proof, (), (), } let mut rng = rand::thread_rng(); let instance = proof::Instance {}; let witness = proof::Witness {}; assert!(proof::prove(&instance, &witness, b"emptystatement_test", &mut rng).is_err()); }