/
RollupInclusionProofs.t.sol
582 lines (480 loc) · 46.3 KB
/
RollupInclusionProofs.t.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.21;
import "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol";
import "../../../Constants.sol";
import "../../../DataRootTuple.sol";
import "../DAVerifier.sol";
import "../../../Blobstream.sol";
import "../../tree/binary/BinaryMerkleProof.sol";
import "../../tree/namespace/NamespaceMerkleMultiproof.sol";
import "../../tree/Types.sol";
import "ds-test/test.sol";
interface CheatCodes {
function addr(uint256 privateKey) external returns (address);
function sign(uint256 privateKey, bytes32 digest) external returns (uint8 v, bytes32 r, bytes32 s);
}
/// @notice A span sequence defines the location of the rollup transaction data
/// inside the Celestia block.
/// For this tutorial, we will be posting the rollup data to a single block. Thus, all
/// we will need is the height, the index and the length of the data.
/// This can be generalized to multiple Celestia blocks.
struct SpanSequence {
// Celestia block height where the rollup data was posted.
uint256 height;
// Index of the first share containing the rollup transaction data
// inside the Celestia block
uint256 index;
// Number of shares that the rollup transaction data spans on.
uint256 length;
}
/// @notice A rollup header is a simple example of the fields a Celestium header
/// would contain.
struct RollupHeader {
// The rollup state root.
bytes32 stateRoot;
// The reference to the position of the rollup block inside
// the Celestia block.
SpanSequence sequence;
}
/// @notice a rollup transaction is a simple transfer transaction in the Rollup.
struct RollupTransaction {
address from;
address to;
uint256 amount;
}
/*
The data used to generate the Celestia proofs:
==============================================
Original data square:
=====================
The block used contains four shares. In row major order:
// PFB share
0x0000000000000000000000000000000000000000000000000000000004010000015c00000026da020ace020aa0010a9d010a202f63656c65737469612e626c6f622e76312e4d7367506179466f72426c6f627312790a2f63656c657374696131666e796e676c6175766a6c677472706e306c7a37793864346a67786339703775336e676e7735121d00000000000000000000000000000000000000121312324243243288991a0297022220adf9685b533f637df3943da5baf78310b673afd705f76fb67936889885a137da42010012670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2102ef3c3faf700de2c13a40afc24aa17caebf2bb3a4213831682a5d359f7ba8f39f12040a020801180112130a0d0a04757469611205323130303010d0e80c1a40bec3bdabdcb154f9115e85384ad100ca1acca881b0851c078cbc16365f6ab05a591f2954e4a42da5334d7598b9c0132103c633b97e6d8e61996311be24839f6f1201011a04494e4458000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// blob share
0x00000000000000000000000000000000000000121312324243243288990100000117283078623130393742314439393239623837336641304132413830383134313339446231323838323932362c3078623130393742314439393239623837336641304132413830383134313339446231323838323932372c313030293b283078623130393742314439393239623837336641304132413830383134313339446231323838323932362c3078623130393742314439393239623837336641304132413830383134313339446231323838323932382c3230303030293b283078623130393742314439393239623837336641304132413830383134313339446231323838323932362c3078623130393742314439393239623837336641304132413830383134313339446231323838323932392c31303030302900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// tail padding share
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
// tail padding share
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Extended data square:
=====================
The extended block contains 16 shares. In row major order:
0x0000000000000000000000000000000000000000000000000000000004010000015c00000026da020ace020aa0010a9d010a202f63656c65737469612e626c6f622e76312e4d7367506179466f72426c6f627312790a2f63656c657374696131666e796e676c6175766a6c677472706e306c7a37793864346a67786339703775336e676e7735121d00000000000000000000000000000000000000121312324243243288991a0297022220adf9685b533f637df3943da5baf78310b673afd705f76fb67936889885a137da42010012670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a2102ef3c3faf700de2c13a40afc24aa17caebf2bb3a4213831682a5d359f7ba8f39f12040a020801180112130a0d0a04757469611205323130303010d0e80c1a40bec3bdabdcb154f9115e85384ad100ca1acca881b0851c078cbc16365f6ab05a591f2954e4a42da5334d7598b9c0132103c633b97e6d8e61996311be24839f6f1201011a04494e4458000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x00000000000000000000000000000000000000121312324243243288990100000117283078623130393742314439393239623837336641304132413830383134313339446231323838323932362c3078623130393742314439393239623837336641304132413830383134313339446231323838323932372c313030293b283078623130393742314439393239623837336641304132413830383134313339446231323838323932362c3078623130393742314439393239623837336641304132413830383134313339446231323838323932382c3230303030293b283078623130393742314439393239623837336641304132413830383134313339446231323838323932362c3078623130393742314439393239623837336641304132413830383134313339446231323838323932392c31303030302900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x00000000000000000000000000000000000000292b291daba93e1ddcfa01000001f8391ebb849b1f15a6aa18e712157e129b0708e1645def6ed550ec00eeebe1e101d88f81fcd9e3c1e2d1fae2f4f74c6ae1da2ad5af015ce0e6ecd557e9ea32665cde5ced5decd5dae4e3ecd7d6646932ead131dd3aef35cbecdde013d41bd59769ece8db36902ea211111d119f13151f95aa1eaa1daa131e131c2f24243e4b750632477e23107a16260af60ee5cbc13255d2377437556a04402f6f51e691a7865f63de32487a40593325761f1d28e319c319f4372e03e0ebdacfe7fd004558dcd8d9e0b5d853efd73232bee838014761e345ec6a2808170b15b83a36ee5914b1a939f55da5fb75d3f4e90f635a0280315b01cb3e735e53807daea41aab18a92c1d282410141b1f6957e6e2281e323c333f1d269db61520d375bb7742887cdc9139d85c2bec8000bd3eb240527f5c310c5a743521dbf87fd6d43312dca34b1c482ce0cb6e79b9381702b62c79ccf45bff6dfe39751a5362f53b03033e0eeee2e6d7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x000000000000000000000000000000000000003b383b2fe9ea1a2f546701000001b3112ec3c0702d265fea23032a26d12af31f10b16770ba5c9378b51eb4b6bab21c97facd8098bca9b1918ebbaa855867b299019be71f7bbcb3bb9f41b8bc3066739773b870b59094bfbbba909d506533b4933e963bb9368dba95b3039f0490dc65bab69534c002e628282f28fd2b222cf3eb2eeb2feb2b2e2b2d090605354d541332f7df0b2bdf22281a2395bca0ab3a749e80d933c2e991fb08ea440876e34371ed973cf1d6f4cb3dbb562f2f02bc21aa218a11031cb3b4998bb3a61e5e48949894b8d99a72b59e323eeabb3e1c7155b14fbb52021b251b23663530054b2861503b87cb5587f89f223415e0c714fa317712af39d547c344d1dae120e822e90c2c02062e2822225841beb102233234313601077d6e290abacb78cae954cd88682886d913a6510077247ee8d3cfd92d0bd6c823178492cf8c8d2c3b8847ef31ed1fadbef6c0792b3601701fc0b299d59ef49d28cb3ed0fd9a290202240aa7aca28f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffe010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x616161616161616161616161616161616161616161616161616161616d01000003d90000001b870104b30104450304630304141dfef1f7f1c4c8faff1efdf7f5fd1ec92d1ee0c4f0d2ffc0e7f5c7e9f7f5fdc43bc0041dfef1f7f1c4c8faff2df3f6c0f6f0f7ffcbc9f8f7f0c8c7c6f62ef7c222c02bf220f8f0c3fe28c622cb2cf6f0f6ca233b32000000000000000000000000000000000000003b383b2fe9ea1a2f546d3e01670115144d91f9d5d027fece956526487b9b533a70c44c8f0d9bf570c021546e5c462287e903003bf004d204e704331dfef5c4f4f5c41efec7c0c6c8f51ec4f1fec62f2321fb2d1ed2cbfdeff1c03b16041701a425274cc608acba2ae84cb8ec46cd4f76137d4b172b2df910da2362c14095623b0e040105033f033b380408040ecbc8faff3b0d2f2d2e2e2e3a83a80b3ee875bb7742887cdc9139d85c2bec8000bd3eb240527f5c310c5a743521dbf87fd6d43312dca34b1c482ce0cb6e79b9381702b62c79ccf45bff6dfe39751a5362f53b03033e0eeee2e6d7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x616161616161616161616161616161616161615a595a4e888b7b4e350e0100000336112ec3fd2d2e2822e92de628282f28fd2b222cf3eb2eeb2feb2b2e2b2d202d2c28e6fd2d2f2b2b2f282f211f2ec3fd2d2e2822e92de628282f28fd2b222cf3eb2eeb2feb2b2e2b2d202d2c28e6fd2d2f2b2b2f282f221f2d2e2e1229112ec3fd2d2e2822e92de628282f28fd2b222cf3eb2eeb2feb2b2e2b2d202d2c28e6fd2d2f2b2b2f282f211f2ec3fd2d2e2822e92de628282f28fd2b222cf3eb2eeb2feb2b2e2b2d202d2c28e6fd2d2f2b2b2f282f2b1f2f2e2e2e2e1229112ec3fd2d2e2822e92de628282f28fd2b222cf3eb2eeb2feb2b2e2b2d202d2c28e6fd2d2f2b2b2f282f211f2ec3fd2d2e2822e92de628282f28fd2b222cf3eb2eeb2feb2b2e2b2d202d2c28e6fd2d2f2b2b2f282f281f2d2e2e2e2e1200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x616161616161616161616161616161616161617372735323224553e9f001000003922830785f6c33374a413fa13b37cc3b6c0c05aef2daa4f68ed2a600a7aaaeae038658529c85afbaac8093ac999be3f8ae87108e4c03d9ada2a68edeaba92ff3d989d9a5daa68e87a3afa68f8cf2fa2fa9802d8b2aa423bea68bad388d3d8e67faa6a884216b1e443939323962383733664130413241383038311d1a1a24efcb0f2fe4cc163ac2351b04980aa0beba2fdf8222c822dff80ee81df5d1a268495edbfe892fedc2e8d42c19c9333211af3cbb3c99221e02adaa87b0a19f00e5d7888685ad7286d0a48f2f2f75a82b03e4ffafe5a6f811053607377a2a21a7d4347c43289ada4890cb8199ab09fed601512dd503be24c4d8d051ce4f4b3e423f431f32111a3a343d33fadea2ac11302f252c27321b6370371481cb78cae954cd88682886d913a6510077247ee8d3cfd92d0bd6c823178492cf8c8d2c3b8847ef31ed1fadbef6c0792b3601701fc0b299d59ef49d28cb3ed0fd9a290202240aa7aca28f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x61616161616161616161616161616161616161484a487ccac85f7cbd93010000037d391ebbb9c61c1bdba91602101b801095333a7cf0c67bd969c3723071707b7e316793b1516e74437c685b78415cd7f07e6d036ca133c1747d7862eb7a742ef3c467c47ac6726b6576787b6b63d2f12c71692464297921597b667d02620e6b88f17b706620b901a211111d119f13151f95aa1eaa1daa131e131c060f0d23e0dc382f9b8a07138a15113e16667445422ac86151852cb8ab689005a9e605c9afeac5a56725948c99be2678dd1d1d0174174117553902317d716d567d4a30d8ed656e657a856fc772612f24a9782431c5df7ce178d3013d193d16f3232e0def11ffd2295dbedf5d9262152037adb534932dca3b4c288ee4bbe68087ae14a815ab0b1f010f1e111515d7eb757c01162f202d21030ccef612047bbec3bdabdcb154f9115e85384ad100ca1acca881b0851c078cbc16365f6ab05a591f2954e4a42da5334d7598b9c0132103c633b97e6d8e61996311be24839f6f1201011a04494e4458000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9701000002850000003d5d030e7d030ee5020efe020e34329d949b94b7bc939e309f9b9a9f30bf1c30adb797829eb9a19ab5ab9b9a9fb729b90e329d949b94b7bc939e1c9598b998979b9ebebf929b97bcb5b6981e9bb815b91396149297bb9d11b615be1f989798bd16292f00000000000000000000000000000000000000292b291daba93e1ddcf42403f0033734e068918e83189db366f11bedc16cd02ac6b7e358086c9ac6b917dcf6d9e7155dab020029970e820ea10e2c329d9ab7999ab7309db5b9b6bc9a30b7949db61d1617901c3082be9fa494b929350e36034b1918e3b6054e7b10a8e37aa6e7b1e1c938ceef36131c913a8716fdbae866fd290a0e030d022702292b0e050e0abebc939e29081d1c1e1e1e2a53400724a8cb78cae954cd88682886d913a6510077247ee8d3cfd92d0bd6c823178492cf8c8d2c3b8847ef31ed1fadbef6c0792b3601701fc0b299d59ef49d28cb3ed0fd9a290202240aa7aca28f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9eb7b5b7833537a08342690100000221391ebb9f1c1e1115ab1ca211111d119f13151f95aa1eaa1daa131e131c141c1f11a29f1c1d13131d111d17331ebb9f1c1e1115ab1ca211111d119f13151f95aa1eaa1daa131e131c141c1f11a29f1c1d13131d111d15331c1e1e3b12391ebb9f1c1e1115ab1ca211111d119f13151f95aa1eaa1daa131e131c141c1f11a29f1c1d13131d111d17331ebb9f1c1e1115ab1ca211111d119f13151f95aa1eaa1daa131e131c141c1f11a29f1c1d13131d111d13331d1e1e1e1e3b12391ebb9f1c1e1115ab1ca211111d119f13151f95aa1eaa1daa131e131c141c1f11a29f1c1d13131d111d17331ebb9f1c1e1115ab1ca211111d119f13151f95aa1eaa1daa131e131c141c1f11a29f1c1d13131d111d11331c1e1e1e1e3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9ea5a6a5b1777484b1caf4010000026a112ec3dbf72c22eceb27462922b229f70b0d4f96874b985b824a0049414f4f025ed7d3605c4c7b4e51694e6d6caf924f5d3a5be302854d444a5b8942431d9585578548874a5b5d474c4a585a96931d43511c56104b16754a564d2b59265bf0934a405f17fb30e628282f28fd2b222cf3eb2eeb2feb2b2e2b2d323e3e1aa4be091da3b2352ab8233d0e6e0445757b1d8a5015bc158a920aa8329a8044f9eed8849d571da5b8a88d1f3cbf2c2f394c2578256d1530014d415d7f466200a08f545e5c4dc75e834b581d1dcb401302a39e4ca04a92390d210c22c21017498d20cdea116f87ed6bbe526d42069d8c03d11c8e02751ab78683d1b3e1ef24e927ea332f393e2a20262c9389444e392e1d191f182f3dfec6223452bec3bdabdcb154f9115e85384ad100ca1acca881b0851c078cbc16365f6ab05a591f2954e4a42da5334d7598b9c0132103c633b97e6d8e61996311be24839f6f1201011a04494e4458000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0x9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e9e8c8d8cacdcddbaac160a01000002ce28307879b6313d844335013a3d513a662c2acd97b6c185fabbc72ec5c6c1cc2df0697cd1f6c8eacdf9d5c3ebd98f97ccf402f7462cbac8cec3fdaac2c81e95b7f0b7c2b6c7fbf1c9c3c1fbfe82941fc5fa1af212c017d4c1f3ce01fd0afb5494c1c6f3147903443939323962383733664130413241383038310f090816ad882b1d6c550c385537392435f3c8e5e910bcffd15c1f7a42f96b0d43a20dbf4ca9b448f019655a6d751bc38b323203c836eb36df28012dcec5f4ddceec2e86a5f1f6f1c25cf5b5c7ff1d1a43c31a2db48acdaec38103263c263595161e08a4399e8212da758ada6afd3714224d7220691cbd29e3115ba378a2515d4f3440374207330309303937378faacbcd03351d141c17020bb3983b0ec175bb7742887cdc9139d85c2bec8000bd3eb240527f5c310c5a743521dbf87fd6d43312dca34b1c482ce0cb6e79b9381702b62c79ccf45bff6dfe39751a5362f53b03033e0eeee2e6d7000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
The row roots:
==============
1. 0x00000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000012131232424324328899eca190450f1424f4c96f50142cae150261466dcf4d47fb52b5e1cccef047f2fe
2. 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffe94ddc2da7e01f575f757fbb4fa42ba202d51a576b609a8aeb114fd226c6e7372
3. 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff33622135c2a12b0e5b3f67fd2cdacddbd58b88abbe67a9ce42e456bb88e137c7
4. 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc096faf6ef0b9f1d3439d619b29bbd4b810825e80b658ed1fa7525220dc796b0
The column roots:
=================
1. 0x0000000000000000000000000000000000000000000000000000000004fffffffffffffffffffffffffffffffffffffffffffffffffffffffffe43e76fdc8b119c62dd02c197ad666b5c00ccc4736bf34573c9bd995558a2cf0d
2. 0x0000000000000000000000000000000000000012131232424324328899fffffffffffffffffffffffffffffffffffffffffffffffffffffffffe37a4e02492e5c60e661b531861ae3f45cf4d6ae5237bab37d857b39763373556
3. 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215bd7509274803c556914e2a4b840826bb8b7d94de9344dfb2c2b0e71ba2d26
4. 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff35543dab513d606fd51dddbecce5a0ff86d5a5a4b1e081e6fb9afeeaa36ff6
The data root: 0xb9b0d94eae45e56a551e9415701bec462b18329d2a42bcce3e37a22a2ca83a6f
The height: 21
The blocks data roots used to create the commitment:
21. 0xb9b0d94eae45e56a551e9415701bec462b18329d2a42bcce3e37a22a2ca83a6f
22. 0x3d96b7d238e7e0456f6af8e7cdf0a67bd6cf9c2089ecb559c659dcaa1f880353
23. 0x3d96b7d238e7e0456f6af8e7cdf0a67bd6cf9c2089ecb559c659dcaa1f880353
24. 0x3d96b7d238e7e0456f6af8e7cdf0a67bd6cf9c2089ecb559c659dcaa1f880353
The nonce: 2
The data root tuple root: 0xd149f160dec348d8582b8c2629c91fab8189b8dca205c4c01bb378f2f5450c3b
*/
/*
The rollup state:
=================
We assume that the rollup state is comprised of the following key-values:
| key | value |
|--------------------------------------------|-------|
| 0xb1097B1D9929b873fA0A2A80814139Db12882926 | 20100 |
| 0xb1097B1D9929b873fA0A2A80814139Db12882927 | 10000 |
Where the key is the EVM address of an account, and the value is its balance.
*/
/*
The rollup transactions:
========================
We will define the rollup transfer transactions as follows:
{
address from;
address to;
uint256 amount;
}
And we will encode them, to be sent to a Celestia block as follows: (from, to, amount).
Example transaction:
(0xb1097B1D9929b873fA0A2A80814139Db12882926,0xb1097B1D9929b873fA0A2A80814139Db12882927,100)
which sends 100 balance from the 0xb1097B1D9929b873fA0A2A80814139Db12882926 account to
the 0xb1097B1D9929b873fA0A2A80814139Db12882927 account.
For this tutorial, the rollup block, which will be submitted to Celestia, will contain the following transactions:
- (0xb1097B1D9929b873fA0A2A80814139Db12882926,0xb1097B1D9929b873fA0A2A80814139Db12882927,100)
- (0xb1097B1D9929b873fA0A2A80814139Db12882926,0xb1097B1D9929b873fA0A2A80814139Db12882928,20000)
- (0xb1097B1D9929b873fA0A2A80814139Db12882926,0xb1097B1D9929b873fA0A2A80814139Db12882929,10000)
Given the above state, the third transaction should fail because the 0xb1097B1D9929b873fA0A2A80814139Db12882926 account
won't have anymore balance left after the first two transactions.
Also, if you look at the above raw shares, and take the blob share and convert it from its hex representation
to ASCII, you will see the above transactions there.
*/
/*
Tests overview:
===============
Given the above setup, we will prove the following inside the tests:
1. We will create an invalid header, which points to a sequence of spans outside of a Celestia block, and prove
that that transaction data is missing.
2. We will create another invalid header, which points to the correct location of the transaction data in the
Celestia block, and prove that the third transaction, as defined above, is invalid.
For the other cases, where the inclusion proof is invalid:
- The data is available and was committed to in the Celestia block. That is intrinsically verified in the second test.
Since checking the state comes after verifying that the data is available.
- The data is available, and also all the state transitions are valid, i.e. the transactions posted are valid.
This verification is just changing the conclusion of the second test, given a different state.
Thus, there is no need to add more tests for these scenarios and only keep the first ones.
Note: We will not be generating the rollup state root for this test to test against it, we will leave that
to be defined by rollups depending on how they handle their state.
*/
contract RollupInclusionProofTest is DSTest {
// Private keys used for test signatures.
uint256 constant testPriv1 = 0x64a1d6f0e760a8d62b4afdde4096f16f51b401eaaecc915740f71770ea76a8ad;
Blobstream bridge;
TestFixture fixture;
Validator[] private validators;
uint256 private votingPower = 5000;
// Set up Foundry cheatcodes.
CheatCodes cheats = CheatCodes(HEVM_ADDRESS);
// deploy a Blobstream contract and submit the following:
// - initial valset.
// - data root tuple root that commits to the proofs tested below.
function setUp() public {
uint256 initialVelsetNonce = 1;
validators.push(Validator(cheats.addr(testPriv1), votingPower));
bytes32 hash = computeValidatorSetHash(validators);
bridge = new Blobstream();
bridge.initialize(initialVelsetNonce, (2 * votingPower) / 3, hash);
fixture = new TestFixture();
bytes32 newDataRootTupleRoot =
domainSeparateDataRootTupleRoot(fixture.dataRootTupleRootNonce(), fixture.dataRootTupleRoot());
// Signature for the update.
Signature[] memory sigs = new Signature[](1);
bytes32 digest_eip191 = ECDSA.toEthSignedMessageHash(newDataRootTupleRoot);
(uint8 v, bytes32 r, bytes32 s) = cheats.sign(testPriv1, digest_eip191);
sigs[0] = Signature(v, r, s);
Validator[] memory valSet = new Validator[](1);
valSet[0] = Validator(cheats.addr(testPriv1), votingPower);
bridge.submitDataRootTupleRoot(
fixture.dataRootTupleRootNonce(), initialVelsetNonce, fixture.dataRootTupleRoot(), valSet, sigs
);
assertEq(bridge.state_eventNonce(), fixture.dataRootTupleRootNonce());
assertEq(bridge.state_dataRootTupleRoots(fixture.dataRootTupleRootNonce()), fixture.dataRootTupleRoot());
DataRootTuple memory _tuple;
_tuple.height = fixture.height();
_tuple.dataRoot = fixture.dataRoot();
assertTrue(bridge.verifyAttestation(fixture.dataRootTupleRootNonce(), _tuple, fixture.getDataRootTupleProof()));
}
// test case 1: a rollup header pointing to data that was not published to Celestia.
function testUnavailableData() public {
// let's create an arbitrary span that is out of bounds of the target Celestia block.
uint256 height = 21;
uint256 startIndex = 0;
uint256 length = 10;
SpanSequence memory sequence = SpanSequence(height, startIndex, length);
// an invalid header that points to data that don't exist in the target Celestia block.
RollupHeader memory header =
RollupHeader(0x215bd7509274803c556914e2a4b840826bb8b7d94de9344dfb2c2b0e71ba2d26, sequence);
// let's first calculate the square size of the Celestia block referenced in the header
// Note: the square size can also be computed from the shares proof.
(uint256 squareSize, DAVerifier.ErrorCodes error) =
DAVerifier.computeSquareSizeFromRowProof(fixture.getRowRootToDataRootProof());
assertEq(uint8(error), uint8(DAVerifier.ErrorCodes.NoError));
assertEq(fixture.squareSize(), squareSize);
// let's authenticate the row proof to the data root tuple root to be sure that
// the square size is valid.
AttestationProof memory attestationProof = AttestationProof(
fixture.dataRootTupleRootNonce(), fixture.getDataRootTuple(), fixture.getDataRootTupleProof()
);
bool success;
(success, error) = DAVerifier.verifyRowRootToDataRootTupleRoot(
bridge,
fixture.getFirstRowRootNode(),
fixture.getRowRootToDataRootProof(),
attestationProof,
fixture.dataRoot()
);
assertTrue(success);
assertEq(uint8(error), uint8(DAVerifier.ErrorCodes.NoError));
// Now, we're sure that the proof is valid and the square size is valid,
// we can compare the square size against the sequence referenced in the rollup
// header to see if the data exists.
uint256 endIndex = header.sequence.index + header.sequence.length;
// This checks that indeed the data referenced in the header is out of bounds of the square.
// Thus the data doesn't exist => unavailable.
assertTrue(!(squareSize >= endIndex));
}
// test case 2: a rollup header pointing to available data that is invalid.
function testInvalidData() public {
// let's create the sequence span of the rollup data in the Celestia block.
uint256 height = 21;
uint256 startIndex = 1;
uint256 length = 1;
SpanSequence memory sequence = SpanSequence(height, startIndex, length);
// a header that points to the rollup data posted in Celestia.
RollupHeader memory header =
RollupHeader(0x215bd7509274803c556914e2a4b840826bb8b7d94de9344dfb2c2b0e71ba2d26, sequence);
// let's first calculate the square size of the Celestia block referenced in the header
uint256 squareSize = DAVerifier.computeSquareSizeFromShareProof(fixture.getShareToRowRootProof());
assertEq(fixture.squareSize(), squareSize);
// let's create the share to data root tuple root proof to be able to validate the square
// size and the data.
SharesProof memory shareProof;
bytes[] memory data = new bytes[](1);
data[0] = fixture.shareData();
shareProof.data = data;
NamespaceMerkleMultiproof[] memory shareToRowRootProof = new NamespaceMerkleMultiproof[](1);
shareToRowRootProof[0] = fixture.getShareToRowRootProof();
shareProof.shareProofs = shareToRowRootProof;
shareProof.namespace = fixture.getNamespace();
NamespaceNode[] memory rowRoots = new NamespaceNode[](1);
rowRoots[0] = fixture.getFirstRowRootNode();
shareProof.rowRoots = rowRoots;
BinaryMerkleProof[] memory rowProofs = new BinaryMerkleProof[](1);
rowProofs[0] = fixture.getRowRootToDataRootProof();
shareProof.rowProofs = rowProofs;
shareProof.attestationProof = AttestationProof(
fixture.dataRootTupleRootNonce(), fixture.getDataRootTuple(), fixture.getDataRootTupleProof()
);
// let's authenticate the share proof to the data root tuple root to be sure that
// the square size is valid.
(bool success, DAVerifier.ErrorCodes error) =
DAVerifier.verifySharesToDataRootTupleRoot(bridge, shareProof, fixture.dataRoot());
assertTrue(success);
assertEq(uint8(error), uint8(DAVerifier.ErrorCodes.NoError));
// Now, we're sure that the proof is valid and the square size is valid,
// we can compare the square size against the sequence referenced in the rollup
// header to see if the data exists.
uint256 endIndex = header.sequence.index + header.sequence.length;
// This checks that indeed the data referenced in the header is part of the Celestia
// block, i.e. the sequence of spans in not out of the block's bounds.
assertTrue(squareSize >= endIndex);
// The last step is to prove that the share is part of the rollup data
// referenced in the rollup header.
// To do so, we will use the proof, already authenticated above, to get the index,
// Then, we will compare it against the spans sequence.
// since we're using nmt multiproofs, we have a begin key and an end key of the shares
// proven. However, in our case, we're only proving a single share.
// Thus, we can take the begin key as the index.
// Note: In the case of multiple shares in the proof, we will need to check all the shares
// if they're part of the sequence of spans. Then, only use the ones that are part of it.
uint256 shareIndexInRow = shareProof.shareProofs[0].beginKey;
uint256 shareIndexInRowMajorOrder =
shareIndexInRow + shareProof.rowProofs[0].numLeaves * shareProof.rowProofs[0].key;
// check if the share is part of the sequence of spans
assertTrue(header.sequence.index <= shareIndexInRowMajorOrder);
assertTrue(shareIndexInRowMajorOrder <= endIndex);
// At this level we can parse the share to get the transactions, and compare them to
// the rollup state. Then, we would be able to know if there is an invalid transaction
// or not.
// As explained in the test overview at the beginning of the file, the third transaction
// is an invalid transaction.
// For the sake of simplicity, we will not parse the shares as that is rollup
// specific.
}
function computeValidatorSetHash(Validator[] memory _validators) private pure returns (bytes32) {
return keccak256(abi.encode(_validators));
}
function domainSeparateDataRootTupleRoot(uint256 _nonce, bytes32 _dataRootTupleRoot)
private
pure
returns (bytes32)
{
bytes32 c = keccak256(abi.encode(DATA_ROOT_TUPLE_ROOT_DOMAIN_SEPARATOR, _nonce, _dataRootTupleRoot));
return c;
}
}
/// @title TestFixture contains the necessary information to create proofs for the blob
/// that was posted to Celestia. It represents the data mentioned in the comment at
/// the beginning of this file.
contract TestFixture {
/// @notice the share containing the blob that was published to Celestia.
bytes public shareData = abi.encodePacked(
hex"0000000000000000000000000000000000000012131232424324328899010000",
hex"0117283078623130393742314439393239623837336641304132413830383134",
hex"313339446231323838323932362c307862313039374231443939323962383733",
hex"6641304132413830383134313339446231323838323932372c313030293b2830",
hex"7862313039374231443939323962383733664130413241383038313431333944",
hex"6231323838323932362c30786231303937423144393932396238373366413041",
hex"32413830383134313339446231323838323932382c3230303030293b28307862",
hex"3130393742314439393239623837336641304132413830383134313339446231",
hex"323838323932362c307862313039374231443939323962383733664130413241",
hex"3830383134313339446231323838323932392c31303030302900000000000000",
hex"0000000000000000000000000000000000000000000000000000000000000000",
hex"0000000000000000000000000000000000000000000000000000000000000000",
hex"0000000000000000000000000000000000000000000000000000000000000000",
hex"0000000000000000000000000000000000000000000000000000000000000000",
hex"0000000000000000000000000000000000000000000000000000000000000000",
hex"0000000000000000000000000000000000000000000000000000000000000000"
);
/// @notice the first EDS row root.
bytes public firstRowRoot = abi.encodePacked(
hex"00000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000012131232424324328899eca190450f1424f4c96f50142cae150261466dcf4d47fb52b5e1cccef047f2fe"
);
/// @notice the second EDS row root.
bytes public secondRowRoot = abi.encodePacked(
hex"fffffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffffffffffffffffffffffffffffffffffffffffffffffffffffffe94ddc2da7e01f575f757fbb4fa42ba202d51a576b609a8aeb114fd226c6e7372"
);
/// @notice the third EDS row root.
bytes public thirdRowRoot = abi.encodePacked(
hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff33622135c2a12b0e5b3f67fd2cdacddbd58b88abbe67a9ce42e456bb88e137c7"
);
/// @notice the fourth EDS row root.
bytes public fourthRowRoot = abi.encodePacked(
hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc096faf6ef0b9f1d3439d619b29bbd4b810825e80b658ed1fa7525220dc796b0"
);
/// @notice the first EDS column root.
bytes public firstColumnRoot = abi.encodePacked(
hex"0000000000000000000000000000000000000000000000000000000004fffffffffffffffffffffffffffffffffffffffffffffffffffffffffe43e76fdc8b119c62dd02c197ad666b5c00ccc4736bf34573c9bd995558a2cf0d"
);
/// @notice the second EDS column root.
bytes public secondColumnRoot = abi.encodePacked(
hex"0000000000000000000000000000000000000012131232424324328899fffffffffffffffffffffffffffffffffffffffffffffffffffffffffe37a4e02492e5c60e661b531861ae3f45cf4d6ae5237bab37d857b39763373556"
);
/// @notice the third EDS column root.
bytes public thirdColumnRoot = abi.encodePacked(
hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff215bd7509274803c556914e2a4b840826bb8b7d94de9344dfb2c2b0e71ba2d26"
);
/// @notice the fourth EDS column root.
bytes public fourthColumnRoot = abi.encodePacked(
hex"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff35543dab513d606fd51dddbecce5a0ff86d5a5a4b1e081e6fb9afeeaa36ff6"
);
/// @notice the data root of the block containing the submitted blob.
bytes32 public dataRoot = 0xb9b0d94eae45e56a551e9415701bec462b18329d2a42bcce3e37a22a2ca83a6f;
/// @notice the height of the block containing the submitted blob.
uint256 public height = 21;
/// @notice the original square size of the block containing the submitted blob.
uint256 public squareSize = 2;
/// @notice the data root tuple root committing to the Celestia block.
bytes32 public dataRootTupleRoot = 0xd149f160dec348d8582b8c2629c91fab8189b8dca205c4c01bb378f2f5450c3b;
/// @notice the data root tuple root nonce in the Blobstream contract.
uint256 public dataRootTupleRootNonce = 2;
/// @notice the data root tuple to data root tuple root proof side nodes.
bytes32[] public dataRootProofSideNodes = [
bytes32(0x062f1c98fda4619e8ce92c39d1fa02dc68a880fdcf2c28c9ac31cf3abb1d6ab2),
bytes32(0x8aa95c4c4ef50468dc728d4e90a07560f1c0095d2df4491879e50ef96305751d)
];
/// @notice shares to row root proof side nodes.
NamespaceNode[] public shareToRowRootProofSideNodes = [
NamespaceNode(
Namespace(0x00, 0x00000000000000000000000000000000000000000000000000000004),
Namespace(0x00, 0x00000000000000000000000000000000000000000000000000000004),
0x2505b82d3c2a3f9262539478dd5f3257fcc452496f0c159c3bc5aae77e8f85ce
),
NamespaceNode(
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
0x9e80fef0ef39caacaa4e0f5b4ace155b42dd0ca70ecd72a047e68a5244a3c6fa
)
];
/// @notice row root to data root proof side nodes.
bytes32[] public rowRootToDataRootProofSideNodes = [
bytes32(0xba0a74b15f58344239a4e89847b45d39db30c257c1876a375e246c98c3666cab),
bytes32(0x89d6a174bb5327c792535cb769d388e5e5904ebdf2c650dc5ff2e1c90b5eb764),
bytes32(0x5e48d0e89322b5caac9925f7acf77621dc0b06844fef864a2ab92b108fae4101)
];
/// @notice the share's namespace.
function getNamespace() public pure returns (Namespace memory) {
return Namespace(0x00, 0x00000000000000000000000000000000000012131232424324328899);
}
/// @notice the data root tuple of the block containing the submitted blob.
function getDataRootTuple() public view returns (DataRootTuple memory) {
return DataRootTuple(height, dataRoot);
}
/// @notice the data root tuple to data root tuple root proof.
function getDataRootTupleProof() public view returns (BinaryMerkleProof memory) {
return BinaryMerkleProof(dataRootProofSideNodes, 0, 4);
}
/// @notice the first EDS row root.
function getFirstRowRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0x00, 0x00000000000000000000000000000000000000000000000000000004),
Namespace(0x00, 0x00000000000000000000000000000000000012131232424324328899),
0xeca190450f1424f4c96f50142cae150261466dcf4d47fb52b5e1cccef047f2fe
);
}
/// @notice the second EDS row root.
function getSecondRowRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0xff, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffe),
Namespace(0xff, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffe),
0x94ddc2da7e01f575f757fbb4fa42ba202d51a576b609a8aeb114fd226c6e7372
);
}
/// @notice the third EDS row root.
function getThirdRowRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
0x33622135c2a12b0e5b3f67fd2cdacddbd58b88abbe67a9ce42e456bb88e137c7
);
}
/// @notice the fourth EDS row root.
function getFourthRowRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
0xc096faf6ef0b9f1d3439d619b29bbd4b810825e80b658ed1fa7525220dc796b0
);
}
/// @notice the first EDS column root.
function getFirstColumnRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0xff, 0x00000000000000000000000000000000000000000000000000000004),
Namespace(0xff, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffe),
0x43e76fdc8b119c62dd02c197ad666b5c00ccc4736bf34573c9bd995558a2cf0d
);
}
/// @notice the second EDS column root.
function getSecondColumnRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0x00, 0x00000000000000000000000000000000000012131232424324328899),
Namespace(0xff, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffe),
0x37a4e02492e5c60e661b531861ae3f45cf4d6ae5237bab37d857b39763373556
);
}
/// @notice the third EDS column root.
function getThirdColumnRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0x00, 0x00000000000000000000000000000000000012131232424324328899),
Namespace(0xff, 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffe),
0x37a4e02492e5c60e661b531861ae3f45cf4d6ae5237bab37d857b39763373556
);
}
/// @notice the fourth EDS column root.
function getFourthColumnRootNode() public pure returns (NamespaceNode memory) {
return NamespaceNode(
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
Namespace(0xff, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff),
0x215bd7509274803c556914e2a4b840826bb8b7d94de9344dfb2c2b0e71ba2d26
);
}
/// @notice shares to row root proof.
function getShareToRowRootProof() public view returns (NamespaceMerkleMultiproof memory) {
return NamespaceMerkleMultiproof(1, 2, shareToRowRootProofSideNodes);
}
/// @notice row root to data root proof.
function getRowRootToDataRootProof() public view returns (BinaryMerkleProof memory) {
return BinaryMerkleProof(rowRootToDataRootProofSideNodes, 0, 8);
}
}