ops: post-merge !394–!396 — indexer fees migrate, Swap gas deploy, 8266 still NO-GO #590

Closed
opened 2026-08-22 06:29:11 +00:00 by PlasticDigits · 24 comments
PlasticDigits commented 2026-08-22 06:29:11 +00:00 (Migrated from gitlab.com)

Why

!1112 / !1113 / !1114 are on main. Remaining work is ops deploy, LocalTerra QA, and the LCD-wasm audit layers that #589 did not automate. Do not treat green make verify-issue-589 as 8266 clearance.

Related: #586 (closes via !1112; remaining QA), #587 (closes via !1113; e2e-tx), #589 (closes via !1114; A-lcd/B-lt gap), #581 (reopened — SpaceUSD/UST1 still blocked).

Tasks

Coolify / indexer / dApp

  • Apply indexer/migrations/20260821120000_protocol_fees.sql on QA + prod indexer.
  • Set indexer WRAP_MAPPER_ADDRESS (bech32). Empty → wrap/unwrap sources omitted, not fake $0.
  • Confirm GET /api/v1/overview returns total_fees_24h_usd / 7d / 30d (additive) and GET /api/v1/protocol/fees?window=24h is 60s-cached.
  • Deploy dApp: /protocol Protocol fees panel after Global stats; Swap Network fee (est.) ~X LUNC.

#586 LocalTerra / prod smoke

  • Idle /protocol fees $0; Δ% — until 2× windows.
  • Hybrid swap: AMM + book once (L7), not double book.
  • Limit place → limit_place; unwrap does not include InstantWithdraw burn tax.

#587 chain

  • CI=1 Playwright e2e/wrap-swap.spec.ts --project=e2e-tx E7 LUNC→USTR and E8 reverse; gas_used < gas_wanted.
  • Manual: 0 USTC still allows LUNC-funded swap; AMM Fee row stays pool bps.

#589 / #581 (do not whitelist 8266)

  • Implement Layer A-lcd / B-lt so pinned codeids/<id>/token.wasm is actually executed (LAYER_B_LT=1 must not PASS as a stub).
  • apt install wabt; CODE_ID=8266 fetch + decompile; fill 8266 REPORT.md from those logs.
  • Only then record GO/NO-GO on #581. Until GO: no AddWhitelistedCodeId 8266, no SpaceUSD/UST1 pair.

Verify (no wait on CI)

make setup-indexer-postgres
make verify-issue-586
make verify-issue-587
make verify-issue-589
# after A-lcd/B-lt exist:
CODE_ID=8266 LAYER_B_LT=1 make verify-issue-589

Out of scope

Changing wrap-mapper bps, indexer route/solve for native uluna, FoT swap math (H-01), F6 pin behavior.

## Why !1112 / !1113 / !1114 are on `main`. Remaining work is **ops deploy**, **LocalTerra QA**, and the **LCD-wasm audit layers** that #589 did not automate. Do not treat green `make verify-issue-589` as 8266 clearance. Related: #586 (closes via !1112; remaining QA), #587 (closes via !1113; e2e-tx), #589 (closes via !1114; A-lcd/B-lt gap), #581 (reopened — SpaceUSD/UST1 still blocked). ## Tasks ### Coolify / indexer / dApp - [x] Apply `indexer/migrations/20260821120000_protocol_fees.sql` on QA + prod indexer. - [x] Set indexer `WRAP_MAPPER_ADDRESS` (bech32). Empty → wrap/unwrap sources omitted, not fake `$0`. - [x] Confirm `GET /api/v1/overview` returns `total_fees_24h_usd` / `7d` / `30d` (additive) and `GET /api/v1/protocol/fees?window=24h` is 60s-cached. - [x] Deploy dApp: `/protocol` **Protocol fees** panel after Global stats; Swap **Network fee (est.) ~X LUNC**. ### #586 LocalTerra / prod smoke - [x] Idle `/protocol` fees `$0`; Δ% `—` until 2× windows. - [ ] Hybrid swap: AMM + book once (L7), not double book. - [ ] Limit place → `limit_place`; unwrap does **not** include InstantWithdraw burn tax. ### #587 chain - [ ] `CI=1` Playwright `e2e/wrap-swap.spec.ts --project=e2e-tx` E7 LUNC→USTR and E8 reverse; `gas_used < gas_wanted`. - [ ] Manual: 0 USTC still allows LUNC-funded swap; AMM Fee row stays pool bps. ### #589 / #581 (do not whitelist 8266) - [ ] Implement Layer **A-lcd** / **B-lt** so pinned `codeids/<id>/token.wasm` is actually executed (`LAYER_B_LT=1` must not PASS as a stub). - [ ] `apt install wabt`; `CODE_ID=8266` fetch + decompile; fill 8266 `REPORT.md` from those logs. - [ ] Only then record GO/NO-GO on #581. Until GO: no `AddWhitelistedCodeId 8266`, no SpaceUSD/UST1 pair. ## Verify (no wait on CI) ```bash make setup-indexer-postgres make verify-issue-586 make verify-issue-587 make verify-issue-589 # after A-lcd/B-lt exist: CODE_ID=8266 LAYER_B_LT=1 make verify-issue-589 ``` ## Out of scope Changing wrap-mapper bps, indexer `route/solve` for native `uluna`, FoT swap math (H-01), F6 pin behavior.
PlasticDigits commented 2026-08-22 06:29:12 +00:00 (Migrated from gitlab.com)

marked as related to #586

marked as related to #586
PlasticDigits commented 2026-08-22 06:29:13 +00:00 (Migrated from gitlab.com)

marked as related to #587

marked as related to #587
PlasticDigits commented 2026-08-22 06:29:13 +00:00 (Migrated from gitlab.com)

marked as related to #589

marked as related to #589
PlasticDigits commented 2026-08-22 06:29:14 +00:00 (Migrated from gitlab.com)

marked as related to #581

marked as related to #581
PlasticDigits commented 2026-08-22 06:29:28 +00:00 (Migrated from gitlab.com)

mentioned in issue #586

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

mentioned in issue #587

mentioned in issue #587
PlasticDigits commented 2026-08-22 06:29:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #589

mentioned in issue #589
PlasticDigits commented 2026-08-22 06:29:31 +00:00 (Migrated from gitlab.com)

mentioned in issue #581

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

Local sanity after merge: make verify-issue-587 and make verify-issue-589 green. make verify-issue-586 integration was red only because Postgres was down; retried indexer_protocol_fees + api_overview after make setup-indexer-postgres — 12/12 pass. Remaining checkboxes on this issue are still open (Coolify migrate, LocalTerra e2e-tx, A-lcd/B-lt).

Local sanity after merge: `make verify-issue-587` and `make verify-issue-589` green. `make verify-issue-586` integration was red only because Postgres was down; retried `indexer_protocol_fees` + `api_overview` after `make setup-indexer-postgres` — 12/12 pass. Remaining checkboxes on this issue are still open (Coolify migrate, LocalTerra e2e-tx, A-lcd/B-lt).
PlasticDigits commented 2026-08-22 07:54:20 +00:00 (Migrated from gitlab.com)

marked the checklist item Apply indexer/migrations/20260821120000_protocol_fees.sql on QA + prod indexer. as completed

marked the checklist item **Apply indexer/migrations/20260821120000\_protocol\_fees\.sql on QA \+ prod indexer\.** as completed
PlasticDigits commented 2026-08-22 07:54:20 +00:00 (Migrated from gitlab.com)

marked the checklist item Set indexer WRAP_MAPPER_ADDRESS (bech32). Empty → wrap/unwrap sources omitted, not fake $0. as completed

marked the checklist item **Set indexer WRAP\_MAPPER\_ADDRESS \(bech32\)\. Empty → wrap/unwrap sources omitted, not fake $0\.** as completed
PlasticDigits commented 2026-08-22 07:54:20 +00:00 (Migrated from gitlab.com)

marked the checklist item Confirm GET /api/v1/overview returns total_fees_24h_usd / 7d / 30d additive and GET /api/v1/protocol/fees?window=24h is 60s-cached. as completed

marked the checklist item **Confirm GET /api/v1/overview returns total\_fees\_24h\_usd / 7d / 30d \(additive\) and GET /api/v1/protocol/fees?window\=24h is 60s\-cached\.** as completed
PlasticDigits commented 2026-08-22 07:54:20 +00:00 (Migrated from gitlab.com)

marked the checklist item Deploy dApp: /protocol Protocol fees panel after Global stats; Swap Network fee est\. ~X LUNC. as completed

