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

Reject vote withdraws that create non-rent-exempt accounts#21639

Merged
jstarry merged 2 commits intosolana-labs:masterfrom
jstarry:rent-exempt-vote-accounts
Dec 6, 2021
Merged

Reject vote withdraws that create non-rent-exempt accounts#21639
jstarry merged 2 commits intosolana-labs:masterfrom
jstarry:rent-exempt-vote-accounts

Conversation

@jstarry
Copy link
Copy Markdown
Contributor

@jstarry jstarry commented Dec 6, 2021

Problem

The remaining balance after a vote withdraw is not checked to see if it meets the rent exempt threshold.

Summary of Changes

  • Add feature to enforce that withdraws do not result in non-rent-exempt vote accounts

Fixes #

@jstarry jstarry added the v1.9 label Dec 6, 2021
@jstarry jstarry requested a review from t-nelson December 6, 2021 18:16
@CriesofCarrots
Copy link
Copy Markdown
Contributor

Coincidentally just came across the the cli-side checks for this here and it was on my list to ensure rent-exemption was programmatically enforced. Thanks!

@jstarry jstarry requested review from CriesofCarrots and removed request for t-nelson December 6, 2021 18:38
CriesofCarrots
CriesofCarrots previously approved these changes Dec 6, 2021
Copy link
Copy Markdown
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Yep, lgtm! Thanks again

@CriesofCarrots
Copy link
Copy Markdown
Contributor

I think we may want this on v1.8 later, if we move toward no rent-paying accounts.

@jstarry jstarry added v1.8 automerge Merge this Pull Request automatically once CI passes labels Dec 6, 2021
@mergify mergify Bot removed the automerge Merge this Pull Request automatically once CI passes label Dec 6, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Dec 6, 2021

automerge label removed due to a CI failure

@mergify mergify Bot dismissed CriesofCarrots’s stale review December 6, 2021 19:55

Pull request has been modified.

@jstarry jstarry added the automerge Merge this Pull Request automatically once CI passes label Dec 6, 2021
@mergify mergify Bot removed the automerge Merge this Pull Request automatically once CI passes label Dec 6, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Dec 6, 2021

automerge label removed due to a CI failure

@jstarry jstarry merged commit e123883 into solana-labs:master Dec 6, 2021
@jstarry jstarry deleted the rent-exempt-vote-accounts branch December 6, 2021 22:01
mergify Bot pushed a commit that referenced this pull request Dec 6, 2021
* Reject vote withdraws that create non-rent-exempt accounts

* fix mocked instruction test

(cherry picked from commit e123883)

# Conflicts:
#	program-runtime/src/invoke_context.rs
#	programs/vote/src/vote_instruction.rs
#	sdk/src/feature_set.rs
mergify Bot pushed a commit that referenced this pull request Dec 6, 2021
* Reject vote withdraws that create non-rent-exempt accounts

* fix mocked instruction test

(cherry picked from commit e123883)

# Conflicts:
#	sdk/src/feature_set.rs
mergify Bot added a commit that referenced this pull request Dec 7, 2021
…21639) (#21645)

* Reject vote withdraws that create non-rent-exempt accounts (#21639)

* Reject vote withdraws that create non-rent-exempt accounts

* fix mocked instruction test

(cherry picked from commit e123883)

# Conflicts:
#	sdk/src/feature_set.rs

* resolve conflicts

Co-authored-by: Justin Starry <justin@solana.com>
jstarry added a commit that referenced this pull request Dec 7, 2021
…21639) (#21644)

* Reject vote withdraws that create non-rent-exempt accounts (#21639)

* Reject vote withdraws that create non-rent-exempt accounts

* fix mocked instruction test

(cherry picked from commit e123883)

# Conflicts:
#	program-runtime/src/invoke_context.rs
#	programs/vote/src/vote_instruction.rs
#	sdk/src/feature_set.rs

* resolve conflicts

* fix old rust issue

Co-authored-by: Justin Starry <justin@solana.com>
t-nelson added a commit to t-nelson/solana that referenced this pull request Dec 13, 2021
tao-stones pushed a commit that referenced this pull request Dec 13, 2021
CriesofCarrots pushed a commit to CriesofCarrots/solana that referenced this pull request Dec 16, 2021
CriesofCarrots pushed a commit that referenced this pull request Dec 17, 2021
@brooksprumo brooksprumo mentioned this pull request Jan 5, 2022
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.

2 participants