Skip to main content
This guide helps DVN operators diagnose and resolve common issues with DVN contracts, Gasolina services, and infrastructure deployments.

Contract Error Reference

DVN Contract Errors

These errors are emitted by the DVN smart contract when operations fail.
ErrorSignatureCauseSolution
DVN_OnlySelfDVN_OnlySelf()Calling a restricted function directly instead of through signed executeUse the execute function with proper signatures to call setSigner, setQuorum, or role management functions
DVN_InvalidRoleDVN_InvalidRole(bytes32 role)Attempting to grant/revoke an invalid roleUse only valid roles: ADMIN_ROLE, MESSAGE_LIB_ROLE, ALLOWLIST, or DENYLIST
DVN_InstructionExpiredDVN_InstructionExpired()The signed instruction’s expiration timestamp has passedGenerate new signatures with a future expiration timestamp
DVN_InvalidTargetDVN_InvalidTarget(address target)Target address doesn’t match the DVN contractVerify the target address in ExecuteParam matches the DVN contract address
DVN_InvalidVidDVN_InvalidVid(uint32 vid)VID in the instruction doesn’t match this DVN instanceEnsure the VID matches the DVN’s configured VID (check vid() on contract)
DVN_InvalidSignaturesDVN_InvalidSignatures()Signature verification failedVerify signers match those registered in the contract and signatures are correctly formatted
DVN_DuplicatedHashDVN_DuplicatedHash(bytes32 hash)Attempting to replay an already-executed instructionGenerate a new instruction with different parameters or expiration

DVNFeeLib Errors

These errors relate to fee calculation and configuration.
ErrorSignatureCauseSolution
DVN_EidNotSupportedDVN_EidNotSupported(uint32 eid)Destination endpoint ID is not configuredAdd the destination to DstConfig using setDstConfig
DVN_INVALID_INPUT_LENGTHDVN_INVALID_INPUT_LENGTH()Array lengths don’t match in batch operationsEnsure all arrays have matching lengths
DVN_TimestampOutOfRangeDVN_TimestampOutOfRange(uint32 eid, uint64 timestamp)Read request timestamp outside valid retention windowAdjust the timestamp to fall within maxPastRetention and maxFutureRetention bounds
DVN_UnsupportedOptionTypeDVN_UnsupportedOptionType(uint8 optionType)DVN option type not supportedCheck option encoding matches expected format

Worker Errors (Inherited)

ErrorSignatureCauseSolution
Worker_OnlyMessageLibWorker_OnlyMessageLib()Caller is not an authorized Message LibraryVerify the caller has MESSAGE_LIB_ROLE
Worker_NotAllowedWorker_NotAllowed()Sender is on denylist or not on allowlistCheck ACL configuration; add sender to allowlist or remove from denylist

DVN Contract Events

Monitor these events to track DVN operations:
EventWhen EmittedAction Required
VerifySignaturesFailed(uint256 idx)Signature verification failed during batch executeCheck signer configuration and signature format
ExecuteFailed(uint256 index, bytes data)Execution of instruction failedDecode return data for specific error
HashAlreadyUsed(ExecuteParam, bytes32)Replay attempt detectedInstruction already executed; generate new one
VerifierFeePaid(uint256 fee)Fee paid for ULNv2 verificationInformational; fee collection successful
SetDstConfig(DstConfigParam[])Destination configuration updatedInformational; verify new config is correct

Gasolina Service Issues

Health Check Failures

Symptom: GET / doesn’t return “HEALTHY” Possible Causes:
  1. Service not running
    # AWS: Check ECS task status
    aws ecs describe-tasks --cluster <cluster-name> --tasks <task-id>
    
    # GCP: Check Cloud Run status
    gcloud run services describe gasolina-api --region=<region>
    
  2. Container crash loop
    # AWS: Check logs
    aws logs tail /ecs/gasolina-api --follow
    
    # GCP: Check logs
    gcloud logging read "resource.type=cloud_run_revision" --limit 100
    
  3. Port misconfiguration
    • Verify the container is listening on the correct port (default: 8999 for GCP)
    • Check load balancer health check configuration

