Skip to content

AgentEscrow genesis state migration plan + testnet cutover smoke tests #86

@abhicris

Description

@abhicris

Problem

The architectural direction (per the 2026-05-25 + 2026-06-01 strategy docs) is to ship AgentEscrow as a regular Solidity contract deployed to a fixed, well-known address in genesis state — not as a system contract with upgrade-via-fork semantics. This sidesteps the governance-capture optics ("any chain that ships kcolbchain's contract as system-contract genesis is a chain kcolbchain controls") and keeps the contract redeployable via Council vote.

We need a written migration plan that:

  1. Documents which address gets the genesis deploy
  2. Specifies what state transitions are valid during the testnet -> mainnet cutover
  3. Defines smoke tests that prove the genesis deploy is functionally identical to a fresh forge create
  4. Defines the upgrade path (Council vote -> redeploy at a new address -> chain proxy redirect, NOT system-contract fork)

Proposed Approach

  1. docs/agent-escrow-genesis-migration.md covering:
    • Target address: TBD with Lux subnet config (likely 0x000...A002 per architecture RFC)
    • Genesis state: zero balance, owner = Council multisig, no in-flight payments
    • Constructor invariants verified post-genesis (owner, version, no unintended state)
  2. Smoke test corpus (test/genesis_cutover.t.sol):
    • Fresh genesis state matches forge create deployment byte-for-byte
    • createPayment{value: 0.01 ether} round-trips against happy-path + timeout + challenge paths
    • Council ownership transfer works (not just owner-key transfer)
    • Out-of-band tx replay protection: pre-genesis testnet tx hashes do not collide with post-genesis tx hashes
  3. Upgrade path doc:
    • Future upgrades = Council vote -> deploy AgentEscrow_v2 at a new address -> deprecation notice on v1 -> migration period for in-flight payments
    • Explicitly not a system-contract upgrade-via-fork
  4. Testnet cutover dry run at least 2 weeks before mainnet

Acceptance Criteria

  • Migration plan doc published
  • Smoke test corpus added to test/genesis_cutover.t.sol and CI
  • Dry-run cutover executed on testnet
  • Council multisig owner key confirmed on-chain before any mainnet genesis state ships
  • Public RFC posted at least 14 days before mainnet for community review

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentationenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions