Add adnl codec for TON network addresses#402
Merged
vmx merged 3 commits intomultiformats:masterfrom Apr 17, 2026
Merged
Conversation
Replace vague "Ed25519-derived peer identifier" with the precise construction: SHA-256(TL constructor 0x4813b4c6 little-endian || Ed25519 public key). Matches the reference implementation in ton-blockchain/ton (keys/keys.cpp::compute_short_id) and the TL schema pub.ed25519.
vmx
approved these changes
Apr 17, 2026
Member
vmx
left a comment
There was a problem hiding this comment.
I haven't had a close look, but it sounds reasonable and enough context was provided. It's also in a high byte range, hence approving it.
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.
Add multicodec namespace entry for TON ADNL addresses in the 0xbX9910 range following the existing namespace convention (alongside skynet, arweave, subspace, kumandra, massa).
What is ADNL?
ADNL (Abstract Datagram Network Layer) is TON's peer-to-peer networking protocol. An ADNL address is a 32-byte identifier computed as
SHA-256(TL_constructor_id || pubkey), where the TL constructor id forpub.ed25519is0x4813b4c6serialized little-endian (wire bytesc6 b4 13 48), followed by the 32-byte Ed25519 public key. Reference:ton-blockchain/ton—keys/keys.cpp::compute_short_id().https://docs.ton.org/develop/network/adnl-udp
Codec added:
│ 0xb69910 │ adnl │ TON ADNL address: 32-byte SHA-256(0x4813b4c6_LE || Ed25519-pubkey)
Motivation
This codec enables ENSIP-7 contenthash encoding for TON sites, allowing
.ethdomains to resolve to TON resources through standard content-addressed URIs.Reference implementation: https://github.com/TONresistor/Tonutils-Proxy/blob/contenthash/resolver/contenthash.go
Live example: tonnet.eth contenthash set on Ethereum mainnet