This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Filter out stake and vote accounts with incorrect owners#14062
Merged
CriesofCarrots merged 5 commits intosolana-labs:masterfrom Dec 11, 2020
Merged
Filter out stake and vote accounts with incorrect owners#14062CriesofCarrots merged 5 commits intosolana-labs:masterfrom
CriesofCarrots merged 5 commits intosolana-labs:masterfrom
Conversation
8668283 to
e6f3f3f
Compare
CriesofCarrots
commented
Dec 11, 2020
ryoqun
reviewed
Dec 11, 2020
ryoqun
reviewed
Dec 11, 2020
Codecov Report
@@ Coverage Diff @@
## master #14062 +/- ##
========================================
Coverage 82.1% 82.1%
========================================
Files 381 381
Lines 94076 94211 +135
========================================
+ Hits 77291 77407 +116
- Misses 16785 16804 +19 |
ryoqun
reviewed
Dec 11, 2020
Contributor
|
@CriesofCarrots btw, did you tested this manually?: Well, I have a secret sauce of easily creating fake account via the wracked $ ./target/release/solana --url http://localhost:8899 account -o vote.data <foo bar pubkey json>
$ hexedit
$ ./target/release/solana.bad-deploy deploy --url http://localhost:8899/ vote.data <foo bar pubkey json>this is not strict requirement, though. :) |
ryoqun
previously approved these changes
Dec 11, 2020
Contributor
ryoqun
left a comment
There was a problem hiding this comment.
lgtm after metrics addition and small test tweaks!
Really thanks for taking this over. :)
Contributor
@CriesofCarrots And this for faster inflation: |
Contributor
Author
|
@ryoqun thanks for the special sauce! It took a few more steps, but I was able to test this manually. Merging! |
mergify Bot
pushed a commit
that referenced
this pull request
Dec 11, 2020
* Add failing test * Check stake/vote accounts for validity * Feature gate change * Add datapoint * Add test realism (cherry picked from commit d6eff3d)
CriesofCarrots
added a commit
that referenced
this pull request
Dec 12, 2020
* Add failing test * Check stake/vote accounts for validity * Feature gate change * Add datapoint * Add test realism (cherry picked from commit d6eff3d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow up to #13615
While the stake program now checks whether a vote account is correctly owned on Delegation, the runtime method to collect stake and vote accounts doesn't verify whether this is still the case.
Summary of Changes
Filter out invalid stake and vote accounts