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

Late block: move checking of empty attribute earlier #13465

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

terencechain
Copy link
Member

In the happy case, validators will not propose the next block. In such scenarios, we will return early due to attribute.IsEmpty() being true, eliminating the need to call s.headBlock() unless the validator is proposing the next slot. This approach avoids an unnecessary block copy.

Note to the reviewer: Please exercise caution when reviewing any locking mechanisms in this PR, particularly the fork choice lock and head lock. It appears that s.getPayloadAttribute may not require locking, but kindly verify this to ensure accuracy.

@terencechain terencechain requested a review from a team as a code owner January 13, 2024 15:27
@terencechain terencechain added the Ready For Review A pull request ready for code review label Jan 16, 2024
@terencechain terencechain force-pushed the move-attriute-earlier branch from 62c0a9d to 12a0888 Compare January 16, 2024 02:43
@terencechain terencechain force-pushed the move-attriute-earlier branch from 12a0888 to 5f69850 Compare January 16, 2024 14:46
Copy link
Contributor

@potuz potuz left a comment

Choose a reason for hiding this comment

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

LGTM

@terencechain terencechain added this pull request to the merge queue Jan 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 16, 2024
@terencechain terencechain added this pull request to the merge queue Jan 17, 2024
Merged via the queue into develop with commit 93aba99 Jan 17, 2024
17 checks passed
@terencechain terencechain deleted the move-attriute-earlier branch January 17, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants