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(tx-pool): fast reject transactions that cannot fit into a block #1042

Merged
merged 6 commits into from
Sep 17, 2024

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Sep 13, 2024

1. Purpose or design rationale of this PR

2. PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • feat: A new feature

3. Deployment tag versioning

Has the version in params/version.go been updated?

  • Yes

4. Breaking change label

Does this PR have the breaking-change label?

  • This PR is not a breaking change

@colinlyguo colinlyguo changed the title feat(tx pool): fast reject transactions that cannot fit into a block feat(tx-pool): fast reject transactions that cannot fit into a block Sep 13, 2024
georgehao
georgehao previously approved these changes Sep 14, 2024
@georgehao
Copy link
Member

I think also need to catch errors.New("tx too big") error

@colinlyguo
Copy link
Member Author

I think also need to catch errors.New("tx too big") error

if if !pool.chainconfig.Scroll.IsValidBlockSize(tx.Size()) { can catch all cases that "one tx cannot fit into a block", then we don't need to catch errors.New("tx too big") error for the moment, because these txs can at least fit into an empty block.

@georgehao
Copy link
Member

if you don't deal with the error, the exist error tx will stay in the txpool forever

@omerfirmak
Copy link

A reboot will get rid of those txns, it is fine.

omerfirmak
omerfirmak previously approved these changes Sep 14, 2024
Copy link

@omerfirmak omerfirmak left a comment

Choose a reason for hiding this comment

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

It might be nice to add a test to avoid a regression in the future

0xmountaintop
0xmountaintop previously approved these changes Sep 16, 2024
@colinlyguo
Copy link
Member Author

It might be nice to add a test to avoid a regression in the future

added in 9cc2719.

omerfirmak
omerfirmak previously approved these changes Sep 16, 2024
@colinlyguo
Copy link
Member Author

if you don't deal with the error, the exist error tx will stay in the txpool forever

makes sense. I also believe reboot and repropagation (then rejection by tx pool) can resolve this.

Thegaram
Thegaram previously approved these changes Sep 17, 2024
@github-actions github-actions bot dismissed stale reviews from omerfirmak and Thegaram via b543388 September 17, 2024 14:14
@colinlyguo colinlyguo merged commit 86965f8 into develop Sep 17, 2024
8 checks passed
@colinlyguo colinlyguo deleted the add-block-size-check-in-tx-pool branch September 17, 2024 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants