> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://docs.ampdb.io/api/mcp` to find what you need.

# EVM RPC Tables

Every EVM RPC [raw dataset](/datasets/raw-datasets) (`"kind": "evm-rpc"`) has these tables: [`blocks`](/datasets/tables/evm-rpc#blocks), [`transactions`](/datasets/tables/evm-rpc#transactions), and [`logs`](/datasets/tables/evm-rpc#logs). Query one through its dataset's name, like `SELECT * FROM "acme/eth_mainnet".blocks`. Column types are [Arrow types](/datasets/manifests#data-types), and a nullable column can be `NULL`.

## `blocks`

One row per block: a batch of transactions the chain added at once, with the header that links it to the block before it.

| Column                   | Type                            | Nullable | Description                                                                                                                                                                                                                                                               |
| ------------------------ | ------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_block_num`             | `UInt64`                        | No       | The number of the block the row comes from. Amp adds it to every raw table, and uses it to order the data, split it into files, and track which blocks it has.                                                                                                            |
| `_ts`                    | `Timestamp(Nanosecond, +00:00)` | No       | The time of the block the row comes from, in UTC. Amp adds it to the tables of chains that timestamp their blocks.                                                                                                                                                        |
| `block_num`              | `UInt64`                        | No       | The block's number: its height in the chain, counting from `0`. The same as `_block_num`.                                                                                                                                                                                 |
| `timestamp`              | `Timestamp(Nanosecond, +00:00)` | No       | The time the block was produced, in UTC, to the second. The same as `_ts`.                                                                                                                                                                                                |
| `hash`                   | `FixedSizeBinary(32)`           | No       | The block's hash, which identifies it: a 32-byte fingerprint of its header, stored as raw bytes rather than a hex string. To compare it with a hex string, convert one to the other with `evm_encode_hex` or `evm_decode_hex` ([EVM functions](/querying/functions/evm)). |
| `parent_hash`            | `FixedSizeBinary(32)`           | No       | The `hash` of the block before this one.                                                                                                                                                                                                                                  |
| `ommers_hash`            | `FixedSizeBinary(32)`           | No       | A hash of the block's ommers (uncles): blocks mined at the same time that lost the race, from before the Merge, Ethereum's 2022 switch from mining to staking. Since the Merge, always the hash of an empty list.                                                         |
| `miner`                  | `FixedSizeBinary(20)`           | No       | The address that receives the block's priority fees, the tips transactions pay on top of the base fee: the miner before the Merge, the address the block's proposer chose since. Addresses are their 20 raw bytes.                                                        |
| `state_root`             | `FixedSizeBinary(32)`           | No       | A hash that fingerprints every account's state (balance, code, and storage) after the block: the root of the chain's state trie.                                                                                                                                          |
| `transactions_root`      | `FixedSizeBinary(32)`           | No       | A hash that fingerprints the block's transactions, in order.                                                                                                                                                                                                              |
| `receipt_root`           | `FixedSizeBinary(32)`           | No       | A hash that fingerprints the block's receipts, the outcome of each transaction: whether it succeeded, the gas it used, and its logs.                                                                                                                                      |
| `logs_bloom`             | `Binary`                        | No       | A 256-byte Bloom filter of the addresses and topics in the block's logs: a compact summary that tells you a block certainly lacks a given log, or may have it.                                                                                                            |
| `difficulty`             | `Decimal128(38, 0)`             | Yes      | How hard the block was to mine, before the Merge; `0` since. Null when the value is too large to store, which happens on some chains.                                                                                                                                     |
| `gas_limit`              | `UInt64`                        | No       | The most gas the block's transactions can use in total. Gas is the unit Ethereum measures computation in, and each transaction pays for the gas it uses.                                                                                                                  |
| `gas_used`               | `UInt64`                        | No       | The gas the block's transactions used in total.                                                                                                                                                                                                                           |
| `extra_data`             | `Binary`                        | No       | Up to 32 bytes the block's producer chose freely, often text naming its client or builder.                                                                                                                                                                                |
| `mix_hash`               | `FixedSizeBinary(32)`           | No       | Part of the proof of work before the Merge; since, the randomness the consensus layer provides for the block (`PREVRANDAO`). Zeros when the chain's RPC leaves it out.                                                                                                    |
| `nonce`                  | `UInt64`                        | No       | The number miners varied to find a valid block, before the Merge. `0` since, and when the chain's RPC leaves it out.                                                                                                                                                      |
| `base_fee_per_gas`       | `Decimal128(38, 0)`             | Yes      | The minimum price per unit of gas a transaction pays to be in the block, in wei: 10^18 wei make one ether, or one of the chain's own coin. Null for blocks before the London upgrade, which introduced it.                                                                |
| `withdrawals_root`       | `FixedSizeBinary(32)`           | Yes      | A hash that fingerprints the block's withdrawals, which move staked ether from the consensus layer to accounts. Null for blocks before the Shanghai upgrade, which introduced withdrawals.                                                                                |
| `blob_gas_used`          | `UInt64`                        | Yes      | The blob gas the block's transactions used. Blobs are large chunks of data that transactions attach, mostly from layer 2 chains, and blob gas prices them apart from gas. Null for blocks before the Dencun upgrade, which introduced blobs.                              |
| `excess_blob_gas`        | `UInt64`                        | Yes      | How far blob gas use has run above its target over recent blocks, which sets the price of blob gas. Null for blocks before the Dencun upgrade.                                                                                                                            |
| `parent_beacon_root`     | `FixedSizeBinary(32)`           | Yes      | The hash of the previous block on Ethereum's consensus layer, the Beacon chain: the `parent_hash` of the Beacon block that carries this one. Null for blocks before the Dencun upgrade.                                                                                   |
| `requests_hash`          | `FixedSizeBinary(32)`           | Yes      | A hash that fingerprints the requests the block passes to the consensus layer, like validators' deposits and withdrawals. Null for blocks before the Pectra upgrade, which introduced them.                                                                               |
| `block_access_list_hash` | `FixedSizeBinary(32)`           | Yes      | A hash that fingerprints the block's access list: every account and storage slot its transactions read or change. Null for blocks before the Glamsterdam upgrade, which adds it.                                                                                          |
| `slot_number`            | `UInt64`                        | Yes      | The slot of the block on Ethereum's consensus layer, the `slot` in an Ethereum Beacon dataset. Null for blocks before the Glamsterdam upgrade, which adds it.                                                                                                             |

## `transactions`

One row per transaction: a signed request from an account to send coins, call a contract, or deploy one. Each row also has what its receipt says about the outcome.

| Column                     | Type                                                                                                                                             | Nullable | Description                                                                                                                                                                                                                                                                                                         |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_block_num`               | `UInt64`                                                                                                                                         | No       | The number of the block the row comes from. Amp adds it to every raw table, and uses it to order the data, split it into files, and track which blocks it has.                                                                                                                                                      |
| `_ts`                      | `Timestamp(Nanosecond, +00:00)`                                                                                                                  | No       | The time of the block the row comes from, in UTC. Amp adds it to the tables of chains that timestamp their blocks.                                                                                                                                                                                                  |
| `block_hash`               | `FixedSizeBinary(32)`                                                                                                                            | No       | The hash of the block the row comes from. Joins to `blocks.hash`.                                                                                                                                                                                                                                                   |
| `block_num`                | `UInt64`                                                                                                                                         | No       | The block's number: its height in the chain, counting from `0`. The same as `_block_num`.                                                                                                                                                                                                                           |
| `timestamp`                | `Timestamp(Nanosecond, +00:00)`                                                                                                                  | No       | The time the block was produced, in UTC, to the second. The same as `_ts`.                                                                                                                                                                                                                                          |
| `tx_index`                 | `UInt32`                                                                                                                                         | No       | The transaction's position in its block, counting from `0`.                                                                                                                                                                                                                                                         |
| `tx_hash`                  | `FixedSizeBinary(32)`                                                                                                                            | No       | The transaction's hash, which identifies it.                                                                                                                                                                                                                                                                        |
| `to`                       | `FixedSizeBinary(20)`                                                                                                                            | Yes      | The address the transaction sends to: an account, or a contract it calls. Null for transactions that deploy a contract.                                                                                                                                                                                             |
| `nonce`                    | `UInt64`                                                                                                                                         | No       | The number of transactions the sender had sent before this one. It orders the sender's transactions and keeps one from being replayed.                                                                                                                                                                              |
| `gas_price`                | `Decimal128(38, 0)`                                                                                                                              | Yes      | The price per unit of gas the sender offered, in wei. Null for types `2` and above, which set `max_fee_per_gas` and `max_priority_fee_per_gas` instead.                                                                                                                                                             |
| `gas_limit`                | `UInt64`                                                                                                                                         | No       | The most gas the sender allowed the transaction to use.                                                                                                                                                                                                                                                             |
| `value`                    | `Utf8`                                                                                                                                           | No       | The amount of ether (or the chain's own coin) the transaction sends to `to`, in wei, as a decimal string like `1000000000000000000` for one ether.                                                                                                                                                                  |
| `input`                    | `Binary`                                                                                                                                         | No       | The data the transaction sends: for a contract call, the function and its arguments, ABI-encoded (the standard way contracts encode values); for a deployment, the contract's code. Empty for plain transfers.                                                                                                      |
| `r`                        | `FixedSizeBinary(32)`                                                                                                                            | No       | The `r` value of the sender's signature. Zeros for chain-specific transaction types outside Ethereum's (`0` to `4`), like a layer 2's deposit transactions.                                                                                                                                                         |
| `s`                        | `FixedSizeBinary(32)`                                                                                                                            | No       | The `s` value of the sender's signature. Zeros for chain-specific transaction types outside Ethereum's (`0` to `4`).                                                                                                                                                                                                |
| `v_parity`                 | `Boolean`                                                                                                                                        | No       | The signature's y-parity, which, with `r` and `s`, lets anyone recover the sender's address. `false` for chain-specific transaction types outside Ethereum's (`0` to `4`).                                                                                                                                          |
| `chain_id`                 | `UInt64`                                                                                                                                         | Yes      | The ID of the chain the transaction is valid on, which keeps it from being replayed on another chain. Null for old type `0` transactions signed without one.                                                                                                                                                        |
| `gas_used`                 | `UInt64`                                                                                                                                         | No       | The gas used by the block's transactions up to and including this one (the receipt's cumulative gas used), not by this transaction alone. Subtract the previous transaction's value to get this one's.                                                                                                              |
| `type`                     | `Int32`                                                                                                                                          | No       | The transaction's type: `0` (legacy), `1` (with an access list), `2` (with a priority fee, since the London upgrade), `3` (carrying blobs), `4` (setting an account's code), or a chain-specific type, like a layer 2's deposits.                                                                                   |
| `max_fee_per_gas`          | `Decimal128(38, 0)`                                                                                                                              | Yes      | The most the sender pays per unit of gas, base fee and priority fee together, in wei. For types `0` and `1`, the gas price; `0` for chain-specific types that don't set it.                                                                                                                                         |
| `max_priority_fee_per_gas` | `Decimal128(38, 0)`                                                                                                                              | Yes      | The most the sender pays per unit of gas on top of the base fee, as a tip to the block's producer, in wei. Null for types `0` and `1`.                                                                                                                                                                              |
| `max_fee_per_blob_gas`     | `Decimal128(38, 0)`                                                                                                                              | Yes      | The most the sender pays per unit of blob gas, in wei. Null for types other than `3`.                                                                                                                                                                                                                               |
| `from`                     | `FixedSizeBinary(20)`                                                                                                                            | No       | The address of the account that sent and signed the transaction.                                                                                                                                                                                                                                                    |
| `status`                   | `Boolean`                                                                                                                                        | No       | Whether the transaction succeeded: `false` when it reverted, undoing its changes (it still pays for its gas). Always `true` for blocks before the Byzantium upgrade, whose receipts have no status.                                                                                                                 |
| `state_root`               | `FixedSizeBinary(32)`                                                                                                                            | Yes      | A hash of the chain's state after the transaction, which receipts carried instead of a status before the Byzantium upgrade. Null for later blocks.                                                                                                                                                                  |
| `access_list`              | `List(Struct(address: FixedSizeBinary(20), storage_keys: List(FixedSizeBinary(32))))`                                                            | Yes      | The addresses and storage keys the transaction declares it will access, which makes accessing them cheaper: each entry has an `address` and its `storage_keys`. Null for type `0` and chain-specific types.                                                                                                         |
| `blob_versioned_hashes`    | `List(FixedSizeBinary(32))`                                                                                                                      | Yes      | The hashes of the blobs the transaction carries, one each, which the consensus layer keeps for about 18 days. Null for types other than `3`.                                                                                                                                                                        |
| `authorization_list`       | `List(Struct(chain_id: UInt64, address: FixedSizeBinary(20), nonce: UInt64, y_parity: Boolean, r: FixedSizeBinary(32), s: FixedSizeBinary(32)))` | Yes      | The accounts that set their code with this transaction, each delegating to a contract so the account runs that contract's code: the `chain_id` it's valid on (`0` for any), the contract's `address`, the account's `nonce`, and the account's signature (`y_parity`, `r`, and `s`). Null for types other than `4`. |

