-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add indexer grpc, add better logs for storage indexer
- Loading branch information
1 parent
401e420
commit 24a39cf
Showing
16 changed files
with
306 additions
and
43 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
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
...ndexer-grpc/indexer-grpc-parser/migrations/2023-07-06-042159_minor_optimizations/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 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP INDEX IF EXISTS mr_ver_index; |
29 changes: 29 additions & 0 deletions
29
.../indexer-grpc/indexer-grpc-parser/migrations/2023-07-06-042159_minor_optimizations/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,29 @@ | ||
-- Your SQL goes here | ||
-- This is needed to improve performance when querying an account with a large number of transactions | ||
CREATE INDEX IF NOT EXISTS mr_ver_index ON move_resources(transaction_version DESC); | ||
-- These are needed b/c for some reason we're getting build errors when setting | ||
-- type field with a length limit | ||
ALTER TABLE signatures | ||
ALTER COLUMN type TYPE VARCHAR; | ||
ALTER TABLE token_activities_v2 | ||
ALTER COLUMN type TYPE VARCHAR; | ||
DROP VIEW IF EXISTS transactions_view; | ||
ALTER TABLE transactions | ||
ALTER COLUMN type TYPE VARCHAR; | ||
CREATE VIEW transactions_view AS | ||
SELECT "version", | ||
block_height, | ||
"hash", | ||
"type", | ||
payload#>>'{}' AS json_payload, | ||
state_change_hash, | ||
event_root_hash, | ||
state_checkpoint_hash, | ||
gas_used, | ||
success, | ||
vm_status, | ||
accumulator_root_hash, | ||
num_events, | ||
num_write_set_changes, | ||
inserted_at | ||
FROM transactions; |
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.