fix(indexer): remove actor digests and bound daily evidence exports (#1397) #1424

Merged
PlasticDigits merged 1 commit from fix/issue-1397-evidence-privacy into main 2026-10-06 06:23:08 +00:00
Owner

Public daily exports previously exposed stable unsalted actor hashes and allowed export SQL to run without a dedicated work budget. Schema 2 removes actor identifiers and digests from the response and SQL, while explicitly documenting retained public transaction linkage and its lack of anonymity. Exact economic fields and protocol contract identities are preserved.

The endpoint now has day/surface-scoped e2. cursors, a two-request admission limit, bounded acquisition and SQL/request deadlines, six indexed source limits, and cleanup after cancellation. A disconnected caller retains its admission slot until the bounded worker settles. Legacy e1. cursors return 400 and must be restarted; consumers must check schema_version and stop actor-hash grouping.

Fixes #1397. Aggregate digest work in #1206 remains separate.

Acceptance criteria

  • AC1: Realistic public-chain-linked privacy contract; synthetic dictionary and transaction-join tests verify the stated limitation.
  • AC2: No actor grouping or digest remains. Persistent public-chain linkage is documented; HMAC key rotation is inapplicable because no HMAC/key path exists.
  • AC3: Empty/dense days, every surface, pagination/cursor abuse, acquisition, SQL, HTTP and admission budgets verified. Twenty-four query-plan scenarios per run use 20,000 synthetic rows per source.
  • AC4: Cancellation and genuine SQL timeouts preserve ordinary DB-backed API progress and reusable pool sessions.
  • Invariants, API migration documentation and third-party agent instructions updated and crosslinked.
  • Production deployment/readback was not performed. Six ordinary indexes require startup time, storage and ledger-write locks; the rollout procedure is documented.

Validation

  • make verify-issue-1397: PASS; 5 library, 14 API and 6 database-budget tests, each run twice. Independent API/DB agents also repeated their suites successfully.
  • Existing security/rate-limit suite: 42/42 PASS with EXPECTED_CHAIN_ID=columbus-5 in the synthetic fixture.
  • make verify-issue-1205: PASS, all eight accounting/structure checks, including the updated API suite.
  • Pre-commit contract formatting and Clippy checks passed. Frontend hook checks were skipped because this isolated worktree has no node_modules; this change contains no frontend code.
  • Tracked-tree and final documentation gitleaks scans: PASS, no leaks. Diff and shell checks passed; independent review found no remaining blocking defects.

Synthetic PostgreSQL ran in an exclusive disposable tmpfs container with durability disabled. These receipts establish source behavior, not production latency or deployment. Initial strict index-name, truncated activity-observer and missing test-chain configuration failures were corrected and fully retested; no executed failure was reclassified as a skip.

Agent review checklist

Read E1397 invariants, then follow the step-by-step checklist and verification receipt. Use an isolated synthetic PostgreSQL database, run make verify-issue-1397, inspect all four acceptance rows and confirm cursor/schema migration behavior. Record revision, UTC time, exact commands and outcomes. Complete runnable checks first; unavailable items may be explicit SKIP with overall PASS WITH SKIPS, provided executed checks pass. Skipped production checks stay unverified.

Verified implementation commit: d5075e571e139529693687acfb254adea97c745d.

Public daily exports previously exposed stable unsalted actor hashes and allowed export SQL to run without a dedicated work budget. Schema 2 removes actor identifiers and digests from the response and SQL, while explicitly documenting retained public transaction linkage and its lack of anonymity. Exact economic fields and protocol contract identities are preserved. The endpoint now has day/surface-scoped `e2.` cursors, a two-request admission limit, bounded acquisition and SQL/request deadlines, six indexed source limits, and cleanup after cancellation. A disconnected caller retains its admission slot until the bounded worker settles. Legacy `e1.` cursors return 400 and must be restarted; consumers must check `schema_version` and stop actor-hash grouping. Fixes #1397. Aggregate digest work in #1206 remains separate. ## Acceptance criteria - [x] AC1: Realistic public-chain-linked privacy contract; synthetic dictionary and transaction-join tests verify the stated limitation. - [x] AC2: No actor grouping or digest remains. Persistent public-chain linkage is documented; HMAC key rotation is inapplicable because no HMAC/key path exists. - [x] AC3: Empty/dense days, every surface, pagination/cursor abuse, acquisition, SQL, HTTP and admission budgets verified. Twenty-four query-plan scenarios per run use 20,000 synthetic rows per source. - [x] AC4: Cancellation and genuine SQL timeouts preserve ordinary DB-backed API progress and reusable pool sessions. - [x] Invariants, API migration documentation and third-party agent instructions updated and crosslinked. - [ ] Production deployment/readback was not performed. Six ordinary indexes require startup time, storage and ledger-write locks; the rollout procedure is documented. ## Validation - `make verify-issue-1397`: PASS; 5 library, 14 API and 6 database-budget tests, each run twice. Independent API/DB agents also repeated their suites successfully. - Existing security/rate-limit suite: 42/42 PASS with `EXPECTED_CHAIN_ID=columbus-5` in the synthetic fixture. - `make verify-issue-1205`: PASS, all eight accounting/structure checks, including the updated API suite. - Pre-commit contract formatting and Clippy checks passed. Frontend hook checks were skipped because this isolated worktree has no node_modules; this change contains no frontend code. - Tracked-tree and final documentation gitleaks scans: PASS, no leaks. Diff and shell checks passed; independent review found no remaining blocking defects. Synthetic PostgreSQL ran in an exclusive disposable tmpfs container with durability disabled. These receipts establish source behavior, not production latency or deployment. Initial strict index-name, truncated activity-observer and missing test-chain configuration failures were corrected and fully retested; no executed failure was reclassified as a skip. ## Agent review checklist Read [E1397 invariants](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/d5075e571e139529693687acfb254adea97c745d/skills/AGENTS_EVIDENCE_EXPORT_PRIVACY.md), then follow the [step-by-step checklist](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/d5075e571e139529693687acfb254adea97c745d/docs/qa/issue-1397/README.md) and [verification receipt](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/d5075e571e139529693687acfb254adea97c745d/docs/qa/issue-1397/verification.md). Use an isolated synthetic PostgreSQL database, run `make verify-issue-1397`, inspect all four acceptance rows and confirm cursor/schema migration behavior. Record revision, UTC time, exact commands and outcomes. Complete runnable checks first; unavailable items may be explicit SKIP with overall PASS WITH SKIPS, provided executed checks pass. Skipped production checks stay unverified. Verified implementation commit: `d5075e571e139529693687acfb254adea97c745d`.
fix(indexer): remove actor digests and bound evidence exports
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
d5075e571e
Version public-chain evidence and cursor scopes. Bound export admission, indexed pagination, and SQL deadlines with cleanup after cancellation.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/cl8y-dex-terraclassic!1424
No description provided.