fix(security): attest LCD and treasury chain identity (#1392) #1413

Merged
PlasticDigits merged 3 commits from fix/issue-1392-chain-attestation into main 2026-10-06 02:18:26 +00:00
Owner

Configured LCD/RPC endpoints could serve another chain while discovery, quote caches and treasury preparation trusted their data. This change requires an explicit indexer network, checks every selected endpoint before reads/cache use, validates block chain IDs, and reports qualified health observations. A shared treasury policy corroborates fresh LCD/RPC blocks and protocol code identities before ticks, unsigned generation, signing, multisign, broadcast and retries. Credential-bearing URLs stay out of receipts and operational headers.

Fixes #1392. Invariants and third-party agent guidance: NET1392, endpoint policy, agent checklist, verification/results.

  • AC1: Wrong/unavailable/malformed identity cannot populate caches or prepare transactions; zero-call failure tests pass.
  • AC2: Every selected/fallback/recovered endpoint validates; cache namespaces and health qualify expected/observed network identity.
  • AC3: Relevant treasury workflows use shared preflight, including retries, direct multisig preparation and dry runs.
  • AC4: Correct Columbus-5 and explicit LocalTerra supported paths pass, including read-only live corroboration and local dry-run behavior.
  • Verify and retest: make verify-issue-1392 → 12 PASS / 0 FAIL / 0 SKIP. Both runs passed 482 unit tests, 39 API/ingestion integration tests, 13 treasury attestation tests, and 7 existing buyback failure tests plus math/shell regressions. Independent review, shell/format/docs checks and read-only network probes passed; commit hooks passed contract fmt/Clippy and gitleaks.
  • Production deployment, real signing/broadcast and a live treasury tick remain unverified; these were outside source/PR execution. Read-only/unit results do not establish deployment acceptance.

Before release, set production EXPECTED_CHAIN_ID=columbus-5, then rebuild/restart the indexer. Local deploy generates localterra. No schema or contract migration is required. Matching providers are corroboration, not cryptographic light-client authentication; reviewed code/hash pins still matter.

Agents should follow the linked checklist, complete runnable checks first, record revision/UTC/commands/scope, and fix/retest failures. An unavailable item may be explicitly SKIP with its attempted prerequisite and reason, while overall verification remains PASS if every completed check passes. Leave skipped criteria unchecked; executed failures cannot become skips or deployment evidence.

Configured LCD/RPC endpoints could serve another chain while discovery, quote caches and treasury preparation trusted their data. This change requires an explicit indexer network, checks every selected endpoint before reads/cache use, validates block chain IDs, and reports qualified health observations. A shared treasury policy corroborates fresh LCD/RPC blocks and protocol code identities before ticks, unsigned generation, signing, multisign, broadcast and retries. Credential-bearing URLs stay out of receipts and operational headers. Fixes #1392. Invariants and third-party agent guidance: [NET1392](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix/issue-1392-chain-attestation/skills/AGENTS_CHAIN_ATTESTATION.md), [endpoint policy](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix/issue-1392-chain-attestation/docs/runbooks/chain-attestation.md), [agent checklist](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix/issue-1392-chain-attestation/docs/qa/issue-1392/README.md), [verification/results](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/fix/issue-1392-chain-attestation/docs/qa/issue-1392/verification.md). - [x] AC1: Wrong/unavailable/malformed identity cannot populate caches or prepare transactions; zero-call failure tests pass. - [x] AC2: Every selected/fallback/recovered endpoint validates; cache namespaces and health qualify expected/observed network identity. - [x] AC3: Relevant treasury workflows use shared preflight, including retries, direct multisig preparation and dry runs. - [x] AC4: Correct Columbus-5 and explicit LocalTerra supported paths pass, including read-only live corroboration and local dry-run behavior. - [x] Verify and retest: `make verify-issue-1392` → 12 PASS / 0 FAIL / 0 SKIP. Both runs passed 482 unit tests, 39 API/ingestion integration tests, 13 treasury attestation tests, and 7 existing buyback failure tests plus math/shell regressions. Independent review, shell/format/docs checks and read-only network probes passed; commit hooks passed contract fmt/Clippy and gitleaks. - [ ] Production deployment, real signing/broadcast and a live treasury tick remain unverified; these were outside source/PR execution. Read-only/unit results do not establish deployment acceptance. Before release, set production `EXPECTED_CHAIN_ID=columbus-5`, then rebuild/restart the indexer. Local deploy generates `localterra`. No schema or contract migration is required. Matching providers are corroboration, not cryptographic light-client authentication; reviewed code/hash pins still matter. Agents should follow the linked checklist, complete runnable checks first, record revision/UTC/commands/scope, and fix/retest failures. An unavailable item may be explicitly SKIP with its attempted prerequisite and reason, while overall verification remains PASS if every completed check passes. Leave skipped criteria unchecked; executed failures cannot become skips or deployment evidence.
fix(security): attest LCD and treasury chain identity
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
016ae67d30
Require explicit indexer networks and verify each endpoint before data and cache use. Corroborate treasury block and code identities before preparation and retries, with documented agent verification.
docs: link chain attestation review and verification receipt
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
2f716c83de
Combine chain attestation, oracle safety and bounded discovery [skip ci]
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
d02b34e5bd
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!1413
No description provided.