-
Notifications
You must be signed in to change notification settings - Fork 445
replace solana-inline-spl with spl-generic-token #5805
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
base: master
Are you sure you want to change the base?
Conversation
pub static ref STATIC_IDS: Vec<Pubkey> = vec![ | ||
associated_token_account::id(), | ||
associated_token_account::program_v1_1_0::id(), | ||
token::id(), | ||
token::native_mint::id(), |
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.
this is a safe change because the only place this static is used is a for
loop for snapshot size reduction, and the old ata program account does not exist on mainnet. we removed this id and the old token program id from spl-generic-token
pub use { | ||
solana_account_decoder_client_types::token::{ | ||
real_number_string, real_number_string_trimmed, TokenAccountType, UiAccountState, UiMint, | ||
UiMultisig, UiTokenAccount, UiTokenAmount, | ||
}, | ||
spl_generic_token::{is_known_spl_token_id, spl_token_ids}, | ||
}; |
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.
we pub use
these to avoid a breaking change because solana-account-decoder
is a crate that (unlike solana-inline-spl
) is very reasonable for downstream projects to include
hahaha... nevermind, maybe. i think the test failures are because of the bug i fixed in cc @apfitzge for status update (we are almost out of the woods now!) |
d8902dd
to
3d0b8a6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5805 +/- ##
=========================================
- Coverage 83.0% 82.9% -0.1%
=========================================
Files 828 826 -2
Lines 375869 376464 +595
=========================================
+ Hits 312178 312438 +260
- Misses 63691 64026 +335 🚀 New features to boost your workflow:
|
Problem
solana-inline-spl
is used to provide very minimal token parsing functionality for agave crates that cannot depend onspl-token
andspl-token-2022
. we need to use this functionality in svm, but the svm crate is being removed to its own repo. thus this functionality cannot live in either repoin addition
solana-inline-spl
is outdated compared to the copy-pasted version of the same code inspl-token-2022
. by localizing this functionality in one repo we can reduce duplication and ensure bugfixes happen in one placeSummary of Changes
remove
solana-inline-spl
and replace it withspl-generic-token
. this new crate has substantially improved functionality, for details see solana-program/libraries#70there may be opportunities to refactor some code in agave to eliminate some usage of
spl-token
andspl-token-2022
entirely, given the enhanced functionality. this pr, however, merely replaces all uses ofsolana-inline-spl
withspl-generic-token
as a drop-in replacement, because its purpose is to unblock #5588 which will unblock #4253 and finally enable simd83i take it for granted that removing
solana-inline-spl
in this way merely prevents new releases from ever being made, and anyone using it third party (although they shouldnt do that because its an internal crate) will not be broken until we take agave to 3.0. but worth pinging relengNOTE this should not be merged until we do a thorough check on https://github.com/solana-program/libraries repo permissions. at the very least i need to enable mandatory code review, but there may be other boxes to tick like push to master etc