rename module

This commit is contained in:
Dmitry Vagner 2023-01-17 16:11:15 +07:00
parent ccd4a38ab4
commit 31c5db91a5
7 changed files with 10 additions and 5 deletions

View File

@ -1,6 +1,6 @@
use ethereum_types::U256;
use crate::bn254::BN_BASE;
use crate::bn254_arithmetic::BN_BASE;
use crate::util::{addmod, mulmod, submod};
mod add;

View File

@ -1,3 +1,4 @@
use std::ops::{Add, Div, Mul, Sub};
use std::str::FromStr;
use ethereum_types::U256;
@ -11,6 +12,10 @@ pub const BN_BASE: U256 = U256([
0x30644e72e131a029,
]);
// pub struct Fp {
// val: U256,
// }
pub type Fp = U256;
pub type Fp2 = [U256; 2];
pub type Fp6 = [Fp2; 3];

View File

View File

@ -7,7 +7,7 @@ use ethereum_types::{U256, U512};
use keccak_hash::keccak;
use plonky2::field::goldilocks_field::GoldilocksField;
use crate::bn254::BN_BASE;
use crate::bn254_arithmetic::BN_BASE;
use crate::cpu::kernel::aggregator::KERNEL;
use crate::cpu::kernel::constants::context_metadata::ContextMetadata;
use crate::cpu::kernel::constants::global_metadata::GlobalMetadata;

View File

@ -3,7 +3,7 @@ use std::str::FromStr;
use anyhow::Result;
use ethereum_types::U256;
use crate::bn254::{
use crate::bn254_arithmetic::{
curve_generator, fp12_to_vec, frob_fp12, gen_fp12, gen_fp12_sparse, miller_loop, mul_fp12,
power, tate, twisted_curve_generator, Curve, Fp12, TwistedCurve,
};

View File

@ -3,7 +3,7 @@ use std::str::FromStr;
use ethereum_types::{BigEndianHash, H256, U256};
use plonky2::field::types::Field;
use crate::bn254::{fp12_to_array, inv_fp12, vec_to_fp12};
use crate::bn254_arithmetic::{fp12_to_array, inv_fp12, vec_to_fp12};
use crate::generation::prover_input::EvmField::{
Bn254Base, Bn254Scalar, Secp256k1Base, Secp256k1Scalar,
};

View File

@ -8,7 +8,7 @@
pub mod all_stark;
pub mod arithmetic;
pub mod bn254;
pub mod bn254_arithmetic;
pub mod config;
pub mod constraint_consumer;
pub mod cpu;