mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-24 07:14:46 +00:00
Publish ssz_types (and deps) to crates.io (#468)
* Rename `hashing` crate to `eth2_hashing` * Add license, desc to eth2_hashing Cargo.toml * Remove merkle root from eth2 hashing * Remove old benches folder (zombied from old branch) * Add docs to eth2_hashing * Prepare tree_hash for publishing on crates.io * Update deps to use crates.io instead of paths * Update all crates to pull ssz from crates.io * Remove cached_tree_hash, add patches to manifest * Fix compile error in benches * Remove unused code * Fix fake_crypto compile error
This commit is contained in:
@@ -3,7 +3,6 @@ extern crate lazy_static;
|
||||
|
||||
use criterion::Criterion;
|
||||
use criterion::{black_box, criterion_group, criterion_main, Benchmark};
|
||||
use tree_hash::TreeHash;
|
||||
use types::test_utils::{generate_deterministic_keypairs, TestingBeaconStateBuilder};
|
||||
use types::{BeaconState, EthSpec, Keypair, MainnetEthSpec, MinimalEthSpec};
|
||||
|
||||
@@ -36,7 +35,12 @@ fn bench_suite<T: EthSpec>(c: &mut Criterion, spec_desc: &str, validator_count:
|
||||
Benchmark::new("genesis_state", move |b| {
|
||||
b.iter_batched_ref(
|
||||
|| state.clone(),
|
||||
|state| black_box(state.tree_hash_root()),
|
||||
// Note: `state.canonical_root()` uses whatever `tree_hash` that the `types` crate
|
||||
// uses, which is not necessarily this crate. If you want to ensure that types is
|
||||
// using this local version of `tree_hash`, ensure you add a workspace-level
|
||||
// [dependency
|
||||
// patch](https://doc.rust-lang.org/cargo/reference/manifest.html#the-patch-section).
|
||||
|state| black_box(state.canonical_root()),
|
||||
criterion::BatchSize::SmallInput,
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user