fix-bitcoin
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/fix-bitcoin
/fix-bitcoin
Fix the highest priority Bitcoin issue.
修复优先级最高的Bitcoin问题。
What This Does
功能说明
- Invoke to audit Bitcoin setup
/check-bitcoin - Identify highest priority issue
- Fix that one issue
- Verify the fix
- Report what was done
This is a fixer. It fixes one issue at a time. Run again for next issue. Use for full lifecycle.
/bitcoin- 调用 来审计Bitcoin配置
/check-bitcoin - 识别优先级最高的问题
- 修复该问题
- 验证修复效果
- 报告处理内容
这是一个修复工具,每次仅修复一个问题。如需处理下一个问题,请再次运行。使用 进行全生命周期管理。
/bitcoinProcess
操作流程
1. Run Primitive
1. 运行基础工具
Invoke skill to get prioritized findings.
/check-bitcoin调用 技能获取按优先级排序的问题列表。
/check-bitcoin2. Fix Priority Order
2. 修复优先级顺序
Fix in this order:
- P0: Node not synced, wallet not encrypted
- P1: Missing testnet/mainnet separation
- P2: UTXO consolidation needed
- P3: Advanced features
按照以下顺序修复:
- P0:节点未同步、钱包未加密
- P1:缺少测试网/主网分离配置
- P2:需要合并UTXO
- P3:高级功能配置
3. Execute Fix
3. 执行修复
Node not synced (P0):
Check sync status:
bash
bitcoin-cli getblockchaininfoIf > , wait or restart:
headersblocksbash
bitcoin-cli stop
bitcoind -daemonWallet not encrypted (P0):
Encrypt wallet:
bash
bitcoin-cli encryptwallet "strong-passphrase"Back up:
bash
bitcoin-cli backupwallet /path/to/backup.datMissing testnet/mainnet separation (P1):
Split configs:
ini
undefined节点未同步(P0):
检查同步状态:
bash
bitcoin-cli getblockchaininfo如果 数量大于 ,等待或重启节点:
headersblocksbash
bitcoin-cli stop
bitcoind -daemon钱包未加密(P0):
加密钱包:
bash
bitcoin-cli encryptwallet "strong-passphrase"备份钱包:
bash
bitcoin-cli backupwallet /path/to/backup.dat缺少测试网/主网分离配置(P1):
拆分配置文件:
ini
undefinedbitcoin.conf
bitcoin.conf
mainnet=1
[test]
testnet=1
walletdir=/var/lib/bitcoin/testnet-wallets
Use explicit network flags in tooling:
```bash
bitcoin-cli -testnet getblockchaininfoUTXO consolidation needed (P2):
List small UTXOs:
bash
bitcoin-cli listunspent 1 9999999Create consolidation tx:
bash
bitcoin-cli createrawtransaction '[{"txid":"...","vout":0}]' '{"bc1q...":0.999}'Sign and send:
bash
bitcoin-cli signrawtransactionwithwallet <hex>
bitcoin-cli sendrawtransaction <hex>mainnet=1
[test]
testnet=1
walletdir=/var/lib/bitcoin/testnet-wallets
在工具中使用明确的网络标识:
```bash
bitcoin-cli -testnet getblockchaininfo需要合并UTXO(P2):
列出小额UTXO:
bash
bitcoin-cli listunspent 1 9999999创建合并交易:
bash
bitcoin-cli createrawtransaction '[{"txid":"...","vout":0}]' '{"bc1q...":0.999}'签名并发送交易:
bash
bitcoin-cli signrawtransactionwithwallet <hex>
bitcoin-cli sendrawtransaction <hex>4. Verify
4. 验证修复
After fix:
bash
bitcoin-cli getblockchaininfo
bitcoin-cli getwalletinfo修复完成后执行:
bash
bitcoin-cli getblockchaininfo
bitcoin-cli getwalletinfo5. Report
5. 生成报告
Fixed: [P0] Wallet not encrypted
Updated: bitcoin.conf
- Added wallet encryption requirement
- Added backup path
Verified: bitcoin-cli getwalletinfo → encrypted
Next highest priority: [P0] Node not synced
Run /fix-bitcoin again to continue.已修复:[P0] 钱包未加密
更新内容:bitcoin.conf
- 添加了钱包加密要求
- 配置了备份路径
验证结果:bitcoin-cli getwalletinfo → 已加密
下一个最高优先级问题:[P0] 节点未同步
请再次运行 /fix-bitcoin 继续处理。Branching
分支管理
Before making changes:
bash
git checkout -b fix/bitcoin-$(date +%Y%m%d)在进行修改前:
bash
git checkout -b fix/bitcoin-$(date +%Y%m%d)Single-Issue Focus
单问题聚焦
Bitcoin ops are high risk. Fix one thing at a time:
- Test each change thoroughly
- Easy to roll back specific fixes
- Clear audit trail for keys and funds
Run repeatedly to work through the backlog.
/fix-bitcoinBitcoin运维风险较高,每次仅修复一个问题:
- 彻底测试每一项变更
- 便于回滚特定修复
- 为密钥和资金保留清晰的审计轨迹
重复运行 来逐步处理所有问题。
/fix-bitcoinRelated
相关工具
- - The primitive (audit only)
/check-bitcoin - - Create issues without fixing
/log-bitcoin-issues - - Full Bitcoin lifecycle
/bitcoin - - Node diagnostics
/bitcoin-health
- - 基础审计工具(仅审计)
/check-bitcoin - - 仅记录问题不修复
/log-bitcoin-issues - - Bitcoin全生命周期管理
/bitcoin - - 节点诊断
/bitcoin-health