Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deploy): update clickhouse canonical beacon block nullbale columns #359

Merged
merged 1 commit into from
Aug 12, 2024
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
28 changes: 15 additions & 13 deletions deploy/local/docker-compose/vector-kafka-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1018,19 +1018,21 @@ transforms:
.proposer_index = .data.message.proposer_index
.eth1_data_block_hash = .data.message.body.eth1_data.block_hash
.eth1_data_deposit_root = .data.message.body.eth1_data.deposit_root
.execution_payload_block_hash = .data.message.body.execution_payload.block_hash
.execution_payload_block_number = .data.message.body.execution_payload.block_number
.execution_payload_fee_recipient = .data.message.body.execution_payload.fee_recipient
.execution_payload_base_fee_per_gas = .data.message.body.execution_payload.base_fee_per_gas
.execution_payload_blob_gas_used = .data.message.body.execution_payload.blob_gas_used
.execution_payload_excess_blob_gas = .data.message.body.execution_payload.excess_blob_gas
.execution_payload_gas_limit = .data.message.body.execution_payload.gas_limit
.execution_payload_gas_used = .data.message.body.execution_payload.gas_used
.execution_payload_state_root = .data.message.body.execution_payload.state_root
.execution_payload_parent_hash = .data.message.body.execution_payload.parent_hash
.execution_payload_transactions_count = .meta.client.additional_data.transactions_count
.execution_payload_transactions_total_bytes = .meta.client.additional_data.transactions_total_bytes
.execution_payload_transactions_total_bytes_compressed = .meta.client.additional_data.transactions_total_bytes_compressed
if exists(.data.message.body.execution_payload) && .data.message.body.execution_payload.block_hash != "" {
.execution_payload_block_hash = .data.message.body.execution_payload.block_hash
.execution_payload_block_number = .data.message.body.execution_payload.block_number
.execution_payload_fee_recipient = .data.message.body.execution_payload.fee_recipient
.execution_payload_base_fee_per_gas = .data.message.body.execution_payload.base_fee_per_gas
.execution_payload_blob_gas_used = .data.message.body.execution_payload.blob_gas_used
.execution_payload_excess_blob_gas = .data.message.body.execution_payload.excess_blob_gas
.execution_payload_gas_limit = .data.message.body.execution_payload.gas_limit
.execution_payload_gas_used = .data.message.body.execution_payload.gas_used
.execution_payload_state_root = .data.message.body.execution_payload.state_root
.execution_payload_parent_hash = .data.message.body.execution_payload.parent_hash
.execution_payload_transactions_count = .meta.client.additional_data.transactions_count
.execution_payload_transactions_total_bytes = .meta.client.additional_data.transactions_total_bytes
.execution_payload_transactions_total_bytes_compressed = .meta.client.additional_data.transactions_total_bytes_compressed
}
.updated_date_time = to_unix_timestamp(now())
del(.event)
del(.meta)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ALTER TABLE default.canonical_beacon_block ON CLUSTER '{cluster}'
MODIFY COLUMN `execution_payload_block_hash` FixedString(66) COMMENT 'The block hash of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_block_number` UInt32 COMMENT 'The block number of the execution payload' CODEC(DoubleDelta, ZSTD(1)),
MODIFY COLUMN `execution_payload_fee_recipient` String COMMENT 'The recipient of the fee for this execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_state_root` FixedString(66) COMMENT 'The state root of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_parent_hash` FixedString(66) COMMENT 'The parent hash of the execution payload' CODEC(ZSTD(1));

ALTER TABLE default.canonical_beacon_block_local ON CLUSTER '{cluster}'
MODIFY COLUMN `execution_payload_block_hash` FixedString(66) COMMENT 'The block hash of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_block_number` UInt32 COMMENT 'The block number of the execution payload' CODEC(DoubleDelta, ZSTD(1)),
MODIFY COLUMN `execution_payload_fee_recipient` String COMMENT 'The recipient of the fee for this execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_state_root` FixedString(66) COMMENT 'The state root of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_parent_hash` FixedString(66) COMMENT 'The parent hash of the execution payload' CODEC(ZSTD(1));
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ALTER TABLE default.canonical_beacon_block_local ON CLUSTER '{cluster}'
MODIFY COLUMN `execution_payload_block_hash` Nullable(FixedString(66)) COMMENT 'The block hash of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_block_number` Nullable(UInt32) COMMENT 'The block number of the execution payload' CODEC(DoubleDelta, ZSTD(1)),
MODIFY COLUMN `execution_payload_fee_recipient` Nullable(String) COMMENT 'The recipient of the fee for this execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_state_root` Nullable(FixedString(66)) COMMENT 'The state root of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_parent_hash` Nullable(FixedString(66)) COMMENT 'The parent hash of the execution payload' CODEC(ZSTD(1));

ALTER TABLE default.canonical_beacon_block ON CLUSTER '{cluster}'
MODIFY COLUMN `execution_payload_block_hash` Nullable(FixedString(66)) COMMENT 'The block hash of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_block_number` Nullable(UInt32) COMMENT 'The block number of the execution payload' CODEC(DoubleDelta, ZSTD(1)),
MODIFY COLUMN `execution_payload_fee_recipient` Nullable(String) COMMENT 'The recipient of the fee for this execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_state_root` Nullable(FixedString(66)) COMMENT 'The state root of the execution payload' CODEC(ZSTD(1)),
MODIFY COLUMN `execution_payload_parent_hash` Nullable(FixedString(66)) COMMENT 'The parent hash of the execution payload' CODEC(ZSTD(1));
Loading