Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool request: validator keys tracking #98

Open
Tracked by #283
ordian opened this issue Aug 30, 2022 · 7 comments
Open
Tracked by #283

Tool request: validator keys tracking #98

ordian opened this issue Aug 30, 2022 · 7 comments
Assignees

Comments

@ordian
Copy link
Member

ordian commented Aug 30, 2022

This is something I planned on implementing myself, but I think it'd be a good fit for polkadot-introspector collection of tools.

The idea is to have a way to quickly find all information we have on-chain and off-chain about validator by providing some input. That input could be (session_index, validator_index) or AccountId or even PeerId.

The information we store could be:

  • AccountId as a unique identification of a validator (session_info->account_keys might be useful)
  • ss58 format of accountid based on the network
  • session keys for the past N sessions
  • information about when they were paravalidators in the past N sessions
  • PeerIds
  • IP addresses
  • ISP and geolocation based on IP
@vstakhov vstakhov self-assigned this Sep 2, 2022
@vstakhov
Copy link
Contributor

vstakhov commented Sep 2, 2022

The only thing that is not so clear to me is how to find an IP address based on AccountID. Do you have any glue about it?

@ordian
Copy link
Member Author

ordian commented Sep 2, 2022

You can use discovery_keys from SessionInfo (same ValidatorIndex as in AccountKeys) and authority discovery service to map AuthorityDiscoveryId -> Vec<Multiaddr> by using get_addresses_by_authority_id.
And then extract PeerId and IP from that.

Note, that it takes some time for authority discovery worker to populate its cache from DHT.

@ordian
Copy link
Member Author

ordian commented Sep 2, 2022

The hardest part is probably figuring out how to instantiate authority discovery service w/o bringing most of the substrate dependencies.

@vstakhov
Copy link
Contributor

vstakhov commented Sep 2, 2022

What about moving this tracking logic to the node then? It already has this discovery information, so it might probably store it and provide access via some utility pallet call.

@sandreim
Copy link
Collaborator

sandreim commented Sep 2, 2022

We could use the imonline pallet, but afaiu this is not really reliable

@sandreim
Copy link
Collaborator

sandreim commented Sep 2, 2022

Second option is to use the telemetry websocket feed if the telemetry backend has the —expose-node-ips flag

@ordian
Copy link
Member Author

ordian commented Sep 2, 2022

provide access via some utility pallet call

This multiaddr data is offchain and arguably should remain offchain. Maybe we could introduce an RPC call for it, but I think it shouldn't be too hard to implement with authority discovery worker either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

4 participants