# Ethereum Data Model

The [sf.ethereum.type.v2.Block](https://github.com/streamingfast/firehose-ethereum/blob/develop/proto/sf/ethereum/type/v2/type.proto#L51) Protobuf is shared across EVM-compatible blockchains (Ethereum, Polygon, Arbitrum...). While the Protobuf definition (`.proto` file) is largely self-documented, it is important to be aware of the **version** of the Protobuf you are working with.

## The Protobuf Version

Most changes in EVM chains are backward-compatible, meaning there is no need to introduce an entirely new Protobuf namespace (e.g., *sf.ethereum.type.v3.Block*). Instead, `sf.ethereum.type.v2.Block` is used consistently to avoid breaking changes.

To manage internal updates, Firehose uses a versioning system defined by the `ver` [field](https://github.com/streamingfast/firehose-ethereum/blob/develop/proto/sf/ethereum/type/v2/type.proto#L132) in the `Block` Protobuf.

```rust
// Ver represents that data model version of the block, it is used internally by Firehose on Ethereum
// as a validation that we are reading the correct version.
int32 ver = 1;
```

This version refers to the `Block` emitted by the Firehose trace.

### Version 3

* This version is current in place for **all EVM chains, with the exception of Optimism** from block 0 to the last pre-Prague (blockchains currently in Prague version are listed in a section later in this document) hard fork block.
* This version contains several known issues, which are described in the Protobuf definition itself (next to the corresponding field affected). You can also check out [this GitHub issue](https://github.com/streamingfast/firehose-ethereum/issues/71).

### Version 4

* This version is currently in place for the following chains:
  * Optimism
  * Ethereum Hoodi
  * Sei EVM
* This version fixes the known issue of version 3.

## Prague-enabled blockchains

The following chains have already upgraded to Ethereum's Prague version:

* Ethereum Sepolia
* Ethereum Holesky
* BSC Mainnet
* BSC Testnet


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.substreams.dev/reference-material/chain-support/ethereum-data-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
