Commit graph

12 commits

Author SHA1 Message Date
devopsbo3
12e039eb6d Revert "all: rename dataGas to blobGas (#27789)"
This reverts commit 50f1fb085b.
2023-11-10 12:27:53 -06:00
devopsbo3
b51d4b8fad Revert "core/types: support for optional blob sidecar in BlobTx (#27841)"
This reverts commit 278a4af91f.
2023-11-10 12:27:53 -06:00
devopsbo3
975affb4d0 Revert "miner: add to build block with EIP-4844 blobs (#27875)"
This reverts commit 2099a80396.
2023-11-10 12:27:53 -06:00
devopsbo3
704265c86a Revert "core/txpool: fix typos (#28208)"
This reverts commit 1a545fc59e.
2023-11-10 12:27:53 -06:00
devopsbo3
a507b99dce Revert "core/txpool: fix typos (#28213)"
This reverts commit cf252e4eaa.
2023-11-10 12:27:53 -06:00
0xbstn
cf252e4eaa core/txpool: fix typos (#28213)
fix(core/txpool): fix typos
2023-11-10 11:09:46 -06:00
bnovil
1a545fc59e core/txpool: fix typos (#28208)
core/txpool:fix typos
2023-11-10 11:09:46 -06:00
lightclient
2099a80396 miner: add to build block with EIP-4844 blobs (#27875)
---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-10 11:09:46 -06:00
Felix Lange
278a4af91f core/types: support for optional blob sidecar in BlobTx (#27841)
This PR removes the newly added txpool.Transaction wrapper type, and instead adds a way
of keeping the blob sidecar within types.Transaction. It's better this way because most
code in go-ethereum does not care about blob transactions, and probably never will. This
will start mattering especially on the client side of RPC, where all APIs are based on
types.Transaction. Users need to be able to use the same signing flows they already
have.

However, since blobs are only allowed in some places but not others, we will now need to
add checks to avoid creating invalid blocks. I'm still trying to figure out the best place
to do some of these. The way I have it currently is as follows:

- In block validation (import), txs are verified not to have a blob sidecar.
- In miner, we strip off the sidecar when committing the transaction into the block.
- In TxPool validation, txs must have a sidecar to be added into the blobpool.
  - Note there is a special case here: when transactions are re-added because of a chain
    reorg, we cannot use the transactions gathered from the old chain blocks as-is,
    because they will be missing their blobs. This was previously handled by storing the
    blobs into the 'blobpool limbo'. The code has now changed to store the full
    transaction in the limbo instead, but it might be confusing for code readers why we're
    not simply adding the types.Transaction we already have.

Code changes summary:

- txpool.Transaction removed and all uses replaced by types.Transaction again
- blobpool now stores types.Transaction instead of defining its own blobTx format for storage
- the blobpool limbo now stores types.Transaction instead of storing only the blobs
- checks to validate the presence/absence of the blob sidecar added in certain critical places
2023-11-10 11:09:46 -06:00
Péter Szilágyi
50f1fb085b all: rename dataGas to blobGas (#27789) 2023-11-10 11:09:46 -06:00
Péter Szilágyi
16fd9c786e core/txpool/blobpool: 4844 blob transaction pool (#26940)
* core/blobpool: implement txpool for blob txs

* core/txpool: track address reservations to notice any weird bugs

* core/txpool/blobpool: add support for in-memory operation for tests

* core/txpool/blobpool: fix heap updating after SetGasTip if account is evicted

* core/txpool/blobpool: fix eviction order if cheap leading txs are included

* core/txpool/blobpool: add note as to why the eviction fields are not inited in reinject

* go.mod: pull in inmem billy form upstream

* core/txpool/blobpool: fix review commens

* core/txpool/blobpool: make heap and heap test deterministic

* core/txpool/blobpool: luv u linter

* core/txpool: limit blob transactions to 16 per account

* core/txpool/blobpool: fix rebase errors

* core/txpool/blobpool: luv you linter

* go.mod: revert some strange crypto package dep updates
2023-11-10 11:09:46 -06:00
Péter Szilágyi
4b555c7682 core/txpool: make transaction validation reusable across packages (pools) (#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
2023-11-10 11:09:46 -06:00