Skip to content

Commit

Permalink
Include generation info
Browse files Browse the repository at this point in the history
  • Loading branch information
connorwstein committed Nov 8, 2024
1 parent 611fd57 commit 66a74c6
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Chain Selectors

CCIP uses its own set of chain selectors represented by uint64 to identify blockchains. This repository contains a
CCIP uses its own set of chain selectors represented by uint64 to identify blockchains. It is a random
integer generated as follows:
```python3
python3
>>> import random
>>> random.randint(1, 2**64-1)
```
The scheme is used for several reasons:
- Global uniqueness across blockchain families
- Very unlikely to collide with existing chain ID schemes, reducing confusion
- Efficient on/off-chain representation
- No preference towards any family or chain
- Decoupled from chain name which may change over time with rebrands/forks


This repository contains a
mapping between the custom chain identifiers (`chainSelectorId`) chain names and the chain identifiers
used by the blockchains themselves (`chainId`). For solana we use the base58 encoded genesis hash as the chain id.

Expand Down

0 comments on commit 66a74c6

Please sign in to comment.