Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deploy/migrations/clickhouse/002_fast_confirmation.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DROP TABLE IF EXISTS default.beacon_api_eth_v1_events_fast_confirmation ON CLUSTER '{cluster}';
DROP TABLE IF EXISTS default.beacon_api_eth_v1_events_fast_confirmation_local ON CLUSTER '{cluster}';
43 changes: 43 additions & 0 deletions deploy/migrations/clickhouse/002_fast_confirmation.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
CREATE TABLE IF NOT EXISTS default.beacon_api_eth_v1_events_fast_confirmation_local ON CLUSTER '{cluster}'
(
`updated_date_time` DateTime COMMENT 'Timestamp when the record was last updated' CODEC(DoubleDelta, ZSTD(1)),
`event_date_time` DateTime64(3) COMMENT 'When the sentry received the event from a beacon node' CODEC(DoubleDelta, ZSTD(1)),
`slot` UInt32 COMMENT 'Slot number in the beacon API event stream payload' CODEC(DoubleDelta, ZSTD(1)),
`slot_start_date_time` DateTime COMMENT 'The wall clock time when the slot started' CODEC(DoubleDelta, ZSTD(1)),
`propagation_slot_start_diff` Nullable(UInt32) COMMENT 'The difference between the event_date_time and the slot_start_date_time' CODEC(ZSTD(1)),
`block` FixedString(66) COMMENT 'The fast confirmed beacon block root hash' CODEC(ZSTD(1)),
`epoch` Nullable(UInt32) COMMENT 'The epoch number in the beacon API event stream payload' CODEC(ZSTD(1)),
`epoch_start_date_time` Nullable(DateTime) COMMENT 'The wall clock time when the epoch started' CODEC(ZSTD(1)),
`wallclock_slot` Nullable(UInt32) COMMENT 'Slot number of the wall clock when the event was received' CODEC(ZSTD(1)),
`wallclock_slot_start_date_time` Nullable(DateTime) COMMENT 'Start date and time of the wall clock slot when the event was received' CODEC(ZSTD(1)),
`wallclock_epoch` Nullable(UInt32) COMMENT 'Epoch number of the wall clock when the event was received' CODEC(ZSTD(1)),
`wallclock_epoch_start_date_time` Nullable(DateTime) COMMENT 'Start date and time of the wall clock epoch when the event was received' CODEC(ZSTD(1)),
`meta_client_name` LowCardinality(String) COMMENT 'Name of the client that generated the event',
`meta_client_version` LowCardinality(String) COMMENT 'Version of the client that generated the event',
`meta_client_implementation` LowCardinality(String) COMMENT 'Implementation of the client that generated the event',
`meta_client_os` LowCardinality(String) COMMENT 'Operating system of the client that generated the event',
`meta_client_ip` Nullable(IPv6) COMMENT 'IP address of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_city` LowCardinality(String) COMMENT 'City of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_country` LowCardinality(String) COMMENT 'Country of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_country_code` LowCardinality(String) COMMENT 'Country code of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_continent_code` LowCardinality(String) COMMENT 'Continent code of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_longitude` Nullable(Float64) COMMENT 'Longitude of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_latitude` Nullable(Float64) COMMENT 'Latitude of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_autonomous_system_number` Nullable(UInt32) COMMENT 'Autonomous system number of the client that generated the event' CODEC(ZSTD(1)),
`meta_client_geo_autonomous_system_organization` Nullable(String) COMMENT 'Autonomous system organization of the client that generated the event' CODEC(ZSTD(1)),
`meta_network_name` LowCardinality(String) COMMENT 'Ethereum network name',
`meta_consensus_version` LowCardinality(String) COMMENT 'Ethereum consensus client version that generated the event',
`meta_consensus_version_major` LowCardinality(String) COMMENT 'Ethereum consensus client major version that generated the event',
`meta_consensus_version_minor` LowCardinality(String) COMMENT 'Ethereum consensus client minor version that generated the event',
`meta_consensus_version_patch` LowCardinality(String) COMMENT 'Ethereum consensus client patch version that generated the event',
`meta_consensus_implementation` LowCardinality(String) COMMENT 'Ethereum consensus client implementation that generated the event'
)
ENGINE = ReplicatedReplacingMergeTree('/clickhouse/{installation}/{cluster}/tables/{shard}/{database}/{table}', '{replica}', updated_date_time)
PARTITION BY (meta_network_name, toYYYYMM(slot_start_date_time))
ORDER BY (meta_network_name, slot_start_date_time, meta_client_name, block)
COMMENT 'Contains beacon API eventstream "fast_confirmation" data from each sentry client attached to a beacon node.';

