Skip to content

Commit 6d6ac4a

Browse files
committed
Use VersionedCollapsingMergeTree and insert based deletes
1 parent c9db79f commit 6d6ac4a

File tree

9 files changed

+310
-293
lines changed

9 files changed

+310
-293
lines changed

internal/common/block.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66

77
type Block struct {
88
ChainId *big.Int `json:"chain_id" ch:"chain_id"`
9-
Number *big.Int `json:"number" ch:"number"`
9+
Number *big.Int `json:"block_number" ch:"block_number"`
1010
Hash string `json:"hash" ch:"hash"`
1111
ParentHash string `json:"parent_hash" ch:"parent_hash"`
12-
Timestamp uint64 `json:"timestamp" ch:"timestamp"`
12+
Timestamp uint64 `json:"block_timestamp" ch:"block_timestamp"`
1313
Nonce string `json:"nonce" ch:"nonce"`
1414
Sha3Uncles string `json:"sha3_uncles" ch:"sha3_uncles"`
1515
MixHash string `json:"mix_hash" ch:"mix_hash"`
@@ -27,6 +27,8 @@ type Block struct {
2727
GasUsed *big.Int `json:"gas_used" ch:"gas_used"`
2828
WithdrawalsRoot string `json:"withdrawals_root" ch:"withdrawals_root"`
2929
BaseFeePerGas uint64 `json:"base_fee_per_gas" ch:"base_fee_per_gas"`
30+
Sign int8 `json:"sign" ch:"sign"`
31+
InsertTimestamp uint64 `json:"insert_timestamp" ch:"insert_timestamp"`
3032
}
3133

3234
type BlockData struct {

internal/common/log.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ type Log struct {
2525
Topic1 string `json:"topic_1" ch:"topic_1"`
2626
Topic2 string `json:"topic_2" ch:"topic_2"`
2727
Topic3 string `json:"topic_3" ch:"topic_3"`
28+
Sign int8 `json:"sign" ch:"sign"`
29+
InsertTimestamp uint64 `json:"insert_timestamp" ch:"insert_timestamp"`
2830
}
2931

3032
func (l *Log) GetTopic(index int) (string, error) {

internal/common/trace.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ type Trace struct {
2626
Author string `json:"author" ch:"author"`
2727
RewardType string `json:"reward_type" ch:"reward_type"`
2828
RefundAddress string `json:"refund_address" ch:"refund_address"`
29+
Sign int8 `json:"sign" ch:"sign"`
30+
InsertTimestamp uint64 `json:"insert_timestamp" ch:"insert_timestamp"`
2931
}
3032

3133
type RawTraces = []map[string]interface{}

internal/common/transaction.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ type Transaction struct {
4040
BlobGasPrice *big.Int `json:"blob_gas_price" ch:"blob_gas_price" swaggertype:"string"`
4141
LogsBloom *string `json:"logs_bloom" ch:"logs_bloom"`
4242
Status *uint64 `json:"status" ch:"status"`
43+
Sign int8 `json:"sign" ch:"sign"`
44+
InsertTimestamp uint64 `json:"insert_timestamp" ch:"insert_timestamp"`
4345
}
4446

4547
type DecodedTransactionData struct {

0 commit comments

Comments
 (0)