Add aelf namespace (aelf) with CAIP-2 profile - #209
Open
okwme wants to merge 1 commit into
Open
Conversation
Adds a CAN for the aelf ecosystem with a CAIP-2 Blockchain ID profile. Drafted by the maintainers of FAR, an open cross-reference between CAIP-19, CoinGecko and ISO 24165 identifiers, which needs a CAIP-2 for this chain to name assets that exist on it. The authors do not represent the aelf ecosystem and offer this as a starting point for its community to correct, adopt or replace. Discussion: 0xcounting/FAR#1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a CAN for aelf with a CAIP-2 Blockchain ID profile.
Who wrote this
I do not represent the aelf ecosystem. I maintain FAR, an open cross-reference between CAIP-19, CoinGecko and ISO 24165 identifiers. Offered as a starting point for aelf's maintainers to correct, adopt or replace.
Proposal
aelf:+ the chain id in its canonical base58 form.aelf:AELFis not a stutter: lowercase names the ecosystem, uppercase is the main chain's own id — and the stutter disappears ataelf:tDVV.The encoding, established from source rather than assumed
aelf chain ids are an
int32that renders as a short base58 string, but the mapping is not plain base58 of the integer. FromChainHelper.cs(fetched via the GitHub API — raw URLs 404 on every branch; the default branch isdev):ConvertChainIdToBase58takes the low three bytes of the int32's little-endian form, big-endian, plain base58, no checksum.I implemented both directions and round-tripped them:
AELF↔9992731,tDVV↔1866392,tDVW↔1931928 — matching the integers aelf's own documentation publishes. Because only three bytes survive, the value space is0…16777215and the base58 form is 3–5 characters (brute-forced across all 16,777,216 values).The spec therefore defines canonicality as a round-trip rule rather than an enumeration:
^[1-9A-HJ-NP-Za-km-z]{3,5}$andConvertChainIdToBase58(ConvertBase58ToChainId(ref)) == ref. Every invalid test case was computed, not guessed — e.g.1AELF→-1736828160→re-encodes to136H.Verified live (2026-09-14)
GET /api/blockChain/chainStatusonhttps://aelf-public-node.aelf.io→"ChainId":"AELF"; onhttps://tdvv-public-node.aelf.io→"ChainId":"tDVV".aelf's TestNet main chain is documented as also using
AELF, which would meanaelf:AELFdoes not distinguish MainNet from TestNet.aelf-test-node.aelf.ioandtdvw-test-node.aelf.ioreturned HTTP 522 throughout, so the testnet rows are documentation-only and I could not confirm it either way.The spec has a dedicated Collisions section stating the ambiguity and giving three mitigations (out-of-band network context, corroborate
GenesisBlockHash, refuse). This is the item most likely to need community correction and the first thing I would ask a maintainer to look at.Flagged for a future CAIP-19 profile
aelf tokens live in a shared MultiToken system contract, not one contract per token — verified live on both chains by decoding the contract descriptor set at
JRmBduh4…(AELF) and7RzVGiuVWkvL4VfVHdZfQF2Tri3sgLe9U991bohHFfSRZXuGX(tDVV), both containingtoken_contract.proto/MultiToken.So token identity is
(chain id, symbol)and never a contract address. This is not hypothetical: in the cross-reference project that prompted this PR, every aelf token collided on that one address.discussions-to: 0xcounting/FAR#1