CREATE TABLE IF NOT EXISTS default.beacon_api_eth_v1_events_fast_confirmation ON CLUSTER '{cluster}'
AS default.beacon_api_eth_v1_events_fast_confirmation_local
ENGINE = Distributed('{cluster}', 'default', 'beacon_api_eth_v1_events_fast_confirmation_local', cityHash64(slot_start_date_time, meta_network_name, meta_client_name, block))
COMMENT 'Contains beacon API eventstream "fast_confirmation" data from each sentry client attached to a beacon node.';
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ require (
github.com/chuckpreslar/emission v0.0.0-20170206194824-a7ddd980baf9
github.com/creasty/defaults v1.8.0
github.com/ethereum/go-ethereum v1.17.1
github.com/ethpandaops/beacon v0.68.0
github.com/ethpandaops/beacon v0.69.0
github.com/ethpandaops/ethcore v0.0.0-20260513090510-be891b9812d8
github.com/ethpandaops/ethwallclock v0.4.0
github.com/ethpandaops/go-eth2-client v0.1.2
github.com/ethpandaops/go-eth2-client v0.1.3-0.20260513062559-5fb497ba414f
github.com/failsafe-go/failsafe-go v0.9.6
github.com/ferranbt/fastssz v1.0.0
github.com/go-co-op/gocron/v2 v2.16.6
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJ
github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8=
github.com/ethereum/go-ethereum v1.17.1 h1:IjlQDjgxg2uL+GzPRkygGULPMLzcYWncEI7wbaizvho=
github.com/ethereum/go-ethereum v1.17.1/go.mod h1:7UWOVHL7K3b8RfVRea022btnzLCaanwHtBuH1jUCH/I=
github.com/ethpandaops/beacon v0.68.0 h1:qm3Yvn8ZypYNxoGicTuJijaQs1EixCOWqwKLK4mQPLg=
github.com/ethpandaops/beacon v0.68.0/go.mod h1:A/TEBvCp+4aUKPPXWMgGFpWpoJFr3L3muQX72i+DEx4=
github.com/ethpandaops/beacon v0.69.0 h1:qGfy9y+zp8qLna6dgxvzLfAsAdGez0JL8BFJjr1Zudo=
github.com/ethpandaops/beacon v0.69.0/go.mod h1:TSvV8MOrn2kfWgWEFOg5b3AvlMLF5BWbkpsMPPGf4/I=
github.com/ethpandaops/ethcore v0.0.0-20260513090510-be891b9812d8 h1:KCZkl5/P79QqwpSVq5JWUnA331J+3Xg5VMp0MQFunvQ=
github.com/ethpandaops/ethcore v0.0.0-20260513090510-be891b9812d8/go.mod h1:RbeOhj2Umh5rF3tJ69vlOBGn8zXtSWGsZz8cLnClkv4=
github.com/ethpandaops/ethereum-package-go v0.8.1 h1:VN5l8UXveyw7gp0Glj8BRzS/D5RKyvhLeaoi/C5Jy5M=
github.com/ethpandaops/ethereum-package-go v0.8.1/go.mod h1:LQThCwlCeeNBTdXOFV+xSwudoced53x+o/Orya3Y+oo=
github.com/ethpandaops/ethwallclock v0.4.0 h1:+sgnhf4pk6hLPukP076VxkiLloE4L0Yk1yat+ZyHh1g=
github.com/ethpandaops/ethwallclock v0.4.0/go.mod h1:y0Cu+mhGLlem19vnAV2x0hpFS5KZ7oOi2SWYayv9l24=
github.com/ethpandaops/go-eth2-client v0.1.2 h1:nJr0YBmqHtbVeLeWEDyXwjCEO0AFt1Z0lIciMYlowfU=
github.com/ethpandaops/go-eth2-client v0.1.2/go.mod h1:U3KdR8QSq8vqs9LWSGAF4ETHJpcB62E1DFf0gVMgWv0=
github.com/ethpandaops/go-eth2-client v0.1.3-0.20260513062559-5fb497ba414f h1:9k0z0tEayikToEqZn71xKIRtCNzH6mwUkIJk70kbSSk=
github.com/ethpandaops/go-eth2-client v0.1.3-0.20260513062559-5fb497ba414f/go.mod h1:U3KdR8QSq8vqs9LWSGAF4ETHJpcB62E1DFf0gVMgWv0=
github.com/failsafe-go/failsafe-go v0.9.6 h1:vPSH2cry0Ee5cnR9wc9qshCDO6jdrMA9elBJNwyo4Uk=
github.com/failsafe-go/failsafe-go v0.9.6/go.mod h1:IeRpglkcwzKagjDMh90ZhN2l4Ovt3+jemQBUbThag54=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
Expand Down
Loading
Loading