Skip to content

Fix/anvil sandbox startup#5

Open
mbork-ipor wants to merge 2 commits into
mainfrom
fix/anvil-sandbox-startup
Open

Fix/anvil sandbox startup#5
mbork-ipor wants to merge 2 commits into
mainfrom
fix/anvil-sandbox-startup

Conversation

@mbork-ipor

Copy link
Copy Markdown
Collaborator

Two fixes for the compose sandbox failing to grant ALPHA_ROLE on startup:

  • wait for anvil RPC readiness instead of a fixed sleep 3 — forking over
    a remote RPC routinely takes longer than 3 s, so the grant fired before
    anvil was listening;
  • bump the pinned fork block (29007455 → 48394000) — free-tier RPCs have
    pruned state that old ("error code 4444: pruned history unavailable").
    Any pinned block ages out eventually; this one (2026-07-09) will need
    the same refresh in the future.

Symptom in both cases: the bot loops on revert 0x068ca9d8
(AccessManagedUnauthorized) because the alpha wallet never got the role.

Free-tier RPCs no longer serve state at block 29007455 (Alchemy: "error
code 4444: pruned history unavailable"), so the fork started but every
state fetch — including the role grant — failed.

Note: any pinned block ages past the pruning horizon eventually; this one
(2026-07-09) will too and will need the same refresh. The durable
alternative is forking latest at the cost of reproducibility.
@mbork-ipor
mbork-ipor requested review from amydlarz and rav-ipor July 9, 2026 06:26
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