Add Giphy API key for CI configuration#89
Conversation
…ce block height resolution
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Testnet deployment uses wrong secret prefix for Giphy key
- Updated
deploy_testnetto usesecrets.TESTNET_GIPHY_API_KEYso testnet deployment uses the correct environment-specific secret.
- Updated
Or push these changes by commenting:
@cursor push 93d7cca225
Preview (93d7cca225)
diff --git a/.github/workflows/deploy_develop.yaml b/.github/workflows/deploy_develop.yaml
--- a/.github/workflows/deploy_develop.yaml
+++ b/.github/workflows/deploy_develop.yaml
@@ -64,4 +64,4 @@
PROFILE_REGISTRY_CONTRACT_ADDRESS: ${{ secrets.TESTNET_PROFILE_REGISTRY_CONTRACT_ADDRESS }}
PROFILE_ATTESTATION_SIGNER_ADDRESS: ${{ secrets.TESTNET_PROFILE_ATTESTATION_SIGNER_ADDRESS }}
PROFILE_ATTESTATION_PRIVATE_KEY: ${{ secrets.TESTNET_PROFILE_ATTESTATION_PRIVATE_KEY }}
- GIPHY_API_KEY: ${{ secrets.DEV_GIPHY_API_KEY }}
+ GIPHY_API_KEY: ${{ secrets.TESTNET_GIPHY_API_KEY }}This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
| PROFILE_REGISTRY_CONTRACT_ADDRESS: ${{ secrets.TESTNET_PROFILE_REGISTRY_CONTRACT_ADDRESS }} | ||
| PROFILE_ATTESTATION_SIGNER_ADDRESS: ${{ secrets.TESTNET_PROFILE_ATTESTATION_SIGNER_ADDRESS }} | ||
| PROFILE_ATTESTATION_PRIVATE_KEY: ${{ secrets.TESTNET_PROFILE_ATTESTATION_PRIVATE_KEY }} | ||
| GIPHY_API_KEY: ${{ secrets.DEV_GIPHY_API_KEY }} |
There was a problem hiding this comment.
Testnet deployment uses wrong secret prefix for Giphy key
Medium Severity
The deploy_testnet job references secrets.DEV_GIPHY_API_KEY instead of secrets.TESTNET_GIPHY_API_KEY. Every other environment-specific secret in this job uses the TESTNET_ prefix (e.g., TESTNET_TRENDING_TAGS_API_KEY, TESTNET_X_CLIENT_ID), so this looks like a copy-paste error from the deploy_mainnet job above. This causes the testnet deployment to use the dev Giphy API key instead of its own.
…olution in portfolio service
…d performance in BclPnlService
… PortfolioService
…y-performance feat: implement batch processing for token PNL calculations and enhan…



Add Giphy API key for CI configuration
Note
Medium Risk
Medium risk because it changes portfolio history data-fetching patterns (batched SQL, new price source, balance bucketing, higher concurrency), which could affect correctness and load characteristics; workflow secret plumbing is low risk but misconfiguration could break deploys.
Overview
Speeds up portfolio history generation and reduces external calls. Portfolio snapshots now resolve block heights via a new
batchTimestampToAeHeightDB query (with transactions-table fallback) and precompute token PNL for all unique heights in onecalculateTokenPnlsBatchcall instead of per-snapshot queries.Optimizes price/balance fetching. Historical AE prices are pulled from the local
coin_historical_pricestable when available (falling back to CoinGecko), AE balance lookups are bucketed to 300-block windows, and snapshot processing concurrency is increased.SQL/query tuning and infra config. PNL price lookups switch from
DISTINCT ONtoLATERAL ... LIMIT 1,key_blocks.timegains an index, and deploy workflows pass through a requiredGIPHY_API_KEYsecret.Written by Cursor Bugbot for commit d861b16. This will update automatically on new commits. Configure here.