Commit e5d5e09
authored
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.1 parent 2e2e89c commit e5d5e09
File tree
35 files changed
+471
-117
lines changed- core
- internal/ethapi
- testdata
- params
35 files changed
+471
-117
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
318 | 323 | | |
319 | | - | |
| 324 | + | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
468 | 470 | | |
469 | 471 | | |
470 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
471 | 476 | | |
472 | 477 | | |
473 | 478 | | |
| |||
492 | 497 | | |
493 | 498 | | |
494 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
495 | 503 | | |
496 | 504 | | |
497 | 505 | | |
| |||
1219 | 1227 | | |
1220 | 1228 | | |
1221 | 1229 | | |
| 1230 | + | |
1222 | 1231 | | |
1223 | 1232 | | |
1224 | 1233 | | |
| |||
1809 | 1818 | | |
1810 | 1819 | | |
1811 | 1820 | | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
1812 | 1824 | | |
1813 | 1825 | | |
1814 | 1826 | | |
| |||
1834 | 1846 | | |
1835 | 1847 | | |
1836 | 1848 | | |
| 1849 | + | |
1837 | 1850 | | |
1838 | 1851 | | |
1839 | 1852 | | |
| |||
1892 | 1905 | | |
1893 | 1906 | | |
1894 | 1907 | | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
1895 | 1911 | | |
1896 | 1912 | | |
1897 | 1913 | | |
| |||
0 commit comments