check program owners (#15495) (#15568)

* check program owners

* BankSlotDelta should change because InstructionError variant added

Co-authored-by: Tyera Eulberg <tyera@solana.com>
(cherry picked from commit 8399851d11)

Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
mergify[bot]
2021-02-26 23:34:55 +00:00
committed by GitHub
parent 80f5127dfa
commit 7d67f5b18c
10 changed files with 118 additions and 18 deletions

View File

@@ -193,6 +193,9 @@ pub enum InstructionError {
#[error("An account does not have enough lamports to be rent-exempt")]
AccountNotRentExempt,
#[error("Invalid account owner")]
InvalidAccountOwner,
}
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]

View File

@@ -175,6 +175,10 @@ pub mod check_init_vote_data {
solana_sdk::declare_id!("3ccR6QpxGYsAbWyfevEtBNGfWV4xBffxRj2tD6A9i39F");
}
pub mod check_program_owner {
solana_sdk::declare_id!("5XnbR5Es9YXEARRuP6mdvoxiW3hx5atNNeBmwVd8P3QD");
}
lazy_static! {
/// Map of feature identifiers to user-visible description
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
@@ -218,7 +222,8 @@ lazy_static! {
(full_inflation::mainnet::certusone::vote::id(), "Community vote allowing Certus One to enable full inflation"),
(warp_timestamp_again::id(), "warp timestamp again, adjust bounding to 25% fast 80% slow #15204"),
(per_byte_logging_cost::id(), "charge the compute budget per byte for logging"),
(check_init_vote_data::id(), "check initialized Vote data")
(check_init_vote_data::id(), "check initialized Vote data"),
(check_program_owner::id(), "limit programs to operating on accounts owned by itself")
/*************** ADD NEW FEATURES HERE ***************/
]
.iter()