Skip to content

Commit bf1f26c

Browse files
committed
cleanup
1 parent 05c9c90 commit bf1f26c

3 files changed

Lines changed: 3 additions & 29 deletions

File tree

deploy/migrations/clickhouse/xatu/006_gloas_bals_support.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ SETTINGS allow_nullable_key = 1;
6767

6868
CREATE TABLE IF NOT EXISTS canonical_beacon_block_access_list ON CLUSTER '{cluster}'
6969
AS canonical_beacon_block_access_list_local
70-
ENGINE = Distributed('{cluster}', currentDatabase(), canonical_beacon_block_access_list_local, rand());
70+
ENGINE = Distributed('{cluster}', currentDatabase(), canonical_beacon_block_access_list_local, cityHash64(slot_start_date_time, meta_network_name, block_hash, address, change_type, ifNull(storage_key, ''), block_access_index));

deploy/migrations/clickhouse/xatu/007_gloas_epbs_support.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ COMMENT 'Aggregated PTC payload attestations from canonical beacon blocks (max 4
5252

5353
CREATE TABLE canonical_beacon_block_payload_attestation ON CLUSTER '{cluster}'
5454
AS canonical_beacon_block_payload_attestation_local
55-
ENGINE = Distributed('{cluster}', currentDatabase(), canonical_beacon_block_payload_attestation_local, rand());
55+
ENGINE = Distributed('{cluster}', currentDatabase(), canonical_beacon_block_payload_attestation_local, cityHash64(slot_start_date_time, meta_network_name, block_root, position));
5656

5757
---------------------------------------------------------------------
5858
-- 2. CANNON: canonical_beacon_block_execution_payload_bid
@@ -108,7 +108,7 @@ COMMENT 'Winning execution payload bid from canonical beacon blocks (1 per block
108108

109109
CREATE TABLE canonical_beacon_block_execution_payload_bid ON CLUSTER '{cluster}'
110110
AS canonical_beacon_block_execution_payload_bid_local
111-
ENGINE = Distributed('{cluster}', currentDatabase(), canonical_beacon_block_execution_payload_bid_local, rand());
111+
ENGINE = Distributed('{cluster}', currentDatabase(), canonical_beacon_block_execution_payload_bid_local, cityHash64(slot_start_date_time, meta_network_name, block_root));
112112

113113
---------------------------------------------------------------------
114114
-- 3. SENTRY SSE: beacon_api_eth_v1_events_execution_payload

deploy/migrations/clickhouse/xatu/012_gloas_epbs_nullable_builder_index.up.sql

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -67,29 +67,3 @@ ALTER TABLE libp2p_gossipsub_execution_payload_envelope ON CLUSTER '{cluster}'
6767
MODIFY COLUMN builder_index Nullable(UInt64)
6868
COMMENT 'Index of the builder that produced the payload, NULL when self-built'
6969
CODEC(ZSTD(1));
70-
71-
---------------------------------------------------------------------
72-
-- Rewrite the historical UInt64-max sentinel to NULL.
73-
--
74-
-- Mutations run against the _local tables only, as the Distributed tables have
75-
-- no data of their own. Each is scoped by the sentinel so the mutation only
76-
-- rewrites the affected parts.
77-
---------------------------------------------------------------------
78-
79-
ALTER TABLE beacon_api_eth_v1_events_execution_payload_local ON CLUSTER '{cluster}'
80-
UPDATE builder_index = NULL WHERE builder_index = 18446744073709551615;
81-
82-
ALTER TABLE beacon_api_eth_v1_events_execution_payload_gossip_local ON CLUSTER '{cluster}'
83-
UPDATE builder_index = NULL WHERE builder_index = 18446744073709551615;
84-
85-
ALTER TABLE beacon_api_eth_v1_events_execution_payload_bid_local ON CLUSTER '{cluster}'
86-
UPDATE builder_index = NULL WHERE builder_index = 18446744073709551615;
87-
88-
ALTER TABLE canonical_beacon_block_execution_payload_bid_local ON CLUSTER '{cluster}'
89-
UPDATE builder_index = NULL WHERE builder_index = 18446744073709551615;
90-
91-
ALTER TABLE libp2p_gossipsub_execution_payload_bid_local ON CLUSTER '{cluster}'
92-
UPDATE builder_index = NULL WHERE builder_index = 18446744073709551615;
93-
94-
ALTER TABLE libp2p_gossipsub_execution_payload_envelope_local ON CLUSTER '{cluster}'
95-
UPDATE builder_index = NULL WHERE builder_index = 18446744073709551615;

0 commit comments

Comments
 (0)