Skip to content

Fix description of stateless compression #1686

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

Merged
merged 2 commits into from
Aug 21, 2025
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions modules/architecture/pages/data-availability.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ In Starknet version 0.13.3, sending state diffs to Ethereum changed from sending
The list of pointers can be packed to ~ 1/84 of the original list length since we only need 3 bits to indicate the bucket and we can fit 84 of those into a felt.
====

. A list of repeating value pointers is constructed, by adding `(bucket_index, index_in_bucket)` for every repetition in the original data.
. A list of repeating value pointers is constructed, by adding the corresponding index in a unique values list for every repetition in the original data.

To illustrate the above, consider the following example: Let indices 0,1, …, 5 correspond to buckets 252, 125, …, 15, and let 6 denote a special bucket of repetitions. For the data list `[2^250, 10, 100, 2^63, 2^63+1, 10, 100]`, we construct the following:

* Bucket 252: `[2^250]`
* Bucket 83: `[2^63, 2^63+1]`
* Bucket 15: `[10, 100]`
* Pointers: `[0, 5, 5, 3, 3, 6, 6]`
* Repeating value pointers: `[(5, 0), (5, 1)]` (We have two repetitions: the first for 10, which is the first element in bucket index 5, and the second for 100, which is the second element in the same bucket)
* Repeating value pointers: `[3, 4]` (The list of unique values is `[2^250, 2^63, 2^63 + 1, 10, 100]`, and we have two repetitions: the first for 10, which is the fourth unique element, and the second for 100, which is the fifth unique element)

The final compressed list packs each bucket and each list individually and adds some necessary metadata.

Expand Down