- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
4.5 KiB
4.5 KiB
CCIP Troubleshooting Guide
Common Issues
Message Not Received
Symptoms: Message sent but not received on target chain
Diagnosis:
- Check message was sent successfully
- Verify target chain selector is correct
- Check receiver contract address
- Verify CCIP Router is operational
- Check LINK balance for fees
Solutions:
- Verify transaction hash on source chain
- Check CCIP Router logs
- Verify receiver contract is deployed
- Ensure sufficient LINK tokens
- Check target chain status
High Fees
Symptoms: Fees are unexpectedly high
Diagnosis:
- Check message size
- Monitor gas prices on target chain
- Verify fee calculation
- Check for network congestion
Solutions:
- Reduce message size
- Wait for lower gas prices
- Optimize message encoding
- Consider batching updates
Replay Protection Errors
Symptoms: "Message already processed" error
Diagnosis:
- Check
processedMessagesmapping - Verify message IDs are unique
- Check for duplicate sends
Solutions:
- Ensure message IDs are unique
- Clear processed messages (if safe)
- Check for duplicate transaction sends
- Verify replay protection logic
Router Not Found
Symptoms: "Router not found" or "Invalid router address"
Diagnosis:
- Verify router address is correct
- Check router is deployed
- Verify network/chain ID matches
Solutions:
- Update router address in contracts
- Deploy router if missing
- Verify chain ID configuration
- Check router deployment status
Insufficient LINK
Symptoms: "Insufficient LINK balance" error
Diagnosis:
- Check LINK token balance
- Verify token address is correct
- Check approval for spending
Solutions:
- Transfer more LINK tokens
- Verify LINK token address
- Approve contract to spend LINK
- Check token contract is correct
Message Encoding Errors
Symptoms: "Invalid message format" or decode failures
Diagnosis:
- Check message encoding format
- Verify data types match
- Check for encoding errors
Solutions:
- Verify encoding matches expected format
- Check data types are correct
- Test encoding/decoding separately
- Review message structure
Target Chain Unavailable
Symptoms: Message fails to deliver, router unavailable
Diagnosis:
- Check target chain status
- Verify router is operational
- Check network connectivity
Solutions:
- Wait for chain to recover
- Check router health status
- Verify network connectivity
- Contact support if persistent
Diagnostic Commands
Check Router Status
# Check router is accessible
cast call $CCIP_ROUTER "getSupportedTokens(uint64)" $CHAIN_SELECTOR --rpc-url $RPC_URL
Check Message Status
# Check if message was processed
cast call $RECEIVER "processedMessages(bytes32)" $MESSAGE_ID --rpc-url $RPC_URL
Check LINK Balance
# Check LINK balance
cast call $LINK_TOKEN "balanceOf(address)" $SENDER_CONTRACT --rpc-url $RPC_URL
Calculate Fee
# Calculate fee for message
cast call $SENDER "calculateFee(uint64,bytes)" $CHAIN_SELECTOR $MESSAGE_DATA --rpc-url $RPC_URL
Monitoring
Key Metrics
- Message send success rate
- Message delivery latency
- Fee consumption
- Error rates
- Router availability
Alerts
Set up alerts for:
- High error rates
- Low success rates
- High fees
- Router unavailability
- Low LINK balance
Logs
Check Contract Logs
# Get recent events
cast logs --from-block latest-100 --address $SENDER_CONTRACT --rpc-url $RPC_URL
Check Router Logs
Check CCIP Router service logs for errors.
Recovery Procedures
Resend Failed Message
- Verify original message failed
- Check why it failed
- Fix underlying issue
- Resend message with new message ID
Clear Processed Messages
Warning: Only if safe to do so
// Admin function to clear processed messages (use with caution)
function clearProcessedMessage(bytes32 messageId) external onlyAdmin {
delete processedMessages[messageId];
}
Emergency Pause
If critical issues occur:
// Pause message sending
function pause() external onlyAdmin {
paused = true;
emit Paused();
}
Getting Help
- Check CCIP documentation
- Review contract code
- Check Chainlink status page
- Contact Chainlink support
- Review GitHub issues