-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the code more coherent and included also the 1.2 version in the …
…local source. - Some refactor - removed unused files
- Loading branch information
Showing
13 changed files
with
45,244 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
// Copyright Copyright 2024, Horizen Labs, Inc. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
use risc0_core::field::baby_bear::BabyBear; | ||
|
||
use risc0_zkp::{ | ||
adapter::{CircuitCoreDef, CircuitInfo, ProtocolInfo}, | ||
taps::TapSet, | ||
}; | ||
|
||
pub mod control_id; | ||
mod poly_ext; | ||
mod taps; | ||
|
||
pub const CIRCUIT: CircuitImpl = CircuitImpl::new(); | ||
pub struct CircuitImpl; | ||
|
||
impl CircuitImpl { | ||
const fn new() -> Self { | ||
CircuitImpl | ||
} | ||
} | ||
|
||
impl risc0_zkp::adapter::TapsProvider for CircuitImpl { | ||
fn get_taps(&self) -> &'static TapSet<'static> { | ||
taps::TAPSET | ||
} | ||
} | ||
|
||
impl CircuitInfo for CircuitImpl { | ||
#[rustfmt::skip] | ||
const CIRCUIT_INFO: ProtocolInfo = ProtocolInfo(*b"RV32IM:rev1v1___"); | ||
|
||
#[rustfmt::skip] | ||
const OUTPUT_SIZE: usize = 138; | ||
|
||
#[rustfmt::skip] | ||
const MIX_SIZE: usize = 40; | ||
} | ||
|
||
impl CircuitCoreDef<BabyBear> for CircuitImpl {} | ||
|
||
pub mod recursive { | ||
use risc0_zkp::{ | ||
adapter::{CircuitCoreDef, CircuitInfo, ProtocolInfo, TapsProvider}, | ||
field::baby_bear::BabyBear, | ||
taps::TapSet, | ||
}; | ||
|
||
#[allow(dead_code)] | ||
pub mod control_id; | ||
mod poly_ext; | ||
mod taps; | ||
|
||
/// This struct implements traits that are defined by code generated by the | ||
/// circuit definition. | ||
pub struct CircuitImpl; | ||
|
||
impl CircuitImpl { | ||
const fn new() -> Self { | ||
CircuitImpl | ||
} | ||
} | ||
|
||
impl TapsProvider for CircuitImpl { | ||
fn get_taps(&self) -> &'static TapSet<'static> { | ||
self::taps::TAPSET | ||
} | ||
} | ||
|
||
pub const CIRCUIT: CircuitImpl = CircuitImpl::new(); | ||
|
||
impl CircuitInfo for CircuitImpl { | ||
#[rustfmt::skip] | ||
const CIRCUIT_INFO: ProtocolInfo = ProtocolInfo(*b"RECURSION:rev1v1"); | ||
|
||
#[rustfmt::skip] | ||
const OUTPUT_SIZE: usize = 32; | ||
|
||
#[rustfmt::skip] | ||
const MIX_SIZE: usize = 20; | ||
} | ||
|
||
impl CircuitCoreDef<BabyBear> for CircuitImpl {} | ||
} |
Oops, something went wrong.