Skip to content

Migrate Anvil local genesis state #68

Closed

Description

@mowind

Parent

#64

What to build

Migrate Anvil startup, reset, fork, custom-genesis, and snapshot lifecycles to the shared profile-owned local genesis seam. Lifecycle callers pass an explicit target; they do not infer FreshStandalone from a fork-role boolean. Standalone application occurs after generic and user genesis, preserving the current precedence for profile-owned fields and retaining unrelated account state.

This slice relies on the genuinely local backing established by #65 and the shared seam established by #66.

Acceptance criteria

  • Anvil startup and reset lifecycles pass FreshStandalone or RemoteFork explicitly to genesis application.
  • No target helper derives FreshStandalone solely from is_fork == false.
  • Standalone startup applies the complete canonical B20 baseline through the shared seam.
  • Standalone reset restores the baseline only after a genuinely local, no-remote-fallback database has been established.
  • Initial fork and fork reset perform zero profile-owned local writes.
  • Fork-to-standalone reset removes remote-only state and restores the complete local baseline.
  • Anvil production code no longer reads or iterates the legacy B20 allocation and contains no backend-local marker literal or independently transported marker hash.
  • Account patching preserves custom genesis balances, unrelated storage, and other non-owned account fields.
  • Profile-owned singleton code, nonce, and feature slots retain their existing precedence over conflicting custom genesis values.
  • A mutation followed by call or mining does not replay profile genesis.
  • Snapshot and revert restore the captured B20 feature value rather than the original genesis value.
  • Runtime reset failures remain RPC errors under the existing non-atomic failure model; no unsupported rollback guarantee is added.
  • Fork tests use local deterministic source nodes and do not depend on a public RPC endpoint.

Blocked by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified and ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions