You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
In our situation, we submit a chain address(Substrate type) to runtime, and verify whether this address is valid.
But in Substrate, to verify the chain address should parse from ss58 and check the ss58version.
ss58 decode could be implemented in runtime, but check ss58version need blake2_512 hash.
and in sp-io, substrate provide:
[runtime_interface]pubtraitHashing{/// Conduct a 256-bit Keccak hash.fnkeccak_256(data:&[u8]) -> [u8;32]{
sp_core::hashing::keccak_256(data)}/// Conduct a 256-bit Sha2 hash.fnsha2_256(data:&[u8]) -> [u8;32]{
sp_core::hashing::sha2_256(data)}/// Conduct a 128-bit Blake2 hash.fnblake2_128(data:&[u8]) -> [u8;16]{
sp_core::hashing::blake2_128(data)}/// Conduct a 256-bit Blake2 hash.fnblake2_256(data:&[u8]) -> [u8;32]{
sp_core::hashing::blake2_256(data)}//...}
but not provide blake2_512.
If I provide blake2_512 or from_ss58check_with_version from my local runtime_interface, currently parachain could not support custom runtime_interface definition.
So substrate could provide balke2_512 in runtime for generic requirements?
or could provide AccountId32::from_ss58check_with_version for the situation which some one need to verify Substrate Address in runtime?
In our situation, we submit a chain address(Substrate type) to runtime, and verify whether this address is valid.
But in Substrate, to verify the chain address should parse from ss58 and check the ss58version.
ss58 decode could be implemented in runtime, but check ss58version need
blake2_512hash.and in
sp-io, substrate provide:but not provide blake2_512.
If I provide blake2_512 or
from_ss58check_with_versionfrom my local runtime_interface, currently parachain could not support custom runtime_interface definition.So substrate could provide
balke2_512in runtime for generic requirements?or could provide
AccountId32::from_ss58check_with_versionfor the situation which some one need to verify Substrate Address in runtime?