Skip to content

Commit

Permalink
increase caches related to daa window
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsutton committed Dec 12, 2023
1 parent 0132c1d commit 53cbf3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions consensus/src/consensus/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ impl ConsensusStorage {

// Cache sizes represented and tracked as bytes
// TODO: unit approx for noise magnitude + higher block levels lower bound
let ghostdag_cache_bytes = 50_000_000usize;
let headers_cache_bytes = 50_000_000usize;
let ghostdag_cache_bytes = 100_000_000usize;
let headers_cache_bytes = 100_000_000usize;
let utxo_diffs_cache_bytes = 50_000_000usize;

// Add stochastic noise to cache sizes to avoid predictable and equal sizes across all network nodes
Expand Down Expand Up @@ -155,7 +155,7 @@ impl ConsensusStorage {
let headers_store = Arc::new(DbHeadersStore::new(
db.clone(),
CachePolicy::Tracked(noise(headers_cache_bytes)),
CachePolicy::Unit(noise(perf_params.header_data_cache_size)),
CachePolicy::Unit(noise((3600 * params.bps() as usize).max(perf_params.header_data_cache_size))),
));
let depth_store = Arc::new(DbDepthStore::new(db.clone(), CachePolicy::Unit(noise(perf_params.header_data_cache_size))));
let selected_chain_store =
Expand Down

0 comments on commit 53cbf3a

Please sign in to comment.