Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Detect vote hash mismatch even at run-sanity.sh#12690

Closed
ryoqun wants to merge 6 commits intosolana-labs:masterfrom
ryoqun:run-sanity-vote-hash-mismatch
Closed

Detect vote hash mismatch even at run-sanity.sh#12690
ryoqun wants to merge 6 commits intosolana-labs:masterfrom
ryoqun:run-sanity-vote-hash-mismatch

Conversation

@ryoqun
Copy link
Copy Markdown
Contributor

@ryoqun ryoqun commented Oct 6, 2020

Problem

#12670 (comment)

Summary of Changes

note that this test expected to fail.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 6, 2020

Codecov Report

Merging #12690 (21d3059) into master (5d72e52) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #12690   +/-   ##
=======================================
  Coverage    82.0%    82.1%           
=======================================
  Files         378      378           
  Lines       90905    90905           
=======================================
+ Hits        74632    74637    +5     
+ Misses      16273    16268    -5     

@sakridge
Copy link
Copy Markdown
Contributor

sakridge commented Oct 6, 2020

Would it better to have a flag to panic on this case?

@mvines
Copy link
Copy Markdown
Contributor

mvines commented Oct 6, 2020

Would it better to have a flag to panic on this case?

Flag would be cool. Plumbing that flag from solana-validator into the vote state seems really gnarly though, I don't know how we'd do that nicely

@sakridge
Copy link
Copy Markdown
Contributor

sakridge commented Oct 6, 2020

Would it better to have a flag to panic on this case?

Flag would be cool. Plumbing that flag from solana-validator into the vote state seems really gnarly though, I don't know how we'd do that nicely

That's true. Plumbing would be a pain. Also security reviews don't like these kinds of flags to turn off checks.

On the other hand, these kind of log checks are kind of brittle and have a habit of being disabled without anyone noticing. Also seems like more of a pain to enable in more test situations. Generally we would always want to panic in this situation unless it's a specifically malicious test case to insert duplicate conflicting blocks into the system.

@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Oct 7, 2020

Would it better to have a flag to panic on this case?

Flag would be cool. Plumbing that flag from solana-validator into the vote state seems really gnarly though, I don't know how we'd do that nicely

That's true. Plumbing would be a pain. Also security reviews don't like these kinds of flags to turn off checks.

On the other hand, these kind of log checks are kind of brittle and have a habit of being disabled without anyone noticing. Also seems like more of a pain to enable in more test situations. Generally we would always want to panic in this situation unless it's a specifically malicious test case to insert duplicate conflicting blocks into the system.

Yeah, I don't like the current state of this. After some thought, I think I'll just add a validator kill-switch if the validator's voted slot hash is mismatched to the supermajority rest of cluster.

To begin with, as bank hashes are chained, there is no point to continue running validator once mismatched is started.

This will be like combination of #11927 and #11727, which is done at the snapshot interval.

Also, this will make #12697 like this more visible when testing/benchmarking.

@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Oct 7, 2020

@mvines @sakridge (no rush) please take a look at the more proper solution for this in my previous comment.

@stale
Copy link
Copy Markdown

stale Bot commented Oct 16, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale Bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Oct 16, 2020
@ryoqun ryoqun removed the stale [bot only] Added to stale content; results in auto-close after a week. label Oct 22, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Oct 31, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale Bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Oct 31, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Nov 7, 2020

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale Bot closed this Nov 7, 2020
@sakridge sakridge reopened this Nov 10, 2020
@stale stale Bot removed the stale [bot only] Added to stale content; results in auto-close after a week. label Nov 10, 2020
@sakridge
Copy link
Copy Markdown
Contributor

@ryoqun is there something wrong with this? Can we prioritize enabling this checking?

@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Nov 10, 2020

@sakridge There is nothing wrong with this. it's just that I couldn't get my hands on it. Currently, I'm focusing on various inflation and staking bugs. I talked about this a bit with @carllin, we can implement this with VoteTracker.

@sakridge
Copy link
Copy Markdown
Contributor

@sakridge There is nothing wrong with this. it's just that I couldn't get my hands on it. Currently, I'm focusing on various inflation and staking bugs. I talked about this a bit with @carllin, we can implement this with VoteTracker.

Is the builtins part of this change needed for the vote hash mismatch?

@ryoqun ryoqun force-pushed the run-sanity-vote-hash-mismatch branch from 0e6359b to 21d3059 Compare November 15, 2020 04:36
@ryoqun
Copy link
Copy Markdown
Contributor Author

ryoqun commented Nov 15, 2020

@sakridge There is nothing wrong with this. it's just that I couldn't get my hands on it. Currently, I'm focusing on various inflation and staking bugs. I talked about this a bit with @carllin, we can implement this with VoteTracker.

Is the builtins part of this change needed for the vote hash mismatch?

@sakridge oops, sorry. these was rebase leftover; fixed.

@stale
Copy link
Copy Markdown

stale Bot commented Nov 22, 2020

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale Bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Nov 22, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Nov 29, 2020

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale Bot closed this Nov 29, 2020
@ryoqun ryoqun reopened this Nov 30, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Dec 8, 2020

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale Bot closed this Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

stale [bot only] Added to stale content; results in auto-close after a week.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants