Skip to content

Commit 4681c2b

Browse files
work
1 parent 0e974c4 commit 4681c2b

File tree

2 files changed

+156
-0
lines changed

2 files changed

+156
-0
lines changed

sui/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
namespace-identifier: sui
3+
title: Sui Ecosystem
4+
author: William Robertson (@williamrobertson13)
5+
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/146
6+
status: Draft
7+
type: Informational
8+
created: 2025-06-18
9+
updated: 2025-06-18
10+
---
11+
12+
# Namespace for Sui Chains
13+
14+
Sui is a smart contract platform that uses a Move-based, object-centric data model and is optimized for parallel execution. Transactions in Sui 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.
15+
16+
A Sui 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.
17+
18+
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.
19+
20+
## Rationale
21+
22+
Because chain identity and state in Sui revolve around checkpoints and objects rather than blocks and accounts, standard CAIP identifiers (e.g., for chains, accounts, and assets) must be adapted accordingly.
23+
24+
This namespace defines how Sui’s architecture maps to cross-chain standards to support consistent and interoperable multi-chain tooling.
25+
26+
## Governance
27+
28+
Sui protocol upgrades and standards are coordinated by the Sui Foundation in collaboration with core contributors and the broader developer community. Changes are proposed through SIPs (Sui Improvement Proposals), with open discussion and reference implementations maintained on GitHub.
29+
30+
## References
31+
32+
- [Sui Docs] — Developer documentation and concept overviews for building on Sui.
33+
- [Sui GitHub] — Official GitHub repository for the Sui smart contract platform.
34+
- [Sui SIPs] — Official GitHub repository for Sui Improvement Proposals.
35+
36+
[Sui Docs]: https://docs.sui.io/
37+
[Sui GitHub]: https://github.com/MystenLabs/sui
38+
[Sui SIPs]: https://github.com/sui-foundation/sips
39+
40+
## Copyright
41+
42+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

sui/caip2.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
namespace-identifier: sui-caip2
3+
title: Sui Namespace - Chains
4+
author: William Robertson (@williamrobertson13)
5+
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/146
6+
status: Draft
7+
type: Informational
8+
created: 2025-06-18
9+
updated: 2025-06-18
10+
---
11+
12+
# CAIP-2
13+
14+
_For context, see the [CAIP-2][] specification._
15+
16+
## Introduction
17+
18+
The Sui namespace in CAIP-2 defines chain identifiers based on the **genesis checkpoint digest**, a cryptographically unique and immutable value derived from the first checkpoint of a Sui network. This ensures that identifiers are stable, verifiable, and unambiguous.
19+
20+
## Specification
21+
22+
### Semantics
23+
24+
A valid CAIP-2 identifier in the Sui namespace takes the form:
25+
26+
```
27+
sui:<genesis_checkpoint_digest>
28+
```
29+
30+
Where `<genesis_checkpoint_digest>` is the first 4 bytes (8 hex characters) of the network’s genesis checkpoint digest.
31+
32+
### Syntax
33+
34+
#### Regular Expression
35+
36+
```
37+
^sui:[0-9a-fA-F]{8}$
38+
```
39+
40+
#### Example
41+
42+
```
43+
sui:35834a8a
44+
```
45+
46+
### Resolution Mechanics
47+
48+
To resolve a CAIP-2 chain identifier, clients query a trusted full node associated with the specified network. While the `suix_getChainIdentifier` JSON-RPC method is commonly used for this purpose, resolution is not limited to JSON-RPC. Other interfaces, such as GraphQL, may also support retrieving the corresponding genesis checkpoint digest.
49+
50+
**Sample request:**
51+
52+
```json
53+
{
54+
"jsonrpc": "2.0",
55+
"id": 1,
56+
"method": "suix_getChainIdentifier",
57+
"params": []
58+
}
59+
```
60+
61+
**Sample response:**
62+
63+
```json
64+
{
65+
"jsonrpc": "2.0",
66+
"id": 1,
67+
"result": "35834a8a"
68+
}
69+
```
70+
71+
## Rationale
72+
73+
This approach advocates for the exclusive use of unambiguous chain identifiers for identifying Sui chains in CAIP-2 format.
74+
75+
While human-readable identifiers like `sui:mainnet` or `sui:testnet` are intuitive, they are not stable over time. Networks like testnet and devnet may be reset by Sui maintainers, resulting in a new genesis state. When this happens, the associated digest changes, meaning the underlying chain is no longer the same, even if the CAIP-2 identifier remains unchanged.
76+
77+
Using the digest-based identifier directly avoids this ambiguity by ensuring all references point to a specific, verifiable chain instance. This eliminates reliance on potentially outdated or re-used labels and simplifies validation logic.
78+
79+
By relying solely on unambiguous identifiers, we prioritize long-term compatibility, security, and correctness. This ensures that clients consistently interact with the intended chain, even as network environments evolve.
80+
81+
### Backwards Compatibility
82+
83+
There are no legacy identifiers or alternate forms for Sui chains.
84+
85+
## Test Cases
86+
87+
Below are manually composed examples:
88+
89+
```
90+
# CAIP-2 Chain ID for Mainnet**
91+
sui:35834a8a
92+
93+
# CAIP-2 Chain ID for Testnet**
94+
sui:4c78adac
95+
96+
# CAIP-2 Chain ID for Devnet**
97+
sui:aba3e445
98+
```
99+
100+
## References
101+
102+
- [Sui Docs] - Developer documentation and concept overviews for building on Sui.
103+
- [Sui RPC] - Reference documentation for interacting with Sui networks via RPC.
104+
- [Sui GitHub] - Official GitHub repository for the Sui smart contract platform.
105+
- [CAIP-2] - Chain ID Specification.
106+
107+
[Sui Docs]: https://docs.sui.io/
108+
[Sui RPC]: https://docs.sui.io/references/sui-api
109+
[Sui GitHub]: https://github.com/MystenLabs/sui
110+
[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2
111+
112+
## Copyright
113+
114+
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)