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

Block-Production: Speculative Execution #3528

Open
apfitzge opened this issue Nov 7, 2024 · 0 comments
Open

Block-Production: Speculative Execution #3528

apfitzge opened this issue Nov 7, 2024 · 0 comments
Assignees

Comments

@apfitzge
Copy link

apfitzge commented Nov 7, 2024

Problem

  • Block-packing with reserve/commit scheme is inefficient
    • Transactions may reserve much more than they actually use
    • This can block other transactions from executing

Proposed Solution

  • Move from a reserve/commit cost-tracking scheme to execute/commit
  • Do not reserve CUs in cost-tracker before execution. Just check we are not much higher than block-limits
  • Before recording, check which transactions can fit into the block and commit their costs.
  • IF recording fails, the committed costs need to be rolled back (otherwise do nothing here)

This can lead to us executing transactions that we cannot actually record, BUT it will only occur when we are full/near full.
This trade-off is favorable, in my view, because we are more likely to fill the block and we don't necessarily care if we waste a few cycles executing when our block is getting filled. If the block is full, then those wasted cycles are not blocking other transactions.

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

No branches or pull requests

2 participants