This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Decode native-program and sysvar accounts #11463
Merged
mergify
merged 6 commits into
solana-labs:master
from
CriesofCarrots:decode-native-accounts
Aug 9, 2020
Merged
Decode native-program and sysvar accounts #11463
mergify
merged 6 commits into
solana-labs:master
from
CriesofCarrots:decode-native-accounts
Aug 9, 2020
Conversation
This file contains 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
5508085
to
766bfb1
Compare
Codecov Report
@@ Coverage Diff @@
## master #11463 +/- ##
========================================
Coverage 81.7% 81.7%
========================================
Files 323 327 +4
Lines 74987 75398 +411
========================================
+ Hits 61330 61668 +338
- Misses 13657 13730 +73 |
jstarry
reviewed
Aug 8, 2020
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.
Looks awesome! My main gripe is around u64's in JSON. I think Slot
, Epoch
, and UnixTimestamp
are all fine since they will never get larger than 2^53. But I think a convention could be always returning lamports as string (even if the rent fee will never be more than 2^53 lamports)
jstarry
reviewed
Aug 8, 2020
jstarry
reviewed
Aug 8, 2020
2d31939
to
2cbb325
Compare
2cbb325
to
6181f17
Compare
jstarry
previously approved these changes
Aug 9, 2020
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.
lgtm!
6181f17
to
a3918a0
Compare
@mvines , post-merge comments welcome, but moving forward in order to sneak it in to the api node upgrade set tomorrow. |
mergify bot
pushed a commit
that referenced
this pull request
Aug 9, 2020
* Pass pubkey in to account-decoder for sysvars * Decode sysvar accounts * Decode config accounts; move validator-info lower * Decode stake accounts * Review comments * Stringify any account lamports and epochs that can be set to u64::MAX (cherry picked from commit a9f7686) # Conflicts: # Cargo.lock # account-decoder/Cargo.toml # core/src/rpc.rs
mergify bot
pushed a commit
that referenced
this pull request
Aug 9, 2020
* Pass pubkey in to account-decoder for sysvars * Decode sysvar accounts * Decode config accounts; move validator-info lower * Decode stake accounts * Review comments * Stringify any account lamports and epochs that can be set to u64::MAX (cherry picked from commit a9f7686) # Conflicts: # Cargo.lock # account-decoder/Cargo.toml
mergify bot
added a commit
that referenced
this pull request
Aug 9, 2020
* Decode native-program and sysvar accounts (#11463) * Pass pubkey in to account-decoder for sysvars * Decode sysvar accounts * Decode config accounts; move validator-info lower * Decode stake accounts * Review comments * Stringify any account lamports and epochs that can be set to u64::MAX (cherry picked from commit a9f7686) # Conflicts: # Cargo.lock # account-decoder/Cargo.toml * Fix conflicts Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
mergify bot
added a commit
that referenced
this pull request
Aug 9, 2020
* Decode native-program and sysvar accounts (#11463) * Pass pubkey in to account-decoder for sysvars * Decode sysvar accounts * Decode config accounts; move validator-info lower * Decode stake accounts * Review comments * Stringify any account lamports and epochs that can be set to u64::MAX (cherry picked from commit a9f7686) # Conflicts: # Cargo.lock # account-decoder/Cargo.toml # core/src/rpc.rs * Fix conflicts * Ignore clippy lint affecting rust <v1.44.0 Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
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
RPC endpoints
getAccountInfo
andgetProgramAccounts
support returning decoded account information for particular programs (Nonce, Vote, and SPL Token). Other native programs and sysvars need similar handling.Summary of Changes
Fixes #11206