Bug: register-tokens incomplete — Anvil1 unregistered, Terra incoming missing, USTC missing #85

Closed
opened 2026-03-30 02:40:17 +00:00 by Brouie · 10 comments
Brouie commented 2026-03-30 02:40:17 +00:00 (Migrated from gitlab.com)

Ran Verify All on Settings > Tokens page (v0.1.197/84cf7e4). Three systematic gaps in the token registration deploy:

  1. Anvil1: 0/7 on every token. No tokens registered, no dest mappings, no incoming mappings. Entire chain skipped by register-tokens.

  2. LocalTerra incoming mappings: missing for all CW20 tokens (TKNA/B/C, KDEC, SOL) from both Anvil and Anvil1. Only LUNC (uluna) has full 4/4 Terra registration. Outgoing dest mappings exist but incoming set_incoming_token_mapping was never called.

  3. USTC (uusd): 0/7 everywhere. Not registered on any chain, no dest mappings, no incoming mappings.

What works: Anvil has 7/7 on all tokens. Solana Localnet has 5/5 on all SPL tokens except SOL/wSOL (#84). Terra outgoing dest mappings present for CW20s.

Separate from #84 which covers the wSOL mint-not-on-localnet issue.

Ran Verify All on Settings > Tokens page (v0.1.197/84cf7e4). Three systematic gaps in the token registration deploy: 1. Anvil1: 0/7 on every token. No tokens registered, no dest mappings, no incoming mappings. Entire chain skipped by register-tokens. 2. LocalTerra incoming mappings: missing for all CW20 tokens (TKNA/B/C, KDEC, SOL) from both Anvil and Anvil1. Only LUNC (uluna) has full 4/4 Terra registration. Outgoing dest mappings exist but incoming set_incoming_token_mapping was never called. 3. USTC (uusd): 0/7 everywhere. Not registered on any chain, no dest mappings, no incoming mappings. What works: Anvil has 7/7 on all tokens. Solana Localnet has 5/5 on all SPL tokens except SOL/wSOL (#84). Terra outgoing dest mappings present for CW20s. Separate from #84 which covers the wSOL mint-not-on-localnet issue.
Brouie commented 2026-03-30 02:49:03 +00:00 (Migrated from gitlab.com)

Confirmed E2E impact: Anvil->LocalTerra 100 TKNA deposit succeeded (tokens locked) but HASH SUBMISSION FAILED on Terra side — 'Token not mapped for source chain: chain=0x00000001, token=terra17p9rzw...ydrqk7'. The missing Terra incoming mapping causes operator withdrawal to be rejected. 99.50 TKNA stuck in limbo. TransferStatusPage correctly shows the error at step 2/4 with resolved params.

Also: the retry/resubmit button on the HASH SUBMISSION FAILED screen doesn't work — clicking it just loops back to the deposit step instead of retrying the hash submission.

Confirmed E2E impact: Anvil->LocalTerra 100 TKNA deposit succeeded (tokens locked) but HASH SUBMISSION FAILED on Terra side — 'Token not mapped for source chain: chain=0x00000001, token=terra17p9rzw...ydrqk7'. The missing Terra incoming mapping causes operator withdrawal to be rejected. 99.50 TKNA stuck in limbo. TransferStatusPage correctly shows the error at step 2/4 with resolved params. Also: the retry/resubmit button on the HASH SUBMISSION FAILED screen doesn't work — clicking it just loops back to the deposit step instead of retrying the hash submission.
PlasticDigits commented 2026-03-30 03:57:24 +00:00 (Migrated from gitlab.com)

USTC (uusd) and QA scope

USTC showing 0/7 in Settings → Tokens → Verify All is expected for the current QA stack: setup-bridge.sh only runs add_token for uusd on Terra. register-tokens.ts / qa-full-token-setup do not register uusd on EVM TokenRegistries or full Terra↔EVM/Solana mappings.

We do not need to test or fully register USTC in QA paths at this time. Full USTC parity can be a separate product-driven scope later.

(Tracked alongside #85 registration/verify gaps for Anvil1 / Terra incoming.)

## USTC (uusd) and QA scope **USTC showing 0/7 in Settings → Tokens → Verify All is expected** for the current QA stack: `setup-bridge.sh` only runs `add_token` for `uusd` on Terra. `register-tokens.ts` / `qa-full-token-setup` do **not** register `uusd` on EVM TokenRegistries or full Terra↔EVM/Solana mappings. **We do not need to test or fully register USTC in QA paths at this time.** Full USTC parity can be a separate product-driven scope later. (Tracked alongside #85 registration/verify gaps for Anvil1 / Terra incoming.)
PlasticDigits commented 2026-03-30 04:15:19 +00:00 (Migrated from gitlab.com)

Update (branch feat/solana-integration, commit cda6bf7)

Fixes in this push:

  • QA env: After make deploy, start-qa runs scripts/qa/sync-local-env-from-forge-broadcast.sh so .deploy/local.env EVM / EVM1 bridge, registry, and LockUnlock addresses match Foundry run-latest.json on chains 31337 and 31338 (avoids stale proxy addresses before qa:full-token-setup).
  • Terra incoming registration: Shared terraIncomingSrcTokenB64() (native denoms → keccak UTF-8; CW20 → canonical 32-byte bech32 as base64). register-tokens.ts uses it for incoming mappings; unit tests in terraTokenEncoding.test.ts and chain checks in token-registration.integration.test.ts.

@brouie Please QA-verify on a host with Docker + this branch:

  1. From repo root: make start-qa (full stack: compose, migrate, deploy, broadcast sync, qa:full-token-setup, operator, canceler — see scripts/qa/README.md).
  2. Confirm Settings → Verify All (or equivalent): EVM / Terra / Solana checks pass as before. USTC / uusd showing 0/7 remains expected for local QA; no need to block on USTC registration.
  3. Spot-check Transfer token selectors and one EVM ↔ Terra path if CW20 is deployed on your LocalTerra image.
  4. Optional: cd packages/frontend && npx vitest run src/services/terraTokenEncoding.test.ts and, with chains up, make test-frontend-integration-chains.

Thanks!

**Update (branch `feat/solana-integration`, commit `cda6bf7`)** Fixes in this push: - **QA env:** After `make deploy`, `start-qa` runs `scripts/qa/sync-local-env-from-forge-broadcast.sh` so `.deploy/local.env` EVM / EVM1 bridge, registry, and LockUnlock addresses match Foundry `run-latest.json` on chains 31337 and 31338 (avoids stale proxy addresses before `qa:full-token-setup`). - **Terra incoming registration:** Shared `terraIncomingSrcTokenB64()` (native denoms → keccak UTF-8; CW20 → canonical 32-byte bech32 as base64). `register-tokens.ts` uses it for incoming mappings; unit tests in `terraTokenEncoding.test.ts` and chain checks in `token-registration.integration.test.ts`. @brouie **Please QA-verify** on a host with Docker + this branch: 1. From repo root: `make start-qa` (full stack: compose, migrate, deploy, broadcast sync, `qa:full-token-setup`, operator, canceler — see `scripts/qa/README.md`). 2. Confirm **Settings → Verify All** (or equivalent): EVM / Terra / Solana checks pass as before. **USTC / `uusd` showing 0/7 remains expected** for local QA; no need to block on USTC registration. 3. Spot-check **Transfer** token selectors and one **EVM ↔ Terra** path if CW20 is deployed on your LocalTerra image. 4. Optional: `cd packages/frontend && npx vitest run src/services/terraTokenEncoding.test.ts` and, with chains up, `make test-frontend-integration-chains`. Thanks!
Brouie commented 2026-03-30 05:15:16 +00:00 (Migrated from gitlab.com)

Partial fix in cda6bf7: Terra incoming mappings now 4/4 on all tokens (was broken yesterday). That item is resolved.

Still open:

  1. Anvil1 still 0/7 on every token — no registrations, no dest mappings, no incoming mappings
  2. USTC (uusd) still 0/7 everywhere — not registered on any chain
    SOL Solana PDAs still 2/5 tracked separately in #84.
Partial fix in cda6bf7: Terra incoming mappings now 4/4 on all tokens (was broken yesterday). That item is resolved. Still open: 1. Anvil1 still 0/7 on every token — no registrations, no dest mappings, no incoming mappings 2. USTC (uusd) still 0/7 everywhere — not registered on any chain SOL Solana PDAs still 2/5 tracked separately in #84.
Brouie commented 2026-03-30 06:14:21 +00:00 (Migrated from gitlab.com)

mentioned in issue #67

mentioned in issue #67
PlasticDigits commented 2026-03-30 07:50:15 +00:00 (Migrated from gitlab.com)

@brouie USTC (uusd) 0/7 is expected with the current QA setup: qa:full-token-setup / register-tokens.ts do not register uusd on any chain (no dest/incoming mappings). That token can be dropped from the Settings → Tokens verification matrix (or marked skipped) so it does not look like a deploy regression.

@brouie **USTC (`uusd`) 0/7 is expected** with the current QA setup: `qa:full-token-setup` / `register-tokens.ts` do not register `uusd` on any chain (no dest/incoming mappings). That token can be dropped from the Settings → Tokens verification matrix (or marked skipped) so it does not look like a deploy regression.
PlasticDigits commented 2026-03-30 07:59:20 +00:00 (Migrated from gitlab.com)

@brouie When comparing Settings → Tokens / Verify All to the QA server, the full laptop sequence in scripts/qa/README.md (On your laptop) matters: SSH -L forwards, scp the server’s .deploy/local.env into your clone, run ./scripts/qa/write-frontend-env-local.sh, then restart Vite (npm run dev) so VITE_EVM1_* and token addresses match the latest deploy. Skipping scp/regenerate/restart often looks like “Anvil OK, Anvil1 0/7” even when the server registered correctly.

@brouie When comparing **Settings → Tokens / Verify All** to the QA server, the full laptop sequence in `scripts/qa/README.md` (**On your laptop**) matters: **SSH `-L` forwards**, **`scp` the server’s `.deploy/local.env`** into your clone, run **`./scripts/qa/write-frontend-env-local.sh`**, then **restart Vite** (`npm run dev`) so `VITE_EVM1_*` and token addresses match the latest deploy. Skipping `scp`/regenerate/restart often looks like “Anvil OK, Anvil1 0/7” even when the server registered correctly.
Brouie commented 2026-03-31 07:43:47 +00:00 (Migrated from gitlab.com)

register-tokens fix is working great -- pulled 74b5f3e, clean restart, 6/7 tokens now 23/23 verified. SOL route works too (#84 confirmed fixed). only USTC (uusd) is still completely unregistered: 0/7, no dest mappings, no incoming mappings, no Solana PDA on any chain. everything else is green.

register-tokens fix is working great -- pulled 74b5f3e, clean restart, 6/7 tokens now 23/23 verified. SOL route works too (#84 confirmed fixed). only USTC (uusd) is still completely unregistered: 0/7, no dest mappings, no incoming mappings, no Solana PDA on any chain. everything else is green.
PlasticDigits commented 2026-04-01 01:41:17 +00:00 (Migrated from gitlab.com)

@Brouie uusd unregistered is expected, please close if remaining are passing

@Brouie uusd unregistered is expected, please close if remaining are passing
Brouie commented 2026-04-01 03:40:09 +00:00 (Migrated from gitlab.com)

closing -- 6/7 tokens 23/23 verified. USTC (uusd) unregistered is expected per dev.

closing -- 6/7 tokens 23/23 verified. USTC (uusd) unregistered is expected per dev.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-01 03:40:26 +00:00
Sign in to join this conversation.
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-bridge-monorepo#85
No description provided.