This document provides solutions for common issues encountered during BlockDAG development and deployment.
This troubleshooting guide covers frequent problems and their solutions for BlockDAG Comet development, deployment, and testing.
- Problem: Contracts fail verification on block explorers
- Solution: Ensure API keys are correctly configured and verification is enabled
- Problem: Cannot connect to target network during deployment
- Solution: Verify RPC endpoints are accessible and properly configured
- Problem: Deployment fails due to cached contract conflicts
- Solution: Clear deployment cache:
rm -rf deployments/{network}/{market}/.contracts/
- Problem: Tests that fork from mainnet fail with RPC errors
- Solution: Ensure ANKR_KEY environment variable is set with valid API key
- Problem: Insufficient funds for testing on real networks
- Solution: Use local network for development or fund test accounts properly
- Problem: Tests interfere with each other due to state conflicts
- Solution: Implement proper test setup and teardown procedures
- Problem: Spider reports implementation address mismatch after deployment
- Expected Behavior: This is normal and requires updating aliases.json
- Solution: Update
comet:implementationaddress in aliases.json to match deployed implementation
- Problem: Governance proposals fail to execute
- Solution: Verify sufficient threshold approvals and proper queue timing
- Problem: Market operations fail due to price feed errors
- Solution: Verify price feed addresses are correct and accessible
- Problem: Invalid asset parameters causing deployment failures
- Solution: Validate configuration.json against supported parameters
DEBUG=* yarn hardhat deploy --network local --deployment daiyarn hardhat console --network hardhat# Verify deployment cache
ls deployments/local/dai/.contracts/
# Check spider status
yarn hardhat spider --network local --deployment dai- Check Hardhat configuration
- Verify local network connectivity
- Review contract compilation
- Validate RPC endpoint accessibility
- Confirm account funding
- Check gas price estimation
- Document how to rollback failed deployments
- Governance proposal for reverting market changes
- Emergency pause mechanisms
- Contract upgrade rollback
- Oracle failure handling
- Market parameter recovery
This troubleshooting guide should include:
- Diagnostic checklists for common error patterns
- Network-specific issues and solutions
- Performance debugging procedures
- Security incident response procedures
- Integration testing failures and resolution
- Community-reported issues database
- Environment Configuration - Common environment issues
- Local Development - Deployment workflow and troubleshooting
- Testing Guide - Testing issue resolution
- Network Configuration - Network-specific problems