Skip to content

Commit

Permalink
chore: update to t-vm 0.40 twenty-first 0.40
Browse files Browse the repository at this point in the history
Changes to get neptune-core building again and passing tests:

* updated tasm-lib to rev 0591f8eab9b5d86380afdcd422d77dfeaacc5870
* adjusted twenty_first::shared_math to ::math
* NonDeterminism<BFieldElement> --> NonDeterminism
* vm_output_state.final_ram --> vm_output_state.ram (in tests)
* we add a dep on sha3 and copy shake256() fn from twenty-first
  because it is now private there.
* indices_of_set_bits() --> get_peak_heights()
* Blake3 is removed from twenty-first, replace with Tip5 in tests
  • Loading branch information
dan-da committed Apr 18, 2024
1 parent b8e7c35 commit a00aa93
Show file tree
Hide file tree
Showing 88 changed files with 1,738 additions and 1,989 deletions.
133 changes: 32 additions & 101 deletions Cargo.lock

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

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ rs-leveldb = "0.1.5"
leveldb-sys = "2.0.9"
async-trait = "0.1.77"
async-stream = "0.3.5"
sha3 = "0.10.8"

[dev-dependencies]
test-strategy = "0.3"
Expand Down Expand Up @@ -122,7 +123,7 @@ harness = false

[patch.crates-io]
# 15a708cf6fcbd9ed3e65e5e2067be6e622176328 is tip of branch: make_storage_async as of 2024-03-18
tasm-lib = { git = "https://github.com/dan-da/tasm-lib.git", rev = "15a708cf6fcbd9ed3e65e5e2067be6e622176328" }
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "0591f8eab9b5d86380afdcd422d77dfeaacc5870" }

# 81573735e9df4836ca16655fd31884271984bac7 = tip of branch: make_storage_async on 2024-03-18
twenty-first = { git = "https://github.com/Neptune-Crypto/twenty-first.git", rev = "81573735e9df4836ca16655fd31884271984bac7" }
# twenty-first = { git = "https://github.com/Neptune-Crypto/twenty-first.git", rev = "81573735e9df4836ca16655fd31884271984bac7" }
8 changes: 4 additions & 4 deletions benches/archival_mmr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use neptune_core::database::storage::storage_vec::traits::StorageVecBase;
use neptune_core::database::NeptuneLevelDb;
use neptune_core::util_types::mutator_set::archival_mmr::ArchivalMmr;
use rand::random;
use tasm_lib::twenty_first::shared_math::tip5::Tip5;
use tasm_lib::twenty_first::math::tip5::Tip5;
use tasm_lib::twenty_first::util_types::mmr::shared_advanced::leaf_count_to_node_count;
use tasm_lib::Digest;

Expand Down Expand Up @@ -100,7 +100,7 @@ mod append {
mod append_5000 {
const NUM_WRITE_ITEMS: usize = 5000;
const INIT_AMMR_LEAF_COUNT: u64 = 0;
use tasm_lib::twenty_first::shared_math::other::random_elements;
use tasm_lib::twenty_first::math::other::random_elements;

use super::*;

Expand Down Expand Up @@ -141,7 +141,7 @@ mod mutate {
const AMMR_LEAF_COUNT: u64 = 10000;
use itertools::Itertools;
use rand::{thread_rng, Rng};
use tasm_lib::twenty_first::shared_math::other::random_elements;
use tasm_lib::twenty_first::math::other::random_elements;

use super::*;

Expand Down Expand Up @@ -188,7 +188,7 @@ mod batch_mutate_leaf_and_update_mps {
const AMMR_LEAF_COUNT: u64 = 10000;
use itertools::Itertools;
use rand::{thread_rng, Rng};
use tasm_lib::twenty_first::shared_math::other::random_elements;
use tasm_lib::twenty_first::math::other::random_elements;

use super::*;

Expand Down
Loading

0 comments on commit a00aa93

Please sign in to comment.