> **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.

# Tempo Tables

Every Tempo [raw dataset](/datasets/raw-datasets) (`"kind": "tempo"`) has these tables: [`blocks`](/datasets/tables/tempo#blocks), [`transactions`](/datasets/tables/tempo#transactions), and [`logs`](/datasets/tables/tempo#logs). Query one through its dataset's name, like `SELECT * FROM "acme/tempo_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. Tempo's blocks have Ethereum's header fields, some unused, plus three of its own.

| 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`. Add `blocks.timestamp_millis_part` for the milliseconds.                                                                                                                                       |
| `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       | Kept from Ethereum's block format, where it covers uncle blocks from Ethereum's mining era. Tempo has none, so it's always the hash of an empty list.                                                                                                                     |
| `miner`                 | `FixedSizeBinary(20)`           | No       | The address that receives the block's fees: the fee recipient the validator that proposed the block registered. 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      | Kept from Ethereum's block format, where it measured mining difficulty. Always `0` on Tempo.                                                                                                                                                                              |
| `gas_limit`             | `UInt64`                        | No       | The most gas the block's transactions can use in total. Gas is the unit Tempo, like 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       | Data the block's proposer attaches: Tempo's validators use it for the ceremonies that generate their shared keys. Often empty.                                                                                                                                            |
| `mix_hash`              | `FixedSizeBinary(32)`           | No       | Kept from Ethereum's block format, where it holds randomness from the consensus layer. Always zeros on Tempo.                                                                                                                                                             |
| `nonce`                 | `UInt64`                        | No       | Kept from Ethereum's block format, where miners varied it. Always `0` on Tempo.                                                                                                                                                                                           |
| `base_fee_per_gas`      | `Decimal128(38, 0)`             | Yes      | The minimum price per unit of gas a transaction pays to be in the block, in attodollars, the unit Tempo prices gas in: 10^18 attodollars make one US dollar. Tempo sets it per protocol version, not by demand.                                                           |
| `withdrawals_root`      | `FixedSizeBinary(32)`           | Yes      | Kept from Ethereum's block format, where it fingerprints withdrawals of staked ether. Tempo has no such withdrawals.                                                                                                                                                      |
| `blob_gas_used`         | `UInt64`                        | Yes      | Kept from Ethereum's block format, where it counts the gas used by blobs, data that transactions attach. Tempo has no blobs, so it's `0`.                                                                                                                                 |
| `excess_blob_gas`       | `UInt64`                        | Yes      | Kept from Ethereum's block format, where it sets the price of blob gas. Tempo has no blobs, so it's `0`.                                                                                                                                                                  |
| `parent_beacon_root`    | `FixedSizeBinary(32)`           | Yes      | Kept from Ethereum's block format, where it's the hash of the previous block on the consensus layer. Always zeros on Tempo.                                                                                                                                               |
| `requests_hash`         | `FixedSizeBinary(32)`           | Yes      | Kept from Ethereum's block format, where it fingerprints the requests a block passes to the consensus layer, like validators' deposits.                                                                                                                                   |
| `general_gas_limit`     | `UInt64`                        | No       | The most gas the block's general transactions can use in total: those that aren't payments, like most contract calls. Payments, like transfers of TIP-20 tokens (Tempo's token standard), can use the rest of `gas_limit`.                                                |
| `shared_gas_limit`      | `UInt64`                        | No       | The gas the block sets aside for subblocks: batches of transactions that validators other than the proposer submit for the block.                                                                                                                                         |
| `timestamp_millis_part` | `UInt64`                        | No       | The milliseconds to add to `timestamp`, from `0` to `999`. Tempo produces blocks more often than once a second, so several blocks can share a `timestamp`.                                                                                                                |

## `transactions`

One row per transaction: a signed request from an account to call a contract or deploy one. Each row also has what its receipt says about the outcome. Besides Ethereum's transaction types, Tempo has its own, type `118` (`0x76`), with batched calls, sponsored fees, and more kinds of signing keys.

| 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`. Add `blocks.timestamp_millis_part` for the milliseconds.                                                                                                                                                                                                                                                                                                                                          |
| `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 calls. Null for transactions that deploy a contract, and for type `118`, whose targets are in `calls`.                                                                                                                                                                                                                                                                                                                                           |
| `from`                        | `FixedSizeBinary(20)`                                                                                                                                                                                                                                                                                                                                                                           | No       | The address of the account that sent the transaction. When an access key signed it (see `key_authorization`), the account the key signs for.                                                                                                                                                                                                                                                                                                                                 |
| `nonce`                       | `UInt64`                                                                                                                                                                                                                                                                                                                                                                                        | No       | The number of transactions the sender had sent before this one, in the sequence `nonce_key` names. It orders the sender's transactions and keeps one from being replayed.                                                                                                                                                                                                                                                                                                    |
| `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 type `0` transactions signed without one.                                                                                                                                                                                                                                                                                                                     |
| `gas_limit`                   | `UInt64`                                                                                                                                                                                                                                                                                                                                                                                        | No       | The most gas the sender allowed the transaction to use.                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `gas_used`                    | `UInt64`                                                                                                                                                                                                                                                                                                                                                                                        | No       | The gas the transaction used.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `receipt_cumulative_gas_used` | `UInt64`                                                                                                                                                                                                                                                                                                                                                                                        | No       | The gas used by the block's transactions up to and including this one.                                                                                                                                                                                                                                                                                                                                                                                                       |
| `type`                        | `Int32`                                                                                                                                                                                                                                                                                                                                                                                         | No       | The transaction's type: `0` (legacy), `1` (with an access list), `2` (with a priority fee), `4` (setting an account's code), or `118` (`0x76`), Tempo's own.                                                                                                                                                                                                                                                                                                                 |
| `max_fee_per_gas`             | `Decimal128(38, 0)`                                                                                                                                                                                                                                                                                                                                                                             | No       | The most the sender pays per unit of gas, base fee and priority fee together, in attodollars. For types `0` and `1`, the gas price.                                                                                                                                                                                                                                                                                                                                          |
| `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 proposer, in attodollars. Null for types `0` and `1`.                                                                                                                                                                                                                                                                                                                               |
| `gas_price`                   | `Decimal128(38, 0)`                                                                                                                                                                                                                                                                                                                                                                             | Yes      | The price per unit of gas the sender offered, in attodollars. Null for types `2` and above, which set `max_fee_per_gas` and `max_priority_fee_per_gas` instead.                                                                                                                                                                                                                                                                                                              |
| `status`                      | `Boolean`                                                                                                                                                                                                                                                                                                                                                                                       | No       | Whether the transaction succeeded: `false` when it reverted, undoing its changes (it still pays its fees).                                                                                                                                                                                                                                                                                                                                                                   |
| `state_root`                  | `FixedSizeBinary(32)`                                                                                                                                                                                                                                                                                                                                                                           | Yes      | Kept from Ethereum, whose receipts carried a state hash instead of a status before 2017. Always null on Tempo.                                                                                                                                                                                                                                                                                                                                                               |
| `value`                       | `Utf8`                                                                                                                                                                                                                                                                                                                                                                                          | Yes      | The amount of the chain's native coin the transaction sends, as a decimal string. Tempo has no native coin, so it's `0`. Null for type `118`, whose amounts are in `calls`.                                                                                                                                                                                                                                                                                                  |
| `input`                       | `Binary`                                                                                                                                                                                                                                                                                                                                                                                        | Yes      | 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. Null for type `118`, whose inputs are in `calls`.                                                                                                                                                                                                                                        |
| `r`                           | `FixedSizeBinary(32)`                                                                                                                                                                                                                                                                                                                                                                           | Yes      | The `r` value of the sender's signature. Null for type `118`, whose signature is in `signature`.                                                                                                                                                                                                                                                                                                                                                                             |
| `s`                           | `FixedSizeBinary(32)`                                                                                                                                                                                                                                                                                                                                                                           | Yes      | The `s` value of the sender's signature. Null for type `118`, whose signature is in `signature`.                                                                                                                                                                                                                                                                                                                                                                             |
| `v_parity`                    | `Boolean`                                                                                                                                                                                                                                                                                                                                                                                       | Yes      | The signature's y-parity, which, with `r` and `s`, lets anyone recover the sender's address. Null for type `118`, whose signature is in `signature`.                                                                                                                                                                                                                                                                                                                         |
| `signature`                   | `Struct(type: Utf8, r: FixedSizeBinary(32), s: FixedSizeBinary(32), y_parity: Boolean, pub_key_x: FixedSizeBinary(32), pub_key_y: FixedSizeBinary(32), pre_hash: Boolean, webauthn_data: Binary, key_id: FixedSizeBinary(20))`                                                                                                                                                                  | Yes      | The signature of a type `118` transaction, by one of three kinds of key, named in `type`: `secp256k1` (Ethereum's, with `r`, `s`, and `y_parity`), `p256` (with the public key in `pub_key_x` and `pub_key_y`, and `pre_hash` saying whether the message was hashed first), or `webAuthn` (a passkey, with the public key and the authenticator's `webauthn_data`). `key_id` is the address of the access key that signed for the account, if one did. Null for other types. |
| `fee_token`                   | `FixedSizeBinary(20)`                                                                                                                                                                                                                                                                                                                                                                           | Yes      | The address of the TIP-20 token the sender chose to pay fees in, which only type `118` can name. When null, Tempo picks the token, starting from the fee payer's saved preference.                                                                                                                                                                                                                                                                                           |
| `fee_payer`                   | `FixedSizeBinary(20)`                                                                                                                                                                                                                                                                                                                                                                           | Yes      | The address that paid the transaction's fees: a sponsor that signed `fee_payer_signature`, or else the sender, `from`. Null for system transactions, which Tempo adds to blocks from the zero address.                                                                                                                                                                                                                                                                       |
| `nonce_key`                   | `FixedSizeBinary(32)`                                                                                                                                                                                                                                                                                                                                                                           | Yes      | Which of the sender's nonce sequences `nonce` counts in, as a 256-bit number in 32 big-endian bytes: `0` is the main one, others are independent sequences for sending in parallel, and the largest value means the transaction has an expiring nonce, bounded by `valid_before` instead. Null for types other than `118`.                                                                                                                                                   |
| `calls`                       | `List(Struct(to: FixedSizeBinary(20), value: Utf8, input: Binary))`                                                                                                                                                                                                                                                                                                                             | Yes      | The calls a type `118` transaction makes, in order, which all succeed or all fail together. Each has its target `to` (null to deploy a contract), its `value` (always `0`), and its `input`. Null for other types.                                                                                                                                                                                                                                                           |
| `fee_payer_signature`         | `Struct(r: FixedSizeBinary(32), s: FixedSizeBinary(32), y_parity: Boolean)`                                                                                                                                                                                                                                                                                                                     | Yes      | The signature (`r`, `s`, and `y_parity`) of a sponsor that pays a type `118` transaction's fees instead of the sender. Null when there's no sponsor.                                                                                                                                                                                                                                                                                                                         |
| `key_authorization`           | `Struct(chain_id: UInt64, key_type: Utf8, key_id: FixedSizeBinary(20), expiry: UInt64, limits: List(Struct(token: FixedSizeBinary(20), limit: Utf8)), signature: Struct(type: Utf8, r: FixedSizeBinary(32), s: FixedSizeBinary(32), y_parity: Boolean, pub_key_x: FixedSizeBinary(32), pub_key_y: FixedSizeBinary(32), pre_hash: Boolean, webauthn_data: Binary, key_id: FixedSizeBinary(20)))` | Yes      | An access key the transaction registers for the sender's account before it runs, so the key can then sign for the account: its `chain_id`, `key_type` (`secp256k1`, `p256`, or `webAuthn`), `key_id` (the key's address), `expiry` (a Unix time in seconds, or null for never), spending `limits` per TIP-20 token, in the token's smallest unit (null for unlimited, an empty list for no spending), and the account's `signature`. Null when there's none.                 |
| `aa_authorization_list`       | `List(Struct(chain_id: UInt64, address: FixedSizeBinary(20), nonce: UInt64, signature: Struct(type: Utf8, r: FixedSizeBinary(32), s: FixedSizeBinary(32), y_parity: Boolean, pub_key_x: FixedSizeBinary(32), pub_key_y: FixedSizeBinary(32), pre_hash: Boolean, webauthn_data: Binary, key_id: FixedSizeBinary(20))))`                                                                          | Yes      | The accounts that set their code with a type `118` transaction, each delegating to a contract so the account runs that contract's code: the `chain_id` it's valid on, the contract's `address`, the account's `nonce`, and the account's `signature`, by any of Tempo's kinds of key. Empty when there are none, and null for other types.                                                                                                                                   |
| `valid_before`                | `UInt64`                                                                                                                                                                                                                                                                                                                                                                                        | Yes      | The Unix time, in seconds, a type `118` transaction must be in a block before. Null when it sets no deadline.                                                                                                                                                                                                                                                                                                                                                                |
| `valid_after`                 | `UInt64`                                                                                                                                                                                                                                                                                                                                                                                        | Yes      | The Unix time, in seconds, from which a type `118` transaction can be in a block. Null when it sets no start.                                                                                                                                                                                                                                                                                                                                                                |
| `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`.                                                                                                                                                                                                                                                                                           |

## `logs`

One row per event log a transaction emitted. Contracts emit logs to record what happened, like a TIP-20 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`. Add `blocks.timestamp_millis_part` for the milliseconds.                                                                                                     |
| `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.                                                                                                                                     |
