-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syscall: GetEpochStake
#1152
Syscall: GetEpochStake
#1152
Conversation
cebf52d
to
15e8474
Compare
02dc2f6
to
52f6e22
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1152 +/- ##
=========================================
- Coverage 82.7% 82.7% -0.1%
=========================================
Files 871 872 +1
Lines 370249 370496 +247
=========================================
+ Hits 306391 306571 +180
- Misses 63858 63925 +67 |
52f6e22
to
c92350e
Compare
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay on this. Mostly nits. However, I think we need to find a way to avoid importing unneeded dependencies into low-level crates with solana-vote
fcf3908
to
f8fc17c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
f8fc17c
to
86b7981
Compare
3bf712a
to
c8f3381
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All from me
* SVM: add `get_vote_accounts` callback * program-runtime: invoke context: add `vote_accounts` * sdk: add feature gate for sol-get-epoch-stake * syscall: get-epoch-stake * syscall: get-epoch-stake: tests * drop `get_compute_meter` * refactor for total stake * refactor API for total stake
Problem
Currently, on-chain programs have no knowledge of the current epoch's stake and
how much active stake is delegated to a certain vote account.
If this data was available for querying by on-chain programs, it would unblock
many use cases, such as validator governance and secondary consensus mechanisms,
that were previously not possible on Solana.
Additionally, this would enable the Feature Gate program defined in
SIMD 0089 to tally vote account stake in
support for a pending feature gate.
Summary of Changes
vote accounts.
context's
EnvironmentConfig
.SyscallGetEpochStake
- that will use these fields on theinvoke context to retrieve total epoch stake or a given vote account's epoch stake.
SIMD 0133
Feature Gate Tracking Issue: #884