I am writing a custom gRPC
server(not in runtime) and i want to retrieve the public keys of the validators to verify messages signed by them, but i need their public key addresses, how to do that in substrate?
-
What public key do you want? GRANDPA? BABE? Stash?– aurexav ♦Commented Nov 13, 2022 at 11:56
-
@AurevoirXavier aura !– dadzerlazeCommented Nov 13, 2022 at 12:09
Add a comment
|
1 Answer
I think you have the session pallet in your runtime.
PolkadotApps -> chain state -> session -> queuedKeys
If you want to do this in code.
Query the twox128(b"Session") + twox128(b"QueuedKeys")
.
-
-
-
what do you mean by Sublfred and storage key, ps: i can use subxt Commented Nov 13, 2022 at 14:48
-
1. Use it to calculate the storage key 2. Pass the storage key to rpc endpint
state_getStorage
3. Get the result– aurexav ♦Commented Nov 13, 2022 at 14:55 -
docs.substrate.io/fundamentals/state-transitions-and-storage– aurexav ♦Commented Nov 14, 2022 at 7:04