Bump compute budget for neon evm (#17700) (#18522)

(cherry picked from commit 2867584985)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2021-07-09 09:12:31 -07:00
committed by GitHub
parent 5d0e1d62d5
commit 8b87d86358
6 changed files with 29 additions and 7 deletions

View File

@@ -159,6 +159,10 @@ pub mod updated_verify_policy {
solana_sdk::declare_id!("k15tVxtkgsmo7dy6iJ56N5hBCxuQAtqRgYwoTDuwbia");
}
pub mod neon_evm_compute_budget {
solana_sdk::declare_id!("GLrVvDPkQi5PMYUrsYWT9doZhSHr1BVZXqj5DbFps3rS");
}
lazy_static! {
/// Map of feature identifiers to user-visible description
pub static ref FEATURE_NAMES: HashMap<Pubkey, &'static str> = [
@@ -198,6 +202,7 @@ lazy_static! {
(dedupe_config_program_signers::id(), "dedupe config program signers"),
(vote_stake_checked_instructions::id(), "vote/state program checked instructions #18345"),
(updated_verify_policy::id(), "Update verify policy"),
(neon_evm_compute_budget::id(), "bump neon_evm's compute budget"),
/*************** ADD NEW FEATURES HERE ***************/
]
.iter()

View File

@@ -181,6 +181,8 @@ pub struct BpfComputeBudget {
pub sysvar_base_cost: u64,
/// Number of compute units consumed to call secp256k1_recover
pub secp256k1_recover_cost: u64,
/// Optional program heap region size, if `None` then loader default
pub heap_size: Option<usize>,
}
impl Default for BpfComputeBudget {
fn default() -> Self {
@@ -205,6 +207,7 @@ impl BpfComputeBudget {
cpi_bytes_per_unit: 250, // ~50MB at 200,000 units
sysvar_base_cost: 100,
secp256k1_recover_cost: 25_000,
heap_size: None,
}
}
}