-
Notifications
You must be signed in to change notification settings - Fork 116
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
chore: delete default snapshot url for bitcoind docker-compose #3442
Conversation
- Delete default snapshot URL for bitcoind docker-compose
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe pull request involves a modification to the Changes
Possibly related PRs
Suggested Reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
contrib/rpc/bitcoind-mainnet/docker-compose.yml (1)
Line range hint
7-8
: Consider using environment variables for sensitive credentials.The Bitcoin RPC credentials are currently hardcoded. While these might be test credentials, it's a security best practice to externalize them.
environment: - - bitcoin_username=test - - bitcoin_password=test + - bitcoin_username=${BITCOIN_RPC_USER:-test} + - bitcoin_password=${BITCOIN_RPC_PASS:-test}
🧹 Nitpick comments (2)
contrib/rpc/bitcoind-mainnet/docker-compose.yml (2)
Line range hint
10-11
: Consider parameterizing the network height URL.The blockstream.info API endpoint is hardcoded. Consider making it configurable to support different providers or environments.
- - NETWORK_HEIGHT_URL=https://blockstream.info/api/blocks/tip/height + - NETWORK_HEIGHT_URL=${BITCOIN_HEIGHT_API:-https://blockstream.info/api/blocks/tip/height}
Line range hint
12-13
: Consider externalizing wallet configuration.The wallet name and address are hardcoded. Consider making them configurable through environment variables for different environments.
- - WALLET_NAME=tssMainnet - - WALLET_ADDRESS=bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y + - WALLET_NAME=${BITCOIN_WALLET_NAME:-tssMainnet} + - WALLET_ADDRESS=${BITCOIN_WALLET_ADDRESS:-bc1qm24wp577nk8aacckv8np465z3dvmu7ry45el6y}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
contrib/rpc/bitcoind-mainnet/docker-compose.yml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: start-e2e-test / e2e
- GitHub Check: build-and-test
- GitHub Check: gosec
- GitHub Check: Analyze (go)
🔇 Additional comments (2)
contrib/rpc/bitcoind-mainnet/docker-compose.yml (2)
22-22
: LGTM!The newline addition after the volume declaration improves readability.
Line range hint
9-14
: Verify snapshot configuration consistency.The removal of
SNAPSHOT_URL
while retaining other snapshot-related flags (SNAPSHOT_RESTORE=true
,CLEAN_SNAPSHOT=true
,DOWNLOAD_SNAPSHOT=true
) raises concerns about the snapshot functionality.✅ Verification successful
Snapshot configuration is consistent with documented architecture
The removal of
SNAPSHOT_URL
is intentional as the system uses the centralizedSNAPSHOT_API
configuration (https://snapshots.rpc.zetachain.com
) as documented indocs/development/DEPLOY_NODES.md
. The remaining flags (SNAPSHOT_RESTORE
,CLEAN_SNAPSHOT
,DOWNLOAD_SNAPSHOT
) are correctly maintained to control the snapshot functionality.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for any alternative snapshot URL configuration or documentation rg -l "SNAPSHOT_URL|snapshot.*url" --type yaml --type md # Check if there are any recent changes to snapshot-related configuration git log -p --since="1 month ago" -- "**/docker-compose*.yml" | grep -i "snapshot"Length of output: 58
Script:
#!/bin/bash # Check git history for the specific file git log -p contrib/rpc/bitcoind-mainnet/docker-compose.yml | grep -A 5 -B 5 "SNAPSHOT" # Search for snapshot-related configurations more broadly rg -i "snapshot" --type yaml -A 3 -B 3 # Look for documentation files about configuration fd -e md -e txt | xargs rg -i "snapshot.*configuration|bitcoin.*snapshot" -A 3 -B 3 # Search for environment variable definitions rg -i "export.*snapshot|snapshot.*=|snapshot_url" --type sh --type yamlLength of output: 1559
Script:
#!/bin/bash # Search for environment files and bitcoin snapshot configurations fd -e env -e conf | xargs rg -i "snapshot.*url|bitcoin.*snapshot" # Check for any bitcoin-specific configuration files fd -g "*bitcoin*.{yml,yaml,conf,env}" | xargs cat # Search for any URL patterns in the bitcoin directory rg -i "https.*snapshot|snapshot.*https" contrib/rpc/bitcoind-mainnet/Length of output: 316
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.
I'd just delete the whole thing
the whole docker compose file? @gartnera |
The compose file, the shell scripts, the makefile targets. Everything. |
Description
How Has This Been Tested?
Summary by CodeRabbit