Commit e007e7b
authored
refactor: removing blob index (#19204)
## Summary
Removed the `index` field from blob-related data structures (`BlobJson`,
`BlobWithIndex`, `BlobsWithIndexes`) since it was unreliable across
different blob sources and completely unused by production code.
## Motivation
The blob `index` field was problematic for several reasons:
### 1. Inconsistent values across sources
| Source | Index Value | Issue |
|--------|-------------|-------|
| L1 Beacon API | Correct (0, 1, 2...) | Only reliable source |
| FileStore | Always `-1` | By design - filestores don't track original
indices |
| Blobscan Archive | Re-indexed (0, 1, 2...) | Incorrect - returns
indices relative to each API response, not the original block indices |
### 2. Production code never used the index
The archiver's blob retrieval immediately discarded the index by mapping
to just the blob data before processing.
### 3. The `indices` parameter was never used
The `getBlobSidecar()` method had an optional `indices` parameter that
was never called with actual values.
### 4. `BlobsWithIndexes.getBlobsFromIndices` was buggy
The method used array position instead of the blob's actual index field
for filtering, making it fundamentally broken.
## Changes
- Removed `index: string` from `BlobJson` interface
- Deleted `BlobWithIndex` and `BlobsWithIndexes` classes
- Updated all client interfaces to return `Blob[]` directly
- Removed unused `indices` parameter from `getBlobSidecar()`
- Updated testsFile tree
21 files changed
+152
-398
lines changed- yarn-project
- archiver/src/archiver
- l1
- blob-client
- src
- archive
- blobstore
- client
- filestore
- types
- blob-lib/src
21 files changed
+152
-398
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
| 201 | + | |
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
| |||
1207 | 1206 | | |
1208 | 1207 | | |
1209 | 1208 | | |
1210 | | - | |
1211 | | - | |
| 1209 | + | |
| 1210 | + | |
1212 | 1211 | | |
1213 | 1212 | | |
1214 | 1213 | | |
| |||
2023 | 2022 | | |
2024 | 2023 | | |
2025 | 2024 | | |
2026 | | - | |
| 2025 | + | |
2027 | 2026 | | |
2028 | 2027 | | |
2029 | 2028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
| 334 | + | |
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
Lines changed: 15 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
22 | | - | |
| 20 | + | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | | - | |
| 27 | + | |
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
36 | | - | |
37 | | - | |
38 | 34 | | |
39 | 35 | | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
43 | | - | |
| 39 | + | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
49 | | - | |
50 | | - | |
| 45 | + | |
| 46 | + | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
59 | 55 | | |
60 | 56 | | |
61 | 57 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 58 | | |
81 | 59 | | |
82 | 60 | | |
83 | 61 | | |
84 | 62 | | |
85 | 63 | | |
86 | | - | |
| 64 | + | |
87 | 65 | | |
88 | 66 | | |
89 | 67 | | |
| |||
92 | 70 | | |
93 | 71 | | |
94 | 72 | | |
95 | | - | |
96 | | - | |
| 73 | + | |
| 74 | + | |
97 | 75 | | |
98 | 76 | | |
99 | 77 | | |
100 | 78 | | |
101 | | - | |
102 | 79 | | |
103 | 80 | | |
104 | | - | |
| 81 | + | |
105 | 82 | | |
106 | 83 | | |
107 | 84 | | |
108 | 85 | | |
109 | 86 | | |
110 | 87 | | |
111 | | - | |
| 88 | + | |
112 | 89 | | |
113 | 90 | | |
114 | 91 | | |
| |||
117 | 94 | | |
118 | 95 | | |
119 | 96 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 97 | | |
125 | 98 | | |
126 | 99 | | |
127 | | - | |
| 100 | + | |
128 | 101 | | |
129 | | - | |
130 | | - | |
| 102 | + | |
| 103 | + | |
131 | 104 | | |
132 | | - | |
| 105 | + | |
133 | 106 | | |
134 | 107 | | |
135 | | - | |
| 108 | + | |
136 | 109 | | |
137 | 110 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | | - | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
0 commit comments