File tree 1 file changed +9
-0
lines changed
builtins-default-costs/src
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 12
12
// Number of compute units for each built-in programs
13
13
lazy_static ! {
14
14
/// Number of compute units for each built-in programs
15
+ ///
16
+ /// DEVELOPER WARNING: This map CANNOT be modified without causing a
17
+ /// consensus failure because this map is used to calculate the compute
18
+ /// limit for transactions that don't specify a compute limit themselves as
19
+ /// of https://github.com/anza-xyz/agave/issues/2212. It's also used to
20
+ /// calculate the cost of a transaction which is used in replay to enforce
21
+ /// block cost limits as of
22
+ /// https://github.com/solana-labs/solana/issues/29595.
15
23
pub static ref BUILTIN_INSTRUCTION_COSTS : AHashMap <Pubkey , u64 > = [
16
24
( solana_stake_program:: id( ) , solana_stake_program:: stake_instruction:: DEFAULT_COMPUTE_UNITS ) ,
17
25
( solana_config_program:: id( ) , solana_config_program:: config_processor:: DEFAULT_COMPUTE_UNITS ) ,
@@ -26,6 +34,7 @@ lazy_static! {
26
34
// Note: These are precompile, run directly in bank during sanitizing;
27
35
( secp256k1_program:: id( ) , 0 ) ,
28
36
( ed25519_program:: id( ) , 0 ) ,
37
+ // DO NOT ADD MORE ENTRIES TO THIS MAP
29
38
]
30
39
. iter( )
31
40
. cloned( )
You can’t perform that action at this time.
0 commit comments