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

Feature-gate stake program#13394

Merged
mergify[bot] merged 5 commits intosolana-labs:masterfrom
CriesofCarrots:feature-gate-stake-program
Nov 6, 2020
Merged

Feature-gate stake program#13394
mergify[bot] merged 5 commits intosolana-labs:masterfrom
CriesofCarrots:feature-gate-stake-program

Conversation

@CriesofCarrots
Copy link
Copy Markdown
Contributor

@CriesofCarrots CriesofCarrots commented Nov 4, 2020

Problem

Upcoming stake-program fixes need to be feature-gated and released on testnet and mainnet-beta.

Summary of Changes

  • Add legacy stake-program processor and handling
  • Use feature_builtin to replace legacy stake program

Needs rebase on #13403

Comment thread runtime/src/bank.rs Outdated
Comment thread runtime/src/bank.rs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 4, 2020

Codecov Report

Merging #13394 into master will increase coverage by 0.1%.
The diff coverage is 58.0%.

@@            Coverage Diff            @@
##           master   #13394     +/-   ##
=========================================
+ Coverage    81.9%    82.1%   +0.1%     
=========================================
  Files         376      378      +2     
  Lines       88405    89963   +1558     
=========================================
+ Hits        72424    73866   +1442     
- Misses      15981    16097    +116     

@t-nelson
Copy link
Copy Markdown
Contributor

t-nelson commented Nov 4, 2020

Any thoughts one replacing all of the math in the stake program with checked variants while we're replacing the program? It might save us some trouble in the future

@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch from 39a0613 to 875cb80 Compare November 4, 2020 22:00
@CriesofCarrots
Copy link
Copy Markdown
Contributor Author

@mvines how does this look now?

@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch 2 times, most recently from 4e5fbc1 to f45f989 Compare November 4, 2020 22:13
@mvines
Copy link
Copy Markdown
Contributor

mvines commented Nov 4, 2020

@mvines how does this look now?

I think that looks good now. My preference would be to break out the new bank mechanism from the rest of this PR. That I think can be reviewed and landed first (@ryoqun probably should look at it as well). Then the application of it to the stake account is a second PR

@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch 2 times, most recently from 40bcd27 to c802487 Compare November 4, 2020 22:19
@CriesofCarrots CriesofCarrots marked this pull request as ready for review November 4, 2020 22:32
@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch 2 times, most recently from f2df58b to ecace66 Compare November 5, 2020 06:36
Comment thread runtime/src/builtins.rs
@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch 3 times, most recently from d875acb to 8c34ce8 Compare November 5, 2020 16:51
@CriesofCarrots CriesofCarrots requested a review from mvines November 5, 2020 16:51
@CriesofCarrots
Copy link
Copy Markdown
Contributor Author

@mvines this is ready for proper review. Thank you!

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.

How should I review legacy_stake.stake.rs?

Comment thread runtime/src/builtins.rs
Comment thread sdk/src/feature_set.rs Outdated
@mvines
Copy link
Copy Markdown
Contributor

mvines commented Nov 6, 2020

How should I review legacy_stake_stake.rs?

Specifically without a diff commit from the original stake_stake.rs, it's really hard to see what, if anything has changed

@mvines mvines closed this Nov 6, 2020
@mvines mvines reopened this Nov 6, 2020
@mvines
Copy link
Copy Markdown
Contributor

mvines commented Nov 6, 2020

(oops)

@CriesofCarrots
Copy link
Copy Markdown
Contributor Author

How should I review legacy_stake_stake.rs?

Specifically without a diff commit from the original stake_stake.rs, it's really hard to see what, if anything has changed

Fair! Let me make you a diff commit

@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch from 8c34ce8 to 3ce5eba Compare November 6, 2020 06:31
@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch 2 times, most recently from 580291b to 095098a Compare November 6, 2020 06:42
@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch from 095098a to 4e441c0 Compare November 6, 2020 06:45
@CriesofCarrots CriesofCarrots force-pushed the feature-gate-stake-program branch from 4e441c0 to b1b5325 Compare November 6, 2020 06:49
@CriesofCarrots
Copy link
Copy Markdown
Contributor Author

CriesofCarrots commented Nov 6, 2020

Fair! Let me make you a diff commit

@mvines legacy_stake_state diff commit: 41e3c5c

@CriesofCarrots CriesofCarrots added the automerge Merge this Pull Request automatically once CI passes label Nov 6, 2020
@mergify mergify Bot merged commit 1b1d9f6 into solana-labs:master Nov 6, 2020
mergify Bot pushed a commit that referenced this pull request Nov 6, 2020
* Add legacy stake-program handling

* Strip out duplicative legacy code

* Add feature for stake-program-fix

* Feature-deploy new stake program

* Expand comment

(cherry picked from commit 1b1d9f6)

# Conflicts:
#	runtime/src/builtins.rs
#	runtime/src/feature_set.rs
mergify Bot pushed a commit that referenced this pull request Nov 6, 2020
* Add legacy stake-program handling

* Strip out duplicative legacy code

* Add feature for stake-program-fix

* Feature-deploy new stake program

* Expand comment

(cherry picked from commit 1b1d9f6)
mergify Bot added a commit that referenced this pull request Nov 6, 2020
* Add legacy stake-program handling

* Strip out duplicative legacy code

* Add feature for stake-program-fix

* Feature-deploy new stake program

* Expand comment

(cherry picked from commit 1b1d9f6)

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
mergify Bot added a commit that referenced this pull request Nov 6, 2020
* Feature-gate stake program (#13394)

* Add legacy stake-program handling

* Strip out duplicative legacy code

* Add feature for stake-program-fix

* Feature-deploy new stake program

* Expand comment

(cherry picked from commit 1b1d9f6)

# Conflicts:
#	runtime/src/builtins.rs
#	runtime/src/feature_set.rs

* Fix conflicts

Co-authored-by: Tyera Eulberg <teulberg@gmail.com>
Co-authored-by: Tyera Eulberg <tyera@solana.com>
@CriesofCarrots CriesofCarrots deleted the feature-gate-stake-program branch November 18, 2020 00:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automerge Merge this Pull Request automatically once CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants