-
Notifications
You must be signed in to change notification settings - Fork 104
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
[AIP-40][Address Standard v1] #178
Comments
I agree. There should be a standard. We should adopt and implement now rather than later when it would be more impactful. |
In the AIP, what do you mean by:
Can you clarify in the AIP what are the |
I'm just using regex notation. So |
We previously ran into some issues with https://explorer.aptoslabs.com/validators/delegation not displaying the right names, caused by some places using the |
For the special (where "special" is defined in the AIP) addresses like 0x1, people generally expect them to be formatted in the |
At Stakely, we support this proposal. In the previewnet, we encountered some inconsistencies with a wallet that started with two zeros (0x00{62}). Depending on the API method, Petra, CLI commands, or configuration files used, this wallet sometimes displayed as {64}, sometimes as 0x{64}, and sometimes 0x00{62}. This inconsistency was somewhat confusing to realize. A key point of confusion for us was: Upon executing the command: aptos stake initialize-stake-owner --operator-address 0x{64} And then, when we queried the API, the wallet 0x{62} was shown in the operator_address field. Our initial thought was that there might be a mistake due to the mismatch - we assumed that we had input the wrong wallet, as one does not typically keep track of whether the wallet contains 62 or 64 characters. Eventually, we understood that there was no issue and that the wallet addresses were equivalent. Another aspect we believe is crucial to standardize relates to the validator configuration files (e.g., validator-identity.yaml). In these files, the "account_address" field is not preceded by 0x, but it shows as {64}. We are wondering if this proposal also aims to standardize the address format in the node configuration files? |
Thanks for the feedback! Yes we'd love to standardize the address format in the node configuration files. Essentially how this would look is the following:
|
Fully support this! Before mainnet launch, I generated a vanity address with 8 leading zeros for fun and use it as node operator address(guguru). I've encountered a lot of confusing scenarios or mismatch. |
Yeah some changes will be required. Where changes will be backwards compatible, we will make them. If not, we will make changes for future iterations. I'll update the ecosystem impact section of the AIP soon with this information! |
Do we have any applications that actually output short without "0x"? and similarly do any applications actually output long without "0x"? It might be good to at least in the discussion mention a few applications that went too permissive. |
Some examples of applications that output long without 0x off the top of my head include:
I can enumerate some more and add them to the motivation in the AIP. As for outputting short without 0x, not sure. I know we had issues with this in the explorer on the ingestion side but idk where those addresses came from in the first place. I'll investigate. |
More information about how we'll integrate this into the TS SDK here: #193 (comment). |
Through consultation with the working group for the AIP we have clarified how reference implementations should handle parsing of account address strings. In particular, it explicitly lays out the preferred parsing behavior while allowing more relaxed behavior for the sake of migration. See the updated AIP. With these changes in mind, we have landed AccountAddress to the v2 TS SDK. The AIP has been updated to refer to this code as the reference implementation. |
AIP Discussion
Summary
This standard defines the following:
Out of Scope
Prior discussion has centered around ways to differentiate between addresses, public / private keys, and other representations of data as hex. There has also been discussion around a more compact representation of addresses. This standard is not related to these discussions (which are akin to a v2 standard), it only aims to standardize our existing approach (v1).
Motivation
Each account / object on the Aptos blockchain is identified by a 32 byte account address. For internal uses, addresses are represented as just that, using a 32 byte sequence. However when transmitting and displaying addresses it is common to use a hex representation. As it stands today there is no standard that defines how these addresses should be represented in each context. Since there are multiple technically correct ways to represent an address, this leads to a fractured ecosystem in which different APIs, tools, and products represent and accept addresses differently. This can lead to issues with querying on-chain data and submitting correct transactions.
Read more about it here: https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md
The text was updated successfully, but these errors were encountered: