You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What ❔
Update documentation for transaction encoding format
<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
<!-- (For bigger PRs adding more context is appreciated) -->
## Why ❔
<!-- Why are these changes done? What goal do they contribute to? What
are the principles behind them? -->
<!-- The `Why` has to be clear to non-Matter Labs entities running their
own ZK Chain -->
<!-- Example: PR templates ensure PR reviewers, observers, and future
iterators are in context about the evolution of repos. -->
## Is this a breaking change?
- [ ] Yes
- [ ] No
## Checklist
<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->
- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted.
@@ -19,16 +24,14 @@ ZKsyncOS expects transactions with the following fields:
19
24
|`signature`|`bytes`| Signature of the transaction. |
20
25
|`factory_deps`|`bytes`| Only for EraVM. Properly formatted hashes of bytecodes to be published on L1 with this transaction. Previously published bytecodes won't incur additional fees. |
21
26
|`paymaster_input`|`bytes`| Input for the paymaster. Legacy field, unused currently. |
22
-
|`reserved_dynamic`|`bytes`| Field used for extra functionality. Currently, it's used for access and authorization lists. The field is encoded as a list, to be able to extend it in the future. The field is encoded a the ABI encoding of a bytestring containing the ABI encoding of the list itself. Currently the list contains 2 elements. First, the access list: encoded as `tuple(address, bytes32[])[]`, i.e. a list of (address, keys) pairs. Second, the authorization list: encoded as `tuple(chain_id, address, nonce, y_parity, r, s)[]`. |
27
+
|`reserved_dynamic`|`bytes`| Field used for extra functionality. |
23
28
24
29
### Transaction Types
25
30
31
+
Note that transaction types 0,1,2 and 4 are used for RLP-encoded L2 transactions, representing legacy, EIP-2930, EIP-1559 and EIP-7702 transactions.s
|`0x71`| EIP-712 transaction following the [Era format](https://docs.zksync.io/zksync-protocol/rollup/transaction-lifecycle#eip-712-0x71). |
33
36
|`0x7E`| Upgrade transaction. |
34
37
|`0x7F`| L1 -> L2 transaction. |
@@ -42,4 +45,4 @@ ZKsyncOS expects transactions with the following fields:
42
45
|`2`| Reserved for future use. | Reserved for future use. |
43
46
|`3`| Reserved for future use. | Reserved for future use. |
44
47
45
-
Transactions are encoded using the tightly packed ABI encoding for this list of fields. All numeric types are encoded as big-endian `U256`. Encoding and hashing of transactions is implemented in this [module](../../basic_bootloader/src/bootloader/transaction/mod.rs).
48
+
These transactions are encoded using the tightly packed ABI encoding for this list of fields. All numeric types are encoded as big-endian `U256`. Encoding and hashing of transactions is implemented in this [module](../../basic_bootloader/src/bootloader/transaction/abi_encoded/mod.rs).
0 commit comments