Skip to content

Rebuild Anvil standalone state on local backing #65

Closed

Description

@mowind

Parent

#64

What to build

Make Anvil's fork-to-standalone reset establish a genuinely local backing-state epoch before genesis is reapplied. Clearing the fork role must not leave a remote-capable database, stale fork cache, remote-only account or storage, or dynamically loaded B20 token state reachable from the new standalone node.

This is the prefactor that makes the later profile-owned genesis migration safe: FreshStandalone must describe the concrete database, not merely a boolean role flag.

Acceptance criteria

  • Resetting a forked node to standalone replaces or equivalently detaches the remote-capable database before generic and profile-owned genesis are reapplied.
  • The resulting standalone database has no remote fallback and cannot fetch previously unseen state from the former fork source.
  • Remote-only unrelated accounts and storage disappear after fork-to-standalone reset.
  • Remote or cached dynamic B20 token account and storage state disappear after fork-to-standalone reset.
  • The standalone node still restores its configured generic genesis accounts and current canonical B20 local baseline.
  • Standalone-to-standalone reset and fork-to-fork reset retain their existing behavior.
  • Focused tests use local deterministic nodes and do not depend on a public RPC endpoint.
  • Reset failures retain the existing non-atomic RPC error model; this ticket does not introduce rollback or staging-and-swap publication.

Blocked by

  • None — can start immediately.

Activity

  1. self-assigned this
    on Aug 4, 2026
  2. mowind commented on Aug 4, 2026

    @mowind
    OwnerAuthor

    Implemented in commit ad80f34. Fork-to-standalone reset now replaces the remote-capable backing database with a fresh MemDb before genesis reapplication, and deterministic HashKey integration coverage verifies cached and previously unseen remote account/storage state, dynamic B20 state, generic genesis balance, and the B20 baseline. Focused Anvil tests and the HashKey-enabled Anvil suite pass. The workspace-wide suite still has the pre-existing cast stack-overflow failures and external Vyper fixture setup failure.

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

Metadata

Metadata

Assignees

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