Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,30 @@ store.remove('Transfer', id)

The Ethereum API provides access to smart contracts, public state variables, contract functions, events, transactions, blocks and the encoding/decoding Ethereum data.

#### Ethereum JSON‑RPC Schema Changes & Execution Client Compatibility

Following Ethereum's [transition to Proof of Stake](https://ethereum.org/en/roadmap/merge/), the Execution Layer JSON-RPC schema was updated to reflect changes in block metadata.

The `totalDifficulty` field was [officially removed](https://github.com/ethereum/execution-apis/pull/570) from the `eth_getBlockByNumber` response. Additionally, the `difficulty` field—previously used in Proof of Work—was retained as **optional** but is now considered obsolete and typically returned as `"0x0"` by spec-compliant clients. While some clients continue to include these fields for backward compatibility, developers relying on them should update their subgraphs and tooling to accommodate these schema changes. Full schema details are available in the [Ethereum Execution APIs documentation](https://ethereum.github.io/execution-apis/). We've added a chart with the current client compatibility with these updates as of July 17, 2025. **Please check for specific client updates as needed**.

**Ethereum JSON‑RPC Schema Changes Post-Merge**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be a heading?


| Field | JSON‑RPC Schema Status (Post-Merge) |
| ----------------- | --------------------------------------------------------------------------- |
| `totalDifficulty` | ❌ Removed from `eth_getBlockByNumber` response |
| `difficulty` | ⚠️ Optional, expected to be `0x0` post-Merge, but many clients still return |
| `size` | ⚠️ Optional; may be omitted depending on client |

**Execution Client Compatibility**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here?


| Client | totalDifficulty | difficulty | size | Notes |
| --- | --- | --- | --- | --- |
| **Erigon v3** | Not returned | Non-zero | Usually present | Strict spec compliance, noted [here](https://github.com/erigontech/erigon/issues/13012) |
| **Geth** | Returned | Non-zero | Returned | Maintains legacy behavior, noted [here](https://ethereum.org/developers/docs/apis/json-rpc/#eth_getblockbyhash) |
| **Nethermind** | Returned | Non-zero | Returned | Maintains legacy behavior, noted [here](https://docs.nethermind.io/interacting/json-rpc-ns/eth/#eth_getblockbynumber) |
| **Besu** | Returns `0` for an uncle block | Non-zero | Returned | Returns deprecated fields with valid values, noted [here](https://besu.hyperledger.org/public-networks/reference/api/objects) |
| **Reth** | Not Returned | `"0x0"` | Returned | Highly spec-compliant, aligns with post-Merge schema |

#### Support for Ethereum Types

As with entities, `graph codegen` generates classes for all smart contracts and events used in a Subgraph. For this, the contract ABIs need to be part of the data source in the Subgraph manifest. Typically, the ABI files are stored in an `abis/` folder.
Expand Down