Commit a4ca0df
authored
feat: Blob filestores (#18971)
Added `FileStoreBlobClient` that enables reading and writing blobs to
cloud storage (S3, GCS) or local filesystem. This provides an
alternative blob source alongside the existing blob sink server, L1
consensus layer, and archive (e.g., Blobscan).
## Blob Download Logic
The download strategy varies based on sync state:
- **Historical sync:** Blob sink → FileStore → L1 consensus → Archive
- **Near-tip sync:** Blob sink → FileStore → L1 consensus → FileStore
(with retries) → Archive
Near-tip sync includes retries with exponential backoff, assuming
filestores should already contain the data when blobs are queried.
## Blob Upload Logic
Blobs are uploaded only if the node has write access to a filestore.
Uploads occur in three scenarios:
1. `SequencerPublisher` publishes blobs when posting a checkpoint to L1
2. The archiver fetches blobs from any source
3. A validator receives a valid block proposal
## Configuration
The following environment variables are introduced:
| Variable | Description |
|----------|-------------|
| `BLOB_FILE_STORE_URLS` | Comma-separated URLs for reading blobs
(`s3://`, `gs://`, `file://`, `https://`) |
| `BLOB_FILE_STORE_UPLOAD_URL` | URL for uploading blobs (`s3://`,
`gs://`, `file://`) |
`BLOB_FILE_STORE_URLS` can also be defined in the network configuration,
enabling centralized management of these URLs across nodes.File tree
25 files changed
+1702
-50
lines changed- yarn-project
- archiver/src/archiver
- l1
- aztec-node/src/aztec-node
- blob-sink
- src
- client
- filestore
- cli/src/config
- foundation/src/config
- sequencer-client/src/publisher
- validator-client
- src
25 files changed
+1702
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
| 973 | + | |
973 | 974 | | |
974 | 975 | | |
975 | 976 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
159 | 163 | | |
160 | 164 | | |
161 | 165 | | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
| |||
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| 218 | + | |
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| |||
221 | 227 | | |
222 | 228 | | |
223 | 229 | | |
224 | | - | |
| 230 | + | |
225 | 231 | | |
226 | 232 | | |
| 233 | + | |
227 | 234 | | |
228 | | - | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
229 | 241 | | |
230 | 242 | | |
231 | 243 | | |
| |||
241 | 253 | | |
242 | 254 | | |
243 | 255 | | |
| 256 | + | |
244 | 257 | | |
245 | 258 | | |
246 | 259 | | |
| |||
278 | 291 | | |
279 | 292 | | |
280 | 293 | | |
| 294 | + | |
281 | 295 | | |
282 | 296 | | |
283 | 297 | | |
| |||
315 | 329 | | |
316 | 330 | | |
317 | 331 | | |
| 332 | + | |
318 | 333 | | |
319 | | - | |
| 334 | + | |
320 | 335 | | |
321 | 336 | | |
322 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
197 | 202 | | |
198 | 203 | | |
199 | 204 | | |
200 | | - | |
201 | | - | |
202 | 205 | | |
203 | 206 | | |
204 | 207 | | |
| |||
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
269 | 291 | | |
270 | 292 | | |
271 | 293 | | |
| |||
331 | 353 | | |
332 | 354 | | |
333 | 355 | | |
| 356 | + | |
334 | 357 | | |
335 | 358 | | |
336 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
84 | 94 | | |
85 | 95 | | |
86 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
87 | 110 | | |
88 | 111 | | |
89 | 112 | | |
| |||
99 | 122 | | |
100 | 123 | | |
101 | 124 | | |
102 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
103 | 131 | | |
| 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 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
10 | 22 | | |
11 | 23 | | |
12 | 24 | | |
| |||
18 | 30 | | |
19 | 31 | | |
20 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
21 | 40 | | |
22 | | - | |
23 | 41 | | |
0 commit comments