Document deployment script and checklist (BSC + Terra Classic, deterministic addresses, oracle prerequisites) #15

Closed
opened 2026-04-22 03:10:20 +00:00 by PlasticDigits · 4 comments
PlasticDigits commented 2026-04-22 03:10:20 +00:00 (Migrated from gitlab.com)

Summary

Add a documented, repeatable deployment path for production-like environments: BNB Smart Chain (BSC) and Terra Classic, including a checklist, deterministic or explicitly recorded contract addresses on both networks, and prerequisites for operators (keys, gas/funding), especially for the oracle.

Motivation

Today scripts/deploy_local.py targets LocalTerra and mostly documents env vars; there is no single place that walks an operator through mainnet/testnet deploy, address bookkeeping, and oracle bring-up (BSC read path + Terra Classic UpdateRate broadcasts).

Scope

1. Deployment script (documented)

  • Scripted or semi-scripted steps that are checked into the repo or clearly referenced (shell/Makefile/Python), with no business logic duplication (align with existing scripts/ convention).
  • Cover at least:
    • Terra Classic: wasm store/instantiate (oracle, window, and any CW20 dependencies), ordering, and verification commands.
    • BSC: any contracts or fixed integration addresses the stack depends on (e.g. Venus vToken / RPC expectations), and how they tie into oracle-service config.

2. Checklist

  • Pre-deploy: toolchain, RPC/LCD endpoints, chain IDs, artifact build (make build-optimized or CI artifacts).
  • Deploy: store → instantiate → wire addresses into configs.
  • Post-deploy: smoke queries, optional test swap path, oracle health (ORACLE_MAX_SILENCE_SECS, logging, external health check per README).

3. Deterministic addresses (both chains)

  • Terra Classic: document the chosen approach so expected contract addresses are reproducible or predictable (e.g. fixed deployer account + documented nonce/sequence, instantiate2/predictable address pattern if used, or explicit “record actual addresses here” table if chain rules prevent true determinism).
  • BSC: document canonical addresses (production/testnet) for integrations; if anything is deployed by us, document how its address is made deterministic (e.g. CREATE2/salt) or how to verify bytecode at a known address.

4. Prerequisites: keys and funding

  • Keys: which identities are required (deployer, oracle operator for Terra txs, governance multisig if applicable); how they are created/stored; reference TERRA_MNEMONIC / keyring usage for oracle-service.
  • Gas / funding:
    • Terra Classic: fee token balance targets for deploy, instantiate, and ongoing oracle UpdateRate cadence (rough budget + “top up when …”).
    • BSC: whether the oracle needs BNB only for RPC (usually no) vs any on-chain actions; clarify in the doc.

Deliverables

  • Deployment doc and/or script(s) in-repo, linked from README where appropriate.
  • Operator checklist (markdown table or numbered list).
  • Address registry section: BSC + Terra Classic, environment (mainnet/testnet), with notes on determinism vs recorded-at-deploy.

References

  • README: oracle env vars and observability notes.
  • scripts/deploy_local.py: current LocalTerra-oriented hints.
