Skip to content

Conversation

@rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Mar 30, 2025

This pull request introduces two constraints in the blobPool:

(a) If the sender has a pending authorization or delegation, only one in-flight
executable transaction can be cached.
(b) If the authority address in a SetCode transaction is already reserved by
the blobPool, the transaction will be rejected.

These constraints mitigate an attack where an attacker spams the pool with
numerous blob transactions, evicts other transactions, and then cancels all
pending blob transactions by draining the sender’s funds if they have a delegation.

Note, because there is no exclusive lock held between different subpools
when processing transactions, it's totally possible the SetCode transaction
and blob transactions with conflict sender and authorities are accepted
simultaneously. I think it's acceptable as it's very hard to be exploited.

@rjl493456442 rjl493456442 requested a review from holiman as a code owner March 30, 2025 01:38
@ethereum ethereum deleted a comment from irajsavadloo Apr 1, 2025
@ethereum ethereum deleted a comment from irajsavadloo Apr 1, 2025
Copy link
Member

@lightclient lightclient left a comment

Choose a reason for hiding this comment

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

This approach LGTM. I see how you mean that it is a bit weird exposing the HasPendingAuth. One nice benefit of the way you've done this is that we don't need to additionally track all the auths using the reserver. This was my original approach and it ended up being quite tricky reserving and unreserving the authorities, so this minimizes the surface for issues there. Additionally, since we want to still allow 1 in-flight tx in the blob pool from accounts with pending delegations to avoid a deadlock in the account, it is going to be necessary to expose some legacy pool details to the blob pool.

@rjl493456442
Copy link
Member Author

@lightclient Please take another look

lightclient
lightclient previously approved these changes Apr 8, 2025
Copy link
Member

@lightclient lightclient left a comment

Choose a reason for hiding this comment

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

LGTM - I made a small change on the Reserver so that it will not require each use of Hold and Release to also include the pool name. Please take a look at it and the naming and let me know if you think it's okay.

@lightclient lightclient added this to the 1.15.8 milestone Apr 8, 2025
@rjl493456442
Copy link
Member Author

LGTM @lightclient !

@lightclient lightclient merged commit 2e739fc into ethereum:master Apr 8, 2025
3 of 4 checks passed
sivaratrisrinivas pushed a commit to sivaratrisrinivas/go-ethereum that referenced this pull request Apr 21, 2025
This pull request introduces two constraints in the blobPool:

(a) If the sender has a pending authorization or delegation, only one
in-flight
executable transaction can be cached.
(b) If the authority address in a SetCode transaction is already
reserved by
the blobPool, the transaction will be rejected.

These constraints mitigate an attack where an attacker spams the pool
with
numerous blob transactions, evicts other transactions, and then cancels
all
pending blob transactions by draining the sender’s funds if they have a
delegation.

Note, because there is no exclusive lock held between different subpools
when processing transactions, it's totally possible the SetCode
transaction
and blob transactions with conflict sender and authorities are accepted
simultaneously. I think it's acceptable as it's very hard to be
exploited.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
trantienduchn added a commit to trantienduchn/ronin that referenced this pull request May 21, 2025
pick up: ethereum/go-ethereum#31526

---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
trantienduchn added a commit to trantienduchn/ronin that referenced this pull request May 27, 2025
pick up: ethereum/go-ethereum#31526

---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
trantienduchn added a commit to ronin-chain/ronin that referenced this pull request May 27, 2025
* core/txpool: add 7702 protection to blobpool

pick up: ethereum/go-ethereum#31526

---------
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>

* core/txpool: move delegation checks into one place

* core/txpool: simplify err check

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
jakub-freebit pushed a commit to fblch/go-ethereum that referenced this pull request Jul 3, 2025
This pull request introduces two constraints in the blobPool:

(a) If the sender has a pending authorization or delegation, only one
in-flight
executable transaction can be cached.
(b) If the authority address in a SetCode transaction is already
reserved by
the blobPool, the transaction will be rejected.

These constraints mitigate an attack where an attacker spams the pool
with
numerous blob transactions, evicts other transactions, and then cancels
all
pending blob transactions by draining the sender’s funds if they have a
delegation.

Note, because there is no exclusive lock held between different subpools
when processing transactions, it's totally possible the SetCode
transaction
and blob transactions with conflict sender and authorities are accepted
simultaneously. I think it's acceptable as it's very hard to be
exploited.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
howjmay pushed a commit to iotaledger/go-ethereum that referenced this pull request Aug 27, 2025
This pull request introduces two constraints in the blobPool:

(a) If the sender has a pending authorization or delegation, only one
in-flight
executable transaction can be cached.
(b) If the authority address in a SetCode transaction is already
reserved by
the blobPool, the transaction will be rejected.

These constraints mitigate an attack where an attacker spams the pool
with
numerous blob transactions, evicts other transactions, and then cancels
all
pending blob transactions by draining the sender’s funds if they have a
delegation.

Note, because there is no exclusive lock held between different subpools
when processing transactions, it's totally possible the SetCode
transaction
and blob transactions with conflict sender and authorities are accepted
simultaneously. I think it's acceptable as it's very hard to be
exploited.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
gballet pushed a commit to gballet/go-ethereum that referenced this pull request Sep 11, 2025
This pull request introduces two constraints in the blobPool:

(a) If the sender has a pending authorization or delegation, only one
in-flight
executable transaction can be cached.
(b) If the authority address in a SetCode transaction is already
reserved by
the blobPool, the transaction will be rejected.

These constraints mitigate an attack where an attacker spams the pool
with
numerous blob transactions, evicts other transactions, and then cancels
all
pending blob transactions by draining the sender’s funds if they have a
delegation.

Note, because there is no exclusive lock held between different subpools
when processing transactions, it's totally possible the SetCode
transaction
and blob transactions with conflict sender and authorities are accepted
simultaneously. I think it's acceptable as it's very hard to be
exploited.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
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.

2 participants