Skip to content

Commit d1ad6fd

Browse files
Fix description of stateless compression (#1686)
* Fix description of stateless compression * Update data-availability.adoc --------- Co-authored-by: Raz Landau <[email protected]>
1 parent 09a5356 commit d1ad6fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/architecture/pages/data-availability.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ In Starknet version 0.13.3, sending state diffs to Ethereum changed from sending
129129
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.
130130
====
131131

132-
. A list of repeating value pointers is constructed, by adding `(bucket_index, index_in_bucket)` for every repetition in the original data.
132+
. 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.
133133

134134
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:
135135

136136
* Bucket 252: `[2^250]`
137137
* Bucket 83: `[2^63, 2^63+1]`
138138
* Bucket 15: `[10, 100]`
139139
* Pointers: `[0, 5, 5, 3, 3, 6, 6]`
140-
* 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)
140+
* 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)
141141

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

0 commit comments

Comments
 (0)