## Summary Add a **documented, repeatable deployment path** for production-like environments: **BNB Smart Chain (BSC)** and **Terra Classic**, including a **checklist**, **deterministic or explicitly recorded contract addresses** on both networks, and **prerequisites** for operators (keys, gas/funding), especially for the **oracle**. ## Motivation Today `scripts/deploy_local.py` targets LocalTerra and mostly documents env vars; there is no single place that walks an operator through **mainnet/testnet** deploy, **address bookkeeping**, and **oracle bring-up** (BSC read path + Terra Classic `UpdateRate` broadcasts). ## Scope ### 1. Deployment script (documented) - Scripted or semi-scripted steps that are **checked into the repo** or clearly referenced (shell/Makefile/Python), with **no business logic duplication** (align with existing `scripts/` convention). - Cover at least: - **Terra Classic**: wasm store/instantiate (oracle, window, and any CW20 dependencies), ordering, and verification commands. - **BSC**: any contracts or **fixed integration addresses** the stack depends on (e.g. Venus vToken / RPC expectations), and how they tie into `oracle-service` config. ### 2. Checklist - Pre-deploy: toolchain, RPC/LCD endpoints, chain IDs, artifact build (`make build-optimized` or CI artifacts). - Deploy: store → instantiate → wire addresses into configs. - Post-deploy: smoke queries, optional test swap path, oracle health (`ORACLE_MAX_SILENCE_SECS`, logging, external health check per README). ### 3. Deterministic addresses (both chains) - **Terra Classic**: document the chosen approach so **expected contract addresses** are reproducible or predictable (e.g. fixed deployer account + documented nonce/sequence, `instantiate2`/predictable address pattern if used, or explicit “record actual addresses here” table if chain rules prevent true determinism). - **BSC**: document **canonical addresses** (production/testnet) for integrations; if anything is deployed by us, document how its address is made deterministic (e.g. CREATE2/salt) or how to verify bytecode at a known address. ### 4. Prerequisites: keys and funding - **Keys**: which identities are required (deployer, **oracle operator** for Terra txs, governance multisig if applicable); how they are created/stored; reference `TERRA_MNEMONIC` / keyring usage for `oracle-service`. - **Gas / funding**: - Terra Classic: fee token balance targets for deploy, instantiate, and ongoing **oracle** `UpdateRate` cadence (rough budget + “top up when …”). - BSC: whether the oracle needs **BNB** only for RPC (usually no) vs any on-chain actions; clarify in the doc. ## Deliverables - [ ] Deployment doc and/or script(s) in-repo, linked from README where appropriate. - [ ] Operator **checklist** (markdown table or numbered list). - [ ] **Address registry** section: BSC + Terra Classic, environment (mainnet/testnet), with notes on determinism vs recorded-at-deploy. ## References - README: oracle env vars and observability notes. - `scripts/deploy_local.py`: current LocalTerra-oriented hints.
Brouie commented 2026-04-22 06:26:03 +00:00 (Migrated from gitlab.com)

@PlasticDigits acknowledging — this is dev deliverable (script + doc + address registry). Once you have a draft or PR ready I'll review against the 3 deliverable items: in-repo deployment doc/scripts, operator checklist, BSC+Terra address registry. Flag when ready.

@PlasticDigits acknowledging — this is dev deliverable (script + doc + address registry). Once you have a draft or PR ready I'll review against the 3 deliverable items: in-repo deployment doc/scripts, operator checklist, BSC+Terra address registry. Flag when ready.
PlasticDigits commented 2026-04-22 06:58:56 +00:00 (Migrated from gitlab.com)

