From 748496442b6847537a2444aabd35f83160b60d2a Mon Sep 17 00:00:00 2001 From: Daniel Lubarov Date: Wed, 24 Aug 2022 10:19:08 -0700 Subject: [PATCH] Include degree in circuit digest --- plonky2/src/plonk/circuit_builder.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plonky2/src/plonk/circuit_builder.rs b/plonky2/src/plonk/circuit_builder.rs index 9da07a2e..6728551c 100644 --- a/plonky2/src/plonk/circuit_builder.rs +++ b/plonky2/src/plonk/circuit_builder.rs @@ -794,7 +794,10 @@ impl, const D: usize> CircuitBuilder { // TODO: This should also include an encoding of gate constraints. let circuit_digest_parts = [ constants_sigmas_cap.flatten(), - vec![/* Add other circuit data here */], + vec![ + F::from_canonical_usize(degree_bits), + /* Add other circuit data here */ + ], ]; let circuit_digest = C::Hasher::hash_no_pad(&circuit_digest_parts.concat());