Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

function for computing wrapper PI + test #28

Merged
merged 17 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- name: Setup rust
run: |
rustup set profile minimal
rustup toolchain install nightly-2023-08-23
rustup default nightly-2023-08-23
- run: cargo build --verbose
- run: cargo test --verbose --all --no-run

Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ rescue_poseidon = {git = "https://github.com/matter-labs/rescue-poseidon.git", b

zkevm-assembly = {git = "https://github.com/matter-labs/era-zkEVM-assembly.git", branch = "v1.3.2"}

rand = "0.4"
rayon = "*"
derivative = "*"
hex = "*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,21 @@ pub type CompressionMode1Circuit = CompressionLayerCircuit<CompressionMode1>;
pub type CompressionMode2Circuit = CompressionLayerCircuit<CompressionMode2>;
pub type CompressionMode3Circuit = CompressionLayerCircuit<CompressionMode3>;
pub type CompressionMode4Circuit = CompressionLayerCircuit<CompressionMode4>;
pub type CompressionModeToL1Circuit = CompressionLayerCircuit<CompressionModeToL1>;
pub type CompressionMode5Circuit = CompressionLayerCircuit<CompressionMode5>;

pub type CompressionMode1ForWrapperCircuit = CompressionLayerCircuit<CompressionMode1ForWrapper>;
pub type CompressionMode2ForWrapperCircuit = CompressionLayerCircuit<CompressionMode2ForWrapper>;
pub type CompressionMode3ForWrapperCircuit = CompressionLayerCircuit<CompressionMode3ForWrapper>;
pub type CompressionMode4ForWrapperCircuit = CompressionLayerCircuit<CompressionMode4ForWrapper>;
pub type CompressionModeToL1ForWrapperCircuit =
CompressionLayerCircuit<CompressionModeToL1ForWrapper>;
pub type CompressionMode5ForWrapperCircuit = CompressionLayerCircuit<CompressionMode5ForWrapper>;

use crate::circuit_definitions::traits::circuit::CircuitBuilderProxy;

pub type CompressionMode1CircuitBuilder = CircuitBuilderProxy<F, CompressionMode1Circuit>;
pub type CompressionMode2CircuitBuilder = CircuitBuilderProxy<F, CompressionMode2Circuit>;
pub type CompressionMode3CircuitBuilder = CircuitBuilderProxy<F, CompressionMode3Circuit>;
pub type CompressionMode4CircuitBuilder = CircuitBuilderProxy<F, CompressionMode4Circuit>;
pub type CompressionModeToL1CircuitBuilder = CircuitBuilderProxy<F, CompressionModeToL1Circuit>;
pub type CompressionMode5CircuitBuilder = CircuitBuilderProxy<F, CompressionMode5Circuit>;

pub type CompressionMode1ForWrapperCircuitBuilder =
CircuitBuilderProxy<F, CompressionMode1ForWrapperCircuit>;
Expand All @@ -179,5 +178,5 @@ pub type CompressionMode3ForWrapperCircuitBuilder =
CircuitBuilderProxy<F, CompressionMode3ForWrapperCircuit>;
pub type CompressionMode4ForWrapperCircuitBuilder =
CircuitBuilderProxy<F, CompressionMode4ForWrapperCircuit>;
pub type CompressionModeToL1ForWrapperCircuitBuilder =
CircuitBuilderProxy<F, CompressionModeToL1ForWrapperCircuit>;
pub type CompressionMode5ForWrapperCircuitBuilder =
CircuitBuilderProxy<F, CompressionMode5ForWrapperCircuit>;
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,17 @@ pub mod mode_3;
pub mod mode_3_for_wrapper;
pub mod mode_4;
pub mod mode_4_for_wrapper;
pub mod mode_to_l1;
pub mod mode_to_l1_for_wrapper;
pub mod mode_5;
pub mod mode_5_for_wrapper;

pub use self::mode_1::*;
pub use self::mode_2::*;
pub use self::mode_3::*;
pub use self::mode_4::*;
pub use self::mode_to_l1::*;
pub use self::mode_5::*;

pub use self::mode_1_for_wrapper::*;
pub use self::mode_2_for_wrapper::*;
pub use self::mode_3_for_wrapper::*;
pub use self::mode_4_for_wrapper::*;
pub use self::mode_to_l1_for_wrapper::*;
pub use self::mode_5_for_wrapper::*;
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use crate::circuit_definitions::implementations::transcript::Keccak256Transcript

// no lookup, just enough copiable width, moderate LDE factor,
// and matrix multiplication gate,
pub struct CompressionModeToL1;
pub struct CompressionMode5;

impl ProofCompressionFunction for CompressionModeToL1 {
impl ProofCompressionFunction for CompressionMode5 {
// no PoW from the previous step
type PreviousLayerPoW = NoPow;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
use super::*;
use crate::boojum::gadgets::traits::configuration::ConfigurationFunction;
use crate::boojum::sha3::Keccak256;
use crate::circuit_definitions::implementations::transcript::Keccak256Transcript;

// no lookup, just enough copiable width, moderate LDE factor,
// and matrix multiplication gate,
pub struct CompressionModeToL1ForWrapper;
pub struct CompressionMode5ForWrapper;

impl ProofCompressionFunction for CompressionModeToL1ForWrapper {
impl ProofCompressionFunction for CompressionMode5ForWrapper {
// no PoW from the previous step
type PreviousLayerPoW = NoPow;

Expand Down Expand Up @@ -102,7 +100,7 @@ impl ProofCompressionFunction for CompressionModeToL1ForWrapper {
merkle_tree_cap_size: 8,
fri_folding_schedule: None,
security_level: crate::L1_SECURITY_BITS,
pow_bits: 28,
pow_bits: 0,
}
}

Expand Down
Loading