forked from okx/xlayer-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix l1InfoRoot in sync, aggregator and state (0xPolygonHermez#3052)
* fix l1InfoRoot in sync, aggregator and state * fix
- Loading branch information
Showing
15 changed files
with
206 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,38 @@ | ||
-- +migrate Up | ||
ALTER TABLE state.exit_root | ||
ADD COLUMN prev_block_hash BYTEA DEFAULT NULL, | ||
ADD COLUMN l1_info_root BYTEA DEFAULT NULL, | ||
ADD COLUMN l1_info_tree_index BIGINT DEFAULT NULL UNIQUE; | ||
ADD COLUMN IF NOT EXISTS prev_block_hash BYTEA DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS l1_info_root BYTEA DEFAULT NULL, | ||
ADD COLUMN IF NOT EXISTS l1_info_tree_index BIGINT DEFAULT NULL UNIQUE; | ||
CREATE INDEX IF NOT EXISTS idx_exit_root_l1_info_tree_index ON state.exit_root (l1_info_tree_index); | ||
|
||
ALTER TABLE state.transaction | ||
ADD COLUMN l2_hash VARCHAR UNIQUE; | ||
ADD COLUMN IF NOT EXISTS l2_hash VARCHAR UNIQUE; | ||
|
||
CREATE INDEX IF NOT EXISTS idx_transaction_l2_hash ON state.transaction (l2_hash); | ||
|
||
ALTER TABLE state.batch | ||
ADD COLUMN wip BOOLEAN NOT NULL; | ||
ADD COLUMN IF NOT EXISTS wip BOOLEAN NOT NULL; | ||
|
||
ALTER TABLE state.virtual_batch | ||
ADD COLUMN timestamp_batch_etrog TIMESTAMP WITH TIME ZONE NULL; | ||
ADD COLUMN IF NOT EXISTS timestamp_batch_etrog TIMESTAMP WITH TIME ZONE NULL, | ||
ADD COLUMN IF NOT EXISTS l1_info_root VARCHAR; | ||
|
||
-- +migrate Down | ||
ALTER TABLE state.exit_root | ||
DROP COLUMN prev_block_hash, | ||
DROP COLUMN l1_info_root, | ||
DROP COLUMN l1_info_tree_index; | ||
DROP COLUMN IF EXISTS prev_block_hash, | ||
DROP COLUMN IF EXISTS l1_info_root, | ||
DROP COLUMN IF EXISTS l1_info_tree_index; | ||
DROP INDEX IF EXISTS state.idx_exit_root_l1_info_tree_index; | ||
|
||
ALTER TABLE state.transaction | ||
DROP COLUMN l2_hash; | ||
DROP COLUMN IF EXISTS l2_hash; | ||
|
||
DROP INDEX IF EXISTS state.idx_transaction_l2_hash; | ||
|
||
ALTER TABLE state.batch | ||
DROP COLUMN IF EXISTS wip; | ||
|
||
ALTER TABLE state.virtual_batch | ||
DROP COLUMN IF EXISTS timestamp_batch_etrog; | ||
DROP COLUMN IF EXISTS timestamp_batch_etrog, | ||
DROP COLUMN IF EXISTS l1_info_root; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.