-
Notifications
You must be signed in to change notification settings - Fork 20
368 move sql schema to distinct file #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
rozhkovdmitrii
merged 66 commits into
develop
from
368-Move_SQL_schema_to_distinct_file
Mar 12, 2022
Merged
Changes from 56 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
0ec2268
Introduce proxy/db_scheme.py
vasiliy-zaznobin 43d1b28
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin 075273e
Debug
vasiliy-zaznobin 768bf09
Introduce run-db-creation.sh
vasiliy-zaznobin 09bf1ac
Use entrypoint: proxy/run-db-creation.sh
vasiliy-zaznobin f2cac17
Add dbcreation.log
vasiliy-zaznobin d8ecf1b
Debug
vasiliy-zaznobin 68a7841
Debug
vasiliy-zaznobin d34c8f7
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin 6a47f6b
Add dbcreation.log
vasiliy-zaznobin 2058f0a
Use from ..proxy
vasiliy-zaznobin 295568e
Debug
vasiliy-zaznobin 8a7047f
Debug
vasiliy-zaznobin 3cf914e
Introduce dbcreation_mode to run proxy
vasiliy-zaznobin 550c46e
Change paths
vasiliy-zaznobin f22a780
Will run in dbcreation mode with SOLANA_URL and EVM_LOADER
vasiliy-zaznobin e6c0e43
Debug
vasiliy-zaznobin acf7bce
Debug
vasiliy-zaznobin eaf23d2
Debug
vasiliy-zaznobin 5a0306b
SOLANA_URL: http://solana:8899
vasiliy-zaznobin 27c0e68
Add logged_groups
vasiliy-zaznobin 0ac19fa
Debug
vasiliy-zaznobin 33515b4
Log schema
vasiliy-zaznobin f1c2c50
Use psql
vasiliy-zaznobin 8865af4
Add postgresql-client-common in the docker image
vasiliy-zaznobin 1eb1bf9
Add postgresql-client in the docker image
vasiliy-zaznobin cf47fad
Set network_mode: container:postgres
vasiliy-zaznobin 7b9167c
Remove networks
vasiliy-zaznobin 9355411
Use network_mode: service:postgres
vasiliy-zaznobin 505b3eb
Remove hostname
vasiliy-zaznobin 11fa1bc
Remove hostname
vasiliy-zaznobin 6d9c6ca
ports:
vasiliy-zaznobin b9c2f7a
networks:
vasiliy-zaznobin 1586797
Add ports:
vasiliy-zaznobin 31b8048
Add networks:
vasiliy-zaznobin d9154eb
Try to use links: - postgres
vasiliy-zaznobin b66b803
Use export PGPASSWORD=${POSTGRES_PASSWORD} to set the password for psql
vasiliy-zaznobin a12fe00
Use run_dbcreation()
vasiliy-zaznobin 7803d3c
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin 0360208
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin 94f733a
Correction after the prev merge
vasiliy-zaznobin 92d0201
Correction after the prev merge
vasiliy-zaznobin ea0dbdc
Lowercase in function names
vasiliy-zaznobin d02bfee
Refactor to introduce scheme.sql
vasiliy-zaznobin df19f2d
Debug
vasiliy-zaznobin 6a38f0c
Debug
vasiliy-zaznobin c94126b
Debug
vasiliy-zaznobin 6bf4cfc
Add table airdrop_scheduled
vasiliy-zaznobin 7560704
Revert some changes
vasiliy-zaznobin 5ab70f3
Fixed: psql:proxy/db/scheme.sql:73: ERROR: syntax error at or near "{"
vasiliy-zaznobin f6d17d2
Use run_indexer(solana_url)
vasiliy-zaznobin bb07118
Merge remote-tracking branch 'origin/develop' into 368-Move_SQL_schem…
vasiliy-zaznobin db54d3b
Use run_airdropper with 7 args
vasiliy-zaznobin ffab8cd
Remove creation.py
vasiliy-zaznobin 3881bac
Remove creation.py
vasiliy-zaznobin e5f8f64
Remove dbcreation_mode
vasiliy-zaznobin 37ebf6a
Merge branch 'develop' into 368-Move_SQL_schema_to_distinct_file
rozhkovdmitrii 4832f03
check it
rozhkovdmitrii 46e1c2b
check it
rozhkovdmitrii f5891cb
Catch "Operator has NO resources!" exception
rozhkovdmitrii b5811da
Catch "Operator has NO resources!" exception
rozhkovdmitrii 06ae9df
Get rid of create_table in sql_dict.py
rozhkovdmitrii d05f9d1
Get rid of stuff from sql_dict
rozhkovdmitrii 4ec9a14
Get rid of crating table stuff from TrxReceiptsStorage
rozhkovdmitrii b092d3d
Roll back NEON_ERC20_MAX_AMOUNT
rozhkovdmitrii 8dd8800
Spit and polish
rozhkovdmitrii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,124 @@ | ||
| CREATE TABLE IF NOT EXISTS constants ( | ||
| key TEXT UNIQUE, | ||
| value BYTEA | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS airdrop_scheduled ( | ||
| key TEXT UNIQUE, | ||
| value BYTEA | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS OPERATOR_COST ( | ||
| id SERIAL PRIMARY KEY, | ||
| hash char(64), | ||
| cost bigint, | ||
| used_gas bigint, | ||
| sender char(40), | ||
| to_address char(40) , | ||
| sig char(100), | ||
| status varchar(100), | ||
| reason varchar(100) | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS neon_accounts ( | ||
| neon_account CHAR(42), | ||
| pda_account VARCHAR(50), | ||
| code_account VARCHAR(50), | ||
| slot BIGINT, | ||
| code TEXT, | ||
|
|
||
| UNIQUE(pda_account, code_account) | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS failed_airdrop_attempts ( | ||
| attempt_time BIGINT, | ||
| eth_address TEXT, | ||
| reason TEXT | ||
| ); | ||
| CREATE INDEX IF NOT EXISTS failed_attempt_time_idx ON failed_airdrop_attempts (attempt_time); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS airdrop_ready ( | ||
| eth_address TEXT UNIQUE, | ||
| scheduled_ts BIGINT, | ||
| finished_ts BIGINT, | ||
| duration INTEGER, | ||
| amount_galans INTEGER | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS solana_block ( | ||
| slot BIGINT, | ||
| hash CHAR(66), | ||
|
|
||
| parent_hash CHAR(66), | ||
| blocktime BIGINT, | ||
| signatures BYTEA, | ||
|
|
||
| UNIQUE(slot), | ||
| UNIQUE(hash) | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS neon_transaction_logs ( | ||
| address CHAR(42), | ||
| blockHash CHAR(66), | ||
| blockNumber BIGINT, | ||
|
|
||
| transactionHash CHAR(66), | ||
| transactionLogIndex INT, | ||
| topic TEXT, | ||
|
|
||
| json TEXT, | ||
|
|
||
| UNIQUE(blockNumber, transactionHash, transactionLogIndex) | ||
| ); | ||
| CREATE INDEX IF NOT EXISTS neon_transaction_logs_block_hash ON neon_transaction_logs(blockHash); | ||
| CREATE INDEX IF NOT EXISTS neon_transaction_logs_address ON neon_transaction_logs(address); | ||
| CREATE INDEX IF NOT EXISTS neon_transaction_logs_topic ON neon_transaction_logs(topic); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS solana_neon_transactions ( | ||
| sol_sign CHAR(88), | ||
| neon_sign CHAR(66), | ||
| slot BIGINT, | ||
| idx INT, | ||
|
|
||
| UNIQUE(sol_sign, neon_sign, idx), | ||
| UNIQUE(neon_sign, sol_sign, idx) | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS neon_transactions ( | ||
| neon_sign CHAR(66), | ||
| from_addr CHAR(42), | ||
| sol_sign CHAR(88), | ||
| slot BIGINT, | ||
| block_hash CHAR(66), | ||
| idx INT, | ||
|
|
||
| nonce VARCHAR, | ||
| gas_price VARCHAR, | ||
| gas_limit VARCHAR, | ||
| value VARCHAR, | ||
| gas_used VARCHAR, | ||
|
|
||
| to_addr CHAR(42), | ||
| contract CHAR(42), | ||
|
|
||
| status CHAR(3), | ||
|
|
||
| return_value TEXT, | ||
|
|
||
| v TEXT, | ||
| r TEXT, | ||
| s TEXT, | ||
|
|
||
| calldata TEXT, | ||
| logs BYTEA, | ||
|
|
||
| UNIQUE(neon_sign), | ||
| UNIQUE(sol_sign, idx) | ||
| ); | ||
|
|
||
| CREATE TABLE IF NOT EXISTS transaction_receipts ( | ||
| slot BIGINT, | ||
| signature VARCHAR(88), | ||
| trx BYTEA, | ||
| PRIMARY KEY (slot, signature) | ||
| ); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postgresql-clientdepends onpostgresql-client-common, that's why it'll be installed automaticallyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed