go-ethereum/tests
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
..
evm-benchmarks@d8b88f4046 tests: update evm-benchmarks (#26255) 2022-11-28 11:13:41 +01:00
fuzzers core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
solidity all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
testdata@ee3fa4c86d core, tests: EIP-4844 transaction processing logic (#27721) 2023-07-15 23:27:36 +02:00
block_test_util.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
block_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
difficulty_test_util.go all: add whitespace linter (#25312) 2022-07-25 13:14:03 +03:00
difficulty_test.go params: remove EIP150Hash from chainconfig (#27087) 2023-04-18 03:49:09 -04:00
gen_btheader.go tests: update (#26548) 2023-02-06 14:52:51 -05:00
gen_difficultytest.go all: simplify timestamps to uint64 (#19372) 2019-04-02 23:28:48 +03:00
gen_stenv.go build: add imports for go generate tools (#24682) 2022-04-12 20:24:02 +02:00
gen_sttransaction.go all: rename dataGas to blobGas (#27789) 2023-07-27 16:53:28 +03:00
init_test.go internal,tests: replace noarg fmt.Errorf with errors.New (#27335) 2023-05-25 02:54:28 -04:00
init.go core/vm: define cancun + enable 1153 (tstore/tload) in cancun (#27663) 2023-07-10 14:40:31 -04:00
rlp_test_util.go internal,tests: replace noarg fmt.Errorf with errors.New (#27335) 2023-05-25 02:54:28 -04:00
rlp_test.go tests: get test name from testing.T (#22941) 2021-05-25 22:47:14 +02:00
state_test_util.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
state_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
transaction_test_util.go core/vm: implement EIP-3860: Limit and meter initcode (#23847) 2023-01-11 04:05:47 -05:00
transaction_test.go tests: get test name from testing.T (#22941) 2021-05-25 22:47:14 +02:00