Files
proxmox/docs/06-besu/T1_1_SELECTOR_RESOLUTION.md
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

3.0 KiB

T1.1: ChainID 138 CCIP Selector Resolution

Last Updated: 2026-01-31
Document Version: 1.0
Status: Active Documentation


Date: 2026-01-18
Status: RESOLUTION IDENTIFIED


🔍 Investigation Findings

Conflicting Values

  1. networks.json: 5009297550715157269 (same as Mainnet selector)

    • Location: smom-dbis-138/networks.json line 13
    • Issue: Different chains should have different selectors
  2. Relay Service Config: BigInt('138') (chain ID directly)

    • Location: services/relay/src/config.js line 34
    • Comment: "Using chain ID as selector for custom relay"

Analysis

Key Finding: Relay service uses chain ID (138) as selector

Implication: This indicates a custom CCIP implementation, not official Chainlink CCIP

Documentation Evidence:

  • Relay service comment: "Official CCIP chain selectors are calculated differently, but for custom relay we use chain ID"
  • This confirms custom CCIP is being used

Resolution

Correct Selector Value

ChainID 138 Selector: 138

Reasoning:

  1. Matches relay service implementation (actively used)
  2. Consistent with custom CCIP pattern (chain ID as selector)
  3. networks.json value appears to be placeholder/incorrect

Action Required

  1. Update .env:

    CHAIN138_SELECTOR=138
    
  2. Update networks.json (optional but recommended):

    "138": {
      "chainSelector": "138"
    }
    
  3. Document decision: Custom CCIP uses chain ID as selector


📋 Verification

Before Update:

  • Current: 5009297550715157269 (same as Mainnet)
  • Status: Incorrect for custom CCIP

After Update:

  • New: 138 (chain ID)
  • Status: Matches relay service implementation

🔍 Why This Matters

Impact on Bridge Configuration:

  • Mainnet → ChainID 138: Already configured with 5009297550715157269 (Mainnet selector)
    • This is correct - Mainnet bridges use Mainnet selector to identify ChainID 138 destination
  • ChainID 138 → Mainnet: Needs to use 138 (ChainID 138 selector)
    • This is what identifies ChainID 138 as the source chain

Note:

  • Source selector = selector of the chain sending the message (ChainID 138 = 138)
  • Destination selector = selector of the target chain (Mainnet = 5009297550715157269)

The Mainnet → ChainID 138 configuration is correct because it uses Mainnet selector. The ChainID 138 → Mainnet configuration needs ChainID 138 selector (138).


🚀 Next Steps

  1. Update .env with CHAIN138_SELECTOR=138
  2. Test bridge configuration with correct selector
  3. Verify bidirectional configuration works with:
    • Mainnet → ChainID 138: Uses 5009297550715157269 (destination selector)
    • ChainID 138 → Mainnet: Uses 138 (source selector) and 5009297550715157269 (destination selector)

Status: RESOLUTION IDENTIFIED - READY FOR IMPLEMENTATION

Last Updated: 2026-01-18