@ -30,3 +30,10 @@ Note: the Circom variant currently has a bit of extra overhead since at each fol
### Repo structure
- the Circom circuit (that defines the keccak-chain) to be folded is defined at [./circuit/keccak-chain.circom](https://github.com/arnaucube/hash-chain-sonobe/blob/main/circuit/keccak-chain.circom)
- the logic to fold the circuit using Sonobe is defined at [src/{sha_chain, keccak_chain}.rs](https://github.com/arnaucube/hash-chain-sonobe/blob/main/src)
## Other
Additionally there is the `src/naive_approach_sha_chain.rs` file, which mimics the amount of hashes computed by the `src/sha_chain.rs` file, but instead of folding it does it by building a big circuit that does all the hashes at once, as we would do before folding existed.
To run it: `cargo test --release naive_approach_sha_chain -- --nocapture`
// set how many iterations of the SHA256ChainCircuit circuit internal loop we want to
// compute
constN_STEPS: usize=50;
constHASHES_PER_STEP: usize=10;
println!("running the 'naive' SHA256ChainCircuit, with N_STEPS={}, HASHES_PER_STEP={}. Total hashes = {}",N_STEPS,HASHES_PER_STEP,N_STEPS*HASHES_PER_STEP);
println!("finished running the 'naive' SHA256ChainCircuit, with N_STEPS={}, HASHES_PER_STEP={}. Total hashes = {}",N_STEPS,HASHES_PER_STEP,N_STEPS*HASHES_PER_STEP);
// set how many steps of folding we want to compute
letn_steps=100;
constN_STEPS: usize=100;
constHASHES_PER_STEP: usize=10;
println!("running Nova folding scheme on SHA256FoldStepCircuit, with N_STEPS={}, HASHES_PER_STEP={}. Total hashes = {}",N_STEPS,HASHES_PER_STEP,N_STEPS*HASHES_PER_STEP);