Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tx data version 1 for commitments #90

Merged
merged 3 commits into from
Mar 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: add tx data version 1 for commitments
tchardin committed Mar 13, 2024
commit 1245a5b9fc5f5461191fd3b7e4a0166cf16ced50
10 changes: 10 additions & 0 deletions specs/experimental/plasma.md
Original file line number Diff line number Diff line change
@@ -67,6 +67,16 @@ The [batching][batcher] and compression of input data remain unchanged. When a b
to be submitted to the inbox address, the data is uploaded to the DA storage layer instead, and a
commitment (keccak256 hash) is submitted as the bacher inbox transaction call data.

Commitment txdata introduces version `1` to the [transaction format](derivation.md#batcher-transaction-format),
in order to interpret the txdata as a commitment during the l1 retrieval step of the derivation pipeline:

| `version_byte` | `tx_data` |
trianglesphere marked this conversation as resolved.
Show resolved Hide resolved
| -------------- | -------------------- |
| 1 | `encoded_commitment` |

The derivationVersion0 byte is still prefixed to the input data stored in the DA provider so the frames
tchardin marked this conversation as resolved.
Show resolved Hide resolved
can be decoded downstream.

Commitments are encoded as `commitment_type_byte ++ commitment_bytes`, where `commitment_bytes` depends
on the `commitment_type_byte` where [0, 128) are reserved for official implementations: