File tree Expand file tree Collapse file tree
2024-05-31-125032_chain_parameters
2025-03-10-122312_redelegation
parameters/src/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,8 +11,7 @@ CREATE TABLE chain_parameters (
1111 chain_id VARCHAR NOT NULL ,
1212 genesis_time BIGINT NOT NULL ,
1313 epoch_switch_blocks_delay INT NOT NULL ,
14- checksums JSONB NOT NULL ,
15- slash_processing_epoch_offset INT NOT NULL
14+ checksums JSONB NOT NULL
1615);
1716
1817ALTER TABLE chain_parameters ADD UNIQUE (chain_id);
Original file line number Diff line number Diff line change 1- -- This file should undo anything in `up.sql`
2-
31DROP TABLE IF EXISTS redelegation;
2+
3+ ALTER TABLE chain_parameters DROP COLUMN IF EXISTS slash_processing_epoch_offset;
Original file line number Diff line number Diff line change @@ -9,3 +9,5 @@ CREATE TABLE redelegation (
99);
1010
1111ALTER TABLE redelegation ADD UNIQUE (delegator, validator_id);
12+
13+ ALTER TABLE chain_parameters ADD COLUMN slash_processing_epoch_offset INT NOT NULL DEFAULT 0 ;
Original file line number Diff line number Diff line change @@ -179,10 +179,10 @@ diesel::table! {
179179 genesis_time -> Int8 ,
180180 epoch_switch_blocks_delay -> Int4 ,
181181 checksums -> Jsonb ,
182- slash_processing_epoch_offset -> Int4 ,
183182 cubic_slashing_window_length -> Int4 ,
184183 duplicate_vote_min_slash_rate -> Numeric ,
185184 light_client_attack_min_slash_rate -> Numeric ,
185+ slash_processing_epoch_offset -> Int4 ,
186186 }
187187}
188188
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ pub fn upsert_chain_parameters(
2626 chain_parameters:: light_client_attack_min_slash_rate. eq ( excluded (
2727 chain_parameters:: light_client_attack_min_slash_rate,
2828 ) ) ,
29+ chain_parameters:: slash_processing_epoch_offset
30+ . eq ( excluded ( chain_parameters:: slash_processing_epoch_offset) ) ,
2931 ) )
3032 . execute ( transaction_conn)
3133 . context ( "Failed to update chain_parameters state in db" ) ?;
You can’t perform that action at this time.
0 commit comments