-
Notifications
You must be signed in to change notification settings - Fork 106
Add haneul namespace and CAIP-2 spec
#168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| --- | ||
| namespace-identifier: haneul | ||
| title: Haneul Ecosystem | ||
| author: Geunhwa Jeong (@GeunhwaJeong) | ||
| discussions-to: https://github.com/ChainAgnostic/namespaces/pull/168 | ||
| status: Draft | ||
| type: Informational | ||
| created: 2026-01-19 | ||
| updated: 2026-01-19 | ||
| --- | ||
|
|
||
| # Namespace for Haneul Chains | ||
|
|
||
| Haneul is a Layer 1 smart contract platform that uses a Move-based, object-centric data model and is optimized for parallel execution. Transactions in Haneul operate on objects rather than accounts, allowing independent operations to be executed in parallel without coordination. This enables high throughput while preserving safety and determinism. | ||
|
|
||
| A Haneul network is maintained by a validator committee responsible for processing transactions, reaching consensus, and producing checkpoint digests — cryptographic summaries of network state at fixed intervals. These checkpoints serve as the canonical state and ensure consistency across nodes. | ||
|
|
||
| Each network is uniquely identified by its genesis checkpoint digest — the cryptographic hash of the very first checkpoint, signed by the original validator set. This digest anchors the network's identity in verifiable history and validator consensus. | ||
|
|
||
| ## Rationale | ||
|
|
||
| Because chain identity and state in Haneul revolve around checkpoints and objects rather than blocks and accounts, standard CAIP identifiers (e.g., for chains, accounts, and assets) must be adapted accordingly. | ||
|
|
||
| This namespace defines how Haneul's architecture maps to cross-chain standards to support consistent and interoperable multi-chain tooling. | ||
|
|
||
| ## Governance | ||
|
|
||
| Haneul protocol upgrades and standards are coordinated by Haneul Labs in collaboration with core contributors and the broader developer community. Changes are proposed through HIPs (Haneul Improvement Proposals), with open discussion and reference implementations maintained on GitHub. | ||
|
|
||
| ## References | ||
|
|
||
| - [Haneul GitHub] — Official GitHub repository for the Haneul blockchain. | ||
| - [Haneul TypeScript SDK] — Official TypeScript SDK for Haneul. | ||
|
|
||
| [Haneul GitHub]: https://github.com/GeunhwaJeong/haneul | ||
| [Haneul TypeScript SDK]: https://github.com/GeunhwaJeong/haneul-ts-sdks | ||
|
|
||
| ## Copyright | ||
|
|
||
| Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| --- | ||
| namespace-identifier: haneul-caip2 | ||
| title: Haneul Namespace - Chains | ||
| author: Geunhwa Jeong (@GeunhwaJeong) | ||
| discussions-to: https://github.com/ChainAgnostic/namespaces/pull/168 | ||
| status: Draft | ||
| type: Informational | ||
| created: 2026-01-19 | ||
| updated: 2026-02-11 | ||
| --- | ||
|
|
||
| # CAIP-2 | ||
|
|
||
| _For context, see the [CAIP-2][] specification._ | ||
|
|
||
| ## Introduction | ||
|
|
||
| The Haneul namespace in CAIP-2 uses human-readable chain identifiers — such as `mainnet`, `testnet`, and `devnet` — to identify specific Haneul networks. These identifiers are **stable**, **concise**, and **easy to communicate**, and can be resolved to a unique genesis checkpoint digest through a supported Haneul RPC interface. | ||
|
|
||
| This design provides both developer ergonomics and cryptographic assurance, allowing developers to work with simple names while still supporting verifiable chain identification. | ||
|
|
||
| ## Specification | ||
|
|
||
| ### Semantics | ||
|
|
||
| A valid CAIP-2 identifier in the Haneul namespace takes the form: | ||
|
|
||
| `haneul:<network>` | ||
|
|
||
| Where `<network>` is one of the following reserved, stable identifiers: | ||
|
|
||
| - `mainnet` | ||
| - `testnet` | ||
| - `devnet` | ||
|
|
||
| ### Syntax | ||
|
|
||
| #### Regular Expression | ||
|
|
||
| `^haneul:(mainnet|testnet|devnet)$` | ||
|
|
||
| Only these exact network identifiers are currently supported. Network names are lowercase ASCII strings with a maximum length of 7 characters. The resolved chain identifier returned by RPC is 4 bytes (8 hex characters), derived from the first 4 bytes of the 32-byte Blake2b-256 genesis checkpoint digest. | ||
|
|
||
| #### Example | ||
|
|
||
| `haneul:testnet` | ||
|
|
||
| ### Governance | ||
|
|
||
| New network identifiers and chain resets are decided by Haneul Labs. Adding a new network name requires a protocol-level code change and validator coordination. Resets of `testnet` and `devnet` may occur during protocol upgrades or development cycles; `mainnet` is not expected to be reset under normal circumstances. | ||
|
|
||
| ### Resolution Mechanics | ||
|
|
||
| To resolve a CAIP-2 `haneul:<network>` identifier into a unique chain identifier, clients typically query a trusted full node associated with the specified network. While the `haneul_getChainIdentifier` JSON-RPC method is commonly used for this purpose, resolution is not limited to JSON-RPC. Other node interfaces, such as GraphQL, may also support retrieving identifiers pertinent to locating records, such as a genesis checkpoint digest unique to each chain. | ||
|
|
||
| **Sample request** | ||
|
|
||
| ```json | ||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 1, | ||
| "method": "haneul_getChainIdentifier", | ||
| "params": [] | ||
| } | ||
| ``` | ||
|
|
||
| **Sample response (for testnet):** | ||
|
|
||
| ```json | ||
| { | ||
| "jsonrpc": "2.0", | ||
| "id": 1, | ||
| "result": "afd5afb7" | ||
| } | ||
| ``` | ||
|
|
||
| The response returns the first four bytes of the genesis checkpoint digest for the network. | ||
|
|
||
| ## Rationale | ||
|
|
||
| This approach allows developers to use intuitive, readable CAIP-2 identifiers (e.g., `haneul:testnet`) while still achieving unambiguous and verifiable identification of the underlying chain through the genesis checkpoint digest. | ||
|
|
||
| The separation of **stable identifiers** (e.g., `haneul:testnet`) from the **unambiguous chain identifier** (e.g., the identifier returned by `haneul_getChainIdentifier`) is particularly important because: | ||
|
|
||
| - **`testnet` and `devnet` may be reset** by Haneul maintainers, resulting in a new genesis state. A reset is a complete reinitialization — all on-chain state, including balances, objects, and smart contract data, is wiped and a new genesis checkpoint is produced. Only the stable network name (e.g., `testnet`) persists across resets. | ||
| - When this happens, the **genesis checkpoint digest changes**, meaning the underlying chain identifier is no longer the same. | ||
| - If clients depended directly on the digest as the CAIP-2 identifier, each reset would break compatibility or require external coordination. | ||
| - By resolving the digest dynamically via RPC, clients can ensure they're talking to the correct chain, without needing to change the CAIP-2 identifier they rely on. | ||
|
|
||
| This pattern balances human readability, forward compatibility, and security. | ||
|
|
||
| ### Backwards Compatibility | ||
|
|
||
| There are no legacy identifiers or alternate forms for Haneul chains. | ||
|
|
||
| ## Test Cases | ||
|
|
||
| Below are manually composed examples: | ||
|
|
||
| #### Haneul Testnet | ||
|
|
||
| - **CAIP-2 Chain ID:** `haneul:testnet` | ||
| - **Resolved Chain Identifier:** `afd5afb7` | ||
|
|
||
| ## References | ||
|
|
||
| - [Haneul GitHub] — Official GitHub repository for the Haneul blockchain. | ||
| - [Haneul TypeScript SDK] — Official TypeScript SDK for Haneul. | ||
| - [CAIP-2] — Chain ID Specification. | ||
|
|
||
| [Haneul GitHub]: https://github.com/GeunhwaJeong/haneul | ||
| [Haneul TypeScript SDK]: https://github.com/GeunhwaJeong/haneul-ts-sdks | ||
| [CAIP-2]: https://chainagnostic.org/CAIPs/caip-2 | ||
|
|
||
| ## Copyright | ||
|
|
||
| Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there are syntactic limits (like, no future network name will be longer than X ASCII characters/codepoints) , or how to validate the genesis hash you get back (how many bytes? how base-encoded to ASCII?), I would add them to this section