Skip to content

Commit 4f1b259

Browse files
sirtimidclaude
andcommitted
fix(evm-wallet-experiment): use correct delegator vat name in setup scripts and docs
The delegator vat was renamed from `delegation` to `delegator` (and its bundle from `delegation-vat.bundle` to `delegator-vat.bundle`) in PR #939 when `coordinator-vat` was split. The setup scripts and the setup guide were not updated, so they configure a vat key (`delegation`) the home coordinator doesn't read at bootstrap (`vats.delegator` is undefined) and reference a stale bundle artifact that `yarn build` no longer produces. Also brings the README's endowment description in line with the current globals list and adds a note to Recent Improvements summarizing this PR's direction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d5f1edf commit 4f1b259

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

packages/evm-wallet-experiment/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ const config = makeWalletClusterConfig({
688688
const { rootKref } = await kernel.launchSubcluster(config);
689689
```
690690

691-
The configuration creates four vats (`coordinator`, `keyring`, `provider`, `delegation`) and registers the coordinator as the bootstrap vat. The `keyring`, `provider`, and `delegation` vats receive `TextEncoder` and `TextDecoder` as globals since they perform binary encoding.
691+
The configuration creates four vats (`coordinator`, `keyring`, `provider`, `delegator`) and registers the coordinator as the bootstrap vat. Every vat receives `TextEncoder` and `TextDecoder` for binary encoding. The `keyring` and `delegator` vats additionally receive `crypto` for secure random generation (throwaway keys and delegation salts). The `coordinator` vat receives `Date` and `setTimeout` for on-chain confirmation polling.
692692

693693
## SES Compatibility
694694

@@ -846,6 +846,7 @@ The package exports chain contract addresses used by the Delegation Framework:
846846
- **Error handling** -- Decryption with a wrong password now returns a clear error message. EIP-7702 gas estimation failures are no longer silently swallowed for all error types.
847847
- **Timer cleanup** -- The internal `raceWithTimeout` helper (used for peer communication timeouts) now properly cleans up timers to prevent resource leaks.
848848
- **SES lockdown compliance** -- Module-level counters (`bundlerRequestId`, `rpcRequestId`) have been moved into per-client-instance closures, eliminating shared mutable state that conflicts with SES lockdown requirements.
849+
- **Explicit vat endowments** -- Throwaway keyrings and delegation salts now use `crypto.getRandomValues` directly, enabled by adding `crypto` to the `keyring` and `delegator` vats' globals. Removes the prior caller-supplied `entropy` escape hatch and the counter-based salt fallback.
849850

850851
## Disclaimer
851852

packages/evm-wallet-experiment/docs/setup-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,16 @@ yarn ocap daemon exec launchSubcluster '{
468468
},
469469
"keyring": {
470470
"bundleSpec": "packages/evm-wallet-experiment/src/vats/keyring-vat.bundle",
471-
"globals": ["TextEncoder", "TextDecoder"]
471+
"globals": ["TextEncoder", "TextDecoder", "crypto"]
472472
},
473473
"provider": {
474474
"bundleSpec": "packages/evm-wallet-experiment/src/vats/provider-vat.bundle",
475475
"globals": ["TextEncoder", "TextDecoder", "fetch", "Request", "Headers", "Response"],
476476
"network": { "allowedHosts": ["<chain>.infura.io", "api.pimlico.io", "swap.api.cx.metamask.io"] }
477477
},
478-
"delegation": {
479-
"bundleSpec": "packages/evm-wallet-experiment/src/vats/delegation-vat.bundle",
480-
"globals": ["TextEncoder", "TextDecoder"],
478+
"delegator": {
479+
"bundleSpec": "packages/evm-wallet-experiment/src/vats/delegator-vat.bundle",
480+
"globals": ["TextEncoder", "TextDecoder", "crypto"],
481481
"parameters": { "delegationManagerAddress": "0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3" }
482482
}
483483
}

packages/evm-wallet-experiment/scripts/setup-away.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ CONFIG=$(BUNDLE_DIR="$BUNDLE_DIR" DM="$DELEGATION_MANAGER" RPC_HOST="$AWAY_RPC_H
380380
globals: ['TextEncoder', 'TextDecoder'],
381381
platformConfig: { fetch: { allowedHosts: hosts } }
382382
},
383-
delegation: {
384-
bundleSpec: bd + '/delegation-vat.bundle',
383+
delegator: {
384+
bundleSpec: bd + '/delegator-vat.bundle',
385385
globals: ['TextEncoder', 'TextDecoder', 'crypto'],
386386
parameters: { delegationManagerAddress: dm }
387387
}

packages/evm-wallet-experiment/scripts/setup-home.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ CONFIG=$(BUNDLE_DIR="$BUNDLE_DIR" DM="$DELEGATION_MANAGER" RPC_HOST="$RPC_HOST"
345345
globals: ['TextEncoder', 'TextDecoder'],
346346
platformConfig: { fetch: { allowedHosts: hosts } }
347347
},
348-
delegation: {
349-
bundleSpec: bd + '/delegation-vat.bundle',
348+
delegator: {
349+
bundleSpec: bd + '/delegator-vat.bundle',
350350
globals: ['TextEncoder', 'TextDecoder', 'crypto'],
351351
parameters: { delegationManagerAddress: dm }
352352
}

0 commit comments

Comments
 (0)