Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4e09db1
Ledger + VRF: use public fields instead of methods from proof-systems
dannywillems Sep 2, 2025
28a3ed0
Cargo: remove all deps on forks
dannywillems Sep 2, 2025
ad27fd5
poseidon: stop using in-house FromBytes implementation
dannywillems Sep 2, 2025
52a2b8c
mina-p2p-messages: copy definition of InvalidBigInt
dannywillems Sep 2, 2025
49528bf
mina-p2p-messages: stop using fork of ark_ff
dannywillems Sep 2, 2025
ef5a7cc
ledger/pi: use from_hex from FieldHelpers
dannywillems Sep 3, 2025
8d83f74
ledger/account: use from_le_bytes_mod_order instead of FromBytes
dannywillems Sep 3, 2025
a2001d5
ledger/staged: remove usage of ToBytes
dannywillems Sep 3, 2025
df2bff9
ledger/staged: add value for packed parameter of signer.sign
dannywillems Sep 3, 2025
c8bed60
VRF: use serde from workspace
dannywillems Sep 3, 2025
b74210c
Use parametrized BigInt
dannywillems Sep 3, 2025
ebc3030
Deps: use num-bigint-generic
dannywillems Sep 4, 2025
461b62c
mina-p2p-messages: back to parametrized rational lib
dannywillems Sep 7, 2025
08c12da
Rename feature num-bigint to num-bigint-generic
dannywillems Sep 7, 2025
f1a739a
Cargo.lock: add num-rational-generic
dannywillems Sep 7, 2025
b5c7d0c
Deps: bump up proof-systems
dannywillems Sep 7, 2025
2f6cb30
Deps: use num-rational-generic from workspace
dannywillems Sep 7, 2025
a37dfe1
VRF/deps: use num_bigint_generic instead of num
dannywillems Sep 7, 2025
5145266
Deps: use num-bigint from workspace
dannywillems Sep 7, 2025
523320b
VRF/threshold: use num_bigint_generic
dannywillems Sep 7, 2025
67fe839
VRF/lib: remove useless import of Mul
dannywillems Sep 7, 2025
83820ac
num-rational-generic: use BigRational without type param
dannywillems Sep 7, 2025
7e6a9b2
num-rational-generic: use generic suffix instead of num-rational
dannywillems Sep 7, 2025
8a67541
num-bigint-generic: downgrade to 0.4.4
dannywillems Sep 7, 2025
5bb03cb
mina-p2p-messages: use to_string directly on BigInt.0
dannywillems Sep 7, 2025
83b0866
Use generic for bigint and big-rational
dannywillems Sep 7, 2025
d6ba0f3
Deps: add num-traits to workspace
dannywillems Sep 7, 2025
82fa4e3
Deps: add num-bigint-generic features to num-rational-generic
dannywillems Sep 7, 2025
58fe098
VRF: do not use num directly but use vendor
dannywillems Sep 7, 2025
e8a4dff
WIP
dannywillems Sep 8, 2025
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
58 changes: 36 additions & 22 deletions Cargo.lock

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

75 changes: 24 additions & 51 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,36 @@ arithmetic_side_effects = "warn"
indexing_slicing = "warn"

[workspace.dependencies]
ledger = { path = "ledger", package = "mina-tree" }
mina-p2p-messages = { path = "mina-p2p-messages" }
poseidon = { path = "poseidon" }

# UNCOMMENTED_IN_CI mina-curves = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203", features = [ "32x9" ] }
kimchi = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }
mina-curves = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }
mina-hasher = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }
mina-poseidon = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }
mina-signer = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }
o1-utils = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }
poly-commitment = { git = "https://github.com/openmina/proof-systems", rev = "d1912bca54d2609296b9af9d09ad1ef78702e203" }

# kimchi.path = "../deps/proof-systems/kimchi"
# mina-curves.path = "../deps/proof-systems/curves"
# mina-hasher.path = "../deps/proof-systems/hasher"
# mina-poseidon.path = "../deps/proof-systems/poseidon"
# mina-signer.path = "../deps/proof-systems/signer"
# o1-utils.path = "../deps/proof-systems/utils"
# poly-commitment.path = "../deps/proof-systems/poly-commitment"
# UNCOMMENTED_IN_CI ark-ff = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode", features = ["parallel", "asm", "std", "32x9" ] }

ark-ec = { version = "0.5", features = ["std"] }
ark-ff = { version = "0.5", features = ["parallel", "asm", "std"] }
ark-poly = { version = "0.5" }
ark-serialize = { version = "0.5", features = ["std"] }
graphannis-malloc_size_of = { git = "https://github.com/openmina/graphannis-malloc_size_of.git", rev = "f7da9f6" }
graphannis-malloc_size_of_derive = { git = "https://github.com/openmina/graphannis-malloc_size_of_derive.git" }
juniper = { version = "0.16" }
kimchi = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
ledger = { path = "ledger", package = "mina-tree" }
libp2p = { git = "https://github.com/openmina/rust-libp2p", rev = "5c44c7d9", default-features = false }
linkme = "0.3.22"
mina-curves = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
mina-hasher = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
mina-node-account = { path = "node/account" }
mina-p2p-messages = { path = "mina-p2p-messages" }
mina-poseidon = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
mina-producer-dashboard = { path = "producer-dashboard" }
mina-signer = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
num-bigint = { version = "0.4.6" }
num-bigint-generic = { path = "./vendor/num-bigint-generic" }
num-rational-generic = { path = "./vendor/num-rational-generic", features = [
"num-bigint-generic",
] }
num-traits = "0.2"
o1-utils = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
poly-commitment = { git = "https://github.com/o1-labs/proof-systems", rev = "c513810dddec410c4065df359a66b1adfdf1aa23" }
poseidon = { path = "poseidon" }
redux = { git = "https://github.com/o1-labs/redux-rs.git", rev = "06c8366", features = [
"serde",
] }
Expand All @@ -82,29 +87,6 @@ serde_with = { version = "3.7.0", features = ["hex"] }
static_assertions = "1.1.0"
vrf = { path = "vrf" }


ark-ec = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode", features = [
"std",
] }
ark-ff = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode", features = [
"parallel",
"asm",
"std",
] }
ark-poly = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode" }
ark-serialize = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode", features = [
"std",
] }

num-bigint = { git = "https://github.com/openmina/num-bigint", branch = "rebase-onstack" } # branch: rebase-onstack

# UNCOMMENTED_IN_CI ark-ff = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode", features = ["parallel", "asm", "std", "32x9" ] }

graphannis-malloc_size_of = { git = "https://github.com/openmina/graphannis-malloc_size_of.git", rev = "f7da9f6" }
graphannis-malloc_size_of_derive = { git = "https://github.com/openmina/graphannis-malloc_size_of_derive.git" }

mina-producer-dashboard = { path = "producer-dashboard" }

[profile.fuzz]
inherits = "release"
opt-level = 3
Expand All @@ -116,15 +98,6 @@ panic = "abort"
incremental = false
codegen-units = 1

[patch.crates-io]
ark-ff = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode" }
ark-ec = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode" }
ark-poly = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode" }
ark-serialize = { git = "https://github.com/openmina/algebra", branch = "rebase-fix-openmina-webnode" }

num-bigint = { git = "https://github.com/openmina/num-bigint", branch = "rebase-onstack" } # branch: rebase-onstack
num-rational = { git = "https://github.com/openmina/num-rational", branch = "rebase-onstack" } # branch: rebase-onstack

[profile.test.package."*"]
opt-level = 3
debug-assertions = true
Expand Down
3 changes: 1 addition & 2 deletions core/src/block/block_with_hash.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use ark_ff::fields::arithmetic::InvalidBigInt;
use mina_p2p_messages::v2;
use mina_p2p_messages::{bigint::InvalidBigInt, v2};
use redux::Timestamp;
use serde::{Deserialize, Serialize};

Expand Down
6 changes: 4 additions & 2 deletions core/src/block/genesis.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use ark_ff::fields::arithmetic::InvalidBigInt;
use mina_p2p_messages::v2::{self, StateHash};
use mina_p2p_messages::{
bigint::InvalidBigInt,
v2::{self, StateHash},
};

use crate::constants::{constraint_constants, slots_per_window};

Expand Down
8 changes: 3 additions & 5 deletions ledger/src/account/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,12 @@ impl TokenSymbol {
}

pub fn to_field<F: FieldWitness>(&self) -> F {
use ark_ff::FromBytes;

let mut s = <[u8; 32]>::default();
self.to_bytes(&mut s);

let value = FromBytes::read(&s[..]).expect("Shoudn't fail");
let bigint = BigInteger256::new(value);
F::from(bigint) // Never fail, `self` contain 6 bytes at most
// There is an assumption that a token symbol is on 6 bytes, therefore
// it will be smaller than the order
F::from_le_bytes_mod_order(&s)
}
}

Expand Down
4 changes: 2 additions & 2 deletions ledger/src/account/conv.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#![allow(clippy::type_complexity)]

use ark_ec::short_weierstrass::Affine;
use ark_ff::{fields::arithmetic::InvalidBigInt, Field, PrimeField};
use ark_ff::{Field, PrimeField};
use mina_curves::pasta::Fp;
use mina_p2p_messages::{
bigint::BigInt,
bigint::{BigInt, InvalidBigInt},
binprot,
pseq::PaddedSeq,
v2::{
Expand Down
6 changes: 4 additions & 2 deletions ledger/src/proofs/accumulator_check.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use ark_ff::fields::arithmetic::InvalidBigInt;
use mina_curves::pasta::{Fp, Vesta};
use mina_p2p_messages::{bigint::BigInt, v2::PicklesProofProofsVerified2ReprStableV2};
use mina_p2p_messages::{
bigint::{BigInt, InvalidBigInt},
v2::PicklesProofProofsVerified2ReprStableV2,
};
use poly_commitment::{commitment::CommitmentCurve, ipa::SRS};

use super::{public_input::scalar_challenge::ScalarChallenge, urs_utils};
Expand Down
Loading
Loading