Closed pedrouid closed 4 years ago
There is an issue however with using the genesis-hash
as is to be compatible with CAIP-2 since the reference should not be longer than 47 characters.
# Kusama
polkadot:b0a8d493285c2df73290dfb7e61f870f17b41801197a149ca93654499ea3dafe
# Edgeware
polkadot:742a2ca70c2fda6cee4f8df98d64c4c670a052d9568058982dad9d5a7a135c5b
# Kulupu
polkadot:37e1f8125397a98630013a4dff89b54cb758ff8eed894419e65a6dcf27a6fb8a
In that case I would suggest that we truncate it to 47 characters or we would use the first 32 characters from the resulting hash.
I would love your feedback. cc @webmaster128 @ligi
@pedrouid this sounds like a good approach from our side!
Although polkadot:hash
may not be as generic as substrate:hash
. There may be many future substrate chains not related to Polkadot, but could enter your ecosystem for free because they all follow the same standards.
I like the more generic substrate:
idea - could help in the future.
Otherwise LGTM
would actually argue counter to that - substrate
is exclusive to alternative Polkadot Hosts (Gossamer, Kagome) or parachain development kits (none exist yet afaik but 🤷♂️) which would connect to the same networks but might not use Substrate at any stage.
polkadot
is the name of the chain, but also the name of the network.
Yeah this is similar to cosmos
namespace where we argued about using tendermint
instead but you can be part of the cosmos
network and not use tendermint
so I would keep it as polkadot
Actually I just realized that CAIP-4 uses the first 32 characters of the genesis hash, I will update to match it
I've updated the PR #14... please give it another look @joshua-mir @shawntabrizi @ligi before merging
Merged #14
I think it could be nice to add the hash of Polkadot Mainnet to the list. Just for reference and to help others implementing the CAIP standards.
# Polkadot mainnet
polkadot:91b171bb158e2d3848fa23a9f1c25182
how do i find caip-13 id for rococo testnet?
As pointed out from this PR https://github.com/ceramicnetwork/specs/pull/12, there is no standard way currently to reference polkadot chains so I thought it would be best to start a discussion for a new CAIP to tackle this.
From the suggestion of @joshua-mir and @shawntabrizi on the PR mentioned above, the best way to reference Polkadot chains would be to use the genesis-hash similar to how Bitcoin namespace uses BIP122 as a reference for chainId.
I will start a draft for this proposal using CAIP-4 as a template.