RPC Connection Failures

Symptom: Signature requests fail with RPC-related errors Diagnostic Steps:
  1. Verify RPC endpoints are accessible:
    curl -X POST <your-rpc-endpoint> \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
    
  2. Check provider configuration:
    • Verify providers.json contains valid endpoints
    • Ensure API keys are correct and not rate-limited
    • Confirm chain IDs match expected values
  3. Add backup providers:
    {
      "1": {
        "chainName": "ethereum",
        "uris": ["https://primary-rpc.example.com", "https://backup-rpc.example.com"]
      }
    }
    
Solutions:
  • Add multiple RPC providers per chain for redundancy
  • Monitor RPC usage to avoid rate limits
  • Use dedicated RPC endpoints for production

Signature Generation Failures

Symptom: API returns 500 error when requesting signatures Possible Causes:
  1. KMS key access issues (AWS/GCP)
    # AWS: Check KMS key permissions
    aws kms describe-key --key-id <key-id>
    
    # GCP: Check KMS permissions
    gcloud kms keys describe <key-name> \
      --keyring=gasolinaKeyRing --location=global
    
  2. Mnemonic secret not found
    # AWS: Verify secret exists
    aws secretsmanager get-secret-value --secret-id <secret-name>
    
  3. Event not found on chain
    • Verify transaction hash is correct
    • Ensure RPC provider is synced
    • Check if transaction has been mined
Solutions:
  • Verify IAM/service account permissions for KMS
  • Check secret manager configuration
  • Wait for transaction confirmation before requesting signatures

Infrastructure Issues

AWS Deployment Failures

”Resource already exists” Error

Cause: Previous deployment artifacts weren’t cleaned up Solution:
# Delete the CloudWatch log group
aws logs delete-log-group --log-group-name GasolinaMetricLogGroup

# Delete the S3 bucket (empty it first)
aws s3 rm s3://providerconfigs-<projectName>-<environment>-gasolina --recursive
aws s3 rb s3://providerconfigs-<projectName>-<environment>-gasolina

# Retry deployment
cd cdk/gasolina
cdk deploy

CDK Bootstrap Required

Symptom: Deployment fails with “This stack uses assets, so the toolkit stack must be deployed” Solution:
cd cdk/gasolina
cdk bootstrap
cdk deploy

GCP Deployment Failures

”API has not been used in project” Error

Cause: GCP APIs need time to propagate after enabling Solution:
  1. Wait 2-5 minutes after enabling APIs
  2. Retry the Terraform apply:
    terraform apply --var-file=lz-mainnet-verifier.tfvars
    

KeyRing Creation Error

Cause: Cloud KMS API not fully enabled Solution:
  1. Visit the Cloud KMS API page in GCP Console
  2. Ensure the API is enabled
  3. Wait a few minutes and retry

Accessing Logs

AWS CloudWatch

# Tail logs in real-time
aws logs tail /ecs/gasolina-api --follow

# Search for errors
aws logs filter-log-events \
  --log-group-name /ecs/gasolina-api \
  --filter-pattern "ERROR"

# Get logs from specific time range
aws logs filter-log-events \
  --log-group-name /ecs/gasolina-api \
  --start-time $(date -d '1 hour ago' +%s000) \
  --end-time $(date +%s000)

GCP Cloud Logging

# Recent logs
gcloud logging read "resource.type=cloud_run_revision" --limit 50

# Filter by severity
gcloud logging read "resource.type=cloud_run_revision AND severity>=ERROR" --limit 50

# Logs from specific time
gcloud logging read "resource.type=cloud_run_revision AND timestamp>=\"2024-01-01T00:00:00Z\""

Verification Failures

Block Confirmation Issues

Symptom: Signatures not generated; waiting for confirmations Diagnostic:
# Check current block vs transaction block
curl -X POST <rpc-endpoint> \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Solutions:
  • Wait for required confirmations to pass
  • Verify RPC provider is synced to chain head
  • Check if chain is experiencing delays

