-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Restore getProgramAccounts spl-token secondary-index functionality #20993
Merged
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
CriesofCarrots
force-pushed
the
filter-type
branch
from
October 26, 2021 17:42
2290a8f
to
5a72fcb
Compare
CriesofCarrots
force-pushed
the
filter-type
branch
from
October 26, 2021 17:56
5a72fcb
to
52e6702
Compare
t-nelson
previously approved these changes
Oct 26, 2021
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
mergify
bot
dismissed
t-nelson’s stale review
October 26, 2021 18:56
Pull request has been modified.
CriesofCarrots
added
the
automerge
Merge this Pull Request automatically once CI passes
label
Oct 26, 2021
Codecov Report
@@ Coverage Diff @@
## master #20993 +/- ##
=========================================
- Coverage 81.5% 81.5% -0.1%
=========================================
Files 496 496
Lines 139850 139854 +4
=========================================
- Hits 114037 114029 -8
- Misses 25813 25825 +12 |
mergify bot
pushed a commit
that referenced
this pull request
Oct 26, 2021
…20993) * Allow get_spl_token_X_filters to match on any encoding, and optimize earlier * Remove redundant optimize calls * Compress match statements * Add method docs, including note to use optimize_filters before spl-token checks * Add logs (cherry picked from commit b2f6cfb) # Conflicts: # rpc/src/rpc.rs
mergify bot
pushed a commit
that referenced
this pull request
Oct 26, 2021
…20993) * Allow get_spl_token_X_filters to match on any encoding, and optimize earlier * Remove redundant optimize calls * Compress match statements * Add method docs, including note to use optimize_filters before spl-token checks * Add logs (cherry picked from commit b2f6cfb) # Conflicts: # rpc/src/rpc.rs
mergify bot
added a commit
that referenced
this pull request
Oct 26, 2021
…ackport #20993) (#21005) * Restore getProgramAccounts spl-token secondary-index functionality (#20993) * Allow get_spl_token_X_filters to match on any encoding, and optimize earlier * Remove redundant optimize calls * Compress match statements * Add method docs, including note to use optimize_filters before spl-token checks * Add logs (cherry picked from commit b2f6cfb) # Conflicts: # rpc/src/rpc.rs * Fix conflict 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
Oct 27, 2021
…ackport #20993) (#21004) * Restore getProgramAccounts spl-token secondary-index functionality (#20993) * Allow get_spl_token_X_filters to match on any encoding, and optimize earlier * Remove redundant optimize calls * Compress match statements * Add method docs, including note to use optimize_filters before spl-token checks * Add logs (cherry picked from commit b2f6cfb) # Conflicts: # rpc/src/rpc.rs * Fix conflict Co-authored-by: Tyera Eulberg <teulberg@gmail.com> Co-authored-by: Tyera Eulberg <tyera@solana.com>
dankelleher
pushed a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
…olana-labs#20993) * Allow get_spl_token_X_filters to match on any encoding, and optimize earlier * Remove redundant optimize calls * Compress match statements * Add method docs, including note to use optimize_filters before spl-token checks * Add logs
frits-metalogix
added a commit
to identity-com/solana
that referenced
this pull request
Nov 24, 2021
…ality (solana-labs#20993)" This reverts commit 67a89b4.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
#20185 changed the comparison in
get_spl_token_owner_filter()
andget_spl_token_mint_filter()
to check forMemcmpEncodedBytes::Base58
, which no longer matches the default when the field is not provided (MemcmpEncodedBytes::Binary
). This broke a lot of users querying for token accounts by owner and mint, since theTokenkeg
program-owner secondary index is excluded on mainnet-beta RPC nodes.Summary of Changes
Optimize filters earlier in order to allow
get_spl_token_owner_filter()
andget_spl_token_mint_filter()
to match on any provided encoding.Also, compress rpc_filter match statements, which bothered me.