-
Notifications
You must be signed in to change notification settings - Fork 65
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 namesapce for Armonia Meta Chain(AMAX) #64
Draft
Narsiss
wants to merge
4
commits into
ChainAgnostic:main
Choose a base branch
from
Narsiss:feat/add-amax
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
namespace-identifier: amax | ||
title: AMAX Namespace | ||
author: Ray (@dragonmaster), Nariss(@Narsiss) | ||
status: Draft | ||
type: Informational | ||
created: 2023-04-14 | ||
updated: 2023-04-14 | ||
requires: ["CAIP-2","CAIP-10"] | ||
--- | ||
|
||
# Namespace for AMAX Blockchains | ||
|
||
The AMAX blockchain introduces some interesting variations on the account | ||
model but for the sake of cross-chain addressing conforms quite well to | ||
CASA-style URIs. | ||
|
||
## References | ||
|
||
- [Official website](https://amax.network) | ||
- [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) | ||
- [Account and Permissions][]: (https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts) | ||
- [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) | ||
- [Standard Account Name][]: Canonical definition of account name constraints | ||
|
||
- [Mainnet](https://expnode.amaxscan.io/v1/chain/get_info) | ||
- [Testnet](https://test-chain.ambt.art/v1/chain/get_info) | ||
|
||
[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](../LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
namespace-identifier: amax | ||
title: AMAX Namespace - Addresses | ||
author: Narsiss (@Narsiss) | ||
status: Draft | ||
type: Standard | ||
created: 2023-04-14 | ||
updated: 2023-04-14 | ||
requires: ["CAIP-2", "CAIP-10"] | ||
--- | ||
|
||
# CAIP-10 | ||
|
||
*For context, see the [CAIP-10][] specification.* | ||
|
||
## Rationale | ||
|
||
AMAX aligns squarely with the "account" model rather than the "UXTO" model. | ||
Each account instantiated in a given chain exists thereafter in the state of | ||
that chain; independent of any other additional state maintained by deployed | ||
smart contracts, the [token][] smart contract maintains a native-token | ||
balance for each account, and can be queried in various modes from any active | ||
node. | ||
|
||
For any valid account on a given chain, not just current native-token balance | ||
but also the "CPU" compute availability abstraction and the details of | ||
authorization/proof-of-control can be requested from the chain's nodes using the | ||
[get_account][] API call. It is worth noting that unlike other account-based | ||
systems, the [permissions][] object (and the sui generis multi-signature system it | ||
references) may be required to prove control of an account or authorize a | ||
transaction. This is, of course, out of scope of this document. | ||
|
||
## Syntax | ||
|
||
See the more recent [Standard Account Name][] definition from the Glossary and | ||
the [Naming Best Practices][] from the CDT section of the AMAX developer | ||
documentation for up-to-date guidance. At time of press, the following regex | ||
accurately validated standard account names on AMAX: | ||
``` | ||
[a-z][.a-z1-5]{10}[a-z1-5] | ||
``` | ||
|
||
### Backwards Compatibility | ||
|
||
Not applicable or unknown. | ||
|
||
## Test Cases | ||
|
||
This is a list of manually composed examples: | ||
|
||
``` | ||
amax:2403d6f602a87977f898aa3c62c79a76:armoniaadmin | ||
amax:208dacab3cd2e181c86841613cf05d9c:solotestacct | ||
|
||
``` | ||
|
||
## References | ||
|
||
|
||
|
||
- [Official website](https://amax.network) | ||
- [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) | ||
- [Standard Account Name][]: Canonical definition of account name constraints | ||
- [Chain ID][]: A github PR discussion detailing some key design decisions around `chain_id` | ||
- [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) | ||
|
||
[Transactions Protocol]: https://docs.amax.network/en/latest/API/AMAX-RPC/#wallet_sign_trx | ||
[get_info]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_info | ||
[get_account]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_account | ||
[token]: https://developers.eos.io/welcome/v2.2/tutorials/eosio_token | ||
[Chain ID]: https://github.com/EOSIO/eos/pull/3425 | ||
[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name | ||
[Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts | ||
[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md | ||
[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md | ||
|
||
|
||
## Rights | ||
|
||
Copyright and related rights waived via CC0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
namespace-identifier: amax | ||
title: AMAX Namespace - Chains | ||
author: Narsiss(@Narsiss) | ||
status: Draft | ||
type: Standard | ||
created: 2023-04-14 | ||
updated: 2023-04-14 | ||
requires: ["CAIP-2", "CAIP-10"] | ||
replaces: CAIP-7 | ||
--- | ||
|
||
# CAIP-2 | ||
|
||
*For context, see the [CAIP-2][] specification.* | ||
|
||
## Rationale | ||
|
||
An explanation of and specification for `chain_id` in the AMAX development | ||
environment can be found in the algorithm for signing transactions in the | ||
[Transactions Protocol][] section of the developer documents, because a valid | ||
`chain_id` is required to authorize any transaction on that chain. Further | ||
information on querying nodes for `chain_id` can be found in the [get_info][] section of the API documentation, and the PR [Chain ID][] that | ||
merged in those capabilities. | ||
|
||
## Syntax | ||
|
||
The Chain ID, or rather the `chain_id` as defined by AMAX, is always a | ||
64-character hexadecimal string containing the SHA256 hash of the genesis state | ||
of a given chain chain. In order to fit the CAIP-2 reference format, a 32 | ||
character prefix of the Chain ID is used; note, however, that the longer | ||
original will be needed to authorize new transactions. | ||
|
||
### Resolution Method | ||
|
||
See [Chain ID][] and [get_info] for more information about querying | ||
network nodes for [a SHA256 hash of the] genesis state, which is referred to as | ||
`chain ID` and required for authorizing transactions on said chain. | ||
|
||
## Test Cases | ||
|
||
This is a list of manually composed examples | ||
|
||
``` | ||
# AMAX Mainnet | ||
//get_info() --> chain_id=2403d6f602a87977f898aa3c62c79a760f458745904a15b3cd63a106f62adc16 | ||
amax:2403d6f602a87977f898aa3c62c79a76 | ||
|
||
# AMAX Testnet | ||
//get_info() --> chain_id=208dacab3cd2e181c86841613cf05d9c60786c677e4ce86b266d0a58884968f7 | ||
amax:208dacab3cd2e181c86841613cf05d9c | ||
|
||
``` | ||
|
||
## References | ||
|
||
- [Official website](https://amax.network) | ||
- [AMAX Documentation](https://docs.amax.network/en/latest/API/AMAX-RPC/) | ||
- [Standard Account Name][]: Canonical definition of account name constraints | ||
- [Chain ID][]: A github PR discussion detailing some key design decisions around `chain_id` | ||
- [Developer Portal](https://developers.eos.io/welcome/v2.1/welcome-to-eosio/index) | ||
|
||
[Transactions Protocol]: https://docs.amax.network/en/latest/API/AMAX-RPC/#wallet_sign_trx | ||
[get_info]: https://docs.amax.network/en/latest/API/AMAX-RPC/#get_info | ||
[Chain ID]: https://github.com/EOSIO/eos/pull/3425 | ||
[Standard Account Name]: https://developers.eos.io/welcome/v2.1/glossary/index/#standard-account-name | ||
[Account and Permissions]: https://developers.eos.io/welcome/v2.1/introduction-to-eosio/core_concepts | ||
[CAIP-2]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-2.md | ||
[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md | ||
|
||
|
||
|
||
## Rights | ||
|
||
Copyright and related rights waived via CC0. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this blockchain related to EOS in some way? See a bunch of EOS links.
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 agree with OED that this PR doesn't really explain its relationship to EOS.io well enough to be helpful to outsiders assessing AMAX support without context, which is a core design goal of a successful namespace.
It would appear that Amax shares with EOS.io an RPC interface and Rust crate for accessing them, and this comment also implies that AMAX should be considered as one network within the broader eos.io namespace despite its custom functionality. The precedent here is Polkadot, where each custom network composes its own runtime from shared or custom Rust crates, but interoperability is guaranteed by namespace-wide interfaces (i.e. XCM).
Perhaps it would make more sense to combine the two PRs ( #64 and #5 ) into an EOS.io namespace that uses AMAX examples in the
### Test Cases
sections and has AMAX-specific sections added if CAIP-2 or CAIP-10 operate differently on the AMAX network than they do in EOSIO more generally?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.
That way, if other custom networks in EOS.io want to add sections, they'll have a much smaller PR to open, and a template/comparison point in yours!
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.
AMAX is an EOS homomorphic chain, meaning most of its RPC interfaces are consistent with EOS. To add support for the AMAX network, what do we need to do? Do we need to first assist in adding the EOS namespace?
Some key points:
Please tell us next steps to add AMAX namespaces
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.
hey sorry for the delay. from what you're telling me, this sounds like amax is one network within the eos
namespace
using different configurations of the same tooling and frameworks. As such, I think it makes more sense to make an EOS.io namespace with AMAX examples (and, if it's not too much extra work, maybe also examples from main-net EOS.io, or other custom networks on the same RPC/engine). My only request would be that you add an explanation of the EOS.io concept of a "network" to the CAIP-2 entry for this namespace-- i.e., sections describing each of the following (with AMAX examples!):