feat(anvil): add Base proof devnet L1 APIs - #67
Merged
Conversation
This was referenced Aug 11, 2026
PelleKrab
force-pushed
the
feat/prover-single-l1
branch
from
August 12, 2026 00:11
0362ad3 to
ac24945
Compare
* feat(anvil): support debug raw receipts * feat(anvil): serve pre-fork blocks in debug_getRawReceipts --------- Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> (cherry picked from commit c96f35cfe88a0ef01cbeb56cfda747a514114fd3) Amp-Thread-ID: https://ampcode.com/threads/T-019ff2a8-b426-7769-88bf-e3052db3b51e Co-authored-by: Amp <amp@ampcode.com>
(cherry picked from commit 13f46acdff02263cb7164410d306e6eca4ec19c0)
(cherry picked from commit 2f18e89f6321dc8df7c1e0dc312bafc34a397249)
Expose SECONDS_PER_SLOT so Base clients can map execution timestamps to Beacon slots. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019ff1b0-c07c-77f3-816c-5da33175c7a4 (cherry picked from commit 3877a2c)
PelleKrab
force-pushed
the
feat/prover-single-l1
branch
from
August 12, 2026 00:17
ac24945 to
b8f48ba
Compare
This was referenced Aug 11, 2026
PelleKrab
marked this pull request as ready for review
August 12, 2026 01:16
refcell
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Base's prover stack needs three things from Anvil when it serves as the single devnet L1:
debug_getRawHeader— canonical RLP-encoded L1 headers for witness constructiondebug_getRawReceipts— canonical EIP-2718 receipt bytes for witness constructionGET /eth/v1/config/spec—SECONDS_PER_SLOTso Base's Beacon client can map L1 execution timestamps to Beacon slots when retrieving blob sidecars from the same Anvil instanceSolution
The debug endpoints landed upstream after this fork's divergence point, so this PR includes them as verbatim upstream cherry-picks (original authorship preserved,
-xannotated):debug_getRawReceipts(includes fork-mode forwarding of pre-fork blocks)debug_getRawTransactions(picked to keep the stack conflict-free with upstream)debug_getRawHeaderThe only fork-specific commit is the Beacon spec endpoint: add
GET /eth/v1/config/specand return the positive interval-mining duration as the Beacon-compatibleSECONDS_PER_SLOTstring. Return an internal error when interval mining is unavailable or disabled.This supersedes the hand-written implementations previously proposed in #60, #61, and #62, shrinking the fork's maintained surface to the spec endpoint alone; the debug endpoints will merge cleanly on the next upstream sync.
Note one semantics change relative to the superseded implementations: the debug endpoints return a
BlockNotFoundJSON-RPC error for unknown blocks instead ofnull, matching upstream.Stack
/eth/v1/config/specTesting
cargo test -p anvil-core --libcargo test -p anvil --test it beacon_api -- --nocapturecargo test -p anvil --test it -- can_get_rawcargo fmt --all -- --checkgit diff --checkPR Checklist
beacon_apitest for the spec endpoint