feat: CW20 code-id audit harness (#589) #1114

Merged
PlasticDigits merged 2 commits from feat/589-cw20-codeid-audit-harness into main 2026-08-22 06:10:00 +00:00
PlasticDigits commented 2026-08-22 03:44:09 +00:00 (Migrated from gitlab.com)

Summary

  • Adds cw20-codeid-audits/ intake: LCD fetch pinned to CodeInfo.data_hash, decompile (fail-closed without wabt), fingerprint, catalogue A–CH, and per-code-id REPORT.md.
  • Policy change: byte-identical optimizer rebuild is an appendix only. Whitelist evidence is LCD pin + decomp + catalogue + suite. F6 pin is unchanged. H-01: no FoT swap math.
  • Layer A-mt / B-mt live in smartcontracts/tests (cw20_codeid_harness + mutants). Known-bad FoT stays red on 1:1 and P2. 10184 analogue (cw20-mintable) stays green.
  • 8266 pin 953AD60C… + REPORT.md verdict NO-GO until Layer A-lcd and Layer B-lt execute that wasm. Do not AddWhitelistedCodeId 8266.

Closes #589. Does not close #581 (SpaceUSD listing stays blocked on a GO report).

Test plan

  • make verify-issue-589 (16 passed, including retest)
  • cargo test --lib cw20_codeid_harness (34 tests)
  • cargo test --lib fot (known-bad 1:1 / P2 stay red)
  • fetch/fingerprint self-tests; decompile fail-closed without wabt (C2)
  • CODE_ID=8266 make verify-issue-589 after apt install wabt (decomp of LCD wasm)
  • CODE_ID=8266 LAYER_B_LT=1 make verify-issue-589 after make has-localterra (store that wasm; flip report only if 1:1 + P2 hold)

Skill: skills/AGENTS_CW20_CODE_ID_AUDIT.md (C589-1–C589-9).

## Summary - Adds `cw20-codeid-audits/` intake: LCD fetch pinned to `CodeInfo.data_hash`, decompile (fail-closed without wabt), fingerprint, catalogue **A–CH**, and per-code-id `REPORT.md`. - Policy change: byte-identical optimizer rebuild is an **appendix only**. Whitelist evidence is LCD pin + decomp + catalogue + suite. **F6** pin is unchanged. **H-01**: no FoT swap math. - Layer A-mt / B-mt live in `smartcontracts/tests` (`cw20_codeid_harness` + mutants). Known-bad FoT stays **red** on 1:1 and **P2**. 10184 analogue (`cw20-mintable`) stays **green**. - **8266** pin `953AD60C…` + `REPORT.md` verdict **NO-GO** until Layer A-lcd and Layer B-lt execute that wasm. Do **not** `AddWhitelistedCodeId 8266`. Closes #589. Does **not** close #581 (SpaceUSD listing stays blocked on a **GO** report). ## Test plan - [x] `make verify-issue-589` (16 passed, including retest) - [x] `cargo test --lib cw20_codeid_harness` (34 tests) - [x] `cargo test --lib fot` (known-bad 1:1 / P2 stay red) - [x] fetch/fingerprint self-tests; decompile fail-closed without wabt (C2) - [ ] `CODE_ID=8266 make verify-issue-589` after `apt install wabt` (decomp of LCD wasm) - [ ] `CODE_ID=8266 LAYER_B_LT=1 make verify-issue-589` after `make has-localterra` (store that wasm; flip report only if 1:1 + P2 hold) Skill: `skills/AGENTS_CW20_CODE_ID_AUDIT.md` (C589-1–C589-9).
PlasticDigits commented 2026-08-22 03:44:22 +00:00 (Migrated from gitlab.com)

mentioned in issue #589

mentioned in issue #589
PlasticDigits commented 2026-08-22 03:44:23 +00:00 (Migrated from gitlab.com)

mentioned in issue #581

mentioned in issue #581
PlasticDigits commented 2026-08-22 06:09:46 +00:00 (Migrated from gitlab.com)

added 6 commits

  • 7b01c62f...004929d2 - 5 commits from branch main
  • 0fd7e3a3 - Merge origin/main into feat/589-cw20-codeid-audit-harness

Compare with previous version

added 6 commits <ul><li>7b01c62f...004929d2 - 5 commits from branch <code>main</code></li><li>0fd7e3a3 - Merge origin/main into feat/589-cw20-codeid-audit-harness</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/396/diffs?diff_id=1977536521&start_sha=7b01c62ff72df9a3a36ebe6cf59e2b03bfc58fdc)
PlasticDigits (Migrated from gitlab.com) merged commit fa8550f356 into main 2026-08-22 06:10:00 +00:00
PlasticDigits commented 2026-08-22 06:10:01 +00:00 (Migrated from gitlab.com)

mentioned in commit fa8550f356

mentioned in commit fa8550f35614fdee0b75463b0f9a9ffd2f53166e
PlasticDigits commented 2026-08-22 06:29:12 +00:00 (Migrated from gitlab.com)

mentioned in issue #590

mentioned in issue #590
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!1114
No description provided.