Skip to content

Commit 891a7a8

Browse files
cyberphysic4lkodemartin
authored andcommitted
iota-analytics-indexer changes
1 parent 51717eb commit 891a7a8

File tree

7 files changed

+12
-2
lines changed

7 files changed

+12
-2
lines changed

crates/iota-analytics-indexer/src/handlers/checkpoint_handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ impl CheckpointHandler {
109109
end_of_epoch: end_of_epoch_data.is_some(),
110110
total_gas_cost,
111111
computation_cost: epoch_rolling_gas_cost_summary.computation_cost,
112+
computation_cost_burned: epoch_rolling_gas_cost_summary.computation_cost_burned,
112113
storage_cost: epoch_rolling_gas_cost_summary.storage_cost,
113114
storage_rebate: epoch_rolling_gas_cost_summary.storage_rebate,
114115
non_refundable_storage_fee: epoch_rolling_gas_cost_summary.non_refundable_storage_fee,

crates/iota-analytics-indexer/src/handlers/transaction_handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ impl TransactionHandler {
179179
gas_budget: txn_data.gas_budget(),
180180
total_gas_cost: gas_summary.net_gas_usage(),
181181
computation_cost: gas_summary.computation_cost,
182+
computation_cost_burned: gas_summary.computation_cost_burned,
182183
storage_cost: gas_summary.storage_cost,
183184
storage_rebate: gas_summary.storage_rebate,
184185
non_refundable_storage_fee: gas_summary.non_refundable_storage_fee,

crates/iota-analytics-indexer/src/store/bq/schemas/checkpoint.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CREATE TABLE IF NOT EXISTS chaindata.CHECKPOINT
99
end_of_epoch BOOL NOT NULL,
1010
total_gas_cost NUMERIC(20, 0) NOT NULL,
1111
computation_cost NUMERIC(20, 0) NOT NULL,
12+
computation_cost_burned NUMERIC(20, 0) NOT NULL,
1213
storage_cost NUMERIC(20, 0) NOT NULL,
1314
storage_rebate NUMERIC(20, 0) NOT NULL,
1415
non_refundable_storage_fee NUMERIC(20, 0) NOT NULL,

crates/iota-analytics-indexer/src/store/bq/schemas/transaction.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CREATE TABLE IF NOT EXISTS chaindata.TRANSACTION
3131
gas_budget NUMERIC(20, 0) NOT NULL,
3232
total_gas_cost NUMERIC(20, 0) NOT NULL,
3333
computation_cost NUMERIC(20, 0) NOT NULL,
34+
computation_cost_burned NUMERIC(20, 0) NOT NULL,
3435
storage_cost NUMERIC(20, 0) NOT NULL,
3536
storage_rebate NUMERIC(20, 0) NOT NULL,
3637
non_refundable_storage_fee NUMERIC(20, 0) NOT NULL,

crates/iota-analytics-indexer/src/store/snowflake/schemas/checkpoint.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CREATE
1212
end_of_epoch BOOLEAN NOT NULL,
1313
total_gas_cost NUMBER(20, 0) NOT NULL,
1414
computation_cost NUMBER(20, 0) NOT NULL,
15+
computation_cost_burned NUMBER(20, 0) NOT NULL,
1516
storage_cost NUMBER(20, 0) NOT NULL,
1617
storage_rebate NUMBER(20, 0) NOT NULL,
1718
non_refundable_storage_fee NUMBER(20, 0) NOT NULL,
@@ -45,7 +46,7 @@ CREATE
4546
INTEGRATION = 'CHECKPOINTS_DATA_LOADER_NOTIFICATION'
4647
AS
4748
COPY INTO CHECKPOINT (checkpoint_digest, sequence_number, epoch, timestamp_ms, previous_checkpoint_digest,
48-
end_of_epoch, total_gas_cost, computation_cost, storage_cost, storage_rebate,
49+
end_of_epoch, total_gas_cost, computation_cost, computation_cost_burned, storage_cost, storage_rebate,
4950
non_refundable_storage_fee, total_transaction_blocks, total_transactions,
5051
total_successful_transaction_blocks, total_successful_transactions,
5152
network_total_transaction, validator_signature)
@@ -57,6 +58,7 @@ CREATE
5758
t.$1:end_of_epoch as end_of_epoch,
5859
t.$1:total_gas_cost as total_gas_cost,
5960
t.$1:computation_cost as computation_cost,
61+
t.$1:computation_cost_burned as computation_cost_burned,
6062
t.$1:storage_cost as storage_cost,
6163
t.$1:storage_rebate as storage_rebate,
6264
t.$1:non_refundable_storage_fee as non_refundable_storage_fee,

crates/iota-analytics-indexer/src/store/snowflake/schemas/transaction.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CREATE OR REPLACE TABLE TRANSACTION
3131
gas_budget NUMBER(20, 0) NOT NULL,
3232
total_gas_cost NUMBER(20, 0) NOT NULL,
3333
computation_cost NUMBER(20, 0) NOT NULL,
34+
computation_cost_burned NUMBER(20, 0) NOT NULL,
3435
storage_cost NUMBER(20, 0) NOT NULL,
3536
storage_rebate NUMBER(20, 0) NOT NULL,
3637
non_refundable_storage_fee NUMBER(20, 0) NOT NULL,
@@ -66,7 +67,7 @@ CREATE
6667
input, shared_input, gas_coins,
6768
created, mutated, deleted, transfers, split_coins, merge_coins, publish, upgrade, others,
6869
move_calls, packages, gas_owner, gas_object_id, gas_object_sequence, gas_object_digest,
69-
gas_budget, total_gas_cost, computation_cost, storage_cost, storage_rebate,
70+
gas_budget, total_gas_cost, computation_cost, computation_cost_burned, storage_cost, storage_rebate,
7071
non_refundable_storage_fee,
7172
gas_price, raw_transaction, has_zklogin_sig, has_upgraded_multisig
7273
)
@@ -101,6 +102,7 @@ CREATE
101102
t.$1:gas_budget as gas_budget,
102103
t.$1:total_gas_cost as total_gas_cost,
103104
t.$1:computation_cost as computation_cost,
105+
t.$1:computation_cost_burned as computation_cost_burned,
104106
t.$1:storage_cost as storage_cost,
105107
t.$1:storage_rebate as storage_rebate,
106108
t.$1:non_refundable_storage_fee as non_refundable_storage_fee,

crates/iota-analytics-indexer/src/tables.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub(crate) struct CheckpointEntry {
2929
// gas stats
3030
pub(crate) total_gas_cost: i64,
3131
pub(crate) computation_cost: u64,
32+
pub(crate) computation_cost_burned: u64,
3233
pub(crate) storage_cost: u64,
3334
pub(crate) storage_rebate: u64,
3435
pub(crate) non_refundable_storage_fee: u64,
@@ -87,6 +88,7 @@ pub(crate) struct TransactionEntry {
8788
pub(crate) gas_budget: u64,
8889
pub(crate) total_gas_cost: i64,
8990
pub(crate) computation_cost: u64,
91+
pub(crate) computation_cost_burned: u64,
9092
pub(crate) storage_cost: u64,
9193
pub(crate) storage_rebate: u64,
9294
pub(crate) non_refundable_storage_fee: u64,

0 commit comments

Comments
 (0)