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

core/txpool: make transaction validation reusable across packages (pools) #27429

Merged
merged 4 commits into from Jun 6, 2023

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Jun 6, 2023

The blobpool coming in a followup PR will be a separare tx pool, but it needs some shared functionality with the main transaction pool. Specifically in the context of this PR, the blobpool will need almost the exact same transaction validations with minor tweaks.

As such, this PR does a reparatory work to make the transaction validation reusable across multiple txpool implementations. The PR also does some minor refactorings to clean up some method names.

A next PR will move tx txpool itself into a legacy "subpool" pool, so I'd like to merge in all functional changes first and have the move into a new package be mostly just code moving and import path reworking (TM).

If you're curious how these are used in the blobpool (to verify the abstraction), this PR contains all the code: #26940

@karalabe karalabe added this to the 1.12.1 milestone Jun 6, 2023
@karalabe karalabe mentioned this pull request Jun 6, 2023
26 tasks
@karalabe karalabe changed the title core/txpool: abstraction prep work for secondary pools (blob pool) core/txpool: make transaction validation reusable across packages (pools) Jun 6, 2023
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

core/txpool/txpool.go Outdated Show resolved Hide resolved
core/txpool/validation.go Outdated Show resolved Hide resolved
@karalabe
Copy link
Member Author

karalabe commented Jun 6, 2023

@holiman Fixed, PTAL

@karalabe karalabe merged commit 950d564 into ethereum:master Jun 6, 2023
1 of 2 checks passed
antonydenyer pushed a commit to antonydenyer/go-ethereum that referenced this pull request Jul 28, 2023
…ols) (ethereum#27429)

* core/txpool: abstraction prep work for secondary pools (blob pool)

* core/txpool: leave subpool concepts to a followup pr

* les: fix tests using hard coded errors

* core/txpool: use bitmaps instead of maps for tx type filtering
MoonShiesty pushed a commit to MoonShiesty/go-ethereum that referenced this pull request Aug 30, 2023
…ols) (ethereum#27429)

* core/txpool: abstraction prep work for secondary pools (blob pool)

* core/txpool: leave subpool concepts to a followup pr

* les: fix tests using hard coded errors

* core/txpool: use bitmaps instead of maps for tx type filtering
devopsbo3 pushed a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
…ols) (ethereum#27429)

* core/txpool: abstraction prep work for secondary pools (blob pool)

* core/txpool: leave subpool concepts to a followup pr

* les: fix tests using hard coded errors

* core/txpool: use bitmaps instead of maps for tx type filtering
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
devopsbo3 added a commit to HorizenOfficial/go-ethereum that referenced this pull request Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants