Files
smom-dbis-138/runbooks/oracle-recovery.md
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- 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.
2025-12-12 14:57:48 -08:00

2.2 KiB

Oracle Recovery Procedures

Recovery Scenarios

Stale Oracle Recovery

Scenario: Oracle has not updated in > 5 minutes

Steps:

  1. Identify stale oracle
  2. Check transmitter status
  3. Verify data sources
  4. Force update if needed
  5. Monitor recovery

Commands:

# Check oracle state
cast call $AGGREGATOR_ADDRESS "latestRoundData()" --rpc-url $RPC_URL

# Force update
cast send $AGGREGATOR_ADDRESS "updateAnswer(uint256)" $PRICE \
  --rpc-url $RPC_URL \
  --private-key $PRIVATE_KEY

Failed Transmitter Recovery

Scenario: Transmitter is unavailable

Steps:

  1. Identify failed transmitter
  2. Remove failed transmitter
  3. Add backup transmitter
  4. Verify updates resume
  5. Monitor recovery

Commands:

# Remove failed transmitter
cast send $AGGREGATOR_ADDRESS "removeTransmitter(address)" $FAILED_TRANSMITTER \
  --rpc-url $RPC_URL \
  --private-key $ADMIN_KEY

# Add backup transmitter
cast send $AGGREGATOR_ADDRESS "addTransmitter(address)" $BACKUP_TRANSMITTER \
  --rpc-url $RPC_URL \
  --private-key $ADMIN_KEY

Data Source Failure Recovery

Scenario: Data source is unavailable

Steps:

  1. Identify failed data source
  2. Switch to backup data source
  3. Verify updates resume
  4. Monitor recovery
  5. Document incident

CCIP Failure Recovery

Scenario: CCIP messages failing

Steps:

  1. Check CCIP router status
  2. Verify LINK balance
  3. Check message queue
  4. Retry failed messages
  5. Monitor recovery

Recovery Verification

Verify Oracle Updates

# Check latest round
cast call $AGGREGATOR_ADDRESS "latestRoundData()" --rpc-url $RPC_URL

# Monitor updates
watch -n 5 "cast call $AGGREGATOR_ADDRESS 'latestRoundData()' --rpc-url $RPC_URL"

Verify Transmitter Status

# Check transmitter list
cast call $AGGREGATOR_ADDRESS "getTransmitters()" --rpc-url $RPC_URL

# Check transmitter status
cast call $AGGREGATOR_ADDRESS "isTransmitter(address)" $TRANSMITTER --rpc-url $RPC_URL

Post-Recovery

  1. Document Incident: Document what happened
  2. Root Cause Analysis: Identify root cause
  3. Preventive Measures: Implement preventive measures
  4. Update Runbooks: Update runbooks if needed
  5. Monitor: Continue monitoring