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

Add proposal for tick verification in slots #6512

Merged
merged 2 commits into from
Oct 26, 2019

Conversation

carllin
Copy link
Contributor

@carllin carllin commented Oct 23, 2019

Problem

No design clarifying how errors and spam should be handled in blocktree and replay stage.

Summary of Changes

Proposal for handling various tick/slot verification failures

Fixes #

slashing proof. In this case, blocktree will also not insert `s`.


# Replaying and validating ticks
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jstarry I think these are the conditions related to your PR.

The only case where we don't mark slots as dead is when we detect extra shreds that come after the last tick or the last shred (they should be one and the same under this proposal, and are handled by the above secction Blocktree receiving shreds)

@aeyakovenko
Copy link
Member

It’s going to be hard to distinguish spam from failures. Leader can always withhold the first block.

@carllin
Copy link
Contributor Author

carllin commented Oct 23, 2019

@aeyakovenko, you mean the leader could withhold the shred containing the last tick and just fill blocktree with spam?

@aeyakovenko
Copy link
Member

@carllin yep. The only real solution is to let the next leader start because the previous block timed out, and if no one votes on it the spam gets cleaned up anyways.

@jstarry
Copy link
Member

jstarry commented Oct 24, 2019

and just fill blocktree with spam?

@carllin what spam could this be? Replay stage will mark a slot as dead if it gets too many hashes without a tick or just too many ticks

then the cluster must handle the possibility of both transmissions being live.

Thus this means we cannot mark the erronenous transmission `T` as dead because
the cluster may have reached consensus on `T`. These cases necessitate a
Copy link
Member

Choose a reason for hiding this comment

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

Reached consensus on T'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yes, thanks!


When blocktree receives a new shred `s`, there are two cases:

1) `s` is marked as `LAST_SHRED_IN_SLOT`, then check if there exists a shred
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible for the blocktree to receive two different shreds for the same index?

Copy link
Member

Choose a reason for hiding this comment

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

Seems like we should add a case for that too

Copy link
Member

Choose a reason for hiding this comment

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

Nvm I see we have a separate proposal for this case (duplicate blocks) maybe link to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ya that one's a nasty bugger. It hasn't been checked in yet, you mean link it here in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

Oh I meant link in the book to the other proposal so that all the cases are covered for how to handle a new shred. Or for now, say proposal pending?

@carllin
Copy link
Contributor Author

carllin commented Oct 24, 2019

and just fill blocktree with spam?

@carllin what spam could this be? Replay stage will mark a slot as dead if it gets too many hashes without a tick or just too many ticks

@jstarry So that's only if replay stage actually gets the entries. Recall Blocktree only feeds consecutive entries to replay stage, because we must play entries in order. However, if there's a gap in blocktree, the everything after that gap can grow unchecked. For instance, if blocktree gets entries with index

  1. 0, 1
  2. skips 2
  3. 2..10000000000

Replay stage will only see and verify 0 and 1.

Copy link
Member

@jstarry jstarry left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for writing this up!

@carllin carllin merged commit 08238e8 into solana-labs:master Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants