-
Notifications
You must be signed in to change notification settings - Fork 83
Add sui
namespace and CAIP-2 spec
#146
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
Add sui
namespace and CAIP-2 spec
#146
Conversation
Sui
namespace and CAIP-2 specSui
namespace and CAIP-2 spec
09d063c
to
bde57f4
Compare
bde57f4
to
4681c2b
Compare
Sui
namespace and CAIP-2 specSui
namespace and CAIP-2 spec
Sui
namespace and CAIP-2 specsui
namespace and CAIP-2 spec
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.
Approving in this case - curious though how this would apply to a different sui network and how it would be formatted both with the prefix and namespace identifier. Some additional clarity here would be great.
Hey @obstropolos! Thanks for the review - LMK if there was anything unclear from the specification in the PR. There are only four canonical networks on Sui - mainnet, testnet, devnet, and localnet (localnet is excluded from the spec since that identifier encompasses locally ran network instances). The motivating factor for using static identifiers, i.e. |
Ah got it! This makes a lot more sense - I didn't know if there would be any additional derivative networks besides the core canonical ones that would require this. Appreciate the color here. |
@williamrobertson13 sorry i'm still not understanding what you mean by "canonical". The docs make it sound like any chainId that you can get the domain controller of sui.ui to point to a fullnode at
|
Hello! Ah I realize now that saying "canonical" was incorrect terminology in my previous message 😅. Let me rephrase that and say there are four commonly recognized networks that run today that are supported by dApps.
Just to clarify on this point, the documentation states that To hit on your questions:
|
ok neat thanks I will open a PR to add this additional stuff when I have some time but this is fine to publish as a first draft |
The separation of **stable identifiers** (e.g., `sui:testnet`) from the **unambiguous chain identifier** (e.g., the identifier returned by `suix_getChainIdentifier`) is particularly important because: | ||
|
||
- **`testnet` and `devnet` may be reset** by Sui maintainers, resulting in a new genesis state. | ||
- When this happens, the **genesis checkpoint digest changes**, meaning the underlying chain identifier is no longer the same. |
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.
So the Sui Foundation decides this, and announces this? Is there a canonical mapping anywhere? most CAIP-2 profiles define the underlying machine-readable (and immutable) identifier, since this creates CAIP-10s and CAIP-19s that survive changes at the governance/human level...
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.
Good enough to publish as a draft since clearly the indirections are maintained by the foundation but i'd like to add localnet
in a follow-in PR and add some more precise explanation of how these indirections are governed.
I also don't see a good technical reason for only allowing mutable/unsafe indirections; couldn't
sui:4c78adac
and
sui:testnet
coexist? don't some usecases need the former and some usecases need the latter?
This PR adds documentation for the Sui smart contract platform and a corresponding
CAIP-2
specification which will unlock cross-chain integrations with Sui. The design here is largely inspired by a discussion we had a few years ago in MystenLabs/sui#6624 and will supersede #43.For easier viewing pleasure:
https://github.com/ChainAgnostic/namespaces/blob/fe4627761af1d6b192994791ea0bba45049f02d5/sui/README.md
https://github.com/ChainAgnostic/namespaces/blob/fe4627761af1d6b192994791ea0bba45049f02d5/sui/caip2.md