marked the checklist item **Deploy dApp: /protocol Protocol fees panel after Global stats; Swap Network fee \(est\.\) \~X LUNC\.** as completed
PlasticDigits commented 2026-08-22 07:54:20 +00:00 (Migrated from gitlab.com)

marked the checklist item Idle /protocol fees $0; Δ% — until 2× windows. as completed

marked the checklist item **Idle /protocol fees $0; Δ% — until 2× windows\.** as completed
PlasticDigits commented 2026-08-22 07:54:21 +00:00 (Migrated from gitlab.com)

Prod Coolify verify (indexer + dApp redeploy)

Not closing. Coolify/indexer/dApp boxes and idle /protocol fee smoke are done. Still open: hybrid/limit/unwrap fee classification, #587 e2e-tx E7/E8, #589 A-lcd/B-lt + 8266 REPORT.md, #581 still NO-GO.

Indexer (https://indexer.dex.cl8y.com)

Logs match a successful overlapping restart:

  • RUN_MODE=Prod, factory terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea
  • poller lock wait → acquired (expected during rolling deploy)
  • Database migrations applied; API on :3001
  • 14 pairs synced; indexing from height 30058157
  • Venus vFDUSD + USTC/LUNC/FDUSD oracles live

Live API (2026-08-22):

  • GET /health → {"status":"ok"}
  • GET /api/v1/overview has additive total_fees_24h_usd / 7d / 30d = "0"; fees_change_*_pct = null (Δ% empty until 2× windows)
  • GET /api/v1/protocol/fees?window=24h|7d|30d → 200; window=99h → 400
  • wrap_mapper_configured: true (wrap/unwrap sources present in JSON; idle $0 rows hidden in UI)
  • pair_count=14; 24h volume USD ≈ 580; TVL USD ≈ 25.7k
  • /protocol/fees cache is in-process 60s (no Cache-Control); identical bodies on rapid repeats

Startup WARN: Initial rolling trader volumes refresh failed: numeric field overflow — trader rollup only; protocol fee stats did not fail. Non-blocking for this deploy; follow-up if it repeats on the 5 min loop.

QA indexer was not independently probed this pass (prod Coolify only).

dApp (https://dex.cl8y.com)

HTML Last-Modified: Sat, 22 Aug 2026 07:30:43 GMT. Baked chunks include protocol-fee-stats / swap-network-fee.

Playwright vs production, 5 workers, 5/5 pass:

  • P590-1 /protocol Protocol fees sits after Global stats and before DEX hub
  • P590-2 idle totals $0; 24h/7d/30d Δ% em-dash (not 0% / Infinity)
  • P590-3 idle $0 source rows hidden (wrap/unwrap/AMM/book/limit)
  • P590-4 Swap quote shows Network fee (est.) ~X LUNC (no USTC, no uluna / gas × on the card)
  • P590-5 gas × price internals stay under Trade details

Still open on this issue

  • #586 hybrid L7 (AMM + book once) and limit-place / unwrap-not-burn-tax (needs a classified tx)
  • #587 LocalTerra CI=1 e2e/wrap-swap.spec.ts --project=e2e-tx E7/E8; 0-USTC LUNC-funded swap
  • #589 Layer A-lcd / B-lt + 8266 decomp REPORT.md
  • #581 remains blocked — no AddWhitelistedCodeId 8266
## Prod Coolify verify (indexer + dApp redeploy) **Not closing.** Coolify/indexer/dApp boxes and idle `/protocol` fee smoke are done. Still open: hybrid/limit/unwrap fee classification, #587 `e2e-tx` E7/E8, #589 A-lcd/B-lt + 8266 `REPORT.md`, #581 still NO-GO. ### Indexer (`https://indexer.dex.cl8y.com`) Logs match a successful overlapping restart: - `RUN_MODE=Prod`, factory `terra1ejpgvv7g3hj0u6fpcnxhflqp84g0w3cnaskqkg5733ygwlmf963sfchsea` - poller lock wait → acquired (expected during rolling deploy) - `Database migrations applied`; API on `:3001` - 14 pairs synced; indexing from height `30058157` - Venus vFDUSD + USTC/LUNC/FDUSD oracles live Live API (2026-08-22): - `GET /health` → `{"status":"ok"}` - `GET /api/v1/overview` has additive `total_fees_24h_usd` / `7d` / `30d` = `"0"`; `fees_change_*_pct` = `null` (Δ% empty until 2× windows) - `GET /api/v1/protocol/fees?window=24h|7d|30d` → 200; `window=99h` → **400** - `wrap_mapper_configured: true` (wrap/unwrap sources present in JSON; idle `$0` rows hidden in UI) - pair_count=14; 24h volume USD ≈ 580; TVL USD ≈ 25.7k - `/protocol/fees` cache is in-process 60s (no `Cache-Control`); identical bodies on rapid repeats Startup `WARN`: `Initial rolling trader volumes refresh failed: numeric field overflow` — trader rollup only; protocol fee stats did not fail. Non-blocking for this deploy; follow-up if it repeats on the 5 min loop. QA indexer was not independently probed this pass (prod Coolify only). ### dApp (`https://dex.cl8y.com`) HTML `Last-Modified: Sat, 22 Aug 2026 07:30:43 GMT`. Baked chunks include `protocol-fee-stats` / `swap-network-fee`. Playwright vs production, 5 workers, 5/5 pass: - **P590-1** `/protocol` **Protocol fees** sits after Global stats and before DEX hub - **P590-2** idle totals `$0`; 24h/7d/30d Δ% em-dash (not `0%` / Infinity) - **P590-3** idle `$0` source rows hidden (wrap/unwrap/AMM/book/limit) - **P590-4** Swap quote shows **Network fee (est.) ~X LUNC** (no USTC, no `uluna` / `gas ×` on the card) - **P590-5** `gas × price` internals stay under Trade details ### Still open on this issue - #586 hybrid L7 (AMM + book once) and limit-place / unwrap-not-burn-tax (needs a classified tx) - #587 LocalTerra `CI=1` `e2e/wrap-swap.spec.ts --project=e2e-tx` E7/E8; 0-USTC LUNC-funded swap - #589 Layer A-lcd / B-lt + 8266 decomp `REPORT.md` - #581 remains blocked — no `AddWhitelistedCodeId 8266`
PlasticDigits commented 2026-08-22 08:49:43 +00:00 (Migrated from gitlab.com)

mentioned in commit 8689a12981

mentioned in commit 8689a12981c67ab808127e6ed990d1aa5c218e96
PlasticDigits commented 2026-08-22 08:50:02 +00:00 (Migrated from gitlab.com)

LocalTerra verify complete (8689a129 on main)

Worked in git worktree feat/590-post-merge-ops-verify, then fast-forwarded main and pushed.

LAYER_B_LT=1 no longer stub-passes. It stores the pinned LCD wasm, instantiates it, proves 1:1 Transfer (A-lcd), then whitelists the local store id only, CreatePair vs EMBER, and 1:1 Transfer into the pair (B-lt). Columbus-5 8266 was not added to the factory whitelist.

8266 REPORT.md is filled from fetch + wabt decomp + those logs. Verdict remains NO-GO (factory-global Everybody instantiate / 1686+ instances, F6/minter residuals, Send/TransferFrom and round-trip swap still pending). Recorded the same on #581. Do not AddWhitelistedCodeId 8266.

Also: hybrid L7 ingest ignores swap book_commission_amount; unwrap ingest uses mapper fee_amount (not InstantWithdraw tax_amount). Wrap-swap E7/E8 e2e-tx (1 worker) passed after combobox reopen-on-click + pick receive before native LUNC pay (other-leg exclude).

Stacked gate: VERIFY590_REQUIRE_CHAIN=1 make verify-issue-590 → 8/8 PASS (children 586, 587, 589, A-lcd/B-lt, E7/E8).

Playbook: skills/AGENTS_POST_MERGE_OPS_590.md (M590-1–M590-8 / Q7).

Checklist to re-verify

  • make setup-indexer-postgres && make verify-issue-586
  • make verify-issue-587
  • make verify-issue-589 (multi-test; not 8266 clearance)
  • CODE_ID=8266 LAYER_B_LT=1 make verify-issue-589 after make has-localterra — must execute wasm (fail if stub strings reappear)
  • VERIFY590_REQUIRE_CHAIN=1 make verify-issue-590
  • CI=1 Playwright e2e/wrap-swap.spec.ts --project=e2e-tx --workers=1 -g "E7:|E8:" — success, no OOG; Network fee LUNC not USTC; 0 USTC still LUNC-funded
  • 8266 REPORT.md still NO-GO; no columbus-5 AddWhitelistedCodeId 8266
  • Coolify (already done earlier): protocol fees migrate + WRAP_MAPPER_ADDRESS; idle /protocol $0 / Δ% —

Closing this ops issue. #581 stays open until a GO report.

## LocalTerra verify complete (`8689a129` on `main`) Worked in git worktree `feat/590-post-merge-ops-verify`, then fast-forwarded `main` and pushed. `LAYER_B_LT=1` no longer stub-passes. It stores the **pinned LCD wasm**, instantiates it, proves 1:1 Transfer (**A-lcd**), then whitelists the **local** store id only, `CreatePair` vs EMBER, and 1:1 Transfer into the pair (**B-lt**). Columbus-5 **8266** was not added to the factory whitelist. 8266 `REPORT.md` is filled from fetch + wabt decomp + those logs. **Verdict remains NO-GO** (factory-global Everybody instantiate / 1686+ instances, F6/minter residuals, Send/TransferFrom and round-trip swap still pending). Recorded the same on #581. Do **not** `AddWhitelistedCodeId 8266`. Also: hybrid L7 ingest ignores swap `book_commission_amount`; unwrap ingest uses mapper `fee_amount` (not InstantWithdraw `tax_amount`). Wrap-swap **E7/E8** `e2e-tx` (1 worker) passed after combobox reopen-on-click + pick receive before native LUNC pay (other-leg exclude). Stacked gate: `VERIFY590_REQUIRE_CHAIN=1 make verify-issue-590` → **8/8 PASS** (children 586, 587, 589, A-lcd/B-lt, E7/E8). Playbook: `skills/AGENTS_POST_MERGE_OPS_590.md` (**M590-1–M590-8** / **Q7**). ### Checklist to re-verify - [ ] `make setup-indexer-postgres && make verify-issue-586` - [ ] `make verify-issue-587` - [ ] `make verify-issue-589` (multi-test; not 8266 clearance) - [ ] `CODE_ID=8266 LAYER_B_LT=1 make verify-issue-589` after `make has-localterra` — must **execute** wasm (fail if stub strings reappear) - [ ] `VERIFY590_REQUIRE_CHAIN=1 make verify-issue-590` - [ ] `CI=1` Playwright `e2e/wrap-swap.spec.ts --project=e2e-tx --workers=1 -g "E7:|E8:"` — success, no OOG; Network fee LUNC not USTC; 0 USTC still LUNC-funded - [ ] 8266 `REPORT.md` still **NO-GO**; no columbus-5 `AddWhitelistedCodeId 8266` - [ ] Coolify (already done earlier): protocol fees migrate + `WRAP_MAPPER_ADDRESS`; idle `/protocol` `$0` / Δ% `—` Closing this ops issue. **#581 stays open** until a GO report.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-08-22 08:50:13 +00:00
PlasticDigits commented 2026-08-23 03:05:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #599

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

marked as related to #599

marked as related to #599
PlasticDigits commented 2026-08-23 03:05:53 +00:00 (Migrated from gitlab.com)

Related: #599 (USTR→USTC unwrap+2hop OOG). E7/E8 remain LUNC wrap/unwrap. #599 adds a USTR→USTC (or uusd unwrap) Playwright path; do not treat E8 LUNC success as coverage for taxed USTC InstantWithdraw.

Related: #599 (USTR→USTC unwrap+2hop OOG). E7/E8 remain LUNC wrap/unwrap. #599 adds a USTR→USTC (or `uusd` unwrap) Playwright path; do not treat E8 LUNC success as coverage for taxed USTC InstantWithdraw.
PlasticDigits commented 2026-08-23 03:31:22 +00:00 (Migrated from gitlab.com)

mentioned in issue #600

mentioned in issue #600
PlasticDigits commented 2026-08-24 00:30:13 +00:00 (Migrated from gitlab.com)

mentioned in issue #613

mentioned in issue #613
PlasticDigits commented 2026-08-24 00:30:14 +00:00 (Migrated from gitlab.com)

marked as related to #613

marked as related to #613
PlasticDigits commented 2026-08-24 05:54:21 +00:00 (Migrated from gitlab.com)

mentioned in issue #623

mentioned in issue #623
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-dex-terraclassic#590
No description provided.