Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

authority-discovery: Keep the validator ID <-> PeerId mapping of past sessions #6910

Closed
Tracked by #989
tomaka opened this issue Aug 18, 2020 · 5 comments
Closed
Tracked by #989

Comments

@tomaka
Copy link
Contributor

tomaka commented Aug 18, 2020

In addition to the mapping of the current and next session, the authority discovery needs to be able to provide the PeerId/Multiaddr of validator IDs of past sessions, in order for disputes to work.

It is unclear how many sessions in the past we want to keep.

@mxinden
Copy link
Contributor

mxinden commented Aug 20, 2020

More details in paritytech/polkadot#1461 (comment).

@rphmeier
Copy link
Contributor

Can we implement this entire on the runtime API level (as @mxinden suggested elsewhere) just by returning the AuthorityIds of N past sessions from a particular runtime?

The only thing that we'd need to be sure of is that the authority-discovery service needs to publish a DHT record for every key in that list as opposed to only the first. However, that may already be the implemented behavior.

@mxinden
Copy link
Contributor

mxinden commented Aug 20, 2020

Can we implement this entire on the runtime API level (as @mxinden suggested elsewhere) just by returning the AuthorityIds of N past sessions from a particular runtime?

Yes. Correct. This is done for the current and next authorities in #6788.

The only thing that we'd need to be sure of is that the authority-discovery service needs to publish a DHT record for every key in that list as opposed to only the first. However, that may already be the implemented behavior.

The authority discovery module publishes a record for each key in the key store. This has not been tested yet though.

@mxinden
Copy link
Contributor

mxinden commented Aug 24, 2020

An implementation of this ticket should ensure that either (a) the resources required for a lookup of all authorities is negligible or (b) the lookup of all authorities is spread out over time, only requiring a negligible amount of resources at a given moment.

(Related discussion: #6788 (comment))

@bkchr
Copy link
Member

bkchr commented Nov 17, 2022

This was done by just returning the all relevant authorities from the runtime.

@bkchr bkchr closed this as completed Nov 17, 2022
Repository owner moved this from Backlog 🗒 to Done ✅ in SDK Node Nov 17, 2022
Repository owner moved this from Backlog 🗒 to Blocked ⛔️ in Networking Nov 17, 2022
@altonen altonen moved this from Blocked ⛔️ to Done ✅ in Networking Dec 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Status: done
Development

Successfully merging a pull request may close this issue.

4 participants