From 6f045d608074da7cc7a227eb26ee014c559532f0 Mon Sep 17 00:00:00 2001 From: Tao Zhu <82401714+taozhu-chicago@users.noreply.github.com> Date: Fri, 19 Aug 2022 12:14:37 -0500 Subject: [PATCH] add ed25519_program to built-in instruction cost list (#27199) * add ed25519_program to built-in instruction cost list * Remove unnecessary and stale comment --- runtime/src/block_cost_limits.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/src/block_cost_limits.rs b/runtime/src/block_cost_limits.rs index 31964f88cdaee3..cc279b4dd7549e 100644 --- a/runtime/src/block_cost_limits.rs +++ b/runtime/src/block_cost_limits.rs @@ -3,7 +3,8 @@ use { lazy_static::lazy_static, solana_sdk::{ - feature, incinerator, native_loader, pubkey::Pubkey, secp256k1_program, system_program, + ed25519_program, feature, incinerator, native_loader, pubkey::Pubkey, secp256k1_program, + system_program, }, std::collections::HashMap, }; @@ -38,8 +39,8 @@ lazy_static! { (solana_sdk::stake::program::id(), COMPUTE_UNIT_TO_US_RATIO * 25), (solana_config_program::id(), COMPUTE_UNIT_TO_US_RATIO * 15), (solana_vote_program::id(), COMPUTE_UNIT_TO_US_RATIO * 70), - // secp256k1 is executed in banking stage, it should cost similar to sigverify (secp256k1_program::id(), COMPUTE_UNIT_TO_US_RATIO * 24), + (ed25519_program::id(), COMPUTE_UNIT_TO_US_RATIO * 24), (system_program::id(), COMPUTE_UNIT_TO_US_RATIO * 5), ] .iter()