Skip to content

Fix test OOM issues on tree-states-hot #7176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Apr 3, 2025

Conversation

michaelsproul
Copy link
Member

WIP branch to debug test OOMs

@michaelsproul
Copy link
Member Author

The Heaptrack commit should probably be ripped out and pushed to unstable separately.

@michaelsproul
Copy link
Member Author

The current test failure is:

---- beacon_block_streamer::tests::check_all_blocks_from_altair_to_fulu stdout ----

thread 'beacon_block_streamer::tests::check_all_blocks_from_altair_to_fulu' panicked at beacon_node/beacon_chain/src/test_utils.rs:2712:14:
called `Result::unwrap()` on an `Err` value: BeaconChainError(DBError(HotColdDBError(HdiffGetPriorStateRootError(Slot(96), Slot(0)))))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@michaelsproul michaelsproul added work-in-progress PR is a work-in-progress tree-states Ongoing state and database overhaul labels Mar 20, 2025
@michaelsproul michaelsproul changed the title Tree states hot rebase oom Fix test OOM issues on tree-states-hot Mar 20, 2025
@dapplion dapplion mentioned this pull request Mar 20, 2025
10 tasks
@dapplion
Copy link
Collaborator

@michaelsproul there's a key design decision when using the summaries for iteration.

let mut state_root = *from_state
.get_state_root(
from_state
.slot()
.saturating_sub(Slot::new(E::SlotsPerHistoricalRoot::to_u64())),
)
.map_err(|_| StateSummaryIteratorError::OutOfBoundsInitialSlot)?;

What slot do we start from?

state_slot - 1

If we are attempting to store state A to the store, are we guaranteed that the summary of its parent is already persisted in disk? Could it be it will be written eventually but it's currently sitting in an ops vector? What about the migration path?

state_slot - SLOTS_PER_HISTORICAL_VECTOR

This feels safer due to the big distance, but it can experience the same issue as above. Also, we could have a situation where we are attempting to get the ancestor root of an HDiff with slot < finalized_slot. And state_slot - SLOTS_PER_HISTORICAL_VECTOR is also < finalized_slot. In that case we can get a missing state summary as it has already been pruned as part of the migration.

What I'm setting for now is:

let initial_state_slot = max(state.slot() - SLOTS_PER_HISTORICAL_VECTOR, store.split_slot);

What do you think?

@dapplion
Copy link
Collaborator

dapplion commented Mar 20, 2025

Test weak_subjectivity_sync_unaligned_unadvanced_checkpoint fails because the forwards block root iterator of both nodes don't match
Screenshot 2025-03-20 at 15 01 54

  • left = forwards: (0x6b6eef0cc6be9c55ca95d3bff66f1a78aa2aee8d2c73e3a0f958992a57999cfb, Slot(69))
  • right = expected: (0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10752d1ad84c94693c6f4a7, Slot(69))

The test weak_subjectivity_sync_unaligned_advanced_checkpoint has the exact same assertion error

@michaelsproul this tests look strange to me, questions

  • weak_subjectivity_sync_unaligned_unadvanced_checkpoint uses as checkpoint a slot that's not aligned, do we support this case?
  • If we checkpoint sync into slot 72, where in the test are historical blocks fetched? I see this log in the consumer node beacon_chain::historical_blocks: Ignoring some historic blocks oldest_block_slot=0 total_blocks=68 ignored=68
  • Does the consumer node have backfill and range sync enabled?

EDIT: The right, expected is correct. This is the chain of blocks built

  • 68 0x6b6eef0cc6be9c55ca95d3bff66f1a78aa2aee8d2c73e3a0f958992a57999cfb
  • 69 0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10752d1ad84c94693c6f4a7 <- checkpoint block
  • 70 skipped
  • 71 skipped
  • 72 skipped
  • 73 0xde74591ddcd9fe0020fccffd9e13df0e3edc408af23e76db1c52a323cc1936ca

Somehow left thinks that block 0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10752d1ad84c94693c6f4a7 is for slot 72 in the iterator.

  • The forced import historical blocks imports up to 68 included

Logs of the source checkpoint sync server node

2025-03-20T18:46:48.977158Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x305fb468655195467b0a9a763714df9cb910c5a0d3a5bbf4009928fe21c74f21 slot=68 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0xc4f4a9e0266f78efc1b46ef06a8dae69131ccd9d07c46af392d625fb92aa87c5
2025-03-20T18:46:48.977204Z DEBUG beacon_chain::beacon_chain: Beacon block imported block_root=0x6b6eef0cc6be9c55ca95d3bff66f1a78aa2aee8d2c73e3a0f958992a57999cfb block_slot=68 source=range_sync

2025-03-20T18:46:48.987348Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x4698679e674a2d6e125b0e7c3eabbd9a3434213e79acabae07de52a8946d68ea slot=69 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0x305fb468655195467b0a9a763714df9cb910c5a0d3a5bbf4009928fe21c74f21
2025-03-20T18:27:21.284430Z DEBUG beacon_chain::beacon_chain: Beacon block imported block_root=0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10752d1ad84c94693c6f4a7 block_slot=69 source=range_sync

2025-03-20T18:46:48.997590Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x14500ce15bc46fe39594aec134e6323aee2a012dc961f67cfd95e83daa71014c slot=70 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0x4698679e674a2d6e125b0e7c3eabbd9a3434213e79acabae07de52a8946d68ea
2025-03-20T18:46:48.997656Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0xfee996191ecd94ee2b0e0d0bbd22b4784982b294a8fa7ae1fd5b8c9766277ef9 slot=71 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0x14500ce15bc46fe39594aec134e6323aee2a012dc961f67cfd95e83daa71014c
2025-03-20T18:46:48.997790Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x92c13c4dce9c76f9362cc679a6d08e8967d56da6ee2f6780f76522cda2c84223 slot=72 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0xfee996191ecd94ee2b0e0d0bbd22b4784982b294a8fa7ae1fd5b8c9766277ef9
2025-03-20T18:46:48.997987Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x5669b2d3a9e8127703814aa438ccd5bb9d4a8d6e3b1e2e288cc48c9bd6d94a21 slot=73 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0x92c13c4dce9c76f9362cc679a6d08e8967d56da6ee2f6780f76522cda2c84223

2025-03-20T18:27:21.291515Z DEBUG beacon_chain::beacon_chain: Beacon block imported block_root=0xde74591ddcd9fe0020fccffd9e13df0e3edc408af23e76db1c52a323cc1936ca block_slot=73 source=range_sync

