feat(ops): deploy and migrate route-tax contracts #1401

Merged
PlasticDigits merged 2 commits from feat/1381-production-rollout into main 2026-10-05 01:23:59 +00:00
Owner

Adds an existing-address production rollout for #1381: reviewed code stores, factory/pair/router migrations, launcher token-template rotation, and all managed community-tax instances including zero-rate tokens. The default mode creates a read-only plan; production transactions occur only when the operator invokes --execute.

Refs #1381. No production signing or deployment was performed.

Resulting workflow

  • scripts/upgrade-1381-route-tax.sh wraps a separate planner/journal engine and SDK signing transport.
  • Inventories pair assets, launcher-template instances and explicit ALPHA; verifies chain, admins, factory/router bindings, version and reviewed artifact hashes.
  • Uses cl8ydeploy for stores and multisig_2of3 with members multisig1/multisig2 for governance; validates membership without assuming the 1/3/2 public-key order. Optional EOA admin keys are address-bound. CMM-owned tokens use migrate_owned_contract, with an optional reviewed CMM prerequisite upgrade.
  • Pauses affected markets, preserves configuration/features/supply/reserves/whitelist entries, rotates factory/launcher creation templates, refreshes live asset pins and checks funded buy/sell previews. --finalize restores original pauses after application configuration rollout.
  • Maintains an immutable manifest, exclusive journal lock and durable signed hash before broadcast. Resume checks exact saved bytes/fees/intent and primary receipts; uncertain transactions are not blindly re-signed. Finite cumulative fees and one in-memory keyring prompt protect the run.
  • Emits public indexer/frontend deployment pins only after complete contract verification. Runtime state and credentials stay outside git.

Factory CW2 increases to 1.11.0 without a contract behavior change relative to repository source. The read-only production inventory found factory 11629/1.10.0 using a different hash from the repository 1.10.0 artifact, so a genuine increasing-version release is necessary. Router/token target1.2.0 and pair1.19.0 remain unchanged; the compatible launcher rotates its token code through configuration.

Validation

  • 59 behavioral tests passed twice (make verify-route-tax-rollout), including adversarial journal/receipt/signature/fee/pause cases and zero-rate tokens.
  • 884 contract tests passed, all workspace targets; Clippy -D warnings, formatting, Python compilation, shell syntax and documentation checks passed.
  • Fresh actual SDK LocalTerra rehearsal and retest: 18 rollout transactions, 18 durable journal checks, zero skips, plus successful token creation through the rotated launcher.
  • Real SDK factory1.10→1.11, pair1.15→1.19, router/tokens1.1→1.2, CMM0.2.1→0.2.2 and actual owned-token dispatch; signed body/publickey/sequence/bitmap, primary receipts, funded previews, state preservation and pause restoration verified.
  • Production read-only default plan succeeded:22 pairs and two managed tokens, with no keyring access.
  • Production --execute/--finalize and live swap acceptance remain unexecuted; this PR supplies the script requested by the operator.

Operator and agent instructions

Start with bash scripts/upgrade-1381-route-tax.sh --help, then run its default read-only plan using the reviewed optimized artifacts and checksum manifest. Use the same inputs/state directory for --execute, --verify and --finalize. Apply emitted deployment.env to matching indexer/frontend releases and invalidate caches before finalization; run bounded live smoke after trading is restored.

Follow the runbook, agent checklist/results and RTROLL1381 invariants. Agents may record unavailable checks as explicit skips and report overall PASS with explicit skips; executed failures remain FAIL and skipped production work never establishes AC9 deployment.

Adds an existing-address production rollout for #1381: reviewed code stores, factory/pair/router migrations, launcher token-template rotation, and all managed community-tax instances including zero-rate tokens. The default mode creates a read-only plan; production transactions occur only when the operator invokes `--execute`. Refs #1381. No production signing or deployment was performed. ## Resulting workflow - `scripts/upgrade-1381-route-tax.sh` wraps a separate planner/journal engine and SDK signing transport. - Inventories pair assets, launcher-template instances and explicit ALPHA; verifies chain, admins, factory/router bindings, version and reviewed artifact hashes. - Uses `cl8ydeploy` for stores and `multisig_2of3` with members `multisig1`/`multisig2` for governance; validates membership without assuming the 1/3/2 public-key order. Optional EOA admin keys are address-bound. CMM-owned tokens use `migrate_owned_contract`, with an optional reviewed CMM prerequisite upgrade. - Pauses affected markets, preserves configuration/features/supply/reserves/whitelist entries, rotates factory/launcher creation templates, refreshes live asset pins and checks funded buy/sell previews. `--finalize` restores original pauses after application configuration rollout. - Maintains an immutable manifest, exclusive journal lock and durable signed hash before broadcast. Resume checks exact saved bytes/fees/intent and primary receipts; uncertain transactions are not blindly re-signed. Finite cumulative fees and one in-memory keyring prompt protect the run. - Emits public indexer/frontend deployment pins only after complete contract verification. Runtime state and credentials stay outside git. Factory CW2 increases to **1.11.0** without a contract behavior change relative to repository source. The read-only production inventory found factory 11629/1.10.0 using a different hash from the repository 1.10.0 artifact, so a genuine increasing-version release is necessary. Router/token target1.2.0 and pair1.19.0 remain unchanged; the compatible launcher rotates its token code through configuration. ## Validation - [x] **59 behavioral tests passed twice** (`make verify-route-tax-rollout`), including adversarial journal/receipt/signature/fee/pause cases and zero-rate tokens. - [x] **884 contract tests passed**, all workspace targets; Clippy `-D warnings`, formatting, Python compilation, shell syntax and documentation checks passed. - [x] Fresh actual SDK LocalTerra rehearsal and retest: **18 rollout transactions**, **18 durable journal checks**, **zero skips**, plus successful token creation through the rotated launcher. - [x] Real SDK factory1.10→1.11, pair1.15→1.19, router/tokens1.1→1.2, CMM0.2.1→0.2.2 and actual owned-token dispatch; signed body/publickey/sequence/bitmap, primary receipts, funded previews, state preservation and pause restoration verified. - [x] Production **read-only** default plan succeeded:22 pairs and two managed tokens, with no keyring access. - [ ] Production `--execute`/`--finalize` and live swap acceptance remain unexecuted; this PR supplies the script requested by the operator. ## Operator and agent instructions Start with `bash scripts/upgrade-1381-route-tax.sh --help`, then run its default read-only plan using the reviewed optimized artifacts and checksum manifest. Use the same inputs/state directory for `--execute`, `--verify` and `--finalize`. Apply emitted `deployment.env` to matching indexer/frontend releases and invalidate caches before finalization; run bounded live smoke after trading is restored. Follow [the runbook](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/feat/1381-production-rollout/docs/runbooks/route-local-tax-1381.md), [agent checklist/results](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/feat/1381-production-rollout/docs/qa/issue-1381-rollout/README.md) and [RTROLL1381 invariants](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/feat/1381-production-rollout/skills/AGENTS_ROUTE_TAX_ROLLOUT.md). Agents may record unavailable checks as explicit skips and report overall PASS with explicit skips; executed failures remain FAIL and skipped production work never establishes AC9 deployment.
feat(ops): add resumable route-tax contract rollout
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
1811f2ea5d
Deploy reviewed wasm, migrate managed instances, rotate factory and launcher templates, and reconcile signed transactions before trading resumes.
Refresh route-tax rollout against main [skip ci]
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
0eb77afa5f
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!1401
No description provided.