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

Blocks carry full attestations for candidates #42

Merged
merged 12 commits into from
Nov 26, 2018
Merged

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented Nov 24, 2018

Based on #36
Closes #39

Previously, candidates were included raw in the InherentData and didn't carry with them the attestation data from validators. This is because before, in the instant finality consensus rules, validators would refuse to vote unless they had seen all candidates as fully-attested.

Now that we are moving to non-instant finality with Aura/GRANDPA consensus, we have two options:

  1. Provide attestations with the parachain candidates and verify them inside the runtime
  2. Add a custom GRANDPA voting rule so we don't vote for chains where we haven't seen all candidates in them as fully-attested.

2 was significantly harder to implement. 1 may end up being expensive for now with lots of validators, since we have to check all the validity and availability statement signatures for each validator, but with BLS Signature Aggregation (#41) this will become O(n) to the number of parachains.

I needed a bit-vec implementation in the runtime to track which authorities had already voted, so I opened ferrilab/bitvec#3 to make one of the crates on crates.io compile for no-std.

@rphmeier rphmeier added the A3-in_progress Pull request is in progress. No review needed at this stage. label Nov 24, 2018
@rphmeier rphmeier added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Nov 25, 2018
Copy link
Contributor

@gnunicorn gnunicorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things.

runtime/src/parachains.rs Outdated Show resolved Hide resolved
statement-table/src/generic.rs Show resolved Hide resolved
Co-Authored-By: rphmeier <rphmeier@gmail.com>
@rphmeier rphmeier added A8-looksgood and removed A0-please_review Pull request needs code review. labels Nov 26, 2018
@rphmeier rphmeier merged commit 4b0c496 into master Nov 26, 2018
@rphmeier rphmeier deleted the rh-full-attestations branch November 26, 2018 16:30
@ilhanu ilhanu mentioned this pull request Jul 4, 2020
tomusdrw pushed a commit that referenced this pull request Mar 26, 2021
tomusdrw pushed a commit that referenced this pull request Mar 26, 2021
* patch audit findings #42

* extend msg signature for substrate relay

* signature verification test

* make proof dependet on call_dispatch crate

* silence clippy

* revert deny exception

* address code review

* since it's not really a proof, call it digest
imstar15 pushed a commit to imstar15/polkadot that referenced this pull request Aug 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants