Closed bkontur closed 1 month ago
check @kianenigma's comment here: https://github.com/paritytech/polkadot-sdk/pull/5327#discussion_r1758961989
Keyring::iter()
would give the same, but I donno why no one uses it 🤷
I will work on this
tagging @iulianbarbu , as I know he is working on similar matter.
thanks for the tag! I am happy to leave it to @programskillforverification. Leaving here the direction I got based on the comms on this subject lately and my own investigation.
There is a mention of adding sp_keyring
as a frame
dependency as noted here: https://github.com/paritytech/polkadot-sdk/pull/4739#discussion_r1758825837. My understanding is that the overall suggestion is to re-export sp_keyring::Keyring
from frame
and use Keyring::iter()
instead of the widely used get_account_id_from_seed
and friends. The re-export wouldn't be usable without importing frame
everywhere we have the duplicated business logic (all places that implement/import get_account_id_from_seed/get_from_seed
at least). These places have dependencies on sp-core
and sp-runtime
on their own, so we might very well remove them and use frame::deps::sp_core/sp_runtime
instead where needed (hopefully feature flags will not cause issues here).
thanks for the tag! I am happy to leave it to @programskillforverification. Leaving here the direction I got based on the comms on this subject lately and my own investigation.
There is a mention of adding
sp_keyring
as aframe
dependency as noted here: #4739 (comment). My understanding is that the overall suggestion is to re-exportsp_keyring::Keyring
fromframe
and useKeyring::iter()
instead of the widely usedget_account_id_from_seed
and friends. The re-export wouldn't be usable without importingframe
everywhere we have the duplicated business logic (all places that implement/importget_account_id_from_seed/get_from_seed
at least). These places have dependencies onsp-core
andsp-runtime
on their own, so we might very well remove them and useframe::deps::sp_core/sp_runtime
instead where needed (hopefully feature flags will not cause issues here).
Thanks @iulianbarbu , your investigation help me too much I try to remove all get_account_id_from_seed/get_from_seed
thanks for the tag! I am happy to leave it to @programskillforverification. Leaving here the direction I got based on the comms on this subject lately and my own investigation. There is a mention of adding
sp_keyring
as aframe
dependency as noted here: #4739 (comment). My understanding is that the overall suggestion is to re-exportsp_keyring::Keyring
fromframe
and useKeyring::iter()
instead of the widely usedget_account_id_from_seed
and friends. The re-export wouldn't be usable without importingframe
everywhere we have the duplicated business logic (all places that implement/importget_account_id_from_seed/get_from_seed
at least). These places have dependencies onsp-core
andsp-runtime
on their own, so we might very well remove them and useframe::deps::sp_core/sp_runtime
instead where needed (hopefully feature flags will not cause issues here).Thanks @iulianbarbu , your investigation help me too much I try to remove all get_account_id_from_seed/get_from_seed
hey @programskillforverification ! Glad it helps! At this point I am not 100% that the direction is valid (e.g. using frame as a dependency might be too much given its size, even involving features), but we can try it out (or anything else that you conclude based on your research), and keep discussing on the PR. I saw you opened a draft PR which is great, and you can tag people involved in this issue to ask them questions or add as reviewers.
hey @programskillforverification ! I glanced over your draft #5804 and looks like you're on the right track. I saw there are still a few get_account_id_from_seed
occurrences, so I imagine you want to replace those too, but once you feel it is almost good enough for a review, please let us know (add us as reviewers) and we'll take it from there.
hey @programskillforverification ! I glanced over your draft #5804 and looks like you're on the right track. I saw there are still a few
get_account_id_from_seed
occurrences, so I imagine you want to replace those too, but once you feel it is almost good enough for a review, please let us know (add us as reviewers) and we'll take it from there.
hey @iulianbarbu how can I add you as reviewers? I can't find gear icon in reviews section. Maybe I don't have the permission.
hey @programskillforverification ! I glanced over your draft #5804 and looks like you're on the right track. I saw there are still a few
get_account_id_from_seed
occurrences, so I imagine you want to replace those too, but once you feel it is almost good enough for a review, please let us know (add us as reviewers) and we'll take it from there.hey @iulianbarbu how can I add you as reviewers? I can't find gear icon in reviews section. Maybe I don't have the permission.
You can choose people from the Reviewers
section on the right side of the picture below (I added myself so no need to do it for now):
.
LE: Not sure why you can't see the gear on the Reviewers
section. I'll make sure we get sufficient eyes on the PR when reviewing it. BTW, if you feel you're good with the changes for now and want us to look over them you should make the PR as ready to review.
These functions are copied all over the place.