# Defi Oracle Meta Testnet (Chain ID 2138) — Runbook
**Last Updated:** 2026-03-27
**Status:** Active
**Purpose:** Map creation and deployment of **Defi Oracle Meta Testnet** (EIP-155 chain ID **2138**) to this repository’s layouts, scripts, and docs. Use alongside mainnet Chain 138 material as a parallel path.
**Features:** The chainlist entry records **EIP-155** and **EIP-1559**. Wallets and SDKs should set `chainId: 2138` and use typed / EIP-1559 transactions as supported.
**Network ID note:** `eip155-2138.json` lists `"networkId": 21` (devp2p wire identifier). For a **new** Besu network, align Besu `--network-id` (or TOML `network-id`) and any published metadata with your operator choice—either keep **21** if that is your live testnet convention or set **network-id = 2138** everywhere for simplicity. **Do not** mix mismatched `network-id` across nodes.
- Separate **genesis and keys** from mainnet (`chainId`**138**): testnet must use its own `genesis.json`, static nodes, and data directories.
- Reference mainnet genesis shape: `smom-dbis-138/config/genesis.json` (`config.chainId` is **138** today). For 2138, produce a **new** genesis with `config.chainId: 2138` and QBFT `extraData` for **your** validators.
Store testnet artifacts in a dedicated tree (example convention—create under operator control):
-`smom-dbis-138/config/genesis-testnet-2138.json` (or separate repo/dir), **not** mixed into production `genesis.json` without review.
---
## 4. Phase B — Proxmox / container deployment (LAN)
Orchestration for Besu validated sets lives under **`smom-dbis-138-proxmox/`** (not the root `scripts/`).
| Step | Action | Script / path |
|------|--------|----------------|
| B1 | Full stack: containers, config copy, bootstrap, validate | `smom-dbis-138-proxmox/scripts/deployment/deploy-validated-set.sh` (`--source-project` pointing at a tree that contains **testnet** genesis + keys) |
| B2 | Deploy nodes only | `smom-dbis-138-proxmox/scripts/deployment/deploy-besu-nodes.sh` |
| B3 | Copy configs and keys to VMs | `smom-dbis-138-proxmox/scripts/copy-besu-config.sh` or `copy-besu-config-with-nodes.sh` |
**Important:** Point `SOURCE_PROJECT` (or your copied config layout) at files where **`chainId` is 2138** and Besu `network-id` matches all nodes.
---
## 5. Phase C — RPC, TLS, and public endpoints
| Step | Action | Notes |
|------|--------|--------|
| C1 | Expose HTTP/WebSocket RPC | Same Besu RPC flags as Chain 138; restrict APIs on validators, full APIs on RPC tier ([BESU_MAINNET_VS_CHAIN138_COMPARISON.md](../05-network/BESU_MAINNET_VS_CHAIN138_COMPARISON.md)) |
| C2 | Reverse proxy / TLS | Align with public URLs you publish; chainlist currently lists `https://rpc.public-2138.defi-oracle.io` and `wss://…` (`pr-workspace/chains/_data/chains/eip155-2138.json`) |
| D1 | Deploy explorer UI stack | `smom-dbis-138-proxmox/scripts/deployment/deploy-explorer.sh` (adapt env for **2138** RPC) |
| D2 | Explorer monorepo / API | `explorer-monorepo/docs/EXPLORER_API_ACCESS.md`; aim Blockscout (or equivalent) at testnet RPC |
Update **`eip155-2138.json`** `explorers` when the canonical explorer URL is final.
---
## 7. Phase E — Contracts and apps (`smom-dbis-138`)
| Step | Action | Repo pointers |
|------|--------|----------------|
| E1 | Env for RPC and chain ID | Copy `smom-dbis-138/terraform/phases/phase1/config/env.chain2138.example` → `.env.chain2138` (or merge into `smom-dbis-138/.env`); set `CHAIN_ID=2138`, `RPC_URL=…` |
| E2 | Deploy / verify | Forge scripts under `smom-dbis-138/script/` (mirror mainnet flow in [DEPLOYMENT_ORDER_OF_OPERATIONS.md](../03-deployment/DEPLOYMENT_ORDER_OF_OPERATIONS.md), [REMAINING_DEPLOYMENTS_FOR_FULL_NETWORK_COVERAGE.md](../03-deployment/REMAINING_DEPLOYMENTS_FOR_FULL_NETWORK_COVERAGE.md)); use `--rpc-url` for testnet |
| E3 | Bridge / CCIP | Only after Chainlink / router support for **2138** exists: fill selectors and addresses like `env.chain138.example` pattern in `env.chain2138.example` |
| F4 | Document funded test accounts or a **faucet** (currently empty in chainlist). |
---
## 9. Solidity / Foundry test constants
Use `smom-dbis-138/test/config/Chain2138TestnetConfig.sol` (parallel to `Chain138Config.sol`). Point `RPC_URL_2138` at your LAN or staging node when running fork or live tests.
---
## 10. Related documents
- Generic public testnets (Sepolia, etc.): [TESTNET_DEPLOYMENT.md](TESTNET_DEPLOYMENT.md)