## `logs`

One row per event log a transaction emitted. Contracts emit logs to record what happened, like a token transfer. A transaction that failed emits none.

| Column       | Type                            | Nullable | Description                                                                                                                                                                                                                             |
| ------------ | ------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_block_num` | `UInt64`                        | No       | The number of the block the row comes from. Amp adds it to every raw table, and uses it to order the data, split it into files, and track which blocks it has.                                                                          |
| `_ts`        | `Timestamp(Nanosecond, +00:00)` | No       | The time of the block the row comes from, in UTC. Amp adds it to the tables of chains that timestamp their blocks.                                                                                                                      |
| `block_hash` | `FixedSizeBinary(32)`           | No       | The hash of the block the row comes from. Joins to `blocks.hash`.                                                                                                                                                                       |
| `block_num`  | `UInt64`                        | No       | The block's number: its height in the chain, counting from `0`. The same as `_block_num`.                                                                                                                                               |
| `timestamp`  | `Timestamp(Nanosecond, +00:00)` | No       | The time the block was produced, in UTC, to the second. The same as `_ts`.                                                                                                                                                              |
| `tx_hash`    | `FixedSizeBinary(32)`           | No       | The hash of the transaction that emitted the log. Joins to `transactions.tx_hash`.                                                                                                                                                      |
| `tx_index`   | `UInt32`                        | No       | The position in its block of the transaction that emitted the log, counting from `0`.                                                                                                                                                   |
| `log_index`  | `UInt32`                        | No       | The log's position in its block, across all its transactions, counting from `0`.                                                                                                                                                        |
| `address`    | `FixedSizeBinary(20)`           | No       | The address of the contract that emitted the log.                                                                                                                                                                                       |
| `topic0`     | `FixedSizeBinary(32)`           | Yes      | The log's first topic: usually the hash of the event's signature, like `Transfer(address,address,uint256)`, which `evm_topic` computes. For an anonymous event, which has no signature topic, it's the first indexed argument, or null. |
| `topic1`     | `FixedSizeBinary(32)`           | Yes      | The log's second topic, usually its first indexed argument, padded to 32 bytes. Null when the log has fewer topics.                                                                                                                     |
| `topic2`     | `FixedSizeBinary(32)`           | Yes      | The log's third topic, usually its second indexed argument, padded to 32 bytes. Null when the log has fewer topics.                                                                                                                     |
| `topic3`     | `FixedSizeBinary(32)`           | Yes      | The log's fourth topic, usually its third indexed argument, padded to 32 bytes. Null when the log has fewer topics.                                                                                                                     |
| `data`       | `Binary`                        | No       | The log's non-indexed arguments, ABI-encoded. `evm_decode_log` decodes them, along with the topics.                                                                                                                                     |
