Description
Rationale
Why should this feature exist? / Use-case
AFAIK (and I hope to be wrong), it's not possible to know which blob transactions you've sent from your account using only your local Geth node, without tracking the hashes somewhere else (e.g. disk) or using external services. I stumbled into this situation while working on a L2 sequencer that, upon restarts, will not know what was the first blob transaction it sent1, as such it cannot replace it in case it is not landing.
The txpool_contentFrom
endpoint is not implemented for the blobpool yet. Having it implemented would solve this issue, since I could query this endpoint with my running account, pull the transaction data (blob sidecar isn't strictly needed for my purposes) and make a replacement transaction if needed by doubling its fees.
Disk-usage concerns
A discussion on the implementation of txpool_content
and txpool_contentFrom
has sparkled originally in #29087.
I completely understand the concern for the regular txpool_content
, since it can pull 10GiB in the worst case (even if at the time of writing it is 2.5GiB by default, which is still too high). However, the blob pool accepts at most maxTxsPerAccount = 16
per address, where each blob transaction can have at most maxBlobsPerTx = 7
blobs.
That means for the txpool_contentFrom
endpoint, that highest size that can be read from disk is around 16 * 7 * 128 * 1024
bytes which is ~14.7MiB. While this value isn't necessarily low, it is manageable for a bit more sophisticated RPCs. Moreover, a couple of flags can be introduced to either:
- Configure
maxTxsPerAccount
to a desired value. Defaults to 16 like now, but resource-constrained nodes can turn it down to 8 or 4, further reducing the load on the RPC call on worst cases; - Enable the
txpool_contentFrom
to read the blob pool. Defaults tofalse
but if someone wishes to enable it, it can do it knowing its consequences.
Implementation
Depending on the result of the discussion, I'm available to make a PR with the feature enabled for txpool_contentFrom
only and introduce the desired flags, superseding #29087.
Footnotes
-
I guess you could subscribe to new pending transactions and wait for the blob tx to be rebroadcasted, although not so reliable? ↩