Skip to content

core/txpool: add GetMetadata to transaction pool #31433

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

Merged
merged 4 commits into from
Apr 2, 2025

Conversation

minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Mar 19, 2025

This is an alternative to #31309

With eth/68, transaction announcement must have transaction type and size. So in announceTransactions, we need to query the transaction from transaction pool with its hash. This creates overhead in case of blob transaction which needs to load data from billy and RLP decode. This commit creates a lightweight lookup from transaction hash to transaction size and a function GetMetadata to query transaction type and transaction size given the transaction hash.

@minh-bq minh-bq changed the title core/txpool: add GetMeta to transaction pool core/txpool: add GetMetadata to transaction pool Mar 20, 2025
rjl493456442
rjl493456442 previously approved these changes Mar 25, 2025
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

SGTM

@rjl493456442 rjl493456442 added this to the 1.15.7 milestone Mar 25, 2025
@minh-bq
Copy link
Contributor Author

minh-bq commented Mar 25, 2025

Oh, my mistake, thanks for your fix.

@fjl fjl modified the milestones: 1.15.7, 1.15.8 Mar 31, 2025
minh-bq and others added 4 commits April 2, 2025 07:58
With eth/68, transaction announcement must have transaction type and size. So
in announceTransactions, we need to query the transaction from transaction pool
with its hash. This creates overhead in case of blob transaction which needs to
load data from billy and RLP decode. This commit creates a lightweight lookup
from transaction hash to transaction size and a function GetMetadata to query
transaction type and transaction size given the transaction hash.
@rjl493456442
Copy link
Member

Deployed on my local node for a while, will merge it if nothing wrong.

@rjl493456442 rjl493456442 merged commit ee30681 into ethereum:master Apr 2, 2025
3 of 4 checks passed
sivaratrisrinivas pushed a commit to sivaratrisrinivas/go-ethereum that referenced this pull request Apr 21, 2025
This is an alternative to ethereum#31309

With eth/68, transaction announcement must have transaction type and
size. So in announceTransactions, we need to query the transaction from
transaction pool with its hash. This creates overhead in case of blob
transaction which needs to load data from billy and RLP decode. This
commit creates a lightweight lookup from transaction hash to transaction
size and a function GetMetadata to query transaction type and
transaction size given the transaction hash.

---------

Co-authored-by: Gary Rong <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants