From 9c0190ffea169151e9f4ef04004ffea5a7f89440 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 30 Nov 2020 09:35:49 -0600 Subject: [PATCH 1/8] Added the implementation of CAIP-2 for EOSIO blockchains --- CAIPs/caip-7.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 CAIPs/caip-7.md diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md new file mode 100644 index 00000000..6f1fed9e --- /dev/null +++ b/CAIPs/caip-7.md @@ -0,0 +1,70 @@ +--- +caip: 7 +title: Blockchain Reference for the EOSIO Namespace +author: Sebastian Montero (@sebastianmontero) +discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/5, https://github.com/ChainAgnostic/CAIPs/issues/6, https://github.com/ChainAgnostic/CAIPs/pull/1 +status: Draft +type: Standard +created: 2020-11-30 +updated: 2020-11-30 +requires: 2 +--- + +## Simple Summary + +This document is about the details of the EOSIO namespaces and references for CAIP-2. + +## Abstract + +In CAIP-2 a general blockchain identification scheme is defined. This is the +implementation of CAIP-2 for EOSIO. + +## Motivation + +See CAIP-2. + +## Specification + +### EOSIO Namespace + +The namespace "EOSIO" refers to the EOSIO open-source blockchain platform. + +#### Reference Definition + +The definition is delegated to [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). +The Chain ID is the SHA256 hash of the genesis state of the chain, and its represented as hexadecimal number of 64 digits + +## Rationale + +Blockchains in the "eosio" namespace are identified by their Chain ID as mentioned in the Reference Definition Section. + +## Backwards Compatibility + +Not applicable + +## Test Cases + +This is a list of manually composed examples + +``` +# EOS Mainnet +eosio:aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906 + +# Jungle Testnet +eosio:e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473 + +# Telos Mainnet +eosio:4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11 + +# Telos Testnet +eosio:1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f +``` + +## Links + +- [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) +- [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425) + +## Copyright + +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From 69612835313170b0043b4e8c97ab6c9e4ec568eb Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 30 Nov 2020 09:43:13 -0600 Subject: [PATCH 2/8] Added discussion issue to the eosio CAIP-2 implementation --- CAIPs/caip-7.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md index 6f1fed9e..e8d49185 100644 --- a/CAIPs/caip-7.md +++ b/CAIPs/caip-7.md @@ -2,7 +2,7 @@ caip: 7 title: Blockchain Reference for the EOSIO Namespace author: Sebastian Montero (@sebastianmontero) -discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/5, https://github.com/ChainAgnostic/CAIPs/issues/6, https://github.com/ChainAgnostic/CAIPs/pull/1 +discussions-to: https://github.com/ChainAgnostic/CAIPs/issues/32 status: Draft type: Standard created: 2020-11-30 @@ -31,7 +31,7 @@ The namespace "EOSIO" refers to the EOSIO open-source blockchain platform. #### Reference Definition -The definition is delegated to [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). +The definition is delegated to the [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). The Chain ID is the SHA256 hash of the genesis state of the chain, and its represented as hexadecimal number of 64 digits ## Rationale From 951fe8f2451320237f9cea42863a37ce1e970ef3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 30 Nov 2020 18:23:20 -0600 Subject: [PATCH 3/8] Added reference where the Chain ID is better explained to the CAIP-2 EOSIO implementation --- CAIPs/caip-7.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md index e8d49185..89b6f23b 100644 --- a/CAIPs/caip-7.md +++ b/CAIPs/caip-7.md @@ -31,7 +31,7 @@ The namespace "EOSIO" refers to the EOSIO open-source blockchain platform. #### Reference Definition -The definition is delegated to the [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). +The definition is delegated to the [EOSIO Transactions Protocol Documentation](https://developers.eos.io/welcome/v2.0/protocol/transactions_protocol/#32-sign-transaction), the [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). The Chain ID is the SHA256 hash of the genesis state of the chain, and its represented as hexadecimal number of 64 digits ## Rationale @@ -64,6 +64,7 @@ eosio:1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f - [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) - [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425) +- [EOSIO Transactions Protocol Documentation](https://developers.eos.io/welcome/v2.0/protocol/transactions_protocol/#32-sign-transaction) ## Copyright From 89c153711e72837fcd1c237f5479a69167359811 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 2 Dec 2020 08:43:51 -0600 Subject: [PATCH 4/8] Added EOSIO CAIP reference to README file --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9c51aa1a..c551828b 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ If your CAIP requires images, the image files should be included in a subdirecto * **CAIP-4** - [Blockchain Reference for the BIP122 Namespace](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-4.md) * **CAIP-5** - [Blockchain Reference for the Cosmos Namespace](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-5.md) * **CAIP-6** - [Blockchain Reference for the LIP9 Namespace](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-6.md) +* **CAIP-7** - [Blockchain Reference for the EOSIO Namespace](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-7.md) * **CAIP-10** - [Account ID Specification](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md) * **CAIP-13** - [Blockchain Reference for the Polkadot Namespace](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-13.md) * **CAIP-19** - [Asset Type and Asset ID Specification](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-19.md) From d97e0832aa76a2566fba28cccbfc2e3723c4fb5a Mon Sep 17 00:00:00 2001 From: sebastianmontero Date: Thu, 3 Dec 2020 16:25:45 -0600 Subject: [PATCH 5/8] Update CAIPs/caip-7.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- CAIPs/caip-7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md index 89b6f23b..3e5e3d51 100644 --- a/CAIPs/caip-7.md +++ b/CAIPs/caip-7.md @@ -27,7 +27,7 @@ See CAIP-2. ### EOSIO Namespace -The namespace "EOSIO" refers to the EOSIO open-source blockchain platform. +The namespace "eosio" refers to the EOSIO open-source blockchain platform. #### Reference Definition From 7e72c0aedd43b49046456073e727eeaeacc3719c Mon Sep 17 00:00:00 2001 From: sebastianmontero Date: Thu, 3 Dec 2020 16:42:24 -0600 Subject: [PATCH 6/8] Update CAIPs/caip-7.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- CAIPs/caip-7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md index 3e5e3d51..6faa5cf4 100644 --- a/CAIPs/caip-7.md +++ b/CAIPs/caip-7.md @@ -32,7 +32,7 @@ The namespace "eosio" refers to the EOSIO open-source blockchain platform. #### Reference Definition The definition is delegated to the [EOSIO Transactions Protocol Documentation](https://developers.eos.io/welcome/v2.0/protocol/transactions_protocol/#32-sign-transaction), the [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). -The Chain ID is the SHA256 hash of the genesis state of the chain, and its represented as hexadecimal number of 64 digits +The Chain ID is the SHA256 hash of the genesis state of the chain, represented as lower case hexadecimal number of 64 digits. ## Rationale From 34969bb826f8bf7e3aa22fa913041d3392c21e3c Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 4 Dec 2020 08:59:18 -0600 Subject: [PATCH 7/8] Updated the reference definition for the CAIP-2 EOSIO implementation to use a prefix of the chain ID --- CAIPs/caip-7.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md index 6faa5cf4..08dd0651 100644 --- a/CAIPs/caip-7.md +++ b/CAIPs/caip-7.md @@ -32,7 +32,7 @@ The namespace "eosio" refers to the EOSIO open-source blockchain platform. #### Reference Definition The definition is delegated to the [EOSIO Transactions Protocol Documentation](https://developers.eos.io/welcome/v2.0/protocol/transactions_protocol/#32-sign-transaction), the [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). -The Chain ID is the SHA256 hash of the genesis state of the chain, represented as lower case hexadecimal number of 64 digits. +The Chain ID, as defined by EOSIO, is the SHA256 hash of the genesis state of the chain, represented as lower case hexadecimal number of 64 digits. In order to fit the reference restrictions, the format is a 32 character prefix of the Chain ID. ## Rationale @@ -48,16 +48,16 @@ This is a list of manually composed examples ``` # EOS Mainnet -eosio:aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906 +eosio:aca376f206b8fc25a6ed44dbdc66547c # Jungle Testnet -eosio:e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473 +eosio:e70aaab8997e1dfce58fbfac80cbbb8f # Telos Mainnet -eosio:4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11 +eosio:4667b205c6838ef70ff7988f6e8257e8 # Telos Testnet -eosio:1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f +eosio:1eaa0824707c8c16bd25145493bf062a ``` ## Links From 22263330d19b92b0ce3e0ccaadae2a4f41e084f8 Mon Sep 17 00:00:00 2001 From: sebastianmontero Date: Fri, 4 Dec 2020 09:17:04 -0600 Subject: [PATCH 8/8] Update CAIPs/caip-7.md Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com> --- CAIPs/caip-7.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CAIPs/caip-7.md b/CAIPs/caip-7.md index 08dd0651..ee43bb31 100644 --- a/CAIPs/caip-7.md +++ b/CAIPs/caip-7.md @@ -32,7 +32,7 @@ The namespace "eosio" refers to the EOSIO open-source blockchain platform. #### Reference Definition The definition is delegated to the [EOSIO Transactions Protocol Documentation](https://developers.eos.io/welcome/v2.0/protocol/transactions_protocol/#32-sign-transaction), the [Chain API Plugin Documentation of the EOSIO Developers Manual](https://developers.eos.io/manuals/eos/latest/nodeos/plugins/chain_api_plugin/api-reference/index?query=chain%20id&page=1#operation/get_info) and the pull request that implemented its generation [Chain ID generation implementation pull request](https://github.com/EOSIO/eos/pull/3425). -The Chain ID, as defined by EOSIO, is the SHA256 hash of the genesis state of the chain, represented as lower case hexadecimal number of 64 digits. In order to fit the reference restrictions, the format is a 32 character prefix of the Chain ID. +The Chain ID, as defined by EOSIO, is the SHA256 hash of the genesis state of the chain, represented as lower case hexadecimal number of 64 digits. In order to fit the CAIP-2 reference format, a 32 character prefix of the Chain ID is used. ## Rationale