-
Notifications
You must be signed in to change notification settings - Fork 808
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
Keep execution payload during historical backfill when prune-payloads set to false #6766
Conversation
Co-authored-by: Michael Sproul <micsproul@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one suggested change to the test
@@ -2471,6 +2471,17 @@ async fn weak_subjectivity_sync_test(slots: Vec<Slot>, checkpoint_slot: Slot) { | |||
.map(|s| s.beacon_block.clone()) | |||
.collect::<Vec<_>>(); | |||
|
|||
// If prune_payloads is false, the execution payload should exist in historical blocks | |||
if !beacon_chain.store.get_config().prune_payloads { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove this if
, and make it so that these tests always this check
We can set prune_payloads: false
in the default config here:
lighthouse/beacon_node/beacon_chain/tests/store_tests.rs
Lines 75 to 85 in beefb92
fn get_harness( | |
store: Arc<HotColdDB<E, LevelDB<E>, LevelDB<E>>>, | |
validator_count: usize, | |
) -> TestHarness { | |
// Most tests expect to retain historic states, so we use this as the default. | |
let chain_config = ChainConfig { | |
reconstruct_historic_states: true, | |
..ChainConfig::default() | |
}; | |
get_harness_generic(store, validator_count, chain_config) | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 42fb4d5, thank you for your help!
Setting prune_payloads
default to false
in the test makes the tests that calling check_chain_dump
to fail:
https://github.com/sigp/lighthouse/actions/runs/13171847366/job/36763510649
From my understanding, this is because when prune_payloads
is set to false, the execution payloads are kept for all slots in the test, not only after the split slot, so the second argument in assert_eq!
is false.
lighthouse/beacon_node/beacon_chain/tests/store_tests.rs
Lines 3535 to 3546 in 029b4f2
if harness.chain.spec.bellatrix_fork_epoch.is_some() { | |
assert_eq!( | |
harness | |
.chain | |
.store | |
.execution_payload_exists(&checkpoint.beacon_block_root) | |
.unwrap(), | |
checkpoint.beacon_block.slot() >= split_slot, | |
"incorrect payload storage for block at slot {}: {:?}", | |
checkpoint.beacon_block.slot(), | |
checkpoint.beacon_block_root, | |
); |
I make the assert_eq!
to become assert!
in 5db1b78 to have the tests pass, however it makes the tests "less robust", so not sure if there are better ways to do this?
This pull request has merge conflicts. Could you please resolve them @chong-he? 🙏 |
… set to false (#6766) Squashed commit of the following: commit 5db1b78 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Fri Feb 7 07:54:00 2025 +0800 assert commit 617abb0 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 23:31:13 2025 +0800 remove split_slot commit f97f50b Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 23:30:32 2025 +0800 Update test commit f791df1 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 22:25:05 2025 +0800 test commit b2abae9 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 15:11:33 2025 +0800 Test commit 42fb4d5 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 12:29:14 2025 +0800 Fix test commit 424d4c1 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 09:37:45 2025 +0800 test commit 833d4e2 Merge: e1f81ce 2193f6a Author: chonghe <44791194+chong-he@users.noreply.github.com> Date: Thu Feb 6 09:31:11 2025 +0800 Merge branch 'unstable' into keep-execution-payload commit e1f81ce Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Feb 6 09:18:02 2025 +0800 test commit beefb92 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Fri Jan 17 09:19:31 2025 +0800 Add test commit 2e2efa6 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Wed Jan 15 09:35:48 2025 +0800 remove info commit 7b5d5de Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Wed Jan 15 09:27:27 2025 +0800 Even more simplified logging commit 9492cab Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Mon Jan 13 11:30:26 2025 +0800 Simplify logging commit 0a61483 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Mon Jan 13 10:19:48 2025 +0800 get to prune_paylods correctly commit b86434a Merge: c958809 c9747fb Author: chonghe <44791194+chong-he@users.noreply.github.com> Date: Mon Jan 13 09:51:11 2025 +0800 Merge branch 'unstable' into keep-execution-payload commit c958809 Merge: 412e8e9 7c414cc Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Thu Jan 9 11:05:42 2025 +0800 Merge remote-tracking branch 'lion/anchor_slot_pruning' into keep-execution-payload commit 7c414cc Author: Lion - dapplion <35266934+dapplion@users.noreply.github.com> Date: Thu Jan 9 09:06:45 2025 +0800 Update beacon_node/store/src/hot_cold_store.rs Co-authored-by: Michael Sproul <micsproul@gmail.com> commit 412e8e9 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Wed Jan 8 14:52:46 2025 +0800 Add prune_payload in config.rs commit a9c2f78 Merge: 9d85619 87b72de Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Wed Jan 8 11:40:16 2025 +0800 Merge remote-tracking branch 'origin/unstable' into keep-execution-payload commit 9d85619 Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Fri Jan 3 09:41:06 2025 +0800 add log commit 016e58e Author: Tan Chee Keong <tanck@sigmaprime.io> Date: Fri Jan 3 09:04:19 2025 +0800 Add prune_payloads false commit 791395a Author: dapplion <35266934+dapplion@users.noreply.github.com> Date: Sat Dec 28 21:57:40 2024 +0800 Use oldest_block_slot to break of pruning payloads
This pull request has been removed from the queue for the following reason: The pull request #6766 has been manually updated You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it. If you want to requeue this pull request, you need to post a comment with the text: |
Issue Addressed
--prune-payloads false
#6510Proposed Changes
--prune-payloads false
is setAdditional Info
lighthouse db inspect --column exp --output sizes --datadir path
is around the range of:head_slot - oldest_block_slot
, so I think it worksThank you @michaelsproul for the hints in testing