-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add epoch indexer * epoch indexer improvement * add gas_price endpoint * add validators endpoint * add protocol_config endpoint * fix epoch indexer bug * improvement according pr comments * composite primary key to epoch_id
- Loading branch information
Showing
35 changed files
with
1,530 additions
and
129 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
2 changes: 2 additions & 0 deletions
2
database/src/postgres/migrations/2023-12-07-144820_epochs/down.sql
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DROP TABLE IF EXISTS validators; | ||
DROP TABLE IF EXISTS protocol_configs; |
20 changes: 20 additions & 0 deletions
20
database/src/postgres/migrations/2023-12-07-144820_epochs/up.sql
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
CREATE TABLE IF NOT EXISTS validators ( | ||
epoch_id text NOT NULL, | ||
epoch_height numeric(20,0) NOT NULL, | ||
epoch_start_height numeric(20,0) NOT NULL, | ||
validators_info jsonb NOT NULL | ||
); | ||
|
||
ALTER TABLE ONLY validators | ||
ADD CONSTRAINT validators_pk PRIMARY KEY (epoch_id); | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS protocol_configs ( | ||
epoch_id text NOT NULL, | ||
epoch_height numeric(20,0) NOT NULL, | ||
epoch_start_height numeric(20,0) NOT NULL, | ||
protocol_config jsonb NOT NULL | ||
); | ||
|
||
ALTER TABLE ONLY protocol_configs | ||
ADD CONSTRAINT protocol_config_pk PRIMARY KEY (epoch_id); |
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
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
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.