Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ graphannis-malloc_size_of_derive = { workspace = true }
ark-ff = { workspace = true }
hex = "0.4.3"
libp2p-identity = { version = "=0.2.7", features = ["serde", "peerid"] }
mina-curves = { workspace = true }
mina-hasher = { workspace = true }
mina-p2p-messages = { workspace = true }
poseidon = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion core/src/constants.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use binprot_derive::BinProtWrite;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::{bigint, number, v2};

pub const GENESIS_PRODUCER_SK: &str = "EKFKgDtU3rcuFTVSEpmpXSkukjmX4cKefYREi6Sdsk7E7wsT7KRw";
Expand Down
4 changes: 2 additions & 2 deletions core/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl NetworkConfig {
pub mod devnet {
use super::{CircuitsConfig, NetworkId};
use crate::constants::{ConstraintConstants, ForkConstants};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

pub const NETWORK_ID: NetworkId = NetworkId::TESTNET;
pub const NAME: &str = "devnet";
Expand Down Expand Up @@ -194,7 +194,7 @@ pub mod devnet {
pub mod mainnet {
use super::{CircuitsConfig, NetworkId};
use crate::constants::{ConstraintConstants, ForkConstants};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

pub const NETWORK_ID: NetworkId = NetworkId::MAINNET;
pub const NAME: &str = "mainnet";
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/account/account.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{io::Cursor, str::FromStr, sync::Arc};

use ark_ff::{BigInteger256, One, UniformRand, Zero};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::{
binprot::{BinProtRead, BinProtWrite},
v2,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/account/common.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::str::FromStr;

use ark_ff::{UniformRand, Zero};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use o1_utils::{field_helpers::FieldHelpersError, FieldHelpers};
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/account/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use ark_ec::short_weierstrass_jacobian::GroupAffine;
use ark_ff::{fields::arithmetic::InvalidBigInt, Field, PrimeField};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::{
bigint::BigInt,
binprot,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
sync::atomic::AtomicU64,
};

use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::CompressedPubKey;
use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mod tests {
#[test]
fn test_cache() {
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

static COUNTER: AtomicUsize = AtomicUsize::new(0);

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/database/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
sync::{Arc, Mutex},
};

use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::CompressedPubKey;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/database/database_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
path::PathBuf,
};

use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::CompressedPubKey;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/ffi/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{

use ark_ff::BigInteger256;
use binprot::BinProtWrite;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::{
bigint::BigInt,
binprot,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/ffi/mask.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{borrow::Borrow, cell::RefCell, rc::Rc, str::FromStr};

use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2::NonZeroCurvePointUncompressedStableV1;
use ocaml_interop::{
impl_to_ocaml_polymorphic_variant, impl_to_ocaml_variant, ocaml_export, DynBox, OCaml,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/generators/zkapp_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
};

use ark_ff::{UniformRand, Zero};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::{CompressedPubKey, Keypair, Signature};
use rand::{
rngs::ThreadRng,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::CompressedPubKey;

use crate::{proofs::witness::Witness, scan_state::currency};
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/mask/mask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
sync::{Arc, Mutex},
};

use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::CompressedPubKey;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/mask/mask_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
path::PathBuf,
};

use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_signer::CompressedPubKey;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/port_ocaml/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::hash::Hasher;

use ark_ff::{BigInteger, BigInteger256};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

use crate::AccountId;

Expand Down
14 changes: 7 additions & 7 deletions ledger/src/poseidon/fp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ mod tests {
.collect::<Vec<_>>();
let mina_fps = CONSTANTS
.iter()
.map(|s| mina_hasher::Fp::from_str(s).unwrap())
.map(|s| mina_curves::pasta::Fp::from_str(s).unwrap())
.collect::<Vec<_>>();

let mut fp = fps[0].clone();
Expand All @@ -545,7 +545,7 @@ mod tests {
assert_eq!(fp.0, mina_fp.0 .0);

// let fp = Fp::from_str(CONSTANTS[0]).unwrap();
// let mina_fp = mina_hasher::Fp::from_str(CONSTANTS[0]).unwrap();
// let mina_fp = mina_curves::pasta::Fp::from_str(CONSTANTS[0]).unwrap();

// for s in CONSTANTS {
// fp.mul_assign(s);
Expand All @@ -554,12 +554,12 @@ mod tests {

#[test]
fn test_fp() {
assert_eq!(Fp::zero().0, mina_hasher::Fp::zero().0 .0);
assert_eq!(Fp::from(10).0, mina_hasher::Fp::from(10).0 .0);
assert_eq!(Fp::zero().0, mina_curves::pasta::Fp::zero().0 .0);
assert_eq!(Fp::from(10).0, mina_curves::pasta::Fp::from(10).0 .0);

for s in CONSTANTS {
let fp = Fp::from_str(s).unwrap();
let mina_fp = mina_hasher::Fp::from_str(s).unwrap();
let mina_fp = mina_curves::pasta::Fp::from_str(s).unwrap();
assert_eq!(fp.0, mina_fp.0 .0);

assert_eq!(fp.into_repr(), mina_fp.into_repr().0)
Expand All @@ -571,8 +571,8 @@ mod tests {

let mut fp1 = Fp::from_str(s1).unwrap();
let fp2 = Fp::from_str(s2).unwrap();
let mut mina_fp1 = mina_hasher::Fp::from_str(s1).unwrap();
let mina_fp2 = mina_hasher::Fp::from_str(s2).unwrap();
let mut mina_fp1 = mina_curves::pasta::Fp::from_str(s1).unwrap();
let mina_fp2 = mina_curves::pasta::Fp::from_str(s2).unwrap();

fp1.mul_assign(&fp2);
mina_fp1.mul_assign(mina_fp2);
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/accumulator_check.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ark_ff::fields::arithmetic::InvalidBigInt;
use mina_curves::pasta::Vesta;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::{bigint::BigInt, v2::PicklesProofProofsVerified2ReprStableV2};
use poly_commitment::{commitment::CommitmentCurve, srs::SRS};

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use anyhow::Context;
use ark_ff::fields::arithmetic::InvalidBigInt;
use consensus::ConsensusState;
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2;
use openmina_core::constants::{constraint_constants, ForkConstants};
use poseidon::hash::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/constants.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ark_ff::{One, Zero};
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

use super::{
field::Boolean,
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/conv.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ark_ff::fields::arithmetic::InvalidBigInt;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2;

use crate::scan_state::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use kimchi::curve::KimchiCurve;
use mina_curves::pasta::{
Fq, PallasParameters, ProjectivePallas, ProjectiveVesta, VestaParameters,
};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_poseidon::{constants::PlonkSpongeConstantsKimchi, sponge::DefaultFqSponge};

use poseidon::SpongeParamsForField;
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/group_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pub mod bw19 {
}

use ark_ff::{FpParameters, One};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

use self::tock::Conic;

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::proofs::{
};
use ark_ff::fields::arithmetic::InvalidBigInt;
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2;

use crate::{
Expand Down
6 changes: 3 additions & 3 deletions ledger/src/proofs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ pub type ProverProof<F> = kimchi::proof::ProverProof<
pub fn generate_tx_proof(
params: transaction::TransactionParams,
) -> anyhow::Result<wrap::WrapProof> {
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use witness::Witness;
let mut w: Witness<Fp> = Witness::new::<constants::StepTransactionProof>();
transaction::generate_tx_proof(params, &mut w)
}
pub fn generate_merge_proof(params: merge::MergeParams) -> anyhow::Result<wrap::WrapProof> {
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use witness::Witness;
let mut w: Witness<Fp> = Witness::new::<constants::StepMergeProof>();
merge::generate_merge_proof(params, &mut w)
}
pub fn generate_block_proof(params: block::BlockParams) -> anyhow::Result<wrap::WrapProof> {
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use witness::Witness;
let mut w: Witness<Fp> = Witness::new::<constants::StepBlockProof>();
block::generate_block_proof(params, &mut w)
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/numbers/nat.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

use crate::{
proofs::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use kimchi::{
proof::{PointEvaluations, ProofEvaluations, ProverCommitments, RecursionChallenge},
};
use mina_curves::pasta::Pallas;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use once_cell::sync::Lazy;
use poly_commitment::{commitment::CommitmentCurve, evaluation_proof::OpeningProof};

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/provers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{collections::HashMap, path::Path, sync::Arc};

use kimchi::circuits::gate::CircuitGate;
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use once_cell::sync::OnceCell;
use openmina_core::network::CircuitsConfig;

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/public_input/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::proofs::{
use ark_ec::short_weierstrass_jacobian::GroupAffine;
use ark_ff::{BigInteger256, PrimeField};
use mina_curves::pasta::{Fq, Pallas};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use poly_commitment::PolyComm;

use poseidon::hash::hash_fields;
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/public_input/plonk_checks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use kimchi::{
proof::{PointEvaluations, ProofEvaluations},
};
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

use crate::{
proofs::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/public_input/prepared_statement.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ark_ff::{BigInteger256, Zero};
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2::{
CompositionTypesBranchDataStableV1, PicklesBaseProofsVerifiedStableV1,
};
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/public_input/protocol_state.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2::MinaBaseProtocolConstantsCheckedValueStableV1;

use crate::{
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/public_input/scalar_challenge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ mod tests {
use super::*;

use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

#[cfg(target_family = "wasm")]
use wasm_bindgen_test::wasm_bindgen_test as test;
Expand Down
4 changes: 2 additions & 2 deletions ledger/src/proofs/public_input/scalars.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ark_ff::{fields::arithmetic::InvalidBigInt, BigInteger256, Field, FromBytes};
use kimchi::proof::ProofEvaluations;
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;

use crate::proofs::field::FieldWitness;

Expand Down Expand Up @@ -689,7 +689,7 @@ mod tests {
linearization::{constraints_expr, linearization_columns},
};
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use sha2::{Digest, Sha256};
#[cfg(target_family = "wasm")]
use wasm_bindgen_test::wasm_bindgen_test as test;
Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use ark_poly::{
};
use kimchi::proof::{PointEvaluations, ProverCommitments, RecursionChallenge};
use mina_curves::pasta::{Fq, Pallas};
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::v2;
use poly_commitment::{commitment::b_poly_coefficients, evaluation_proof::OpeningProof};

Expand Down
2 changes: 1 addition & 1 deletion ledger/src/proofs/to_field_elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
use ark_ff::{Field, One, Zero};
use kimchi::proof::{PointEvaluations, ProofEvaluations, ProverCommitments, ProverProof};
use mina_curves::pasta::Fq;
use mina_hasher::Fp;
use mina_curves::pasta::Fp;
use mina_p2p_messages::{string::ByteString, v2};
use mina_signer::CompressedPubKey;
use poly_commitment::evaluation_proof::OpeningProof;
Expand Down
Loading
Loading