PR X: E2E round-trip against public Chain 138 RPC #29

Merged
nsatoshi merged 0 commits from devin/1776895096-pr-x-chain138-public-rpc into main 2026-04-22 14:59:15 -07:00
Owner

Summary

Closes the CurrenciCombo side of proxmox blocker EXT-CHAIN138-CI-RPC now that https://rpc.public-0138.defi-oracle.io is live.

Verified from the orchestrator sandbox before commit:

$ curl -sS -XPOST https://rpc.public-0138.defi-oracle.io -H content-type:application/json -d {"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}
{"jsonrpc":"2.0","result":"0x8a","id":1}

0x8a == 138 ✓.

What

Adds orchestrator/tests/e2e/notaryChainPublicRpc.e2e.test.ts — a read-only E2E suite that targets the real public Chain 138 RPC instead of a locally-spawned ganache.

Why read-only

We dont own a funded key on Chain 138 in CI and writing against mainnet-equivalent infra would be reckless and non-deterministic. The suite sticks to non-destructive calls:

  1. provider.getNetwork() returns a descriptor
  2. eth_chainId == 138
  3. eth_blockNumber > 0
  4. eth_getBlockByNumber returns a well-formed block with timestamp > 2020-09-13
  5. plans(bytes32) call against NOTARY_REGISTRY_ADDRESS (if set) returns a zerod record for a synthetic key — proves the deployed ABI matches NotaryRegistry.sol without mutating state
  6. Orchestrators services/notaryChain.ts gracefully mock-falls-back when the public RPC is configured but no signing key is set

Gating

Gated on both RUN_E2E=1 and E2E_USE_PUBLIC_CHAIN138=1 so the default E2E path stays offline (the existing ganache-based round-trip tests dont need network).

CI

The orchestrator-e2e job now runs with E2E_USE_PUBLIC_CHAIN138: "1", so the existing run-e2e PR label triggers both the Postgres Testcontainers suite and the public Chain 138 suite in the same run.

Verification

RUN_E2E=1 E2E_USE_PUBLIC_CHAIN138=1 npx jest --config=jest.e2e.config.js \
  tests/e2e/notaryChainPublicRpc.e2e.test.ts

Test Suites: 1 passed, 1 total
Tests:       6 passed, 6 total
Time:        2.874 s
  • npx tsc --noEmit clean.
  • No UI changes. No new runtime deps (reuses ethers + existing compileNotaryRegistry helper).
  • Existing ganache-based notaryChainRoundtrip.e2e.test.ts untouched (still runs in the same E2E job).
## Summary Closes the CurrenciCombo side of proxmox blocker `EXT-CHAIN138-CI-RPC` now that `https://rpc.public-0138.defi-oracle.io` is live. Verified from the orchestrator sandbox before commit: ``` $ curl -sS -XPOST https://rpc.public-0138.defi-oracle.io -H content-type:application/json -d {"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1} {"jsonrpc":"2.0","result":"0x8a","id":1} ``` `0x8a == 138` ✓. ## What Adds `orchestrator/tests/e2e/notaryChainPublicRpc.e2e.test.ts` — a **read-only** E2E suite that targets the real public Chain 138 RPC instead of a locally-spawned ganache. ### Why read-only We dont own a funded key on Chain 138 in CI and writing against mainnet-equivalent infra would be reckless and non-deterministic. The suite sticks to non-destructive calls: 1. `provider.getNetwork()` returns a descriptor 2. `eth_chainId == 138` 3. `eth_blockNumber > 0` 4. `eth_getBlockByNumber` returns a well-formed block with `timestamp > 2020-09-13` 5. `plans(bytes32)` call against `NOTARY_REGISTRY_ADDRESS` (if set) returns a zerod record for a synthetic key — proves the deployed ABI matches `NotaryRegistry.sol` without mutating state 6. Orchestrators `services/notaryChain.ts` gracefully mock-falls-back when the public RPC is configured but no signing key is set ### Gating Gated on **both** `RUN_E2E=1` **and** `E2E_USE_PUBLIC_CHAIN138=1` so the default E2E path stays offline (the existing ganache-based round-trip tests dont need network). ### CI The `orchestrator-e2e` job now runs with `E2E_USE_PUBLIC_CHAIN138: "1"`, so the existing `run-e2e` PR label triggers **both** the Postgres Testcontainers suite and the public Chain 138 suite in the same run. ## Verification ``` RUN_E2E=1 E2E_USE_PUBLIC_CHAIN138=1 npx jest --config=jest.e2e.config.js \ tests/e2e/notaryChainPublicRpc.e2e.test.ts Test Suites: 1 passed, 1 total Tests: 6 passed, 6 total Time: 2.874 s ``` - `npx tsc --noEmit` clean. - No UI changes. No new runtime deps (reuses `ethers` + existing `compileNotaryRegistry` helper). - Existing ganache-based `notaryChainRoundtrip.e2e.test.ts` untouched (still runs in the same E2E job).
nsatoshi merged commit b48eb2ab76 into main 2026-04-22 14:59:15 -07:00
nsatoshi deleted branch devin/1776895096-pr-x-chain138-public-rpc 2026-04-22 14:59:24 -07:00
Sign in to join this conversation.