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

Purge storage rewards from accounts db for testnet#11996

Merged
ryoqun merged 2 commits intosolana-labs:masterfrom
ryoqun:purge-storage-from-testnet
Sep 3, 2020
Merged

Purge storage rewards from accounts db for testnet#11996
ryoqun merged 2 commits intosolana-labs:masterfrom
ryoqun:purge-storage-from-testnet

Conversation

@ryoqun
Copy link
Copy Markdown
Contributor

@ryoqun ryoqun commented Sep 2, 2020

Problem

current capitalization calculation has an edge-case bug (it ignores overflowing). And testnet has bogus deprecated accounts still (storage reward pools for archiver).

With both combined, this skewed the capitalization for testnet....

Summary of Changes

Eradicate old-age vestigial accounts entirely and adjust the skewed capitalization to pave a way for cleaner new cap. calculation & enforcement at #11927.

I largely copied from #11966 ;)

Context

This blocks #11927.

Fixes #10870

Comment thread runtime/src/bank.rs
// never do this for testnet; we're pristine here. :)
OperatingMode::Development => false,
// schedule to remove at testnet/tds
OperatingMode::Preview => self.epoch() == 93,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Let's this done rather quickly, otherwise we can't land #11927

Comment thread runtime/src/bank.rs
mvines
mvines previously approved these changes Sep 3, 2020
Copy link
Copy Markdown
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

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

If we're going to roll this out on testnet epoch 93, please speed up this activation to 93 as well!

OperatingMode::Preview => self.epoch() == 95,

@mergify mergify Bot dismissed mvines’s stale review September 3, 2020 05:13

Pull request has been modified.

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 3, 2020

Codecov Report

Merging #11996 into master will increase coverage by 0.0%.
The diff coverage is 98.1%.

@@           Coverage Diff           @@
##           master   #11996   +/-   ##
=======================================
  Coverage    82.1%    82.2%           
=======================================
  Files         334      334           
  Lines       78643    78692   +49     
=======================================
+ Hits        64639    64693   +54     
+ Misses      14004    13999    -5     

@ryoqun ryoqun merged commit fb71ee6 into solana-labs:master Sep 3, 2020
@ryoqun ryoqun added the v1.3 label Sep 3, 2020
mergify Bot pushed a commit that referenced this pull request Sep 3, 2020
* Purge storage rewards from accounts db for testnet

* Fix test failing only on stable

(cherry picked from commit fb71ee6)
@ryoqun ryoqun mentioned this pull request Sep 3, 2020
mergify Bot added a commit that referenced this pull request Sep 3, 2020
* Purge storage rewards from accounts db for testnet

* Fix test failing only on stable

(cherry picked from commit fb71ee6)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
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.

Debug why there are large storage accounts on testnet and devnet (inflation related?)

2 participants