Skip to content

feat(anvil): seed Base activation features for a standalone anvil --base node (BOP-375)#39

Merged
amiecorso merged 1 commit into
base-anvil-forkfrom
corso/bop-375-anvil-base-autoseed
Jun 12, 2026
Merged

feat(anvil): seed Base activation features for a standalone anvil --base node (BOP-375)#39
amiecorso merged 1 commit into
base-anvil-forkfrom
corso/bop-375-anvil-base-autoseed

Conversation

@amiecorso

Copy link
Copy Markdown
Collaborator

What

A standalone anvil --base node now has Base's activation-gated features (B20Asset, B20Stablecoin, PolicyRegistry) active at startup, matching forge --base local execution and a live Beryl-or-later chain.

Why

--base installs the Base precompiles, but the gated features start OFF in a fresh local EVM. forge --base already seeds them active for local (non-fork) runs; a node a developer starts with anvil --base did not, so calls reverted FeatureNotActivated until the dev manually activate()d each feature over RPC.

How

In Backend::apply_genesis, after the genesis alloc, write NetworkConfigs::base_activation_seeds() into the node DB via set_storage_at. Reuses the exact seeds + derivation as the forge path. Skipped in fork mode (the live chain carries real activation state); no-op unless --base is set.

Verification

  • cargo check -p anvil clean.
  • anvil --base: isActivated(bytes32) returns true for B20Asset / B20Stablecoin / PolicyRegistry with no manual activate(); a bogus feature id returns false.
  • plain anvil: registry has no code (unchanged behavior).

Closes BOP-375.

@linear

linear Bot commented Jun 12, 2026

Copy link
Copy Markdown

BOP-375

@amiecorso amiecorso marked this pull request as ready for review June 12, 2026 15:19
@amiecorso amiecorso marked this pull request as draft June 12, 2026 15:30
@amiecorso amiecorso marked this pull request as ready for review June 12, 2026 15:45
@amiecorso amiecorso marked this pull request as ready for review June 12, 2026 15:45
@amiecorso amiecorso merged commit a95fe6b into base-anvil-fork Jun 12, 2026
20 checks passed
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