2025-03-20T18:46:49.008362Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x8ddf4321d5c3e8b887e99ac27e3da5306cadfd16becc97f6eafa1423ac457568 slot=74 storage_strategy=ReplayFrom(Slot(64)) diff_base_state_root=64/0
x3ce62a358919b37aff4691b697b433e882f4037d88b905bd23606cddcc38d553 previous_state_root=0x5669b2d3a9e8127703814aa438ccd5bb9d4a8d6e3b1e2e288cc48c9bd6d94a21
2025-03-20T18:46:49.008385Z DEBUG beacon_chain::beacon_chain: Beacon block imported block_root=0x3c6a5a9728a05e1a2fc324a41ba24e421a5ad2f57aca0794c318adf3bd4bd2ab block_slot=74 source=range_sync

Logs of the consumer node

2025-03-20T18:46:49.387830Z DEBUG beacon_chain::builder: Storing split from weak subjectivity state slot=72 state_root=0x92c13c4dce9c76f9362cc679a6d08e8967d56da6ee2f6780f76522cda2c84223 block_root=0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10
752d1ad84c94693c6f4a7
2025-03-20T18:46:49.388062Z DEBUG store::hot_cold_store: Storing hot state summary and diffs state_root=0x92c13c4dce9c76f9362cc679a6d08e8967d56da6ee2f6780f76522cda2c84223 slot=72 storage_strategy=Snapshot diff_base_state_root=0/0x000000000000
0000000000000000000000000000000000000000000000000000 previous_state_root=0xfee996191ecd94ee2b0e0d0bbd22b4784982b294a8fa7ae1fd5b8c9766277ef9
2025-03-20T18:46:49.389877Z  INFO beacon_chain::builder: Beacon chain initialized head_state=0x4698679e674a2d6e125b0e7c3eabbd9a3434213e79acabae07de52a8946d68ea head_block=0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10752d1ad84c94693c6f4a7 head
_slot=69

^ It has a head at slot 69 for block 0xbf7bc306723de95400be0d8f4eccb9965c4b5ea5c10752d1ad84c94693c6f4a7

@michaelsproul
Copy link
Member Author

michaelsproul commented Mar 21, 2025

weak_subjectivity_sync_unaligned_unadvanced_checkpoint uses as checkpoint a slot that's not aligned, do we support this case?

Yeah we do. The test should pass as-is. To me this failure looks like a bug in our changes rather than an issue with the test.

If we checkpoint sync into slot 72, where in the test are historical blocks fetched?

Right here:

// Supply blocks backwards to reach genesis. Omit the genesis block to check genesis handling.
let historical_blocks = chain_dump[..wss_block.slot().as_usize()]
.iter()
.filter(|s| s.beacon_block.slot() != 0)
.map(|s| s.beacon_block.clone())
.collect::<Vec<_>>();
let mut available_blocks = vec![];
for blinded in historical_blocks {
let block_root = blinded.canonical_root();
let full_block = harness
.chain
.get_block(&block_root)
.await
.expect("should get block")
.expect("should get block");
if let MaybeAvailableBlock::Available(block) = harness
.chain
.data_availability_checker
.verify_kzg_for_rpc_block(
harness.build_rpc_block_from_store_blobs(Some(block_root), Arc::new(full_block)),
)
.expect("should verify kzg")
{
available_blocks.push(block);
}
}

beacon_chain
.import_historical_block_batch(available_blocks_dup)
.unwrap();

Does the consumer node have backfill and range sync enabled?

Not exactly, we are manually feeding it blocks backwards and forwards to simulate backfill & range sync.

Probably just an off by one in one of the new iterators created?

@michaelsproul
Copy link
Member Author

For the backwards state root iterator, I think we might need to support fetching state summaries prior to the split, right? Because we allow diffs to exist in that region (prior to the split) if they are required to construct the split state itself.

@dapplion dapplion force-pushed the tree-states-hot-rebase-oom branch from 8d00b80 to 8ffb5c0 Compare March 25, 2025 09:24
@@ -145,10 +144,8 @@ where
});
}

