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

Accountable Safety Protocol #10

Open
rphmeier opened this issue Sep 10, 2018 · 2 comments
Open

Accountable Safety Protocol #10

rphmeier opened this issue Sep 10, 2018 · 2 comments
Labels
Milestone

Comments

@rphmeier
Copy link
Contributor

  • Hook for dealing with safety violations.
  • Issue and respond to challenges

Responding implies that we are able to return sets of votes such that we have some observable property. That probably means storing messages on disk in the order that we received them, and marking the points at which we voted. We will have to mark on the current and prior rounds, because one kind of query requires justification of the prior round's estimate at the point of voting.

@rphmeier rphmeier added this to the v0.6 milestone Dec 11, 2018
@rphmeier
Copy link
Contributor Author

For now let's focus on the "answering queries" portion.

There are roughly two kinds of queries to answer (more details in paper).

  1. What are all the prevotes you've seen for round r?

This is easy to answer as long as we keep all votes for that round.

  1. Why was the estimate for round R !> B when you prevoted/precommited?

For this, we will want a way to mark which votes we had seen at the time when we prevoted and which we had seen at the time when we precommitted. To answer this query, we would simply query the DB and get the relevant set, and return it to it.

This implies that for each round r, a reasonable schema would be to store something like a

struct HistoricalVotes {
    seen: Vec<Message>, // in order received
    prevote_idx: Option<usize>, // the length of `seen` at the time we prevoted, if we have.
    precommit_idx: Option<usize>, // the length of `seen` at the time we precommitted, if we have.
}

@AlfonsoCev
Copy link

For this, we will want a way to mark which votes we had seen at the time when we prevoted and which we had seen at the time when we precommitted.

This is not necessary. The answer to a challenge should be a set S of votes of the same type (all pre-votes or all pre-commits) and of the same round (for some round previous to the one referenced in the challenge) and with the property that "it is impossible for S to have a supermajority for B". But this property is preserved when we add new votes to S (see Lemma 2.2 (ii) in the Grandpa paper). So, if you saw such a set of votes at any point in the past, and you added some votes to that set since then, then the resulting set still has this property.

Hence we just need to store all votes seen, for the last K rounds, for some large enough parameter K.

@marcio-diaz marcio-diaz removed their assignment Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants