Skip to content
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

Use oldest_block_slot to break off pruning payloads #6745

Merged
merged 3 commits into from
Jan 10, 2025

Conversation

dapplion
Copy link
Collaborator

Issue Addressed

Lighthouse DB persists an "anchor" which has some useful data. One is the anchor_slot. Tree-states on the hot DB wants to use that value and change it's meaning slightly. The only blocker for that change is try_prune_execution_payloads which uses the anchor_slot as optimization to break of early the pruning routine.

BUT it's an easy fix. From @michaelsproul

I was thinking maybe we could recycle the anchor_slot for use here, as it is fairly useless and not used for much. The only load-bearing use of the anchor_slot that I can find is in try_prune_execution_payloads where it is used to halt the pruning process. However, this is not necessary as we could either:

  1. Keep iterating back to Bellatrix, or
  2. Stop iterating back once we find a payload that is missing, or
  3. Use the oldest_block_slot to determine when to stop iterating back. This is my preferred option, as it is also compatible with storing execution payloads older than the anchor_slot, i.e. Store execution payloads during backfill if --prune-payloads false #6510

ref dapplion#39 (comment)

Proposed Changes

This PR implements option 3 of the above citation, quite painless

@michaelsproul michaelsproul changed the title Use oldest_block_slot to break of pruning payloads Use oldest_block_slot to break off pruning payloads Jan 9, 2025
Co-authored-by: Michael Sproul <micsproul@gmail.com>
@michaelsproul michaelsproul added tree-states Upcoming state and database overhaul ready-for-merge This PR is ready to merge. labels Jan 9, 2025
@michaelsproul
Copy link
Member

@mergify queue

Copy link

mergify bot commented Jan 10, 2025

queue

🛑 The pull request has been removed from the queue default

Pull request #6745 has been dequeued by a dequeue command.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

@michaelsproul
Copy link
Member

@mergify dequeue

Copy link

mergify bot commented Jan 10, 2025

This pull request has been removed from the queue for the following reason: pull request dequeued.

Pull request #6745 has been dequeued by a dequeue command

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: @mergifyio requeue

Copy link

mergify bot commented Jan 10, 2025

dequeue

✅ The pull request has been removed from the queue default

@michaelsproul
Copy link
Member

@mergify requeue

Copy link

mergify bot commented Jan 10, 2025

requeue

✅ This pull request will be re-embarked automatically

The followup queue command will be automatically executed to re-embark the pull request

Copy link

mergify bot commented Jan 10, 2025

queue

🛑 The pull request has been removed from the queue default

Pull request #6745 has been dequeued by a dequeue command.

You can take a look at Queue: Embarked in merge queue check runs for more details.

In case of a failure due to a flaky test, you should first retrigger the CI.
Then, re-embark the pull request into the merge queue by posting the comment
@mergifyio refresh on the pull request.

mergify bot added a commit that referenced this pull request Jan 10, 2025
mergify bot added a commit that referenced this pull request Jan 10, 2025
@michaelsproul
Copy link
Member

@mergify dequeue

Copy link

mergify bot commented Jan 10, 2025

This pull request has been removed from the queue for the following reason: pull request dequeued.

Pull request #6745 has been dequeued by a dequeue command

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: @mergifyio requeue

Copy link

mergify bot commented Jan 10, 2025

dequeue

✅ The pull request has been removed from the queue default

@michaelsproul
Copy link
Member

@mergify queue

Copy link

mergify bot commented Jan 10, 2025

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 722573f

mergify bot added a commit that referenced this pull request Jan 10, 2025
@mergify mergify bot merged commit 722573f into sigp:unstable Jan 10, 2025
30 checks passed
@dapplion dapplion deleted the anchor_slot_pruning branch January 13, 2025 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge. tree-states Upcoming state and database overhaul
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants