go-ethereum/core
Sina Mahmoodi e5d5e09faa
internal/ethapi: handle blobs in API methods (#28786)
EIP-4844 adds a new transaction type for blobs. Users can submit such transactions via `eth_sendRawTransaction`. In this PR we refrain from adding support to `eth_sendTransaction` and in fact it will fail if the user passes in a blob hash.

However since the chain can handle such transactions it makes sense to allow simulating them. E.g. an L2 operator should be able to simulate submitting a rollup blob and updating the L2 state. Most methods that take in a transaction object should recognize blobs. The change boils down to adding `blobVersionedHashes` and `maxFeePerBlobGas` to `TransactionArgs`. In summary:

- `eth_sendTransaction`: will fail for blob txes
- `eth_signTransaction`: will fail for blob txes

The methods that sign txes does not, as of this PR, add support the for new EIP-4844 transaction types. Resuming the summary:

- `eth_sendRawTransaction`: can send blob txes
- `eth_fillTransaction`: will fill in a blob tx. Note: here we simply fill in normal transaction fields + possibly `maxFeePerBlobGas` when blobs are present. One can imagine a more elaborate set-up where users can submit blobs themselves and we fill in proofs and commitments and such. Left for future PRs if desired.
- `eth_call`: can simulate blob messages
- `eth_estimateGas`: blobs have no effect here. They have a separate unit of gas which is not tunable in the transaction.
2024-01-17 15:06:14 +01:00
..
asm eth/tracers/js: fix isPush for push0 (#28520) 2023-11-14 13:14:38 +01:00
bloombits core: fix typos (#28218) 2023-09-29 10:52:22 +03:00
forkid params, core/forkid: schedule cancun fork on goerli (#28719) 2024-01-08 20:33:32 +01:00
rawdb core/rawdb: improve state scheme checking (#28724) 2023-12-22 07:50:41 +01:00
state core/state: unexport GetOrNewStateObject (#28804) 2024-01-14 12:32:23 +01:00
txpool core/txpool/blobpool: fix typos 2024-01-15 21:45:14 +02:00
types core/types: make 'v' optional for DynamicFeeTx and BlobTx (#28564) 2023-11-22 11:00:44 +01:00
vm core/state: unexport GetOrNewStateObject (#28804) 2024-01-14 12:32:23 +01:00
.gitignore Renamed `chain` => `core` 2014-12-04 10:28:02 +01:00
bench_test.go core: add basic chain history support in GenerateChain (#28428) 2023-10-31 12:39:25 +01:00
block_validator.go core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
block_validator_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
blockchain.go core/blockchain: fix typos and grammar (#28295) 2023-10-23 15:23:41 +02:00
blockchain_insert.go core, eth, trie: expose more detailed dirty ram tracking for diff layers (#27971) 2023-08-23 14:08:39 +03:00
blockchain_reader.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
blockchain_repair_test.go core/rawdb, ethdb/pebble: avoid fsync db in tests (#27836) 2023-08-23 20:43:55 +02:00
blockchain_sethead_test.go core/rawdb, ethdb/pebble: avoid fsync db in tests (#27836) 2023-08-23 20:43:55 +02:00
blockchain_snapshot_test.go core/rawdb, ethdb/pebble: avoid fsync db in tests (#27836) 2023-08-23 20:43:55 +02:00
blockchain_test.go core/blockchain: fix typos and grammar (#28295) 2023-10-23 15:23:41 +02:00
blocks.go core: typos and comments improve 2017-05-25 17:14:33 +03:00
bloom_indexer.go core: preallocate batch size in bloomIndexer (#25289) 2022-08-03 17:02:09 +02:00
chain_indexer.go core,console: replace noarg fmt.Errorf with errors.New (#27332) 2023-05-25 08:24:09 -04:00
chain_indexer_test.go core: fix potential race in chainIndexerTest (#22346) 2021-03-19 13:32:57 +01:00
chain_makers.go core: add basic chain history support in GenerateChain (#28428) 2023-10-31 12:39:25 +01:00
chain_makers_test.go core: add basic chain history support in GenerateChain (#28428) 2023-10-31 12:39:25 +01:00
dao_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
error.go internal/ethapi: handle blobs in API methods (#28786) 2024-01-17 15:06:14 +01:00
events.go eth/filters: remove use of event.TypeMux for pending logs (#20312) 2019-12-10 12:39:14 +01:00
evm.go core/vm: set basefee to 0 internally on eth_call (#28470) 2023-11-08 11:22:08 +02:00
forkchoice.go core: clarify code in forkchoice (#26257) 2022-11-28 11:07:25 +01:00
gaspool.go core, miner: revert block gas counter in case of invalid transaction (#26799) 2023-03-07 05:23:52 -05:00
gen_genesis.go all: rename dataGas to blobGas (#27789) 2023-07-27 16:53:28 +03:00
gen_genesis_account.go tests: update for London (#22976) 2021-06-07 14:37:56 +02:00
genesis.go cmd/geth: add support for --dev flag in dumpgenesis (#28463) 2023-11-22 12:08:39 +01:00
genesis_alloc.go cmd, core, params: add support for the Holesky testnet (#28007) 2023-08-25 18:11:40 +03:00
genesis_test.go cmd, core, trie: verkle-capable `geth init` (#28270) 2023-11-14 13:09:40 +01:00
headerchain.go all: remove ethash pow, only retain shims needed for consensus and tests (#27178) 2023-05-03 12:58:39 +03:00
headerchain_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
mkalloc.go cmd, core, params: add support for the Holesky testnet (#28007) 2023-08-25 18:11:40 +03:00
rlp_test.go all: cleanup tests (#25641) 2022-09-07 20:21:59 +02:00
sender_cacher.go all: refactor txpool into it's own package in prep for 4844 2022-10-24 16:35:53 +03:00
state_prefetcher.go core/types, params: add blob transaction type, RLP encoded for now (#27049) 2023-04-21 12:52:02 +03:00
state_processor.go core: add basic chain history support in GenerateChain (#28428) 2023-10-31 12:39:25 +01:00
state_processor_test.go core/vm: set basefee to 0 internally on eth_call (#28470) 2023-11-08 11:22:08 +02:00
state_transition.go internal/ethapi: handle blobs in API methods (#28786) 2024-01-17 15:06:14 +01:00
types.go core: use atomic type (#27011) 2023-03-30 06:53:32 -04:00