Delivered (glab #15)

Merged to main (commit 3d51770).

In-repo deployment doc + cross-links

  • Added docs/DEPLOYMENT.md: operator checklist (markdown table), BSC + Terra address registry template, determinism vs record-at-deploy notes, terrad store/instantiate shape and verification queries, oracle service env table (aligned with oracle-service/src/config.rs), keys/funding and observability pointers.
  • Linked from README.md (invariants index + oracle deployment section) and from scripts/deploy_local.py for LocalTerra vs mainnet context.
  • Module doc on Config in oracle-service/src/config.rs points at the deployment doc and INV-ORACLE-* parity.

Semi-scripted operator helper (no Rust duplication)

  • scripts/verify_oracle_operator_env.sh: preflight for required oracle env vars + ≥2 BSC RPC URLs (matches parse_comma_separated_rpc_urls / service requirements).
  • make verify-oracle-env and make help reference the doc.

@brouie please verify against the three deliverable bullets from the issue (deployment doc/scripts, checklist, BSC+Terra address registry) and the latest thread expectations.

## Delivered (glab #15) Merged to `main` (commit 3d51770). **In-repo deployment doc + cross-links** - Added [`docs/DEPLOYMENT.md`](https://gitlab.com/PlasticDigits/ust1-window/-/blob/main/docs/DEPLOYMENT.md): operator checklist (markdown table), BSC + Terra **address registry** template, determinism vs record-at-deploy notes, `terrad` store/instantiate shape and verification queries, oracle service env table (aligned with `oracle-service/src/config.rs`), keys/funding and observability pointers. - Linked from [`README.md`](https://gitlab.com/PlasticDigits/ust1-window/-/blob/main/README.md) (invariants index + oracle deployment section) and from [`scripts/deploy_local.py`](https://gitlab.com/PlasticDigits/ust1-window/-/blob/main/scripts/deploy_local.py) for LocalTerra vs mainnet context. - Module doc on `Config` in `oracle-service/src/config.rs` points at the deployment doc and **INV-ORACLE-*** parity. **Semi-scripted operator helper (no Rust duplication)** - [`scripts/verify_oracle_operator_env.sh`](https://gitlab.com/PlasticDigits/ust1-window/-/blob/main/scripts/verify_oracle_operator_env.sh): preflight for required oracle env vars + ≥2 BSC RPC URLs (matches `parse_comma_separated_rpc_urls` / service requirements). - `make verify-oracle-env` and `make help` reference the doc. @brouie please verify against the three deliverable bullets from the issue (deployment doc/scripts, checklist, BSC+Terra address registry) and the latest thread expectations.
Brouie commented 2026-04-23 01:41:33 +00:00 (Migrated from gitlab.com)

@PlasticDigits verified on 3d51770.

Deliverables review:

  • Deployment script: scripts/verify_oracle_operator_env.sh + make verify-oracle-env + orchestration hints via deploy_local.py + terrad store/instantiate examples in doc.
  • Operator checklist: 16-step phased checklist (pre-deploy → deploy → post-deploy) with checkbox format.
  • BSC address registry: template with mainnet vFDUSD (0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba) + chain ID enforcement note (requires BSC_ALLOWED_CHAIN_IDS=56).
  • Terra Classic address registry: template for mainnet columbus-5 + testnet, columns for code ID + contract address, CMM treasury pre-filled.
  • Oracle prerequisites: full env var table, INV-ORACLE-THROTTLE/DAILY/MONO referenced with file paths, HTTPS requirement + DEV_ALLOW_HTTP=1 escape documented.
  • Determinism: honest treatment — recorded-at-deploy default, BSC vs Terra determinism explained.

Preflight script smoke-tested:

  • no env set: fails with all 6 missing vars listed
  • 1 BSC RPC: rejected with clear error
  • 2 BSC RPCs + all other vars: passes

Non-blocker suggestion: instantiate JSON examples have per_tx_ust1_limit and rolling_24h_ust1_limit as bare placeholders. A sample value (even commented) would help operators understand unit scale. Up to you whether to inline or leave operator to derive from RATE_SCALE.

Closing as verified.

@PlasticDigits verified on `3d51770`. Deliverables review: - **Deployment script**: `scripts/verify_oracle_operator_env.sh` + `make verify-oracle-env` + orchestration hints via `deploy_local.py` + `terrad` store/instantiate examples in doc. - **Operator checklist**: 16-step phased checklist (pre-deploy → deploy → post-deploy) with checkbox format. - **BSC address registry**: template with mainnet vFDUSD (`0xC4eF4229FEc74Ccfe17B2bdeF7715fAC740BA0ba`) + chain ID enforcement note (requires `BSC_ALLOWED_CHAIN_IDS=56`). - **Terra Classic address registry**: template for mainnet columbus-5 + testnet, columns for code ID + contract address, CMM treasury pre-filled. - **Oracle prerequisites**: full env var table, INV-ORACLE-THROTTLE/DAILY/MONO referenced with file paths, HTTPS requirement + `DEV_ALLOW_HTTP=1` escape documented. - **Determinism**: honest treatment — recorded-at-deploy default, BSC vs Terra determinism explained. Preflight script smoke-tested: - no env set: fails with all 6 missing vars listed - 1 BSC RPC: rejected with clear error - 2 BSC RPCs + all other vars: passes Non-blocker suggestion: instantiate JSON examples have `per_tx_ust1_limit` and `rolling_24h_ust1_limit` as bare placeholders. A sample value (even commented) would help operators understand unit scale. Up to you whether to inline or leave operator to derive from `RATE_SCALE`. Closing as verified.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-23 01:41:45 +00:00
Brouie commented 2026-04-23 09:20:53 +00:00 (Migrated from gitlab.com)

mentioned in issue #5

mentioned in issue #5
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/ust1-window#15
No description provided.