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

Light-client Authority Set Handoffs #269

Closed
gavofyork opened this issue Jul 1, 2018 · 7 comments · Fixed by #1669
Closed

Light-client Authority Set Handoffs #269

gavofyork opened this issue Jul 1, 2018 · 7 comments · Fixed by #1669
Assignees
Labels
J0-enhancement An additional feature request.
Milestone

Comments

@gavofyork
Copy link
Member

No description provided.

@gavofyork gavofyork added this to the PoC-3 milestone Jul 1, 2018
@rphmeier
Copy link
Contributor

rphmeier commented Jul 5, 2018

This is desired for light-client-friendly tracking of authority set changes.

When the authority set changes from A to A' at a block B, The header of B will contain an NewAuthorities(A') event in the digest.

When an authority imports such a block and believes the change to be the result of a valid block execution, he generates a signature on a HandoffAttestation(Hash(B), NewAuthorities(A')) message and circulates it to other authorities. Upon witnessing such signatures from a majority of authorities, he accumulates them into a full Justification(B, NewAuthorities(A')) message.

When a full or light node imports a block with this kind of digest event, it waits to fetch a justification for the change before continuing to sync on top of that chain. Full nodes will save the justification permanently in the database.

Optimization: automatically provide the justification with any relevant blocks.

This can also be used for a fast warp sync with the caveat that it is vulnerable to long range attacks.

@gavofyork
Copy link
Member Author

Might be a good one for @svyatonik ?

@gavofyork
Copy link
Member Author

Done in #687

@svyatonik
Copy link
Contributor

Not actually - we only have a DigestItem trait now - everything else is not ready yet.

@svyatonik
Copy link
Contributor

svyatonik commented Sep 12, 2018

Current state:
#687 : DigestItem::AuthoritiesChange
#726 : DigestItem::AuthoritiesChange is emitted when authorities set changes
1d0f52f : (probably we don't need this at all) 'pausable' synchronization

TODO : generate && broadcast justification by authorities. Since (as @rphmeier said) this is required for non-instant finality, I'll put this away for now

@svyatonik svyatonik reopened this Sep 12, 2018
@svyatonik svyatonik removed their assignment Sep 12, 2018
@gavofyork
Copy link
Member Author

@rphmeier @svyatonik is there still anything to do here for a functional & secure MVP of AfG/GRANDPA/SHAFT?

@gavofyork gavofyork modified the milestones: 1.0 beta, 1.0 (final) Sep 25, 2018
@rphmeier rphmeier changed the title Digest should reflect authority set changes Light-client Authority Set Handoffs Nov 26, 2018
@rphmeier
Copy link
Contributor

rphmeier commented Nov 26, 2018

I'm not convinced we can get a light-client running for beta but perhaps for 1.0.

@svyatonik The last thing we need is a handoff-proof generating protocol. And a way to sync the handoff-proofs. The hard part (similar to #1069) is having a heuristic for syncing clients to decide if the handoff-proof has been produced already and we need to request it from a peer or if the proof has not been generated and we should be watching for it).

@gavofyork gavofyork removed the F5-task label Dec 18, 2018
@gavofyork gavofyork added I2-security The client fails to follow expected, security-sensitive, behaviour. J0-enhancement An additional feature request. and removed I2-security The client fails to follow expected, security-sensitive, behaviour. labels Dec 18, 2018
lamafab pushed a commit to lamafab/substrate that referenced this issue Jun 16, 2020
* new image, show rust version

* show rust version, fix metadata
liuchengxu added a commit to chainx-org/substrate that referenced this issue Aug 23, 2021
* Update extrinsic to the latest

* Update tests accordingly

* Update wasm
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants