-
Notifications
You must be signed in to change notification settings - Fork 0
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
Editorial pass for minor style guide issues and clarity #1
Editorial pass for minor style guide issues and clarity #1
Conversation
I'm a little confused because on line 51 you say there is "no algorithm" for computing CAIP-2 hash from genesis hash, but there seems to be a pre-defined function in Octez for doing exactly that, and besides, CAIP-2 defines that algorithm? I don't understand the original intent of line 51, i edited it for clarity before realizing i didn't understand it at all... |
Thx! I would like to keep the ":" in the alias if possible as I think the construction of the account ID should work the same way like |
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.
thank you! Only my comment
ok, it is good that you point that out! I created a ticket in the Tezos GitLab about it https://gitlab.com/tezos/tezos/-/issues/7023 I believe that there is a mapping table in the codebase where the network name is mapped to the known chain IDs of mainnet and ghostnet (mainnet -> NetXdQprcVkpaWU). But the other way around seems missing (NetXdQprcVkpaWU -> mainnet). With "no algorithm" I meant that I cannot throw the string "mainnet" with a prefix of "XY" into a hash function to get the chain id and vice versa. It is "just" the Octez devs maintaing the mapping table and a social consensus of people accepting this Octez version with this feature. Is that clearer? |
i find this a little confusing because neither in the mapping table in octez nor on discussion forums does anyone refer to "tezos:mainnet" -- they refer to "mainnet" or "Tezos mainnet" or "the mainnet of the Tezos ecosystem". backfilling the CAIP-10 syntax onto the real world implies that tooling exists in the world (or should) that takes flags like to put it another way, the CAIP-10 syntaxes uses |
if it's simpler, we could simply cut out all mention of registries and aliases-- you don't really NEED it for this profile to be usable for cross-chain/CAIP-25 tooling to be able to interact with the main 3 chains! the reason OED mentioned it in the other thread is that we generally discourage profiles that DEFINE an original mapping; unless there is already an authoritative registry that can be normatively linked, like chainlist or SS58 (in the case of polkadot), we prefer deterministic, self-confirmable transformations of genesis-block hashes (every namespace without such a registry uses some form of machine-readable, confirmable-from-the-node genesis hash IDs). |
if you think the octez/tezos community WANTS or NEEDS such a registry, feel free to keep working on it (and i'm sympathetic since the octez CLI already seems to have this feature in underdocumented form!), i just don't want you to feel like it's homework before merging this. if anything, it's a hopefully-fun sidequest 😉 |
Good morning @bumblefudge I think a specification like CAIP can in general do at least two things. First define what is the currently implemented practical use of something an write it down for others to follow the method and thought process behind it and second, provide a suggestion on how something should be done in order to steamline something that seems to cause misunderstanding and confusion. Mentioning a chain registry: Alias URN: "tezos mainnet" is derived from "${namespace(account-id)} ${alias(chain_id(account-id))}" I have seen in the repo of your ex colleagues the following: spruceid/did-tezos#33 I know it is not maintained but if you read my ticket then you will see that people are using a chain ID alias in the construction of URNs. It is apparently in their mind. Trying to propose a clear way on how to reuse the definition of the CAIP chain ID and a potential alias is here useful. I also talked to implementers of wallets like kukai who said that the general way of presenting the chain ID to the user is using an alias. I mentioned explicitly that this is an optional UX decision of the wallet implementer and the correctness of the mapping is their responsibility in CAIP-122. |
oh wow, i did NOT know the backstory, that is very interesting! if i've got my chronology straight, the did:tz method (primarily written by wayne, as i recall) actually predates the tezos "namespace" for CAIP-10; i vaguely remember tezos being one of the early examples of opting for a machine-readable chainId for lack of a definitive registry to map aliases unambiguously, if you can believe that. i had no idea that kukai or anyone else had taken the "heirarchical URN" approach to chainIds! in that case, feel free to reject or rollback my totally superficial/aesthetic edits about the when you merge this PR over here, it will update that PR over there, and I'll approve it! thanks again for this great work (and I hope you find time for sidequests both professional and literal in the near future!) |
# sandbox | ||
# ghostnet | ||
|
||
> ./octez-node run --data-dir ~/tezos-ghostnet --network ghostnet | ||
``` | ||
|
||
There is currently no algorithm to connect the `chain ID` to the `network` as it is part of the Octez reference implementation of Tezos. In general it is determined by social consensus what chain ID is considered as `tezos:mainnet`. It is RECOMMENDED to use a separate chain registry to map an alias to the chain ID. | ||
There is currently no algorithm to connecting `chain ID`s to `network`s in the Octez reference implementation of Tezos. |
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.
There is currently no algorithm to connecting `chain ID`s to `network`s in the Octez reference implementation of Tezos. | |
There is currently no algorithm for connecting to a network in the Octez reference implementation of Tezos by that network's CAIP-2 chainId, nor a way to query a node directly for a chainId. |
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.
I cannot change on your branch and will do it myself afterwards
Done. |
Looking good!