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

[Merged by Bors] - Pack attestations into blocks in parallel #2307

Closed
wants to merge 10 commits into from

Conversation

michaelsproul
Copy link
Member

Proposed Changes

Use two instances of max cover when packing attestations into blocks: one for the previous epoch, and one for the current epoch. This reduces the amount of computation done by roughly half due to the O(n^2) running time of max cover (2 * (n/2)^2 = n^2/2). This should help alleviate some load on block proposal, particularly on Prater.

@michaelsproul michaelsproul added the ready-for-review The code is ready for review label Apr 13, 2021
Copy link
Member

@paulhauner paulhauner 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! I just had a question and a minor comment 🙏

beacon_node/operation_pool/src/lib.rs Outdated Show resolved Hide resolved
beacon_node/operation_pool/src/lib.rs Outdated Show resolved Hide resolved
@michaelsproul
Copy link
Member Author

Thanks! Review comments addressed 🚀

Copy link
Member

@paulhauner paulhauner left a comment

Choose a reason for hiding this comment

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

Bors it!

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Apr 13, 2021
@michaelsproul
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Apr 13, 2021
## Proposed Changes

Use two instances of max cover when packing attestations into blocks: one for the previous epoch, and one for the current epoch. This reduces the amount of computation done by roughly half due to the `O(n^2)` running time of max cover (`2 * (n/2)^2 = n^2/2`). This should help alleviate some load on block proposal, particularly on Prater.
@bors bors bot changed the title Pack attestations into blocks in parallel [Merged by Bors] - Pack attestations into blocks in parallel Apr 13, 2021
@bors bors bot closed this Apr 13, 2021
@michaelsproul michaelsproul deleted the block-prop-parallel branch April 13, 2021 06:47
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants