mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-20 05:14:35 +00:00
Implement tree hash caching (#584)
* Implement basic tree hash caching * Use spaces to indent top-level Cargo.toml * Optimize BLS tree hash by hashing bytes directly * Implement tree hash caching for validator registry * Persist BeaconState tree hash cache to disk * Address Paul's review comments
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
|
||||
pub mod impls;
|
||||
mod merkleize_padded;
|
||||
mod merkleize_standard;
|
||||
@@ -27,7 +24,7 @@ pub fn mix_in_length(root: &[u8], length: usize) -> Vec<u8> {
|
||||
let mut length_bytes = length.to_le_bytes().to_vec();
|
||||
length_bytes.resize(BYTES_PER_CHUNK, 0);
|
||||
|
||||
merkleize_padded::hash_concat(root, &length_bytes)
|
||||
eth2_hashing::hash_concat(root, &length_bytes)
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user