From 66a74c63a8d1857844457a899251eb48cff8587d Mon Sep 17 00:00:00 2001 From: connorwstein Date: Fri, 8 Nov 2024 11:02:33 -0500 Subject: [PATCH] Include generation info --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a8a047..eb6429b 100644 --- a/README.md +++ b/README.md @@ -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.