-
Notifications
You must be signed in to change notification settings - Fork 1
Refactor Solana Indexer, Support DAMM V2 #473
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
Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 21616586 | Triggered | Generic High Entropy Secret | 38b886c | solana/indexer/token/indexer_test.go | View secret |
| 21650187 | Triggered | Generic High Entropy Secret | d16ba21 | solana/indexer/damm_v2/indexer_test.go | View secret |
| 21650188 | Triggered | Generic High Entropy Secret | d16ba21 | solana/indexer/damm_v2/indexer_test.go | View secret |
| 1606950 | Triggered | Generic High Entropy Secret | d16ba21 | solana/indexer/damm_v2/indexer_test.go | View secret |
| 21616588 | Triggered | Generic High Entropy Secret | 38b886c | solana/indexer/token/indexer_test.go | View secret |
| 21650189 | Triggered | Generic High Entropy Secret | d16ba21 | solana/indexer/damm_v2/indexer_test.go | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Main changes:
sol_unprocessed_txstosol_retry_queuesince the new structure needs to support retries not just on transactions but on updates from the gRPCv1_coinand /v1_coinsresponses using newcalculate_artist_coin_fees()` sql functiondamm_v2_poolanddbc_poolto theartist_coinstableBonus:
withRetrieshelper that doesn't have a resultUint256LEhelper struct to deserialize the 256-bit little-endian integers used in the meteora accounts so we can use our existing deserializing strategyProcessSignaturewould ignore signatures it had cached, even on failures/retriescoinTickerandcoinrequests share the same common SQL to prevent bugs where only one gets updatedmake test-schemato always use the test db, and tear-down and re-up the test db when running to ensure that the schema state is correct (adds a health check todbcontainer to ensure it's up before attempting to dump schema)Known items:
artist_coin_poolsandsol_meteora_dbc_pools- the former haspriceandprice_usd, the latter does not. The former is updated by the job, the latter by the indexer. Will be following up with another PR to move away from using the former by doing the calculations of price in SQL, and then a PR after that to remove it entirely to avoid confusion. In the meantime, the read-side API will be using theartist_coin_poolstable.Startmethod of each indexer in a quick followup if the patterns used here make sense.