Skip to content

Commit 62fd29f

Browse files
authored
Merge pull request #1646 from o1-labs/dw/ledger-rm-ocaml
Remove OCaml related code from mina-tree
2 parents 7f014b8 + 5e05e6b commit 62fd29f

File tree

29 files changed

+128
-407
lines changed

29 files changed

+128
-407
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Dependency**: use tag instead of references of o1-labs/proof-systems, fix
1313
[[#1674](https://github.com/o1-labs/mina-rust/issues/1674)]
1414
([#1673](https://github.com/o1-labs/mina-rust/pull/1673))
15+
- Remove ocaml-interop dependency, fix
16+
[#1235](https://github.com/o1-labs/mina-rust/issues/1235)
17+
([#1646](https://github.com/o1-labs/mina-rust/pull/1646))
1518

1619
### Removed
1720

Cargo.lock

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

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ num_cpus = "1.0"
160160
num_enum = "0.5.7"
161161
o1-utils = { git = "https://github.com/o1-labs/proof-systems", tag = "0.2.0" }
162162
object = "0.37.1"
163-
ocaml-interop = { git = "https://github.com/sebastiencs/ocaml-interop.git", branch = "closure-values" }
164163
once_cell = "1"
165164
p256 = { version = "0.13", features = ["default", "ecdh", "ecdsa"] }
166165
p384 = "0.13"

core/src/block/genesis.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
use crate::constants::{constraint_constants, slots_per_window};
12
use mina_p2p_messages::{
23
bigint::InvalidBigInt,
34
v2::{self, StateHash},
45
};
56

6-
use crate::constants::{constraint_constants, slots_per_window};
7-
87
#[allow(clippy::too_many_arguments)]
98
pub fn genesis_and_negative_one_protocol_states(
109
constants: v2::MinaBaseProtocolConstantsCheckedValueStableV1,

core/src/block/mod.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1-
mod block_with_hash;
2-
pub use block_with_hash::{BlockHeaderWithHash, BlockWithHash};
3-
41
mod applied_block;
5-
pub use applied_block::AppliedBlock;
6-
7-
pub mod prevalidate;
8-
2+
mod block_with_hash;
93
pub mod genesis;
4+
pub mod prevalidate;
105

11-
use std::sync::Arc;
12-
6+
pub use applied_block::AppliedBlock;
7+
pub use block_with_hash::{BlockHeaderWithHash, BlockWithHash};
138
pub use mina_p2p_messages::v2::{
149
MinaBlockBlockStableV2 as Block, MinaBlockHeaderStableV2 as BlockHeader, StateHash as BlockHash,
1510
};
1611

12+
use std::sync::Arc;
1713
pub type ArcBlock = Arc<Block>;
1814
pub type ArcBlockWithHash = BlockWithHash<Arc<Block>>;

core/src/block/prevalidate.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
use serde::{Deserialize, Serialize};
2-
31
use super::ArcBlockWithHash;
42
use crate::constants::PROTOCOL_VERSION;
3+
use serde::{Deserialize, Serialize};
54

65
#[derive(Serialize, Deserialize, Debug, Clone)]
76
pub enum BlockPrevalidationError {

ledger/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ wasm-bindgen-futures = { workspace = true }
6868

6969
[target.'cfg(not(target_family = "wasm"))'.dependencies]
7070
zstd = { workspace = true, optional = true }
71-
ocaml-interop = { workspace = true, optional = true }
7271
reqwest = { workspace = true, features = ["blocking"] }
7372

7473
[dev-dependencies]

ledger/dune

Lines changed: 0 additions & 23 deletions
This file was deleted.

ledger/mina_tree.ml

Lines changed: 0 additions & 152 deletions
This file was deleted.

ledger/src/account/account.rs

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
use std::{io::Cursor, str::FromStr, sync::Arc};
2-
3-
use ark_ff::{BigInteger256, One, UniformRand, Zero};
4-
use mina_core::constants::PROTOCOL_VERSION;
5-
use mina_curves::pasta::Fp;
6-
use mina_p2p_messages::{
7-
binprot::{BinProtRead, BinProtWrite},
8-
v2,
9-
};
10-
use mina_signer::CompressedPubKey;
11-
use once_cell::sync::{Lazy, OnceCell};
12-
use rand::{prelude::ThreadRng, seq::SliceRandom, Rng};
13-
use serde::{Deserialize, Serialize};
14-
151
use crate::{
162
gen_compressed,
173
proofs::{
@@ -31,6 +17,15 @@ use crate::{
3117
zkapps::snark::FlaggedOption,
3218
AppendToInputs as _, MerklePath, MyCow, ToInputs,
3319
};
20+
use ark_ff::{BigInteger256, One, UniformRand, Zero};
21+
use mina_core::constants::PROTOCOL_VERSION;
22+
use mina_curves::pasta::Fp;
23+
use mina_p2p_messages::{
24+
binprot::{BinProtRead, BinProtWrite},
25+
v2,
26+
};
27+
use mina_signer::CompressedPubKey;
28+
use once_cell::sync::{Lazy, OnceCell};
3429
use poseidon::hash::{
3530
hash_noinputs, hash_with_kimchi,
3631
params::{
@@ -39,6 +34,9 @@ use poseidon::hash::{
3934
},
4035
Inputs,
4136
};
37+
use rand::{prelude::ThreadRng, seq::SliceRandom, Rng};
38+
use serde::{Deserialize, Serialize};
39+
use std::{io::Cursor, str::FromStr, sync::Arc};
4240

4341
use super::common::*;
4442

@@ -424,12 +422,6 @@ pub struct VerificationKey {
424422
pub wrap_vk: Option<()>,
425423
}
426424

427-
// impl From<VerificationKey> for MinaBaseVerificationKeyWireStableV1Base64 {
428-
// fn from(value: VerificationKey) -> Self {
429-
// MinaBaseVerificationKeyWireStableV1Base64((&value).into())
430-
// }
431-
// }
432-
433425
impl Check<Fp> for VerificationKey {
434426
fn check(&self, w: &mut Witness<Fp>) {
435427
let Self {

0 commit comments

Comments
 (0)