Skip to content

Commit d93dc41

Browse files
sirtimidclaude
andauthored
fix(evm-wallet-experiment): unblock docker e2e stack (#945)
## Summary Three independent pre-existing fixes that unblock the docker e2e stack. Found while verifying #943 locally; scoped separately. - **`ca-certificates` in the evm image** — Foundry nightly 2026-04-22 needs a CA bundle even for `http://localhost`; `node:22-slim` ships without one, so `cast bn` hangs forever and the `evm` container never goes healthy. - **`ALLOWED_HOSTS` hostnames only** — `network-caveat.ts` (added in #942) matches `URL.hostname`, which never has a port. `'evm:8545'` never matched `'evm'`, so every provider-vat fetch was rejected. - **Surface twin error causes** — `away-coordinator` wraps per-twin failures as `Error('All delegation twins failed', { cause })`; kernel RPC only serializes `.message`, so the `'Insufficient budget'` reason was invisible to callers. Concat the cause messages into the outer message. ## Verification - 39/39 docker e2e tests pass locally across all three modes (`bundler-7702`, `bundler-hybrid`, `peer-relay`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b17aead commit d93dc41

3 files changed

Lines changed: 28 additions & 3 deletions

File tree

packages/evm-wallet-experiment/docker/Dockerfile.evm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ FROM ghcr.io/foundry-rs/foundry:latest AS foundry
22

33
FROM node:22-slim
44

5+
# `cast` (Foundry nightly 2026-04-22+) requires a CA bundle on disk even for
6+
# plain-http localhost RPC calls, so `node:22-slim` — which ships without
7+
# ca-certificates — makes the entrypoint's `cast bn` wait loop hang. Install
8+
# it once at build time.
9+
RUN apt-get update \
10+
&& apt-get install -y --no-install-recommends ca-certificates \
11+
&& rm -rf /var/lib/apt/lists/*
12+
513
WORKDIR /app
614

715
# Copy anvil + cast from the foundry image

packages/evm-wallet-experiment/src/vats/away-coordinator.ts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,14 @@ export function buildRootObject(
18111811
errors.push(error);
18121812
}
18131813
}
1814-
throw new Error('All delegation twins failed', { cause: errors });
1814+
throw new Error(
1815+
`All delegation twins failed: ${errors
1816+
.map((cause) =>
1817+
cause instanceof Error ? cause.message : String(cause),
1818+
)
1819+
.join('; ')}`,
1820+
{ cause: errors },
1821+
);
18151822
}
18161823
if (homeSection) {
18171824
return E(homeSection).transferNative(to, amt);
@@ -1852,7 +1859,14 @@ export function buildRootObject(
18521859
errors.push(error);
18531860
}
18541861
}
1855-
throw new Error('All delegation twins failed', { cause: errors });
1862+
throw new Error(
1863+
`All delegation twins failed: ${errors
1864+
.map((cause) =>
1865+
cause instanceof Error ? cause.message : String(cause),
1866+
)
1867+
.join('; ')}`,
1868+
{ cause: errors },
1869+
);
18561870
}
18571871
if (homeSection) {
18581872
return E(homeSection).transferFungible(token, to, amt);

packages/evm-wallet-experiment/test/e2e/docker/helpers/scenarios.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ const TEST_MNEMONIC =
3232
const CHAIN_ID = 31337;
3333
const EVM_RPC_URL = 'http://evm:8545';
3434
const BUNDLER_URL = 'http://bundler:4337';
35-
const ALLOWED_HOSTS = ['evm:8545', 'bundler:4337'];
35+
// Hostnames only — the kernel's network caveat (packages/ocap-kernel
36+
// /src/vats/network-caveat.ts) matches `URL.hostname`, which never
37+
// includes a port.
38+
const ALLOWED_HOSTS = ['evm', 'bundler'];
3639

3740
export type HomeResult = {
3841
kref: string;

0 commit comments

Comments
 (0)