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

Asynchronously Prepare Block Proposals #8943

Closed
nisdas opened this issue May 26, 2021 · 0 comments
Closed

Asynchronously Prepare Block Proposals #8943

nisdas opened this issue May 26, 2021 · 0 comments
Labels
Enhancement New feature or request Tracking Gotta Catch 'Em All

Comments

@nisdas
Copy link
Member

nisdas commented May 26, 2021

💎 Issue

Background

Currently a validator prepares a block synchronously, it receives its assignment and then when it comes on time for it to propose it
packages all relevant attestations,deposits, etc and then finally broadcasts the block. While this process is optimized to pack attestations as quickly as possible and have a more efficient deposit trie generated , doing all these in lock-step does cause issues. If for any reason any part of our block proposal routine takes longer than usual this can lead to a late broadcast and in the worst case an orphaned block.

With the merge coming up soon, optimizing our block proposal process will be more important as retrieving the execution payload will add a non-trivial amount of time to the block proposal process.

Description

One solution would be to keep all these objects 'hot' . Fetching attestations/deposits should simply involve reaching directly into a pre-computed list and fetching up till the maximum limit.

  • Attestations would be continuously validated and processed in a pre-proposal pool. This would be run in a separate routine which would run on a per slot basis(or any other sensible time period). The attestations would be packed and verified before hand, and then placed into this pool.

  • Deposits would be easily retrievable from a deposit pool. There would be a separate deposit routine which would be on the lookout for any eth1data changes. Depending on that, it would rebuild the trie based on the newly voted eth1data. With this trie, you could simply arrange all valid deposits for that period and make it much faster for a proposer to fetch in the required amount of deposits.

Open Questions

  • Would having these background routines lead to higher than expected resource usage ? The process of packing attestations and generating deposit tries are not cheap. Having this happen continuously ( rather than sparsely) might have a negative effect on general beacon node performance.

  • What would be the expected improvements for the average validator in terms of time to proposal ?

  • How effective would it be given that attestations have a tight boundary to arrive in .( for the smallest inclusion distance and higher reward)

  • Given how sensitive this part of the codebase is, are there any possible adverse effects to the network by having block proposals this way ? ( ex: higher inclusion distances for validators)

@nisdas nisdas added Enhancement New feature or request Needs Design Tracking Gotta Catch 'Em All labels May 26, 2021
@jmozah jmozah self-assigned this May 28, 2021
@jmozah jmozah changed the title Asynchronously Prepare Block Proposals OKR - Asynchronously Prepare Block Proposals Aug 6, 2021
@jmozah jmozah changed the title OKR - Asynchronously Prepare Block Proposals Asynchronously Prepare Block Proposals Aug 6, 2021
@jmozah jmozah added the OKR Item label Aug 6, 2021
@jmozah jmozah mentioned this issue Sep 30, 2021
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Tracking Gotta Catch 'Em All
Projects
None yet
Development

No branches or pull requests

4 participants