Check seed length before trying to cal program address (backport #19699) (#19708)

* Check seed length before trying to cal program address (#19699)

(cherry picked from commit 778b2adbea)

* resolve conflicts

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2021-09-08 08:26:07 +00:00
committed by GitHub
parent 584f8deae3
commit ed4e7c0c87
5 changed files with 357 additions and 13 deletions

View File

@@ -195,6 +195,10 @@ pub mod allow_native_ids {
solana_sdk::declare_id!("GVnDbNkECwrzLM7aVBGWpBYo3yH1ACaXB4ottNX8pedZ");
}
pub mod check_seed_length {
solana_sdk::declare_id!("8HYXgkoKGreAMA3MfJkdjbKNVbfZRQP3jqFpa7iqN4v7");
}
lazy_static! {
/// Map of feature identifiers to user-visible description
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
@@ -244,6 +248,7 @@ lazy_static! {
(stake_program_advance_activating_credits_observed::id(), "Enable advancing credits observed for activation epoch #19309"),
(demote_program_write_locks::id(), "demote program write locks to readonly #19593"),
(allow_native_ids::id(), "allow native program ids in program derived addresses"),
(check_seed_length::id(), "Check program address seed lengths"),
/*************** ADD NEW FEATURES HERE ***************/
]
.iter()