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

feat: Validate block proposal txs iteratively #10921

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

spalladino
Copy link
Collaborator

@spalladino spalladino commented Dec 20, 2024

Instead of loading all txs from the p2p pool and validating them all, we now get an iterator to the p2p pool and iteratively run through them and validate them as we go. This ensures we only load and validate strictly the txs we need. This also makes it easy to enforce new block constraints such as gas limits, which we add as two new env vars.

As part of this PR, we also change the interface of validators. Since there is no point anymore in validating txs in bulk, we drop the validateTxs method in favor of just validateTx. And since we're at it, we enrich validateTx to return valid/invalid/skip and to include the failure reason.

Fixes #10869

Base automatically changed from palla/sequencer-builds-until-timeout to master December 22, 2024 09:36
@spalladino spalladino force-pushed the palla/validate-with-iterator branch from 3d4ccfe to b598cf8 Compare December 23, 2024 21:43
@spalladino spalladino force-pushed the palla/validate-with-iterator branch from b598cf8 to da8056a Compare December 24, 2024 18:59
@spalladino spalladino marked this pull request as ready for review December 24, 2024 18:59
@spalladino spalladino added the e2e-all CI: Enables this CI job. label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e-all CI: Enables this CI job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: Speed up tx validation in sequencer
1 participant