As an example, take debug_getBadBlocks (alphabetically, the first method in the spec)
- name: debug_getBadBlocks
summary: Returns an array of recent bad blocks that the client has seen on the network.
params: []
result:
name: Blocks
schema:
title: Bad block array
type: array
items:
$ref: '#/components/schemas/BadBlock'
As an example, take
debug_getBadBlocks
(alphabetically, the first method in the spec)https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/debug/getters.yaml#L82-L91
BadBlock
looks likehttps://github.com/ethereum/execution-apis/blob/v1.0.0-beta.4/src/schemas/block.yaml#L140-L146
But in
alloy
, we return aVec<Block>
: https://github.com/alloy-rs/alloy/blob/b621af07b7bd970d256c523c90ec0c91ec61cea1/crates/provider/src/ext/debug.rs#L30This is the wrong struct (there's no
BadBlock
struct anyway)