This repository was archived by the owner on Jan 22, 2025. It is now read-only.
Rpc: Add getStakeActivation endpoint#10902
Merged
CriesofCarrots merged 6 commits intosolana-labs:masterfrom Jul 6, 2020
Merged
Rpc: Add getStakeActivation endpoint#10902CriesofCarrots merged 6 commits intosolana-labs:masterfrom
CriesofCarrots merged 6 commits intosolana-labs:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10902 +/- ##
=========================================
- Coverage 82.1% 82.0% -0.1%
=========================================
Files 316 316
Lines 72000 72052 +52
=========================================
- Hits 59130 59124 -6
- Misses 12870 12928 +58 |
mvines
reviewed
Jul 3, 2020
|
|
||
| #### Results: | ||
|
|
||
| The result will be a JSON object with the following fields: |
Contributor
There was a problem hiding this comment.
This comment comes after my two "activating"/"deactivating" nits. I think a overall "state" field would be very useful. Right now the user needs to infer this based on the three fields.
What about something like:
state: <string>- the current state of the stake account:inactive,activating,active,deactivating(I don't love these state names but they're a start)active: <u64>- amount of stake that is currently activeinactive: <u64>- amount of stake that is not active (eg, for a state account in theactivatingstate, this will be the remaining stake that needs to warm up)
Contributor
Author
There was a problem hiding this comment.
Good idea. I suppose we could go to "warming up" and "cooling down" for state instead of activating/deactivating. Do those appeal any better?
Contributor
Author
There was a problem hiding this comment.
@mvines , updated. I stuck with activating/deactivating for now. Thoughts?
Co-authored-by: Michael Vines <mvines@gmail.com>
mergify Bot
pushed a commit
that referenced
this pull request
Jul 6, 2020
* Add getStakeActivation endpoint * Add docs * Update docs/src/apps/jsonrpc-api.md Co-authored-by: Michael Vines <mvines@gmail.com> * Rework return type * Update docs * Rebase Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 4de0713)
mergify Bot
added a commit
that referenced
this pull request
Jul 6, 2020
* Rpc: Add getStakeActivation endpoint (#10902) * Add getStakeActivation endpoint * Add docs * Update docs/src/apps/jsonrpc-api.md Co-authored-by: Michael Vines <mvines@gmail.com> * Rework return type * Update docs * Rebase Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 4de0713) * Fix build Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
mergify Bot
pushed a commit
that referenced
this pull request
Jul 23, 2020
* Add getStakeActivation endpoint * Add docs * Update docs/src/apps/jsonrpc-api.md Co-authored-by: Michael Vines <mvines@gmail.com> * Rework return type * Update docs * Rebase Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 4de0713) # Conflicts: # core/src/rpc.rs # docs/src/apps/jsonrpc-api.md
CriesofCarrots
added a commit
that referenced
this pull request
Jul 23, 2020
* Rpc: Add getStakeActivation endpoint (#10902) * Add getStakeActivation endpoint * Add docs * Update docs/src/apps/jsonrpc-api.md Co-authored-by: Michael Vines <mvines@gmail.com> * Rework return type * Update docs * Rebase Co-authored-by: Michael Vines <mvines@gmail.com> (cherry picked from commit 4de0713) # Conflicts: # core/src/rpc.rs # docs/src/apps/jsonrpc-api.md * Fix conflicts Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
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
solana stake-accountreturns lots of useful information about stake activation/deactivation for the current epoch. But it's pretty hard to calculate this information if you're not using the solana cli.Summary of Changes
getStakeActivationendpoint; it takes a stake account address (and optional past epoch and optional commitment) as input parameters and returns effective, activating, and deactivating stake amountsFixes #10885