Skip to content

Commit a810bed

Browse files
Copilotdannywillems
andcommitted
Replace mina_hasher::Fp with mina_curves::pasta::Fp in core and some ledger files
Co-authored-by: dannywillems <[email protected]>
1 parent 300707b commit a810bed

20 files changed

+25
-23
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ graphannis-malloc_size_of_derive = { workspace = true }
3535
ark-ff = { workspace = true }
3636
hex = "0.4.3"
3737
libp2p-identity = { version = "=0.2.7", features = ["serde", "peerid"] }
38+
mina-curves = { workspace = true }
3839
mina-hasher = { workspace = true }
3940
mina-p2p-messages = { workspace = true }
4041
poseidon = { workspace = true }

core/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use binprot_derive::BinProtWrite;
2-
use mina_hasher::Fp;
2+
use mina_curves::pasta::Fp;
33
use mina_p2p_messages::{bigint, number, v2};
44

55
pub const GENESIS_PRODUCER_SK: &str = "EKFKgDtU3rcuFTVSEpmpXSkukjmX4cKefYREi6Sdsk7E7wsT7KRw";

core/src/network.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl NetworkConfig {
111111
pub mod devnet {
112112
use super::{CircuitsConfig, NetworkId};
113113
use crate::constants::{ConstraintConstants, ForkConstants};
114-
use mina_hasher::Fp;
114+
use mina_curves::pasta::Fp;
115115

116116
pub const NETWORK_ID: NetworkId = NetworkId::TESTNET;
117117
pub const NAME: &str = "devnet";
@@ -194,7 +194,7 @@ pub mod devnet {
194194
pub mod mainnet {
195195
use super::{CircuitsConfig, NetworkId};
196196
use crate::constants::{ConstraintConstants, ForkConstants};
197-
use mina_hasher::Fp;
197+
use mina_curves::pasta::Fp;
198198

199199
pub const NETWORK_ID: NetworkId = NetworkId::MAINNET;
200200
pub const NAME: &str = "mainnet";

ledger/src/proofs/accumulator_check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use ark_ff::fields::arithmetic::InvalidBigInt;
22
use mina_curves::pasta::Vesta;
3-
use mina_hasher::Fp;
3+
use mina_curves::pasta::Fp;
44
use mina_p2p_messages::{bigint::BigInt, v2::PicklesProofProofsVerified2ReprStableV2};
55
use poly_commitment::{commitment::CommitmentCurve, srs::SRS};
66

ledger/src/proofs/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use ark_ff::{One, Zero};
22
use mina_curves::pasta::Fq;
3-
use mina_hasher::Fp;
3+
use mina_curves::pasta::Fp;
44

55
use super::{
66
field::Boolean,

ledger/src/proofs/group_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub mod bw19 {
9999
}
100100

101101
use ark_ff::{FpParameters, One};
102-
use mina_hasher::Fp;
102+
use mina_curves::pasta::Fp;
103103

104104
use self::tock::Conic;
105105

ledger/src/proofs/merge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::proofs::{
88
};
99
use ark_ff::fields::arithmetic::InvalidBigInt;
1010
use mina_curves::pasta::Fq;
11-
use mina_hasher::Fp;
11+
use mina_curves::pasta::Fp;
1212
use mina_p2p_messages::v2;
1313

1414
use crate::{

ledger/src/proofs/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,19 @@ pub type ProverProof<F> = kimchi::proof::ProverProof<
4747
pub fn generate_tx_proof(
4848
params: transaction::TransactionParams,
4949
) -> anyhow::Result<wrap::WrapProof> {
50-
use mina_hasher::Fp;
50+
use mina_curves::pasta::Fp;
5151
use witness::Witness;
5252
let mut w: Witness<Fp> = Witness::new::<constants::StepTransactionProof>();
5353
transaction::generate_tx_proof(params, &mut w)
5454
}
5555
pub fn generate_merge_proof(params: merge::MergeParams) -> anyhow::Result<wrap::WrapProof> {
56-
use mina_hasher::Fp;
56+
use mina_curves::pasta::Fp;
5757
use witness::Witness;
5858
let mut w: Witness<Fp> = Witness::new::<constants::StepMergeProof>();
5959
merge::generate_merge_proof(params, &mut w)
6060
}
6161
pub fn generate_block_proof(params: block::BlockParams) -> anyhow::Result<wrap::WrapProof> {
62-
use mina_hasher::Fp;
62+
use mina_curves::pasta::Fp;
6363
use witness::Witness;
6464
let mut w: Witness<Fp> = Witness::new::<constants::StepBlockProof>();
6565
block::generate_block_proof(params, &mut w)

ledger/src/proofs/numbers/nat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use mina_hasher::Fp;
1+
use mina_curves::pasta::Fp;
22

33
use crate::{
44
proofs::{

0 commit comments

Comments
 (0)