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 copy for block setters #11795

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Dec 19, 2022

Supercedes #11792

The only time when a validator writes to a block is during the block proposal phase. That's also the only time a block can get mutated. When constructing a block, there's no reason to copy the block field objects. Given that latency matters, calling these setters for block construction is a hot path. We should optimize based on that; hence this PR removes the unnecessary copy

Note: these methods are not used today, they only are used in capella branch

@prylabs-bulldozer prylabs-bulldozer bot merged commit 81b049e into develop Dec 19, 2022
@delete-merged-branch delete-merged-branch bot deleted the block-setters-no-copy branch December 19, 2022 10:54
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.

2 participants