-
Notifications
You must be signed in to change notification settings - Fork 3
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
Interoperable address spec #14
base: feat/chain-specific-addresses
Are you sure you want to change the base?
Interoperable address spec #14
Conversation
specs/address-types.md
Outdated
An extensible way to describe an address specific to one chain which includes the information to condense it into a human-readable name in a secure way. | ||
|
||
## Out of scope concerns | ||
Similarly to CAIP-10, this specification is not concerned with the mapping from a chain id to a network name, which might not be surjective (eg: the case where if there are multiple EIP-155 chains with chain id 8453, which one should we call Base?), regarding that resolution a social-layer problem until a future ERC decides to tackle it. |
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.
We could reference docs/chain-registries.md here
|
||
This document, in its current state, aims to be the starting point for a future address format called 'Interoperable Address' whose aims & properties are fully described in [a separate document](../PROPERTIES.md) | ||
|
||
Requires: CAIP-10 |
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.
should I list the standards required for the various resolvers as well? only CAIP-10 is required for the 'core' spec
``` | ||
|
||
## Rationale | ||
- In order to guarantee future resolvers don't share prefixes with existing resolvers in an ambiguous way, and therefore human-readable names are always mappable to a single machine address, this standard defines the human-readable names to start with the resolver version. (TODO: ideally we should be smarter about this and resolve it in a way that doesnt expose this implementation quirk to users) |
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 do not like this, we should craft them in a way which allows users to not know they are using a particular schema (for which the version::
is almost a prompt) but is secretly unambiguous.
- The rules for wether to parse URL escaping in a resolver payload are specific to the resolver version | ||
- The rules for wether to parse URL escaping in a CAIP-10 account address are specific to its CAIP-2 chain namespace | ||
- To maintain the bijectivity of account ids and therefore interoperable addresses to on-chain addresses: | ||
- In CAIP-2 namespaces where there is a canonicalization scheme (such as EIP-55 in EIP-155 chains) it SHOULD be used. |
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.
Ideally I'd like to say MUST
, but there would be no way to resolve it on chains with competing capitalization schemes. I sort of get now why many existing schemes (DID-pkh, ENSIP-11) resort to using raw public keys
- In CAIP-2 namespaces where addresses have an *optional* checksum field, it MUST be omitted and the checksum defined in the standard be used without redundancy | ||
- In CAIP-2 namespaces where addresses are raw hexadecimal data without an EIP-55-equivalent capitalization scheme, the lowercase `a-f` characters MUST be used instead of uppercase ones. | ||
- In the case of EIP-155 chains, EIP-55 canonicalization MUST be used | ||
- The checksum MUST be the hexadecimal representation first four bytes of the keccak-256 hash of UTF-8 representation of the interoperable address from it's beginning up to and including the hash `#` character separating the checksum from the rest of the address. |
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 don't have any good reason for choosing this, just chose something.
Raising awareness this is aligned to tackle #22 |
I believe this is at a state where we can start a discussion. It is by no means final.
While resolver with id 3 is a good stopgap solution in my opinion, I believe we should iterate on this to:
There are several lower-level items where I would greatly appreciate your ideas and feedback, see my own comments in the diff