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

Remove cdbFutureBlocks #1269

Merged
merged 11 commits into from
Nov 11, 2024
Merged

Remove cdbFutureBlocks #1269

merged 11 commits into from
Nov 11, 2024

Conversation

dnadales
Copy link
Member

After #525, the cdbFutureBlocks field became unnecessary, as we now delay headers until they are no longer from the (near) future.

Closes #1260

@dnadales dnadales force-pushed the dnadales/1260-remove-cdbFutureBlocks branch 4 times, most recently from 6a29209 to d3b359c Compare September 27, 2024 11:28
Copy link
Contributor

@nfrisby nfrisby left a comment

Choose a reason for hiding this comment

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

Nice! Love the +186/-516 ratio 😁

I didn't Approve yet because of the ongoing discussion on the REVIEW comment, etc.

Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

Looks good!


Inspecting rg -i future -t haskell resulted in the following places that should also be adapted:

@dnadales dnadales marked this pull request as draft October 11, 2024 20:10
@dnadales
Copy link
Member Author

I converted it to a draft till the consensus packages needed for Node 10.0 have been released.

@dnadales dnadales force-pushed the dnadales/1260-remove-cdbFutureBlocks branch from d8ae619 to cedff47 Compare November 8, 2024 16:07
@dnadales dnadales marked this pull request as ready for review November 8, 2024 16:14
Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

LGTM (after (maybe partial) squashing), only two minor comments

After #525, the `cdbFutureBlocks` field became unnecessary, as we now delay headers until they are no longer from the (near) future.
@dnadales dnadales force-pushed the dnadales/1260-remove-cdbFutureBlocks branch from cedff47 to d7ce177 Compare November 11, 2024 15:40
... instead of the new tip.

Chain selection uses `Query.getTipPoint` instead of `chainSelectionForBlock`.
The precondition states we never add blocks from the future.
The `ChainDB` state machine model does not need to take the block
slots into account, as a result this part of the logic has been
removed from the model and tests.
we might forge atop a block form the future
... since it was only wrapping up an `ExtValidationError` value.
@dnadales dnadales force-pushed the dnadales/1260-remove-cdbFutureBlocks branch from d7ce177 to 21ab657 Compare November 11, 2024 15:49
@dnadales dnadales enabled auto-merge November 11, 2024 16:00
@dnadales dnadales added this pull request to the merge queue Nov 11, 2024
Merged via the queue into main with commit e86b921 Nov 11, 2024
17 checks passed
@dnadales dnadales deleted the dnadales/1260-remove-cdbFutureBlocks branch November 11, 2024 17:26
amesgen added a commit that referenced this pull request Nov 22, 2024
The handling of blocks from the future in the ChainDB was removed in
#1269.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove cdbFutureBlocks
3 participants