Skip to content

feat(anvil): add debug_getRawHeader - #61

Closed
PelleKrab wants to merge 1 commit into
fix/cargo-deny-stale-advisoryfrom
feat/debug-get-raw-header
Closed

feat(anvil): add debug_getRawHeader#61
PelleKrab wants to merge 1 commit into
fix/cargo-deny-stale-advisoryfrom
feat/debug-get-raw-header

Conversation

@PelleKrab

@PelleKrab PelleKrab commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Superseded: Closed in favor of #67, which carries the debug APIs as verbatim upstream cherry-picks and keeps only the Beacon config spec endpoint fork-specific.

Motivation

Base proof witness construction needs the canonical RLP-encoded L1 block header selected by block ID.

Solution

Add geth-compatible debug_getRawHeader(BlockId) request handling and return the canonical RLP encoding of the selected header. Unknown blocks return null.

Stack

  1. fix(deps): update ruint security advisory #63 — cargo-deny security prerequisite
  2. feat(anvil): add debug_getRawHeader #61debug_getRawHeader ← this PR
  3. feat(anvil): add debug_getRawReceipts #62debug_getRawReceipts
  4. feat(anvil): add Beacon config spec endpoint #60 — Beacon /eth/v1/config/spec

Testing

  • cargo test -p anvil --test it beacon_api::test_debug_get_raw_header -- --nocapture
  • cargo fmt --all -- --check
  • git diff --check

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@PelleKrab
PelleKrab force-pushed the feat/debug-get-raw-header branch from 8c1f218 to 0e28587 Compare August 11, 2026 17:39
@PelleKrab
PelleKrab changed the base branch from base-anvil-fork to fix/cargo-deny-stale-advisory August 11, 2026 17:39
Expose canonical RLP-encoded block headers for proof witness construction.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ff1b0-c07c-77f3-816c-5da33175c7a4
@PelleKrab
PelleKrab force-pushed the fix/cargo-deny-stale-advisory branch from 872679e to 73d1546 Compare August 11, 2026 17:57
@PelleKrab
PelleKrab force-pushed the feat/debug-get-raw-header branch from 0e28587 to acf30db Compare August 11, 2026 17:57
@PelleKrab

Copy link
Copy Markdown
Contributor Author

Superseded: debug_getRawHeader landed upstream in foundry-rs/foundry#15430 after our fork point, so #60 now carries it as a verbatim upstream cherry-pick instead of this hand-written implementation.

@PelleKrab PelleKrab closed this Aug 11, 2026
@PelleKrab
PelleKrab deleted the feat/debug-get-raw-header branch August 11, 2026 23:57
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