Skip to content

SEC-140: Generate unified Ethereum client configuration - #36

Draft
huangminghuang wants to merge 4 commits into
masterfrom
fix/sec-140
Draft

SEC-140: Generate unified Ethereum client configuration#36
huangminghuang wants to merge 4 commits into
masterfrom
fix/sec-140

Conversation

@huangminghuang

@huangminghuang huangminghuang commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • generate one shared data/ethereum-client.json for local clusters and pass it through --outpost-ethereum-client-config-file to every batch-operator and underwriter daemon
  • generate the same artifact for external-outpost mode using the configured Ethereum RPC URL and chain ID
  • match the protobuf-backed ProtoJSON schema introduced by [SEC-131] Enforce local Ethereum transaction expenditure policy wire-sysio#531: schema_version, nested connection, and a numeric chain_id
  • keep daemon argument builders pure: filesystem writes stay in explicit artifact-preparation steps, while create/run/restart/flow paths reuse the prepared artifact
  • use the stable process-local signature-provider id eth-default; each daemon registers its own Ethereum key under that name without sharing private keys across processes
  • omit transaction_policy from generated development-cluster files so nodeop applies the schema defaults and preserves pre-policy behavior
  • retain typed support and validation for optional finite policies, including canonical positive uint256 strings and the priority-fee/max-fee relationship
  • leave bios and producer-only nodes without an Ethereum signing client or orphaned client-config option
  • merge current master, preserving its key-source, debugger, labeling, and external-outpost behavior while adopting the new client schema

Generated configuration

{
  "schema_version": 1,
  "clients": [
    {
      "connection": {
        "client_id": "eth-default",
        "signature_provider_id": "eth-default",
        "rpc_url": "http://127.0.0.1:<anvil-port>"
      },
      "chain_id": 31337
    }
  ]
}

The omitted transaction_policy intentionally selects nodeop's default policy. Production policy selection remains outside wire-tools-ts.

Design alignment

The earlier implementation followed the draft flat JSON shape (version, flat connection fields, and a string chain id). Wire-Network/wire-sysio#531 now defines the host-side configuration with client_config.proto; this PR emits and validates that exact structure for both local and external outposts.

Validation

  • focused configuration/operator/external-outpost suites: 4 suites, 44 tests passed
  • complete @wireio/cluster-tool suite: 115 suites, 802 tests passed
  • pnpm lint
  • pnpm --filter @wireio/cluster-tool build (validated against published @wireio/sdk-core@1.0.78; the local sibling checkout is behind the current SDK API)
  • git diff --check
  • exact [SEC-131] Enforce local Ethereum transaction expenditure policy wire-sysio#531 head 270f03e2: default all build completed (765 targets), the 39-test Ethereum client/plugin suite passed, and nodeop --help exposes --outpost-ethereum-client-config-file

A local combined flow-swap-with-underwriting attempt stopped during the initial system-contract bootstrap with an unrelated native/system-contract ABI decode error in sysio::onblock and sysio::setpriv, before Ethereum artifacts or operator daemons were prepared. It therefore did not exercise this PR's configuration path and is not presented as a successful end-to-end result.

Dependency

Requires Wire-Network/wire-sysio#531 at head 270f03e2 (or a descendant containing its protobuf client-config loader and --outpost-ethereum-client-config-file).

Jira: SEC-140

@huangminghuang huangminghuang changed the title SEC-140: Provision Anvil Ethereum transaction policy SEC-140: Generate unified Ethereum client configuration Jul 21, 2026
@bearcubsvet
bearcubsvet requested a review from jglanz August 5, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant