mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-22 06:14:38 +00:00
Merge tag 'v4.5.0' into tree-states
v4.5.0
This commit is contained in:
@@ -2,34 +2,33 @@
|
||||
name = "store"
|
||||
version = "0.2.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2021"
|
||||
edition = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
tempfile = "3.1.0"
|
||||
beacon_chain = {path = "../beacon_chain"}
|
||||
logging = { path = "../../common/logging" }
|
||||
tempfile = { workspace = true }
|
||||
beacon_chain = { workspace = true }
|
||||
|
||||
[dependencies]
|
||||
db-key = "0.0.5"
|
||||
leveldb = { version = "0.8.6" }
|
||||
parking_lot = "0.12.0"
|
||||
itertools = "0.10.0"
|
||||
ethereum_ssz = "0.5.0"
|
||||
ethereum_ssz_derive = "0.5.0"
|
||||
types = { path = "../../consensus/types" }
|
||||
safe_arith = { path = "../../consensus/safe_arith" }
|
||||
state_processing = { path = "../../consensus/state_processing" }
|
||||
slog = "2.5.2"
|
||||
serde = "1.0.116"
|
||||
leveldb = { version = "0.8" }
|
||||
parking_lot = { workspace = true }
|
||||
itertools = { workspace = true }
|
||||
ethereum_ssz = { workspace = true }
|
||||
ethereum_ssz_derive = { workspace = true }
|
||||
types = { workspace = true }
|
||||
state_processing = { workspace = true }
|
||||
slog = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_derive = "1.0.116"
|
||||
lazy_static = "1.4.0"
|
||||
lighthouse_metrics = { path = "../../common/lighthouse_metrics" }
|
||||
lru = "0.10.0"
|
||||
sloggers = { version = "2.1.1", features = ["json"] }
|
||||
directory = { path = "../../common/directory" }
|
||||
tree_hash = "0.5.0"
|
||||
zstd = "0.11.0"
|
||||
strum = { version = "0.24.0", features = ["derive"] }
|
||||
bls = { path = "../../crypto/bls" }
|
||||
smallvec = "1.0.0"
|
||||
xdelta3 = "0.1.5" # FIXME(sproul): fix bindgen version issues
|
||||
lazy_static = { workspace = true }
|
||||
lighthouse_metrics = { workspace = true }
|
||||
lru = { workspace = true }
|
||||
sloggers = { workspace = true }
|
||||
directory = { workspace = true }
|
||||
strum = { workspace = true }
|
||||
xdelta3 = { workspace = true }
|
||||
zstd = { workspace = true }
|
||||
safe_arith = { workspace = true }
|
||||
bls = { workspace = true }
|
||||
smallvec = { workspace = true }
|
||||
logging = { workspace = true }
|
||||
|
||||
@@ -160,11 +160,11 @@ impl<E: EthSpec> HotColdDB<E, MemoryStore<E>, MemoryStore<E>> {
|
||||
anchor_info: RwLock::new(None),
|
||||
cold_db: MemoryStore::open(),
|
||||
hot_db: MemoryStore::open(),
|
||||
block_cache: Mutex::new(LruCache::new(block_cache_size)),
|
||||
block_cache: Mutex::new(LruCache::new(block_cache_size.get())),
|
||||
state_cache: Mutex::new(StateCache::new(state_cache_size)),
|
||||
immutable_validators: Arc::new(RwLock::new(Default::default())),
|
||||
historic_state_cache: Mutex::new(LruCache::new(historic_state_cache_size)),
|
||||
diff_buffer_cache: Mutex::new(LruCache::new(diff_buffer_cache_size)),
|
||||
historic_state_cache: Mutex::new(LruCache::new(historic_state_cache_size.get())),
|
||||
diff_buffer_cache: Mutex::new(LruCache::new(diff_buffer_cache_size.get())),
|
||||
config,
|
||||
hierarchy,
|
||||
spec,
|
||||
@@ -207,11 +207,11 @@ impl<E: EthSpec> HotColdDB<E, LevelDB<E>, LevelDB<E>> {
|
||||
anchor_info: RwLock::new(None),
|
||||
cold_db: LevelDB::open(cold_path)?,
|
||||
hot_db: LevelDB::open(hot_path)?,
|
||||
block_cache: Mutex::new(LruCache::new(block_cache_size)),
|
||||
block_cache: Mutex::new(LruCache::new(block_cache_size.get())),
|
||||
state_cache: Mutex::new(StateCache::new(state_cache_size)),
|
||||
immutable_validators: Arc::new(RwLock::new(Default::default())),
|
||||
historic_state_cache: Mutex::new(LruCache::new(historic_state_cache_size)),
|
||||
diff_buffer_cache: Mutex::new(LruCache::new(diff_buffer_cache_size)),
|
||||
historic_state_cache: Mutex::new(LruCache::new(historic_state_cache_size.get())),
|
||||
diff_buffer_cache: Mutex::new(LruCache::new(diff_buffer_cache_size.get())),
|
||||
config,
|
||||
hierarchy,
|
||||
spec,
|
||||
|
||||
@@ -50,7 +50,7 @@ impl<E: EthSpec> StateCache<E> {
|
||||
pub fn new(capacity: NonZeroUsize) -> Self {
|
||||
StateCache {
|
||||
finalized_state: None,
|
||||
states: LruCache::new(capacity),
|
||||
states: LruCache::new(capacity.get()),
|
||||
block_map: BlockMap::default(),
|
||||
capacity,
|
||||
max_epoch: Epoch::new(0),
|
||||
|
||||
Reference in New Issue
Block a user