self.compare_and_set_anchor_info_with_write(
old_anchor,
ANCHOR_FOR_ARCHIVE_NODE,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting this const here innadvertedly mutated the anchor_slot, which would have broken HDiff reads

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rename anchor_slot and carefully review where it is mutated or set

Copy link
Collaborator

@dapplion dapplion Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not doing this for now, seeing as anchor_slot seems to be working 🤞

Comment on lines +298 to +303
let epoch_boundary_state_slot = summary.slot - summary.slot % T::EthSpec::slots_per_epoch();
let old_summary = HotStateSummaryV22 {
slot: summary.slot,
latest_block_root: summary.latest_block_root,
epoch_boundary_state_root: state_summaries_dag
.ancestor_state_root_at_slot(state_root, epoch_boundary_state_slot)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this handle the genesis well?

Comment on lines +3447 to +3450
let state_summary = store
.load_hot_state_summary(&state_root)
.map_err(|e| StateSummaryIteratorError::LoadSummaryError(Box::new(e)))?
.ok_or(StateSummaryIteratorError::MissingSummary(state_root))?;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could fail if state_root is pruned between when we took the split lock. We should probably hold the split lock from the start of this function (after the lookup in the state misses). This should be OK for performance because loading summaries is cheap and we're never iterating that far back.

@michaelsproul michaelsproul merged commit 9151436 into tree-states-hot-rebase Apr 3, 2025
17 of 24 checks passed
@michaelsproul michaelsproul deleted the tree-states-hot-rebase-oom branch April 3, 2025 02:54
michaelsproul added a commit that referenced this pull request Jun 16, 2025
Squashed commit of the following:

commit 629fa73
Author: Michael Sproul <[email protected]>
Date:   Sat Jun 14 12:58:45 2025 +1000

    Tweak hdiff size metric buckets

commit 9c8e58c
Author: Michael Sproul <[email protected]>
Date:   Fri Jun 13 17:16:27 2025 +1000

    Metric for hdiff sizes

commit 707557a
Author: Michael Sproul <[email protected]>
Date:   Wed Jun 11 15:36:18 2025 +1000

    Clean up hdiff timing metrics

commit 22f7f73
Merge: 9e77f82 8c6abc0
Author: Michael Sproul <[email protected]>
Date:   Wed Jun 11 14:36:04 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 9e77f82
Author: Michael Sproul <[email protected]>
Date:   Mon Jun 2 17:31:17 2025 +1000

    Remove FIXMEs/mess

commit 4913987
Merge: 80a5353 ae30480
Author: Michael Sproul <[email protected]>
Date:   Mon Jun 2 17:13:35 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 80a5353
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 17:28:49 2025 +1000

    Remove some stale FIXMEs/typos

commit bb23f2a
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 16:30:35 2025 +1000

    Add a new test and fix split loading

commit 6094e23
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 15:50:45 2025 +1000

    Clean up test assert

commit 06c2632
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 15:33:46 2025 +1000

    Typo fix

commit 064115c
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 13:49:25 2025 +1000

    Fix DB manager downgrade

commit 03fece6
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 12:35:37 2025 +1000

    Skip migrating pre-split states in downgrade

commit f0823fe
Merge: bc47fd6 0ddf9a9
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 09:12:39 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit bc47fd6
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 16:50:24 2025 +1000

    Avoid putting pre-split states in the state cache

commit 5fb55be
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 15:38:50 2025 +1000

    Fix migration of dense diffs

commit 9acb1cf
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 13:27:37 2025 +1000

    Fix one schema test and add a new one that's broken :sunglasses:

commit 78d0496
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 10:56:45 2025 +1000

    Rework store config and compatibility checks

commit 8ebe1b2
Author: Michael Sproul <[email protected]>
Date:   Tue May 27 17:02:49 2025 +1000

    Add test for get_ancestor_state_root

commit b0191db
Author: Michael Sproul <[email protected]>
Date:   Mon May 26 17:50:34 2025 +1000

    Fix split slot migration

commit 9800ab8
Author: Michael Sproul <[email protected]>
Date:   Mon May 26 16:34:05 2025 +1000

    Attempt to fix archive node V24 upgrade

commit 2485beb
Author: Michael Sproul <[email protected]>
Date:   Thu May 22 17:03:06 2025 +1000

    Add logging for downgrade

commit d045796
Author: Michael Sproul <[email protected]>
Date:   Thu May 22 11:10:46 2025 +1000

    Align hot grid to freezer when migrating archive nodes

commit 444c1cd
Author: Michael Sproul <[email protected]>
Date:   Wed May 21 15:23:11 2025 +1000

    Add a test for states retained for hot diffs

commit 5d8ddb6
Author: Michael Sproul <[email protected]>
Date:   Wed May 21 12:22:00 2025 +1000

    Delete temporary states on migration

commit a4f442c
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 17:47:53 2025 +1000

    Clean up some more TODOs

commit c39daf2
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 17:41:31 2025 +1000

    Correct V23 -> V24 in load_split comment

commit c12dd1c
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 16:05:57 2025 +1000

    Split hdiff metrics by hot/cold

commit 1096565
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:27:04 2025 +1000

    Move legacy state storage code into migration file

commit 6887ad7
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:14:00 2025 +1000

    Tweak comments in v24 migration

commit b73cb1e
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:03:24 2025 +1000

    Finish PruningCheckpoint thing

commit b681648
Merge: f83b083 23ad833
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 16:28:40 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit f83b083
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 16:27:03 2025 +1000

    WIP remove pruning checkpoint

commit 00ef82a
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 12:43:10 2025 +1000

    Update comment/remove TODO

commit c74913f
Merge: 7d8343f 851ee2b
Author: Michael Sproul <[email protected]>
Date:   Thu May 15 11:02:40 2025 +1000

    Merge branch 'unstable' into tree-states-hot-rebase

commit 7d8343f
Author: Michael Sproul <[email protected]>
Date:   Thu May 8 14:59:10 2025 +1000

    Use same hierarchy for hot and cold

    This is nice as it enables us to avoid recomputing diffs, we can just copy.

commit e1475a1
Author: Michael Sproul <[email protected]>
Date:   Thu May 8 14:43:34 2025 +1000

    Prevent split from changing during ancestor calc

commit 8fa3665
Author: Michael Sproul <[email protected]>
Date:   Thu May 1 13:20:44 2025 +1000

    Remove non-contiguous DAG checks

commit 54ded28
Author: Michael Sproul <[email protected]>
Date:   Wed Apr 30 09:48:10 2025 +1000

    Use 0u8 inside DiffBaseState::Snapshot

commit 1184d72
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 29 19:20:53 2025 +1000

    More type-safe diff base state

commit 088cfa0
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 29 18:32:21 2025 +1000

    Simplify migration logic

commit fcbec47
Merge: 00fbd82 476f3a5
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 15 11:05:18 2025 +1000

    Merge branch 'unstable' into tree-states-hot-rebase

commit 00fbd82
Author: hopinheimer <[email protected]>
Date:   Mon Apr 14 21:04:53 2025 -0400

    Delete `transaction_mutex` in store (#7311)

    * remove  from db

    * remove dependent code

    * clippy happy

    * fixing clippy issues

commit 990ba80
Merge: f70e543 d96b731
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 14:36:43 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit f70e543
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 13:14:58 2025 +1000

    Fix anchor archives

commit 8657b08
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 12:46:21 2025 +1000

    Add note about multiple DAG roots

commit 74ebf8b
Author: Michael Sproul <[email protected]>
Date:   Mon Apr 7 17:04:36 2025 +1000

    Fix clippy and tests

commit fcc96a1
Merge: 9151436 70850fe
Author: Michael Sproul <[email protected]>
Date:   Mon Apr 7 17:00:29 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 9151436
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 3 13:54:31 2025 +1100

    Fix test OOM issues on tree-states-hot (#7176)

    * Try rebasing

    * Heaptrack

    * Try to prevent and detect circular references

    * Don't use StateRootsIterator in get_ancestor_state_root

    * Skip one slot in get_ancestor_state_root

    * Heaptrack clippy fix

    * Fix store test

    * Log diff base state root

    * Jump by slots per historical vector

    * Maybe ok fix for test

    * get_ancestor_state_root

    * lint

    * Implement downgrade from v24

    * Better on state write

    * Log on ws test chain dump

    * Fix WSS tests

    * Tweak condition

    * Revert "Heaptrack"

    This reverts commit f69c38c.

    * Reduce diff

    * Use debug repr

    * Spelling

    ---------

    Co-authored-by: dapplion <[email protected]>

commit b49272f
Merge: 1c81c93 a322463
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 18 15:58:59 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit a322463
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 18 15:53:20 2025 +1100

    Fix compilation

commit f4dd6fe
Author: dapplion <[email protected]>
Date:   Mon Mar 17 14:56:15 2025 -0300

    Clean up temporary flags on migration

commit 1c81c93
Merge: 5b8680a 11cfa1c
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 17:00:39 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit 11cfa1c
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 15:47:58 2025 +1100

    Purge temporary states more, fixing bug

commit 5b8680a
Merge: 9f36dc8 b43c071
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 14:51:20 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit 9f36dc8
Author: dapplion <[email protected]>
Date:   Fri Mar 7 04:34:01 2025 -0300

    Don't include massive lists in errors

commit a1b45e6
Author: dapplion <[email protected]>
Date:   Fri Mar 7 04:33:25 2025 -0300

    Persist states even if in cache

commit b43c071
Merge: a613662 d60c24e
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 11:31:48 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit a928d30
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 16:49:37 2025 +1100

    Fix merge snafu

commit 3f23942
Merge: 4e74ed1 a613662
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 15:56:37 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit a613662
Merge: ebd05c7 1916a2a
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 15:15:04 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit ebd05c7
Merge: d58d8ef b4e79ed
Author: Michael Sproul <[email protected]>
Date:   Mon Mar 10 18:08:37 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit 4e74ed1
Author: dapplion <[email protected]>
Date:   Fri Mar 7 02:12:12 2025 -0300

    Fix wrapping sub

commit ceb59e3
Author: dapplion <[email protected]>
Date:   Fri Mar 7 01:32:51 2025 -0300

    Don't log extra diffs as roots

commit f020adb
Author: dapplion <[email protected]>
Date:   Fri Mar 7 01:05:33 2025 -0300

    Store latest_block_slot in state summary

commit ecb647f
Author: dapplion <[email protected]>
Date:   Fri Mar 7 00:04:41 2025 -0300

    Fix column prefix bug

commit 36ab17c
Author: dapplion <[email protected]>
Date:   Thu Mar 6 23:35:44 2025 -0300

    Better traceability for hdiff errors

commit 33615ea
Author: dapplion <[email protected]>
Date:   Thu Mar 6 18:51:47 2025 -0300

    Document migration better

commit e6fb686
Author: dapplion <[email protected]>
Date:   Thu Mar 6 01:29:17 2025 -0300

    Send it boy

commit d58d8ef
Author: dapplion <[email protected]>
Date:   Thu Mar 6 14:52:27 2025 -0300

    Update tests

commit f8dbda4
Author: dapplion <[email protected]>
Date:   Wed Mar 5 23:51:41 2025 -0300

    Add more details to errors

commit 8931141
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 6 12:16:45 2025 +1100

    Abolish temporary states concept

commit abb3c3f
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 17:14:56 2025 +1100

    Prevent deletion of payloads >= split slot

commit 5cc266c
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 13:27:40 2025 +1100

    Clean up DB migrations

commit 7abbaeb
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 11:49:35 2025 +1100

    Use descent from finality instead of viability

commit 54010b0
Author: Lion - dapplion <[email protected]>
Date:   Wed Feb 19 02:49:19 2025 -0300

    Update consensus/proto_array/src/proto_array.rs

    Co-authored-by: Michael Sproul <[email protected]>

commit cf3b776
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 18 14:59:03 2025 +1100

    Correct assert in `revert_minority_fork_on_resume`

commit 37be9ae
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 16:51:42 2025 +1100

    Tweaks in `prune_hot_db`.

commit f6786eb
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:46:41 2025 +1100

    Tidy and document `migrate_database`.

commit 1dc6d5e
Merge: 7033656 6ab6eae
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:16:34 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit 7033656
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:16:13 2025 +1100

    Fix compilation and remove error from `heads`

commit b9d8ae7
Author: dapplion <[email protected]>
Date:   Tue Feb 4 16:15:05 2025 -0300

    Fix nodes_without_children

commit ed97b97
Author: dapplion <[email protected]>
Date:   Tue Feb 4 15:51:48 2025 -0300

    Use slot clock in heads

commit 12fa5a8
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 4 10:58:06 2025 +1100

    Remove some persisted head stuff

commit 91eab38
Author: dapplion <[email protected]>
Date:   Mon Feb 3 20:50:39 2025 -0300

    Deprecate block DAG for pruning

commit e56299c
Author: dapplion <[email protected]>
Date:   Mon Feb 3 19:50:02 2025 -0300

    Annotate SummariesDagError error

commit 979e43a
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 4 09:23:58 2025 +1100

    Tweak logs

commit 663dfd3
Author: dapplion <[email protected]>
Date:   Mon Feb 3 18:00:37 2025 -0300

    Update tests

commit 066f96a
Author: dapplion <[email protected]>
Date:   Mon Feb 3 17:46:36 2025 -0300

    Prevent very long log line

commit c5b4293
Author: dapplion <[email protected]>
Date:   Mon Feb 3 17:39:22 2025 -0300

    Prune descendants of finalized checkpoint not finalized block

commit 28d7b74
Author: dapplion <[email protected]>
Date:   Mon Feb 3 16:38:51 2025 -0300

    Add states descendants_of

commit 10bbb2e
Author: dapplion <[email protected]>
Date:   Mon Feb 3 16:17:52 2025 -0300

    Log about multiple roots in dag tree

commit 8c9a1b2
Author: dapplion <[email protected]>
Date:   Mon Jan 20 18:41:51 2025 +0700

    Implement db schema upgrade and downgrade

commit 8c15bab
Author: dapplion <[email protected]>
Date:   Fri Jan 10 15:14:35 2025 +0800

    Improve state summary dag compute logic

commit be105d1
Author: dapplion <[email protected]>
Date:   Sat Dec 28 21:33:09 2024 +0800

    Drop head tracker for summaries dag
michaelsproul added a commit that referenced this pull request Jun 16, 2025
Squashed commit of the following:

commit 629fa73
Author: Michael Sproul <[email protected]>
Date:   Sat Jun 14 12:58:45 2025 +1000

    Tweak hdiff size metric buckets

commit 9c8e58c
Author: Michael Sproul <[email protected]>
Date:   Fri Jun 13 17:16:27 2025 +1000

    Metric for hdiff sizes

commit 707557a
Author: Michael Sproul <[email protected]>
Date:   Wed Jun 11 15:36:18 2025 +1000

    Clean up hdiff timing metrics

commit 22f7f73
Merge: 9e77f82 8c6abc0
Author: Michael Sproul <[email protected]>
Date:   Wed Jun 11 14:36:04 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 9e77f82
Author: Michael Sproul <[email protected]>
Date:   Mon Jun 2 17:31:17 2025 +1000

    Remove FIXMEs/mess

commit 4913987
Merge: 80a5353 ae30480
Author: Michael Sproul <[email protected]>
Date:   Mon Jun 2 17:13:35 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 80a5353
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 17:28:49 2025 +1000

    Remove some stale FIXMEs/typos

commit bb23f2a
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 16:30:35 2025 +1000

    Add a new test and fix split loading

commit 6094e23
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 15:50:45 2025 +1000

    Clean up test assert

commit 06c2632
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 15:33:46 2025 +1000

    Typo fix

commit 064115c
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 13:49:25 2025 +1000

    Fix DB manager downgrade

commit 03fece6
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 12:35:37 2025 +1000

    Skip migrating pre-split states in downgrade

commit f0823fe
Merge: bc47fd6 0ddf9a9
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 09:12:39 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit bc47fd6
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 16:50:24 2025 +1000

    Avoid putting pre-split states in the state cache

commit 5fb55be
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 15:38:50 2025 +1000

    Fix migration of dense diffs

commit 9acb1cf
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 13:27:37 2025 +1000

    Fix one schema test and add a new one that's broken :sunglasses:

commit 78d0496
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 10:56:45 2025 +1000

    Rework store config and compatibility checks

commit 8ebe1b2
Author: Michael Sproul <[email protected]>
Date:   Tue May 27 17:02:49 2025 +1000

    Add test for get_ancestor_state_root

commit b0191db
Author: Michael Sproul <[email protected]>
Date:   Mon May 26 17:50:34 2025 +1000

    Fix split slot migration

commit 9800ab8
Author: Michael Sproul <[email protected]>
Date:   Mon May 26 16:34:05 2025 +1000

    Attempt to fix archive node V24 upgrade

commit 2485beb
Author: Michael Sproul <[email protected]>
Date:   Thu May 22 17:03:06 2025 +1000

    Add logging for downgrade

commit d045796
Author: Michael Sproul <[email protected]>
Date:   Thu May 22 11:10:46 2025 +1000

    Align hot grid to freezer when migrating archive nodes

commit 444c1cd
Author: Michael Sproul <[email protected]>
Date:   Wed May 21 15:23:11 2025 +1000

    Add a test for states retained for hot diffs

commit 5d8ddb6
Author: Michael Sproul <[email protected]>
Date:   Wed May 21 12:22:00 2025 +1000

    Delete temporary states on migration

commit a4f442c
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 17:47:53 2025 +1000

    Clean up some more TODOs

commit c39daf2
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 17:41:31 2025 +1000

    Correct V23 -> V24 in load_split comment

commit c12dd1c
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 16:05:57 2025 +1000

    Split hdiff metrics by hot/cold

commit 1096565
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:27:04 2025 +1000

    Move legacy state storage code into migration file

commit 6887ad7
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:14:00 2025 +1000

    Tweak comments in v24 migration

commit b73cb1e
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:03:24 2025 +1000

    Finish PruningCheckpoint thing

commit b681648
Merge: f83b083 23ad833
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 16:28:40 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit f83b083
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 16:27:03 2025 +1000

    WIP remove pruning checkpoint

commit 00ef82a
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 12:43:10 2025 +1000

    Update comment/remove TODO

commit c74913f
Merge: 7d8343f 851ee2b
Author: Michael Sproul <[email protected]>
Date:   Thu May 15 11:02:40 2025 +1000

    Merge branch 'unstable' into tree-states-hot-rebase

commit 7d8343f
Author: Michael Sproul <[email protected]>
Date:   Thu May 8 14:59:10 2025 +1000

    Use same hierarchy for hot and cold

    This is nice as it enables us to avoid recomputing diffs, we can just copy.

commit e1475a1
Author: Michael Sproul <[email protected]>
Date:   Thu May 8 14:43:34 2025 +1000

    Prevent split from changing during ancestor calc

commit 8fa3665
Author: Michael Sproul <[email protected]>
Date:   Thu May 1 13:20:44 2025 +1000

    Remove non-contiguous DAG checks

commit 54ded28
Author: Michael Sproul <[email protected]>
Date:   Wed Apr 30 09:48:10 2025 +1000

    Use 0u8 inside DiffBaseState::Snapshot

commit 1184d72
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 29 19:20:53 2025 +1000

    More type-safe diff base state

commit 088cfa0
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 29 18:32:21 2025 +1000

    Simplify migration logic

commit fcbec47
Merge: 00fbd82 476f3a5
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 15 11:05:18 2025 +1000

    Merge branch 'unstable' into tree-states-hot-rebase

commit 00fbd82
Author: hopinheimer <[email protected]>
Date:   Mon Apr 14 21:04:53 2025 -0400

    Delete `transaction_mutex` in store (#7311)

    * remove  from db

    * remove dependent code

    * clippy happy

    * fixing clippy issues

commit 990ba80
Merge: f70e543 d96b731
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 14:36:43 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit f70e543
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 13:14:58 2025 +1000

    Fix anchor archives

commit 8657b08
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 12:46:21 2025 +1000

    Add note about multiple DAG roots

commit 74ebf8b
Author: Michael Sproul <[email protected]>
Date:   Mon Apr 7 17:04:36 2025 +1000

    Fix clippy and tests

commit fcc96a1
Merge: 9151436 70850fe
Author: Michael Sproul <[email protected]>
Date:   Mon Apr 7 17:00:29 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 9151436
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 3 13:54:31 2025 +1100

    Fix test OOM issues on tree-states-hot (#7176)

    * Try rebasing

    * Heaptrack

    * Try to prevent and detect circular references

    * Don't use StateRootsIterator in get_ancestor_state_root

    * Skip one slot in get_ancestor_state_root

    * Heaptrack clippy fix

    * Fix store test

    * Log diff base state root

    * Jump by slots per historical vector

    * Maybe ok fix for test

    * get_ancestor_state_root

    * lint

    * Implement downgrade from v24

    * Better on state write

    * Log on ws test chain dump

    * Fix WSS tests

    * Tweak condition

    * Revert "Heaptrack"

    This reverts commit f69c38c.

    * Reduce diff

    * Use debug repr

    * Spelling

    ---------

    Co-authored-by: dapplion <[email protected]>

commit b49272f
Merge: 1c81c93 a322463
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 18 15:58:59 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit a322463
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 18 15:53:20 2025 +1100

    Fix compilation

commit f4dd6fe
Author: dapplion <[email protected]>
Date:   Mon Mar 17 14:56:15 2025 -0300

    Clean up temporary flags on migration

commit 1c81c93
Merge: 5b8680a 11cfa1c
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 17:00:39 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit 11cfa1c
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 15:47:58 2025 +1100

    Purge temporary states more, fixing bug

commit 5b8680a
Merge: 9f36dc8 b43c071
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 14:51:20 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit 9f36dc8
Author: dapplion <[email protected]>
Date:   Fri Mar 7 04:34:01 2025 -0300

    Don't include massive lists in errors

commit a1b45e6
Author: dapplion <[email protected]>
Date:   Fri Mar 7 04:33:25 2025 -0300

    Persist states even if in cache

commit b43c071
Merge: a613662 d60c24e
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 11:31:48 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit a928d30
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 16:49:37 2025 +1100

    Fix merge snafu

commit 3f23942
Merge: 4e74ed1 a613662
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 15:56:37 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit a613662
Merge: ebd05c7 1916a2a
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 15:15:04 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit ebd05c7
Merge: d58d8ef b4e79ed
Author: Michael Sproul <[email protected]>
Date:   Mon Mar 10 18:08:37 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit 4e74ed1
Author: dapplion <[email protected]>
Date:   Fri Mar 7 02:12:12 2025 -0300

    Fix wrapping sub

commit ceb59e3
Author: dapplion <[email protected]>
Date:   Fri Mar 7 01:32:51 2025 -0300

    Don't log extra diffs as roots

commit f020adb
Author: dapplion <[email protected]>
Date:   Fri Mar 7 01:05:33 2025 -0300

    Store latest_block_slot in state summary

commit ecb647f
Author: dapplion <[email protected]>
Date:   Fri Mar 7 00:04:41 2025 -0300

    Fix column prefix bug

commit 36ab17c
Author: dapplion <[email protected]>
Date:   Thu Mar 6 23:35:44 2025 -0300

    Better traceability for hdiff errors

commit 33615ea
Author: dapplion <[email protected]>
Date:   Thu Mar 6 18:51:47 2025 -0300

    Document migration better

commit e6fb686
Author: dapplion <[email protected]>
Date:   Thu Mar 6 01:29:17 2025 -0300

    Send it boy

commit d58d8ef
Author: dapplion <[email protected]>
Date:   Thu Mar 6 14:52:27 2025 -0300

    Update tests

commit f8dbda4
Author: dapplion <[email protected]>
Date:   Wed Mar 5 23:51:41 2025 -0300

    Add more details to errors

commit 8931141
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 6 12:16:45 2025 +1100

    Abolish temporary states concept

commit abb3c3f
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 17:14:56 2025 +1100

    Prevent deletion of payloads >= split slot

commit 5cc266c
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 13:27:40 2025 +1100

    Clean up DB migrations

commit 7abbaeb
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 11:49:35 2025 +1100

    Use descent from finality instead of viability

commit 54010b0
Author: Lion - dapplion <[email protected]>
Date:   Wed Feb 19 02:49:19 2025 -0300

    Update consensus/proto_array/src/proto_array.rs

    Co-authored-by: Michael Sproul <[email protected]>

commit cf3b776
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 18 14:59:03 2025 +1100

    Correct assert in `revert_minority_fork_on_resume`

commit 37be9ae
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 16:51:42 2025 +1100

    Tweaks in `prune_hot_db`.

commit f6786eb
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:46:41 2025 +1100

    Tidy and document `migrate_database`.

commit 1dc6d5e
Merge: 7033656 6ab6eae
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:16:34 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit 7033656
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:16:13 2025 +1100

    Fix compilation and remove error from `heads`

commit b9d8ae7
Author: dapplion <[email protected]>
Date:   Tue Feb 4 16:15:05 2025 -0300

    Fix nodes_without_children

commit ed97b97
Author: dapplion <[email protected]>
Date:   Tue Feb 4 15:51:48 2025 -0300

    Use slot clock in heads

commit 12fa5a8
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 4 10:58:06 2025 +1100

    Remove some persisted head stuff

commit 91eab38
Author: dapplion <[email protected]>
Date:   Mon Feb 3 20:50:39 2025 -0300

    Deprecate block DAG for pruning

commit e56299c
Author: dapplion <[email protected]>
Date:   Mon Feb 3 19:50:02 2025 -0300

    Annotate SummariesDagError error

commit 979e43a
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 4 09:23:58 2025 +1100

    Tweak logs

commit 663dfd3
Author: dapplion <[email protected]>
Date:   Mon Feb 3 18:00:37 2025 -0300

    Update tests

commit 066f96a
Author: dapplion <[email protected]>
Date:   Mon Feb 3 17:46:36 2025 -0300

    Prevent very long log line

commit c5b4293
Author: dapplion <[email protected]>
Date:   Mon Feb 3 17:39:22 2025 -0300

    Prune descendants of finalized checkpoint not finalized block

commit 28d7b74
Author: dapplion <[email protected]>
Date:   Mon Feb 3 16:38:51 2025 -0300

    Add states descendants_of

commit 10bbb2e
Author: dapplion <[email protected]>
Date:   Mon Feb 3 16:17:52 2025 -0300

    Log about multiple roots in dag tree

commit 8c9a1b2
Author: dapplion <[email protected]>
Date:   Mon Jan 20 18:41:51 2025 +0700

    Implement db schema upgrade and downgrade

commit 8c15bab
Author: dapplion <[email protected]>
Date:   Fri Jan 10 15:14:35 2025 +0800

    Improve state summary dag compute logic

commit be105d1
Author: dapplion <[email protected]>
Date:   Sat Dec 28 21:33:09 2024 +0800

    Drop head tracker for summaries dag
eserilev pushed a commit to eserilev/lighthouse that referenced this pull request Jun 17, 2025
Squashed commit of the following:

commit 629fa73
Author: Michael Sproul <[email protected]>
Date:   Sat Jun 14 12:58:45 2025 +1000

    Tweak hdiff size metric buckets

commit 9c8e58c
Author: Michael Sproul <[email protected]>
Date:   Fri Jun 13 17:16:27 2025 +1000

    Metric for hdiff sizes

commit 707557a
Author: Michael Sproul <[email protected]>
Date:   Wed Jun 11 15:36:18 2025 +1000

    Clean up hdiff timing metrics

commit 22f7f73
Merge: 9e77f82 8c6abc0
Author: Michael Sproul <[email protected]>
Date:   Wed Jun 11 14:36:04 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 9e77f82
Author: Michael Sproul <[email protected]>
Date:   Mon Jun 2 17:31:17 2025 +1000

    Remove FIXMEs/mess

commit 4913987
Merge: 80a5353 ae30480
Author: Michael Sproul <[email protected]>
Date:   Mon Jun 2 17:13:35 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 80a5353
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 17:28:49 2025 +1000

    Remove some stale FIXMEs/typos

commit bb23f2a
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 16:30:35 2025 +1000

    Add a new test and fix split loading

commit 6094e23
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 15:50:45 2025 +1000

    Clean up test assert

commit 06c2632
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 15:33:46 2025 +1000

    Typo fix

commit 064115c
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 13:49:25 2025 +1000

    Fix DB manager downgrade

commit 03fece6
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 12:35:37 2025 +1000

    Skip migrating pre-split states in downgrade

commit f0823fe
Merge: bc47fd6 0ddf9a9
Author: Michael Sproul <[email protected]>
Date:   Thu May 29 09:12:39 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit bc47fd6
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 16:50:24 2025 +1000

    Avoid putting pre-split states in the state cache

commit 5fb55be
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 15:38:50 2025 +1000

    Fix migration of dense diffs

commit 9acb1cf
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 13:27:37 2025 +1000

    Fix one schema test and add a new one that's broken :sunglasses:

commit 78d0496
Author: Michael Sproul <[email protected]>
Date:   Wed May 28 10:56:45 2025 +1000

    Rework store config and compatibility checks

commit 8ebe1b2
Author: Michael Sproul <[email protected]>
Date:   Tue May 27 17:02:49 2025 +1000

    Add test for get_ancestor_state_root

commit b0191db
Author: Michael Sproul <[email protected]>
Date:   Mon May 26 17:50:34 2025 +1000

    Fix split slot migration

commit 9800ab8
Author: Michael Sproul <[email protected]>
Date:   Mon May 26 16:34:05 2025 +1000

    Attempt to fix archive node V24 upgrade

commit 2485beb
Author: Michael Sproul <[email protected]>
Date:   Thu May 22 17:03:06 2025 +1000

    Add logging for downgrade

commit d045796
Author: Michael Sproul <[email protected]>
Date:   Thu May 22 11:10:46 2025 +1000

    Align hot grid to freezer when migrating archive nodes

commit 444c1cd
Author: Michael Sproul <[email protected]>
Date:   Wed May 21 15:23:11 2025 +1000

    Add a test for states retained for hot diffs

commit 5d8ddb6
Author: Michael Sproul <[email protected]>
Date:   Wed May 21 12:22:00 2025 +1000

    Delete temporary states on migration

commit a4f442c
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 17:47:53 2025 +1000

    Clean up some more TODOs

commit c39daf2
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 17:41:31 2025 +1000

    Correct V23 -> V24 in load_split comment

commit c12dd1c
Author: Michael Sproul <[email protected]>
Date:   Tue May 20 16:05:57 2025 +1000

    Split hdiff metrics by hot/cold

commit 1096565
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:27:04 2025 +1000

    Move legacy state storage code into migration file

commit 6887ad7
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:14:00 2025 +1000

    Tweak comments in v24 migration

commit b73cb1e
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 17:03:24 2025 +1000

    Finish PruningCheckpoint thing

commit b681648
Merge: f83b083 23ad833
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 16:28:40 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit f83b083
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 16:27:03 2025 +1000

    WIP remove pruning checkpoint

commit 00ef82a
Author: Michael Sproul <[email protected]>
Date:   Mon May 19 12:43:10 2025 +1000

    Update comment/remove TODO

commit c74913f
Merge: 7d8343f 851ee2b
Author: Michael Sproul <[email protected]>
Date:   Thu May 15 11:02:40 2025 +1000

    Merge branch 'unstable' into tree-states-hot-rebase

commit 7d8343f
Author: Michael Sproul <[email protected]>
Date:   Thu May 8 14:59:10 2025 +1000

    Use same hierarchy for hot and cold

    This is nice as it enables us to avoid recomputing diffs, we can just copy.

commit e1475a1
Author: Michael Sproul <[email protected]>
Date:   Thu May 8 14:43:34 2025 +1000

    Prevent split from changing during ancestor calc

commit 8fa3665
Author: Michael Sproul <[email protected]>
Date:   Thu May 1 13:20:44 2025 +1000

    Remove non-contiguous DAG checks

commit 54ded28
Author: Michael Sproul <[email protected]>
Date:   Wed Apr 30 09:48:10 2025 +1000

    Use 0u8 inside DiffBaseState::Snapshot

commit 1184d72
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 29 19:20:53 2025 +1000

    More type-safe diff base state

commit 088cfa0
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 29 18:32:21 2025 +1000

    Simplify migration logic

commit fcbec47
Merge: 00fbd82 476f3a5
Author: Michael Sproul <[email protected]>
Date:   Tue Apr 15 11:05:18 2025 +1000

    Merge branch 'unstable' into tree-states-hot-rebase

commit 00fbd82
Author: hopinheimer <[email protected]>
Date:   Mon Apr 14 21:04:53 2025 -0400

    Delete `transaction_mutex` in store (sigp#7311)

    * remove  from db

    * remove dependent code

    * clippy happy

    * fixing clippy issues

commit 990ba80
Merge: f70e543 d96b731
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 14:36:43 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit f70e543
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 13:14:58 2025 +1000

    Fix anchor archives

commit 8657b08
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 10 12:46:21 2025 +1000

    Add note about multiple DAG roots

commit 74ebf8b
Author: Michael Sproul <[email protected]>
Date:   Mon Apr 7 17:04:36 2025 +1000

    Fix clippy and tests

commit fcc96a1
Merge: 9151436 70850fe
Author: Michael Sproul <[email protected]>
Date:   Mon Apr 7 17:00:29 2025 +1000

    Merge remote-tracking branch 'origin/unstable' into tree-states-hot-rebase

commit 9151436
Author: Michael Sproul <[email protected]>
Date:   Thu Apr 3 13:54:31 2025 +1100

    Fix test OOM issues on tree-states-hot (sigp#7176)

    * Try rebasing

    * Heaptrack

    * Try to prevent and detect circular references

    * Don't use StateRootsIterator in get_ancestor_state_root

    * Skip one slot in get_ancestor_state_root

    * Heaptrack clippy fix

    * Fix store test

    * Log diff base state root

    * Jump by slots per historical vector

    * Maybe ok fix for test

    * get_ancestor_state_root

    * lint

    * Implement downgrade from v24

    * Better on state write

    * Log on ws test chain dump

    * Fix WSS tests

    * Tweak condition

    * Revert "Heaptrack"

    This reverts commit f69c38c.

    * Reduce diff

    * Use debug repr

    * Spelling

    ---------

    Co-authored-by: dapplion <[email protected]>

commit b49272f
Merge: 1c81c93 a322463
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 18 15:58:59 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit a322463
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 18 15:53:20 2025 +1100

    Fix compilation

commit f4dd6fe
Author: dapplion <[email protected]>
Date:   Mon Mar 17 14:56:15 2025 -0300

    Clean up temporary flags on migration

commit 1c81c93
Merge: 5b8680a 11cfa1c
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 17:00:39 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit 11cfa1c
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 15:47:58 2025 +1100

    Purge temporary states more, fixing bug

commit 5b8680a
Merge: 9f36dc8 b43c071
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 14:51:20 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit 9f36dc8
Author: dapplion <[email protected]>
Date:   Fri Mar 7 04:34:01 2025 -0300

    Don't include massive lists in errors

commit a1b45e6
Author: dapplion <[email protected]>
Date:   Fri Mar 7 04:33:25 2025 -0300

    Persist states even if in cache

commit b43c071
Merge: a613662 d60c24e
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 13 11:31:48 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit a928d30
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 16:49:37 2025 +1100

    Fix merge snafu

commit 3f23942
Merge: 4e74ed1 a613662
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 15:56:37 2025 +1100

    Merge remote-tracking branch 'origin/drop-headtracker' into tree-states-hot-rebase

commit a613662
Merge: ebd05c7 1916a2a
Author: Michael Sproul <[email protected]>
Date:   Tue Mar 11 15:15:04 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit ebd05c7
Merge: d58d8ef b4e79ed
Author: Michael Sproul <[email protected]>
Date:   Mon Mar 10 18:08:37 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit 4e74ed1
Author: dapplion <[email protected]>
Date:   Fri Mar 7 02:12:12 2025 -0300

    Fix wrapping sub

commit ceb59e3
Author: dapplion <[email protected]>
Date:   Fri Mar 7 01:32:51 2025 -0300

    Don't log extra diffs as roots

commit f020adb
Author: dapplion <[email protected]>
Date:   Fri Mar 7 01:05:33 2025 -0300

    Store latest_block_slot in state summary

commit ecb647f
Author: dapplion <[email protected]>
Date:   Fri Mar 7 00:04:41 2025 -0300

    Fix column prefix bug

commit 36ab17c
Author: dapplion <[email protected]>
Date:   Thu Mar 6 23:35:44 2025 -0300

    Better traceability for hdiff errors

commit 33615ea
Author: dapplion <[email protected]>
Date:   Thu Mar 6 18:51:47 2025 -0300

    Document migration better

commit e6fb686
Author: dapplion <[email protected]>
Date:   Thu Mar 6 01:29:17 2025 -0300

    Send it boy

commit d58d8ef
Author: dapplion <[email protected]>
Date:   Thu Mar 6 14:52:27 2025 -0300

    Update tests

commit f8dbda4
Author: dapplion <[email protected]>
Date:   Wed Mar 5 23:51:41 2025 -0300

    Add more details to errors

commit 8931141
Author: Michael Sproul <[email protected]>
Date:   Thu Mar 6 12:16:45 2025 +1100

    Abolish temporary states concept

commit abb3c3f
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 17:14:56 2025 +1100

    Prevent deletion of payloads >= split slot

commit 5cc266c
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 13:27:40 2025 +1100

    Clean up DB migrations

commit 7abbaeb
Author: Michael Sproul <[email protected]>
Date:   Thu Feb 20 11:49:35 2025 +1100

    Use descent from finality instead of viability

commit 54010b0
Author: Lion - dapplion <[email protected]>
Date:   Wed Feb 19 02:49:19 2025 -0300

    Update consensus/proto_array/src/proto_array.rs

    Co-authored-by: Michael Sproul <[email protected]>

commit cf3b776
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 18 14:59:03 2025 +1100

    Correct assert in `revert_minority_fork_on_resume`

commit 37be9ae
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 16:51:42 2025 +1100

    Tweaks in `prune_hot_db`.

commit f6786eb
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:46:41 2025 +1100

    Tidy and document `migrate_database`.

commit 1dc6d5e
Merge: 7033656 6ab6eae
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:16:34 2025 +1100

    Merge remote-tracking branch 'origin/unstable' into drop-headtracker

commit 7033656
Author: Michael Sproul <[email protected]>
Date:   Fri Feb 14 15:16:13 2025 +1100

    Fix compilation and remove error from `heads`

commit b9d8ae7
Author: dapplion <[email protected]>
Date:   Tue Feb 4 16:15:05 2025 -0300

    Fix nodes_without_children

commit ed97b97
Author: dapplion <[email protected]>
Date:   Tue Feb 4 15:51:48 2025 -0300

    Use slot clock in heads

commit 12fa5a8
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 4 10:58:06 2025 +1100

    Remove some persisted head stuff

commit 91eab38
Author: dapplion <[email protected]>
Date:   Mon Feb 3 20:50:39 2025 -0300

    Deprecate block DAG for pruning

commit e56299c
Author: dapplion <[email protected]>
Date:   Mon Feb 3 19:50:02 2025 -0300

    Annotate SummariesDagError error

commit 979e43a
Author: Michael Sproul <[email protected]>
Date:   Tue Feb 4 09:23:58 2025 +1100

    Tweak logs

commit 663dfd3
Author: dapplion <[email protected]>
Date:   Mon Feb 3 18:00:37 2025 -0300

    Update tests

commit 066f96a
Author: dapplion <[email protected]>
Date:   Mon Feb 3 17:46:36 2025 -0300

    Prevent very long log line

commit c5b4293
Author: dapplion <[email protected]>
Date:   Mon Feb 3 17:39:22 2025 -0300

    Prune descendants of finalized checkpoint not finalized block

commit 28d7b74
Author: dapplion <[email protected]>
Date:   Mon Feb 3 16:38:51 2025 -0300

    Add states descendants_of

commit 10bbb2e
Author: dapplion <[email protected]>
Date:   Mon Feb 3 16:17:52 2025 -0300

    Log about multiple roots in dag tree

commit 8c9a1b2
Author: dapplion <[email protected]>
Date:   Mon Jan 20 18:41:51 2025 +0700

    Implement db schema upgrade and downgrade

commit 8c15bab
Author: dapplion <[email protected]>
Date:   Fri Jan 10 15:14:35 2025 +0800

    Improve state summary dag compute logic

commit be105d1
Author: dapplion <[email protected]>
Date:   Sat Dec 28 21:33:09 2024 +0800

    Drop head tracker for summaries dag
mergify bot pushed a commit that referenced this pull request Jun 19, 2025
This PR implements #5978 (tree-states) but on the hot DB. It allows Lighthouse to massively reduce its disk footprint during non-finality and overall I/O in all cases.

Closes #6580

Conga into #6744

### TODOs

- [x] Fix OOM in CI #7176
- [x] optimise store_hot_state to avoid storing a duplicate state if the summary already exists (should be safe from races now that pruning is cleaner)
- [x] mispelled: get_ancenstor_state_root
- [x] get_ancestor_state_root should use state summaries
- [x] Prevent split from changing during ancestor calc
- [x] Use same hierarchy for hot and cold

### TODO Good optimization for future PRs

- [ ] On the migration, if the latest hot snapshot is aligned with the cold snapshot migrate the diffs instead of the full states.
```
align slot  time
10485760    Nov-26-2024
12582912    Sep-14-2025
14680064    Jul-02-2026
```

### TODO Maybe things good to have

- [ ] Rename anchor_slot https://github.com/sigp/lighthouse/compare/tree-states-hot-rebase-oom...dapplion:lighthouse:tree-states-hot-anchor-slot-rename?expand=1
- [ ] Make anchor fields not public such that they must be mutated through a method. To prevent un-wanted changes of the anchor_slot

### NOTTODO

- [ ] Use fork-choice and a new method [`descendants_of_checkpoint`](ca2388e#diff-046fbdb517ca16b80e4464c2c824cf001a74a0a94ac0065e635768ac391062a8) to filter only the state summaries that descend of finalized checkpoint]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tree-states Ongoing state and database overhaul work-in-progress PR is a work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants