Repository navigation
Commit 1e8019b
committed
Stop writing unused local DB event rows (#2887)
## Motivation
Raw RPC logs and signed take-order context rows are stored during local DB sync even though the order and vault read paths do not use them. They add write work and enlarge the producer's data-only dump and browser database.
Part of RAI-2648.
## Solution
- Stop building `raw_events`, `take_order_contexts`, and `context_values` inserts in the shared apply path used by the producer and browser.
- Exclude those three tables from newly exported SQL dumps.
- Update tests to assert that take orders are still written, skipped rows are omitted from exports, and producer export fixtures use retained data.
The existing table definitions remain. Publishing a newly filtered dump is part of the separate producer rollout.
## Checks
- `nix develop .#rust-shell -c cargo test -p raindex_common local_db:: --lib --quiet` — 575 passed.
- `nix develop .#rust-shell -c cargo test -p raindex_cli local_db:: --lib --quiet` — 53 passed.
- `nix develop .#rust-shell -c cargo fmt --all -- --check` — passed.
- `nix develop .#rust-shell -c cargo clippy -p raindex_common -p raindex_cli --lib -- -D warnings` — passed.
- CI's `nix develop .#wasm-shell` Wasm test command — passed; runner reported no runnable tests for the four packages on this host.
- Two read-only local Codex reviews and a CodeRabbit full review — no actionable findings.
Review focus: confirm no retained query or producer path depends on those three row types. The local workspace has unrelated unstaged benchmarking edits; they are not in this PR.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
* **Data Handling**
* Local database exports no longer include raw event records, take-order contexts, or context values.
* Event processing no longer saves raw event records or signed take-order context data. It continues to save take-order information and other decoded event data.
* Local database export checks now verify that excluded records are absent, and pipeline checks cover deposit data and watermark handling. These changes keep exported and stored data focused on supported decoded information.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 4e90291 commit 1e8019b
5 files changed
Lines changed: 46 additions & 462 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | | - | |
| 198 | + | |
| 199 | + | |
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
455 | 456 | | |
456 | 457 | | |
457 | 458 | | |
| |||
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
538 | | - | |
| 539 | + | |
539 | 540 | | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
543 | | - | |
544 | | - | |
| 544 | + | |
| 545 | + | |
545 | 546 | | |
546 | | - | |
| 547 | + | |
547 | 548 | | |
548 | 549 | | |
549 | 550 | | |
| |||
596 | 597 | | |
597 | 598 | | |
598 | 599 | | |
599 | | - | |
| 600 | + | |
600 | 601 | | |
601 | 602 | | |
602 | 603 | | |
603 | 604 | | |
604 | 605 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
610 | 612 | | |
611 | 613 | | |
612 | 614 | | |
| |||
702 | 704 | | |
703 | 705 | | |
704 | 706 | | |
705 | | - | |
706 | | - | |
| 707 | + | |
| 708 | + | |
707 | 709 | | |
708 | | - | |
| 710 | + | |
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
712 | | - | |
| 714 | + | |
713 | 715 | | |
714 | 716 | | |
715 | 717 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
14 | 20 | | |
15 | 21 | | |
16 | 22 | | |
| |||
1260 | 1266 | | |
1261 | 1267 | | |
1262 | 1268 | | |
1263 | | - | |
1264 | | - | |
1265 | | - | |
1266 | | - | |
1267 | | - | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
1272 | | - | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | 1269 | | |
1278 | 1270 | | |
1279 | 1271 | | |
| |||
1349 | 1341 | | |
1350 | 1342 | | |
1351 | 1343 | | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | 1344 | | |
1371 | 1345 | | |
1372 | 1346 | | |
| |||
0 commit comments