-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Indexer] [break change] Split Object states and perf Indexer (#2490)
* draft split indexer object states * finish split indexer object states * resolve repair and rebuild tools * clean unused code * Unified inscription_id query to {txid}i{index} * redesign events indexer and support decode * optmize transaction indexer by reduce field and index with order by field * fixup test cases * cleanup debug logs * cheanup * merge and fixup bench and db tools * perf index for indexer * fixup object cli * fixup object cli * remain gas used and tx status in tx indexer * revert bitcoin test sleep changes
- Loading branch information
Showing
58 changed files
with
1,648 additions
and
676 deletions.
There are no files selected for viewing
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
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
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
7 changes: 0 additions & 7 deletions
7
crates/rooch-indexer/migrations/2024-08-03-103620_rebuild_indexes/down.sql
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
crates/rooch-indexer/migrations/2024-08-03-103620_rebuild_indexes/up.sql
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
crates/rooch-indexer/migrations/2024-08-19-113033_utxos/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 @@ | ||
DROP TABLE IF EXISTS utxos; |
13 changes: 13 additions & 0 deletions
13
crates/rooch-indexer/migrations/2024-08-19-113033_utxos/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,13 @@ | ||
CREATE TABLE utxos | ||
( | ||
id VARCHAR NOT NULL PRIMARY KEY, | ||
owner VARCHAR NOT NULL, | ||
tx_order BIGINT NOT NULL, | ||
state_index BIGINT NOT NULL, | ||
created_at BIGINT NOT NULL, | ||
updated_at BIGINT NOT NULL, | ||
UNIQUE (tx_order, state_index) | ||
); | ||
|
||
CREATE INDEX idx_object_state_utxos_owner ON utxos (owner, tx_order, state_index); | ||
CREATE INDEX idx_object_state_utxos_updated_at ON utxos (updated_at, tx_order, state_index); |
1 change: 1 addition & 0 deletions
1
crates/rooch-indexer/migrations/2024-08-19-113051_inscriptions/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 @@ | ||
DROP TABLE IF EXISTS inscriptions; |
13 changes: 13 additions & 0 deletions
13
crates/rooch-indexer/migrations/2024-08-19-113051_inscriptions/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,13 @@ | ||
CREATE TABLE inscriptions | ||
( | ||
id VARCHAR NOT NULL PRIMARY KEY, | ||
owner VARCHAR NOT NULL, | ||
tx_order BIGINT NOT NULL, | ||
state_index BIGINT NOT NULL, | ||
created_at BIGINT NOT NULL, | ||
updated_at BIGINT NOT NULL, | ||
UNIQUE (tx_order, state_index) | ||
); | ||
|
||
CREATE INDEX idx_object_state_inscriptions_owner ON inscriptions (owner, tx_order, state_index); | ||
CREATE INDEX idx_object_state_inscriptions_updated_at ON inscriptions (updated_at, tx_order, state_index); |
Oops, something went wrong.