|
50 | 50 | - [GasPriceOracle Enable Ecotone](#gaspriceoracle-enable-ecotone) |
51 | 51 | - [Beacon block roots contract deployment (EIP-4788)](#beacon-block-roots-contract-deployment-eip-4788) |
52 | 52 | - [Building Individual Payload Attributes](#building-individual-payload-attributes) |
| 53 | + - [On Future-Proof Transaction Log Derivation](#on-future-proof-transaction-log-derivation) |
53 | 54 |
|
54 | 55 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> |
55 | 56 |
|
@@ -507,6 +508,9 @@ transaction is one with the following properties: |
507 | 508 |
|
508 | 509 | - The [`to`] field is equal to the configured batcher inbox address. |
509 | 510 |
|
| 511 | +- The transaction type is one of `0`, `1`, `2`, `3`, or `0x7e` (L2 [Deposited transaction type][g-deposit-tx-type], to |
| 512 | + support force-inclusion of batcher transactions on nested OP Stack chains). |
| 513 | + |
510 | 514 | - The sender, as recovered from the transaction signature (`v`, `r`, and `s`), is the batcher |
511 | 515 | address loaded from the system config matching the L1 block of the data. |
512 | 516 |
|
@@ -1022,6 +1026,9 @@ entries. |
1022 | 1026 |
|
1023 | 1027 | [deposit-contract-spec]: deposits.md#deposit-contract |
1024 | 1028 |
|
| 1029 | +Logs are derived from transactions following the future-proof best-effort process described in |
| 1030 | +[On Future-Proof Transaction Log Derivation][#on-future-proof-transaction-log-derivation] |
| 1031 | + |
1025 | 1032 | ### Network upgrade automation transactions |
1026 | 1033 |
|
1027 | 1034 | [network upgrade automation transactions]: #network-upgrade-automation-transactions |
@@ -1286,3 +1293,28 @@ follows: |
1286 | 1293 |
|
1287 | 1294 | [extended-attributes]: exec-engine.md#extended-payloadattributesv1 |
1288 | 1295 | [Fee Vaults]: exec-engine.md#fee-vaults |
| 1296 | + |
| 1297 | +## On Future-Proof Transaction Log Derivation |
| 1298 | + |
| 1299 | +As described in [L1 Retrieval][#l1-retrieval], batcher transactions' types are required to be from a fixed allow-list. |
| 1300 | + |
| 1301 | +However, we want to allow deposit transactions and `SystemConfig` update events to get derived even from receipts of |
| 1302 | +future transaction types, as long as the receipts can be decoded following a best-effort process: |
| 1303 | + |
| 1304 | +As long as a future transaction type follows the [EIP-2718][https://eips.ethereum.org/EIPS/eip-2718] specification, the |
| 1305 | +type can be decoded from the first byte of the transaction's (or its receipt's) binary encoding. We can then proceed as |
| 1306 | +follows to get the logs of such a future transaction, or discard the transaction's receipt as invalid. |
| 1307 | + |
| 1308 | +- If it's a known transaction type, that is, legacy (first byte of the encoding is in the range `[0xc0, 0xfe]`) or its |
| 1309 | +first byte is in the range `[0, 4]` or `0x7e` (_deposited_), then it's not a _future transaction_ and we know how to |
| 1310 | +decode the receipt and this process is irrelevant. |
| 1311 | +- If a transaction's first byte is in the range `[0x05, 0x7d]`, it is expected to be a _future_ EIP-2718 transaction, so |
| 1312 | +we can proceed to the receipt. Note that we excluded `0x7e` because that's the deposit transaction type, which is known. |
| 1313 | +- The _future_ receipt encoding's first byte must be the same byte as the transaction encoding's first byte, or it is |
| 1314 | +discarded as invalid, because we require it to be an EIP-2718-encoded receipt to continue. |
| 1315 | +- The receipt payload is decoded as if it is encoded as `rlp([status, cumulative_transaction_gas_used, logs_bloom, |
| 1316 | +logs])`, which is the encoding of the known non-legacy transaction types. |
| 1317 | + - If this decoding fails, the transaction's receipt is discarded as invalid. |
| 1318 | + - If this decoding succeeds, the `logs` have been obtained and can be processed as those of known transaction types. |
| 1319 | + |
| 1320 | +The intention of this best-effort decoding process is to future-proof the protocol for new L1 transaction types. |
0 commit comments