Skip to content

Commit

Permalink
Remove snapshot cache related code (#5661)
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 1378a62
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Tue Apr 30 17:02:25 2024 +1000

    Add state cache CLI tests

commit 470134b
Author: Michael Sproul <michael@sigmaprime.io>
Date:   Tue Apr 30 16:43:07 2024 +1000

    Remove cache miss comment entirely

commit 65eee99
Author: Michael Sproul <micsproul@gmail.com>
Date:   Tue Apr 30 16:41:28 2024 +1000

    Fix default state cache size in docs

commit 64db49a
Author: Jimmy Chen <jchen.tc@gmail.com>
Date:   Tue Apr 30 11:51:10 2024 +1000

    Remove snapshot cache and other references.
  • Loading branch information
michaelsproul committed Apr 30, 2024
1 parent 791c500 commit 8787e71
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 537 deletions.
6 changes: 0 additions & 6 deletions beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4415,12 +4415,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
if cached_head.head_block_root() == parent_block_root {
(Cow::Borrowed(head_state), cached_head.head_state_root())
} else {
info!(
self.log,
"Missed snapshot cache during withdrawals calculation";
"slot" => proposal_slot,
"parent_block_root" => ?parent_block_root
);
let block = self
.get_blinded_block(&parent_block_root)?
.ok_or(Error::MissingBeaconBlock(parent_block_root))?;
Expand Down
9 changes: 1 addition & 8 deletions beacon_node/beacon_chain/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,11 @@ lazy_static! {
"beacon_block_processing_successes_total",
"Count of blocks processed without error"
);
// Keeping the existing "snapshot_cache" metric name as it would break existing dashboards
pub static ref BLOCK_PROCESSING_SNAPSHOT_CACHE_SIZE: Result<IntGauge> = try_create_int_gauge(
"beacon_block_processing_snapshot_cache_size",
"Count snapshots in the snapshot cache"
);
pub static ref BLOCK_PROCESSING_SNAPSHOT_CACHE_MISSES: Result<IntCounter> = try_create_int_counter(
"beacon_block_processing_snapshot_cache_misses",
"Count of snapshot cache misses"
);
pub static ref BLOCK_PROCESSING_SNAPSHOT_CACHE_CLONES: Result<IntCounter> = try_create_int_counter(
"beacon_block_processing_snapshot_cache_clones",
"Count of snapshot cache clones"
);
pub static ref BLOCK_PROCESSING_TIMES: Result<Histogram> =
try_create_histogram("beacon_block_processing_seconds", "Full runtime of block processing");
pub static ref BLOCK_PROCESSING_BLOCK_ROOT: Result<Histogram> = try_create_histogram(
Expand Down
Loading

0 comments on commit 8787e71

Please sign in to comment.