- static-nodes.json + permissions-nodes.toml: add enodes for 192.168.11.237–238 - deploy-besu-node-lists-to-all.sh / restart-besu-reload-node-lists.sh: tighten Besu deploy/restart flow - CHAIN2138_WALLET_CONFIG_VALIDATION.md, METAMASK_NETWORK_CONFIG_2138.json - Cross-links: CHAIN138 wallet validation, MASTER_INDEX, runbook, meta fixes - NEXT_STEPS_INDEX + TODOS_CONSOLIDATED: 2026-03-28 completable + operator run note Made-with: Cursor
7.3 KiB
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.
1. Identifiers and EIP-155
| Item | Value |
|---|---|
| Chain ID (decimal) | 2138 |
| Chain ID (hex) | 0x85a |
| CAIP-2 (namespaced) | eip155:2138 |
Legacy EIP-155 v (replay protection) |
4311 or 4312 (= 2 × 2138 + 35 + {0,1}) |
| Chainlist-style metadata (this repo) | pr-workspace/chains/_data/chains/eip155-2138.json |
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.
2. Preconditions
- Decide topology (validator count, sentries, RPC nodes)—mirror Besu mainnet vs Chain 138 comparison.
- Separate genesis and keys from mainnet (
chainId138): testnet must use its owngenesis.json, static nodes, and data directories. - Reference mainnet genesis shape:
smom-dbis-138/config/genesis.json(config.chainIdis 138 today). For 2138, produce a new genesis withconfig.chainId: 2138and QBFTextraDatafor your validators.
3. Phase A — Genesis and keys
| Step | Action | Repo pointers |
|---|---|---|
| A1 | Generate QBFT genesis for chainId 2138 | BESU_OFFICIAL_REFERENCE.md (quorum-genesis-tool --chainID 2138, adjust validators/members/bootnodes) |
| A2 | Document validator addresses and extraData |
Same patterns as NEXT_STEPS_AFTER_GENESIS_UPDATE.md (archive—process only) |
| A3 | Node P2P keys, static-nodes.json, optional permissioning |
CHAIN138_BESU_CONFIGURATION.md, BESU_CONFIGURATION_GUIDE.md |
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 productiongenesis.jsonwithout 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 |
| B4 | Bootstrap / static peers | smom-dbis-138-proxmox/scripts/network/bootstrap-network.sh, network/update-static-nodes.sh |
| B5 | Validation | smom-dbis-138-proxmox/scripts/validation/validate-deployment-comprehensive.sh, validate-validator-set.sh, root-level smom-dbis-138-proxmox/scripts/validate-besu-config.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) |
| 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) |
| C3 | Verify | curl -s POST -H 'Content-Type: application/json' --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' <RPC> → 0x85a |
6. Phase D — Explorer
| Step | Action | Repo pointers |
|---|---|---|
| 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, 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 |
| E4 | Frontend / Wagmi | networks.ts, wagmi.ts, trustlessL2.ts, TrustlessBridgeForm — VITE_ENABLE_CHAIN2138, optional RPC/explorer; for testnet lockbox deposits set VITE_TRUSTLESS_L2_CHAIN_ID=2138 and VITE_LOCKBOX_2138 / token env vars (frontend-dapp/.env.example) |
| E5 | Wallet docs | CHAIN2138_WALLET_CONFIG_VALIDATION.md, MetaMask JSON METAMASK_NETWORK_CONFIG_2138.json |
8. Phase F — Registry and QA
| Step | Action |
|---|---|
| F1 | Keep pr-workspace/chains/_data/chains/eip155-2138.json accurate (RPC, explorers, faucets, networkId). |
| F2 | Optional: thirdweb / aggregator RPC URLs (compare eip155-138.json). |
| F3 | Run smoke tests: deploy contract, EIP-1559 fee tx, read eth_chainId. |
| 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
- Mainnet wallet RPC: CHAIN138_WALLET_CONFIG_VALIDATION.md
- Besu index: 06-besu/MASTER_INDEX.md
- Operational runbooks: 03-deployment/OPERATIONAL_RUNBOOKS.md