plugeth/eth
Felix Lange 2a6beb6a39
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-08-14 10:13:34 +02:00
..
catalyst core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
downloader core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
ethconfig all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
fetcher core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
filters all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
gasprice all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
protocols core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
tracers all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
api_admin.go eth: split api.go into namespace based files (#27263) 2023-05-29 05:09:34 -04:00
api_backend.go core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
api_debug_test.go all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
api_debug.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
api_miner.go core/txpool: make transaction validation reusable across packages (pools) (#27429) 2023-06-06 12:53:29 +03:00
api.go les, eth: fix typo in comment (#27369) 2023-05-30 14:55:03 +02:00
backend.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
bloombits.go eth: move eth.Config to a common package (#22205) 2021-02-05 13:51:15 +01:00
handler_eth_test.go core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
handler_eth.go eth: better active protocol handler tracking (#27665) 2023-07-11 03:57:42 -04:00
handler_snap.go eth: check snap satelliteness, delegate drop to eth (#22235) 2021-02-02 10:44:36 +02:00
handler_test.go core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
handler.go core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
peer.go eth: remove admin.peers[i].eth.head and difficulty (#26804) 2023-03-06 09:27:46 +02:00
peerset.go all: fix some typos (#25551) 2022-08-19 09:00:21 +03:00
state_accessor.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
sync_test.go eth: use new atomic types (#27137) 2023-04-25 12:06:50 +02:00
sync.go core/txpool/blobpool: 4844 blob transaction pool (#26940) 2023-07-27 13:45:35 +03:00