This dataset contains a wealth of information about the Ethereum network, including detailed data on beacon chain events, mempool activity, and canonical chain events. Read more in our announcement post.
This work is licensed under CC BY 4.0
[!IMPORTANT]
Join the Xatu Data Telegram group to stay up to date:https://t[dot]me/+JanoQFu_nO8yNzQ1
Dataset Name | Schema | Description | Prefix | EthPandaOps Clickhouse | Public Parquet Files |
---|---|---|---|---|---|
Beacon API Event Stream | Schema | Events derived from the Beacon API event stream | beaconapi | ✅ | ✅ |
Execution Layer P2P | Schema | Events from the execution layer p2p network | mempool_ | ✅ | ✅ |
Canonical Beacon | Schema | Events derived from the finalized beacon chain | canonicalbeacon | ✅ | ✅ |
Canonical Execution | Schema | Data extracted from the execution layer | canonicalexecution | ✅ | ✅ |
Consensus Layer P2P | Schema | Events from the consensus layer p2p network | libp2p_ | ✅ | ✅ |
MEV Relay | Schema | Events derived from MEV relays | mevrelay | ✅ | ✅ |
Note: Public parquet files are available to everyone. Access to EthPandaOps Clickhouse is restricted. If you need access please reach out to us at ethpandaops at ethereum.org.
Check out the visual representation of the extraction process.
For a detailed description of the data schema, please refer to the Schema Documentation.
Public data is available in the form of Apache Parquet files. You can use any tool that supports the Apache Parquet format to query the data.
If you have access to EthPandaOps Clickhouse you can query the data directly. Skip ahead to Using EthPandaOps Clickhouse.
There's a few ways to get started with the data. First install the dependencies:
docker version
There are three options to get started with the data, all of them using Clickhouse.
Option 1: Setup your own Clickhouse server and import the data.
Recommended for most use cases.
Great for larger, repeated queries or when you want to query the data in a more complex way.
Option 2: Query the public parquet files directly.
Great for small queries one-off queriesor when you don't want to setup your own Clickhouse server.
Option 3: Use EthPandaOps Clickhouse.
Great for quick and easy queries. No setup required but access is limited.
Running your own Clickhouse cluster is recommended for most use cases. This process will walk you through the steps of setting up a cluster with the Xatu Clickhouse migrations and importing the data straight from the public parquet files.
Clone the Xatu repo
Xatu contains a docker compose file to run a Clickhouse cluster locally. This server will automatically have the correct schema migrations applied.
Steps:
git clone https://github.com/ethpandaops/xatu.git;
cd xatu
docker compose --profile clickhouse up --detach
docker run --rm -it --net host clickhouse/clickhouse-server clickhouse client --query "SHOW TABLES FROM default" | grep -v local
This should show you the tables that are available in the default database. e.g.
...
beacon_api_eth_v1_beacon_committee
beacon_api_eth_v1_events_attestation
beacon_api_eth_v1_events_blob_sidecar
...
Load data into Clickhouse
Our Clickhouse cluster is running but has no data! Let's import some data.
Steps:
cd;
git clone https://github.com/ethpandaops/xatu-data.git
cd xatu-data;
curl https://clickhouse.com/ | sh
./import-clickhouse.sh mainnet default beacon_api_eth_v1_events_block 2024-03-20 2024-03-27
This will import the data for the default.beacon_api_eth_v1_events_block
table in mainnet from the 20th of March 2024 to the 27th of March 2024.
docker run --rm -it --net host \
clickhouse/clickhouse-server clickhouse client -q "SELECT toStartOfDay(slot_start_date_time) AS day, COUNT(*) FROM default.beacon_api_eth_v1_events_block GROUP BY day FORMAT Pretty"
This query will show you the count of events per day.
Query Parquet Files Directly
Alternatively, you can query the parquet files directly without importing. This is useful if you only need to query a small subset of the data.
Steps:
# date based partitioned tables
clickhouse local --query="SELECT * FROM url('https://data.ethpandaops.io/xatu/mainnet/databases/default/beacon_api_eth_v1_events_block/2024/3/20.parquet', 'Parquet') LIMIT 10 FORMAT Pretty"
20000000.parquet
(block numbers between 20000000
and 20000999
)
# integer based partitioned tables
clickhouse local --query="SELECT * FROM url('https://data.ethpandaops.io/xatu/mainnet/databases/default/canonical_execution_block/1000/20000000.parquet', 'Parquet') LIMIT 10 FORMAT Pretty"
Use globs to query multiple files, e.g., 15th to 20th March or between block 20000000
and 20010000
# date based partitioned tables
clickhouse local --query="SELECT COUNT(*) FROM url('https://data.ethpandaops.io/xatu/mainnet/databases/default/beacon_api_eth_v1_events_block/2024/3/{15..20}.parquet', 'Parquet') FORMAT Pretty"
# integer based partitioned tables
clickhouse local --query="SELECT COUNT(*) FROM url('https://data.ethpandaops.io/xatu/mainnet/databases/default/canonical_execution_block/1000/{20000..20010}000.parquet', 'Parquet') LIMIT 10 FORMAT Pretty"
The EthPandaOps Clickhouse cluster already has the data loaded and the schema migrations applied. You can query the data directly. If you need access please reach out to us at ethpandaops at ethereum.org. Access is limited.
Query the data
Steps:
Setup your credentials
export CLICKHOUSE_USER=YOUR_USERNAME
export CLICKHOUSE_PASSWORD=YOUR_PASSWORD
Execute a query
echo """
SELECT
*
FROM default.beacon_api_eth_v1_events_block FINAL
WHERE
slot_start_date_time >= NOW() - INTERVAL '1 HOUR'
LIMIT 3
FORMAT Pretty
""" | curl "https://clickhouse.xatu.ethpandaops.io" -u "$CLICKHOUSE_USER:$CLICKHOUSE_PASSWORD" --data-binary @-
Querying the public parquet files is a great way to get started with the data. We recommend you don't do this for larger queries or queries that you'll run again.
Examples:
docker run --rm -it clickhouse/clickhouse-server clickhouse local --query="
SELECT
count(*), meta_consensus_implementation
FROM url('https://data.ethpandaops.io/xatu/mainnet/databases/default/beacon_api_eth_v1_events_block/2024/3/20.parquet', 'Parquet')
GROUP BY meta_consensus_implementation
FORMAT Pretty
"
docker run --rm -it clickhouse/clickhouse-server clickhouse local --query="
SELECT
count(*),
extra_data_string
FROM url('https://data.ethpandaops.io/xatu/mainnet/databases/default/canonical_execution_block/1000/{20000..20010}000.parquet', 'Parquet')
WHERE
block_number BETWEEN 20000000 AND 20010000
GROUP BY extra_data_string
ORDER BY count(*) DESC
LIMIT 5
FORMAT Pretty
"
Once your Clickhouse server is setup and the data is imported, you can query the data.
Show all block events for the 20th of March 2024 by nimbus sentries on mainnet between 01:20 and 01:30
docker run --rm -it --net host -e CLICKHOUSE_USER=$CLICKHOUSE_USER -e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD -e CLICKHOUSE_HOST=$CLICKHOUSE_HOST clickhouse/clickhouse-server clickhouse client --query="""
SELECT
*
FROM beacon_api_eth_v1_events_block
WHERE
meta_network_name = 'mainnet'
AND slot_start_date_time BETWEEN '2024-03-20 01:20:00' AND '2024-03-20 01:30:00' -- strongly recommend filtering by the partition key (slot_start_date_time) for query performance
AND meta_consensus_implementation = 'nimbus'
FORMAT Pretty
"""
Show the 90th, 50th, 05th percentile and min arrival time for blocks per day for the 20th to 27th of March 2024
docker run --rm -it --net host -e CLICKHOUSE_USER=$CLICKHOUSE_USER -e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD -e CLICKHOUSE_HOST=$CLICKHOUSE_HOST clickhouse/clickhouse-server clickhouse client --query="""
SELECT
toStartOfDay(slot_start_date_time) AS day,
round(MIN(propagation_slot_start_diff)) AS min_ms,
round(quantile(0.05)(propagation_slot_start_diff)) AS p05_ms,
round(quantile(0.50)(propagation_slot_start_diff)) AS p50_ms,
round(quantile(0.90)(propagation_slot_start_diff)) AS p90_ms
FROM beacon_api_eth_v1_events_block
WHERE
slot_start_date_time BETWEEN '2024-03-20' AND '2024-03-27' -- strongly recommend filtering by the partition key (slot_start_date_time) for query performance
GROUP BY day
ORDER BY day AS
FORMAT Pretty
"""
Show the amount of times a block was seen per sentry for the 20th to 27th of March 2024
docker run --rm -it --net host -e CLICKHOUSE_USER=$CLICKHOUSE_USER -e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD -e CLICKHOUSE_HOST=$CLICKHOUSE_HOST clickhouse/clickhouse-server clickhouse client --query="""
SELECT
meta_client_name AS client_name,
COUNT(*) AS count
FROM beacon_api_eth_v1_events_block
WHERE
slot_start_date_time BETWEEN '2024-03-20' AND '2024-03-27' -- strongly recommend filtering by the partition key (slot_start_date_time) for query performance
GROUP BY client_name
FORMAT Pretty
"""
Show the top 5 block builders by block numbers between 20000000 and 20010000
docker run --rm -it --net host -e CLICKHOUSE_USER=$CLICKHOUSE_USER -e CLICKHOUSE_PASSWORD=$CLICKHOUSE_PASSWORD -e CLICKHOUSE_HOST=$CLICKHOUSE_HOST clickhouse/clickhouse-server clickhouse client --query="""
SELECT
count(*),
extra_data_string
FROM canonical_execution_block
WHERE
block_number BETWEEN 20000000 AND 20010000
GROUP BY extra_data_string
ORDER BY count(*) DESC
LIMIT 5
FORMAT Pretty
"""
There are some examples for both Parquet and Clickhouse and SQLAlchemy in the examples/parquet and examples/clickhouse directories respectively.
We're excited to announce that we are opening up the Xatu data collection pipeline to the Ethereum community! This initiative enables community members to contribute valuable data to the Xatu dataset.
As discussions regarding the potential increase in maximum blob count continue we hope to shed light on the perspective of Ethereum's most crucial participants - home stakers.
Summary:
Data is collected by running a Beacon node and the xatu sentry
sidecar. The data is then sent to a pipeline that we run, which further anonymizes and redacts the data.
graph TD
A1[Home Staker 1] --> B1[Beacon Node]
A2[You!] --> B2[Beacon Node]
A3[Home Staker 3] --> B3[Beacon Node]
B1 --> X1[Xatu Sentry]
B2 --> X2[Xatu Sentry]
B3 --> X3[Xatu Sentry]
C[EthPandaOps]
C --> D[Data Pipeline]
D --> E[Public Parquet Files]
X1 --> C
X2 --> C
X3 --> C
subgraph "Data Collection"
A1
A2
A3
B1
B2
B3
X1
X2
X3
end
subgraph " "
C
D
end
subgraph " "
E
end
linkStyle 0 stroke:#f66,stroke-width:2px;
linkStyle 1 stroke:#f66,stroke-width:2px;
linkStyle 2 stroke:#f66,stroke-width:2px;
linkStyle 3 stroke:#f66,stroke-width:2px;
linkStyle 4 stroke:#f66,stroke-width:2px;
linkStyle 5 stroke:#f66,stroke-width:2px;
linkStyle 6 stroke:#f66,stroke-width:2px;
linkStyle 7 stroke:#f66,stroke-width:2px;
linkStyle 8 stroke:#f66,stroke-width:2px;
linkStyle 9 stroke:#f66,stroke-width:2px;
linkStyle 10 stroke:#f66,stroke-width:2px;
The following events will be collected:
beacon_api_eth_v1_events_block
beacon_api_eth_v1_events_blob_sidecar
beacon_api_eth_v1_events_chain_reorg
beacon_api_eth_v1_events_finalized_checkpoint
The following additional metadata is sent with every event:
clock_drift: '2' # Clock drift of the host machine
ethereum:
consensus:
implementation: lighthouse # Beacon node implementation
version: Lighthouse/v5.3.0-d6ba8c3/x86_64-linux # Beacon node version
network:
id: '11155111' # Ethereum network ID
name: sepolia # Ethereum network name
id: 98df53c0-3de0-477c-a7c9-4ea9b17981c3 # Session ID. Resets on restart
implementation: Xatu
module_name: SENTRY
name: b538bfd92sdv3 # Name of the sentry. Hash of the Beacon Node's node ID.
os: linux # Operating system of the host running sentry
version: v0.0.202-3645eb8 # Xatu version
Once we recieve the event, we do some additional processing to get the server metadata. The data that is added to the event is configurable per-user and allows users to only disclose data they're comfortable with. Geo location data is very useful for understanding how data is propagated through the network, but is not required.
server:
client:
geo:
# OPTIONAL FIELDS
## Data about ISP
autonomous_system_number: 24940 # Autonomous system number of the client
autonomous_system_organization: "Hetzner Online GmbH" # Organization associated with the autonomous system
## Data about location
city: "Helsinki" # City where the client is located
continent_code: "EU" # Continent code of the client's location
country: "Finland" # Country where the client is located
country_code: "FI" # Country code of the client's location
### ALWAYS REDACTED
latitude: REDACTED # Latitude coordinate of the client's location
longitude: REDACTED # Longitude coordinate of the client's location
group: "asn-city" # Group the client belongs to
user: "simplefrog47" # Pseudo username that sent the event
# ALWAYS REDACTED
ip: "REDACTED" # IP address of the client that sent the event
event:
received_date_time: "2024-10-04T03:00:48.533351629Z" # Timestamp when the event was received
Note:
client.name
field is re-hashed with a salt that only the EthPandaOps team has access to. This means that the original name of the client is not disclosed, and there is no way to map events back to a specific node id.client.ip
, client.geo.latitude
, and client.geo.longitude
fields are ALWAYS redacted.Privacy is a top priority for us. We have created privacy groups to allow users to only disclose data they're comfortable with.
Contributing to the Xatu dataset is currently restricted to known community members. We have plans to open this up to the public in the future, but for now, we want to ensure that the data remains high quality and relevant to the home staker community (read: we need to make sure our pipeline can handle the increased load 😂)
If you'd like to contribute to the Xatu dataset, please apply for access here
Once you've been granted access, you'll receive instructions on how exactly to run xatu sentry
and start contributing to the dataset.
If you're already running a beacon node, running xatu sentry
is as simple as running a docker container on your node. For example:
docker run -d \
--name xatu-sentry \
--restart unless-stopped \
--cpus="0.5" \
--memory="1g" \
--read-only \
ethpandaops/xatu:latest sentry \
--preset ethpandaops \
--beacon-node-url=http://localhost:5052 # Replace with your beacon node URL \
--output-authorization=REDACTED # Replace with your output authorization key
If you're running a Rocketpool node, you can contribute to the Xatu dataset by running xatu sentry
with the following command:
docker run -d \
--name xatu-sentry \
--restart unless-stopped \
--cpus="0.5" \
--memory="1g" \
--read-only \
--network=rocketpool_net \
ethpandaops/xatu:latest sentry \
--preset ethpandaops \
--beacon-node-url=http://eth2:5052 \
--output-authorization="REDACTED" # Replace with your output authorization key
You can download the binary from our GitHub Releases page or use the install script.
Once you have the xatu
binary, you can run it with the following command:
xatu sentry \
--preset ethpandaops \
--beacon-node-url=http://localhost:5052 # Replace with your beacon node URL \
--output-authorization=REDACTED # Replace with your output authorization key
Sam - @samcmau
Andrew - @savid