Skip to content

Commit

Permalink
Requested PR changes for #310 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
BGluth committed Aug 9, 2024
1 parent 49fa8da commit e9a6307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zero_bin/common/src/prover_state/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ const ZK_EVM_WORKSPACE_DIR_ENV: &str = "ZK_EVM_WORKSPACE_DIR";
/// We version serialized circuits by the kernel hash they were serialized with,
/// but we really only need a few of the starting hex nibbles to reliably
/// differentiate.
const NUM_HASH_NIBS_TO_USE_IN_CIRCUIT_VERSION: usize = 8;
const KERNEL_HASH_PREFIX: usize = 8;

/// When we serialize/deserialize circuits, we rely on the hash of the plonky
/// kernel to determine if the circuit is compatible with our current binary. If
/// the kernel hash of the circuit that we are loading in from disk differs,
/// then using these circuits could potentially lead to incorrect results (but
/// most likely just a crash).
static CIRCUIT_VERSION: Lazy<String> =
Lazy::new(|| hex::encode(KERNEL.hash())[..NUM_HASH_NIBS_TO_USE_IN_CIRCUIT_VERSION].to_string());
Lazy::new(|| hex::encode(KERNEL.hash())[..KERNEL_HASH_PREFIX].to_string());

fn get_serializers() -> (
DefaultGateSerializer,
Expand Down

0 comments on commit e9a6307

Please sign in to comment.