-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement consolidation request log crawler
- Loading branch information
Showing
8 changed files
with
773 additions
and
6 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
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,72 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
|
||
CREATE TABLE IF NOT EXISTS "consolidation_request_txs" ( | ||
block_number BIGINT NOT NULL, | ||
block_index INT NOT NULL, | ||
block_time BIGINT NOT NULL, | ||
block_root BLOB NOT NULL, | ||
fork_id BIGINT NOT NULL DEFAULT 0, | ||
source_address BLOB NOT NULL, | ||
source_pubkey BLOB NULL, | ||
target_pubkey BLOB NULL, | ||
tx_hash BLOB NULL, | ||
tx_sender BLOB NOT NULL, | ||
tx_target BLOB NOT NULL, | ||
dequeue_block BIGINT NOT NULL, | ||
CONSTRAINT consolidation_pkey PRIMARY KEY (block_root, block_index) | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "consolidation_request_txs_block_number_idx" | ||
ON "consolidation_request_txs" | ||
("block_number" ASC); | ||
|
||
CREATE INDEX IF NOT EXISTS "consolidation_request_txs_source_addr_idx" | ||
ON "consolidation_request_txs" | ||
("source_address" ASC); | ||
|
||
CREATE INDEX IF NOT EXISTS "consolidation_request_txs_fork_idx" | ||
ON "consolidation_request_txs" | ||
("fork_id" ASC); | ||
|
||
CREATE INDEX IF NOT EXISTS "consolidation_request_txs_dequeue_block_idx" | ||
ON "consolidation_request_txs" | ||
("dequeue_block" ASC); | ||
|
||
CREATE TABLE IF NOT EXISTS "withdrawal_request_txs" ( | ||
block_number BIGINT NOT NULL, | ||
block_index INT NOT NULL, | ||
block_time BIGINT NOT NULL, | ||
block_root BLOB NOT NULL, | ||
fork_id BIGINT NOT NULL DEFAULT 0, | ||
source_address BLOB NOT NULL, | ||
validator_pubkey BLOB NOT NULL, | ||
amount BIGINT NOT NULL, | ||
tx_hash BLOB NULL, | ||
tx_sender BLOB NOT NULL, | ||
tx_target BLOB NOT NULL, | ||
dequeue_block BIGINT NOT NULL, | ||
CONSTRAINT withdrawal_request_txs_pkey PRIMARY KEY (block_root, block_index) | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS "withdrawal_request_txs_block_number_idx" | ||
ON "withdrawal_request_txs" | ||
("block_number" ASC); | ||
|
||
CREATE INDEX IF NOT EXISTS "withdrawal_request_txs_source_addr_idx" | ||
ON "withdrawal_request_txs" | ||
("source_address" ASC); | ||
|
||
CREATE INDEX IF NOT EXISTS "withdrawal_request_txs_fork_idx" | ||
ON "withdrawal_request_txs" | ||
("fork_id" ASC); | ||
|
||
CREATE INDEX IF NOT EXISTS "withdrawal_request_txs_dequeue_block_idx" | ||
ON "withdrawal_request_txs" | ||
("dequeue_block" ASC); | ||
|
||
-- +goose StatementEnd | ||
-- +goose Down | ||
-- +goose StatementBegin | ||
SELECT 'NOT SUPPORTED'; | ||
-- +goose StatementEnd |
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.