Signer Mismatch

Symptom: DVN_InvalidSignatures error when submitting to contract Diagnostic:
  1. Query signers from Gasolina:
    curl "https://your-gasolina.com/signer-info?chainName=ethereum"
    
  2. Query signers from contract:
    // Check if address is a signer
    dvn.isSigner(address)
    
Solutions:
  • Ensure Gasolina signers match those registered in the DVN contract
  • If signers changed, update the DVN contract using setSigner
  • Verify you’re using the correct Gasolina instance

Quorum Not Met

Symptom: Verification transaction reverts despite having signatures Diagnostic:
  1. Check required quorum on contract:
    dvn.quorum()
    
  2. Count signatures in your payload
Solutions:
  • Ensure you have at least quorum signatures
  • Verify all signers are valid (not removed)
  • Check signature order (some chains require alphabetical ordering)

Common Scenarios

Scenario: New Chain Support

Issue: DVN doesn’t support a newly added chain Steps:
  1. Add RPC providers for the new chain to providers.json
  2. Update availableChainNames in config
  3. Redeploy Gasolina
  4. Request DVN contract deployment on the new chain from LayerZero
  5. Update setDstConfig for fee configuration

Scenario: Key Rotation

Issue: Need to rotate signing keys Steps:
  1. Generate new keys (KMS or mnemonic)
  2. Add new signer to DVN contract:
    ts-node scripts/configChangePayloads/createAddOrRemoveSignerSignatures.ts \
      -e mainnet -c ethereum,bsc -q 2 \
      --signerAddress 0xNewSigner --shouldRevoke 0
    
  3. Update Gasolina configuration with new key
  4. Redeploy Gasolina
  5. Optionally remove old signer:
    ts-node scripts/configChangePayloads/createAddOrRemoveSignerSignatures.ts \
      -e mainnet -c ethereum,bsc -q 2 \
      --signerAddress 0xOldSigner --shouldRevoke 1
    

Scenario: Taking Over Admin Role

Issue: Need to take direct control from Essence Steps:
  1. Prepare a wallet to receive admin role
  2. Generate quorumChangeAdmin signatures:
    const newAdmin = '0xYourAddress';
    const callData = ethers.utils.defaultAbiCoder.encode(['address'], [newAdmin]);
    
  3. Sign with Gasolina signers
  4. Call quorumChangeAdmin directly on DVN contract
  5. Now you control transaction submission
After taking admin control, you’re responsible for:
  • Managing gas across all chains
  • Submitting verification transactions
  • Monitoring and operational tasks

Debugging Commands Reference

Contract Queries

# Using cast (Foundry)
# Check VID
cast call <dvn-address> "vid()(uint32)" --rpc-url <rpc>

# Check quorum
cast call <dvn-address> "quorum()(uint64)" --rpc-url <rpc>

# Check if address is signer
cast call <dvn-address> "isSigner(address)(bool)" <address> --rpc-url <rpc>

# Check destination config
cast call <dvn-address> "dstConfig(uint32)(uint64,uint16,uint128)" <eid> --rpc-url <rpc>

Gasolina API Tests

# Health check
curl -s https://your-gasolina.com/ | grep HEALTHY

# Signer info
curl -s "https://your-gasolina.com/signer-info?chainName=ethereum" | jq

# Test with sample message
ts-node scripts/testDeployment.ts -u https://your-gasolina.com -e mainnet

Log Analysis

# AWS: Find signature failures
aws logs filter-log-events \
  --log-group-name /ecs/gasolina-api \
  --filter-pattern "signature" \
  --limit 20

# GCP: Find errors
gcloud logging read \
  "resource.type=cloud_run_revision AND textPayload:error" \
  --limit 20

Getting Help

If you’ve exhausted these troubleshooting steps:
  1. Check Documentation:
  2. GitHub Issues:
  3. Community Support:
When reporting issues, include:
  • Error messages and logs
  • Configuration (redact secrets)
  • Chain and environment
  • Steps to reproduce