Use verified treasury custody for native listing markets #1442

Merged
PlasticDigits merged 1 commit from fix/issue-1437-treasury-custody into main 2026-10-07 13:15:49 +00:00
Owner

Production readback before the GeckoTerminal submission showed zero native funds at the mapper: its configured treasury is the actual custodian. The original #1437 rule therefore withheld every native listing market. This correction derives the backing address from the pinned mapper's historical Config.treasury at the event and predecessor heights, requires canonical equal identities and exact served-height headers, and reconciles gross wrap inflow / withdraw_amount outflow while keeping projected principal fee-exclusive.

An additive migration records custody_address without rewriting applied history. The latest unproven observation suppresses older backing, and NULL or different-treasury principal cannot inflate current feeds. Historical LCD requests also carry height in the URL: live probes proved a proxy otherwise reused an earlier response for a different height header. Virtual requests remain SQL-only and preserve response/accounting isolation.

Refs #1437. Required for the approved production deployment and regular GeckoTerminal submission following #1441.

Verification: make verify-issue-1437 PASS13/FAIL0/SKIP0; library577,API11,ingestion5 passed and retested using the same executables. #685/#646/#684/#694/#631 and #1395 passed. Independent assembled-source review, normal commit hooks and secret scanning passed. Original migration is byte-identical; only the additive source-provenance migration is new.

Live read-only evidence established canonical treasury custody and demonstrated matching historical Config headers after adding a height-specific URL key. No wallet/chain transaction or production DB mutation was made by this patch. The existing database roles and credentials stay intact for the separately controlled rollout.

Agent review: follow docs/qa/issue-1437/README.md and skills/AGENTS_LISTING_VIRTUAL_PAIRS.md. Run make verify-issue-1437 in a disposable worktree/Postgres database, complete runnable checks, and record genuinely unavailable items as explicit SKIP with PASS WITH SKIPS. Executed implementation failures must be fixed and retested; source PASS is not deployment proof.

Production readback before the GeckoTerminal submission showed zero native funds at the mapper: its configured treasury is the actual custodian. The original #1437 rule therefore withheld every native listing market. This correction derives the backing address from the pinned mapper's historical Config.treasury at the event and predecessor heights, requires canonical equal identities and exact served-height headers, and reconciles gross wrap inflow / withdraw_amount outflow while keeping projected principal fee-exclusive. An additive migration records custody_address without rewriting applied history. The latest unproven observation suppresses older backing, and NULL or different-treasury principal cannot inflate current feeds. Historical LCD requests also carry height in the URL: live probes proved a proxy otherwise reused an earlier response for a different height header. Virtual requests remain SQL-only and preserve response/accounting isolation. Refs #1437. Required for the approved production deployment and regular GeckoTerminal submission following #1441. Verification: make verify-issue-1437 PASS13/FAIL0/SKIP0; library577,API11,ingestion5 passed and retested using the same executables. #685/#646/#684/#694/#631 and #1395 passed. Independent assembled-source review, normal commit hooks and secret scanning passed. Original migration is byte-identical; only the additive source-provenance migration is new. Live read-only evidence established canonical treasury custody and demonstrated matching historical Config headers after adding a height-specific URL key. No wallet/chain transaction or production DB mutation was made by this patch. The existing database roles and credentials stay intact for the separately controlled rollout. Agent review: follow docs/qa/issue-1437/README.md and skills/AGENTS_LISTING_VIRTUAL_PAIRS.md. Run make verify-issue-1437 in a disposable worktree/Postgres database, complete runnable checks, and record genuinely unavailable items as explicit SKIP with PASS WITH SKIPS. Executed implementation failures must be fixed and retested; source PASS is not deployment proof.
Resolve native listing backing from the configured treasury
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
802b61516d
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!1442
No description provided.