|
| 1 | +""" |
| 2 | +Default fixed opcode count configurations for benchmark repricing tests. |
| 3 | +
|
| 4 | +This config is only used when `--fixed-opcode-count` values are NOT specified |
| 5 | +with the CLI. |
| 6 | +
|
| 7 | +Values are in thousands (K). For example, [100, 500, 1000] means |
| 8 | +100K, 500K, and 1M opcode executions. |
| 9 | +
|
| 10 | +All keys use regex patterns in the format: "test_name.*OPCODE.*" |
| 11 | +This matches test IDs like: |
| 12 | + test_arithmetic[fork_Prague-blockchain_test-opcode_ADD-] |
| 13 | +
|
| 14 | +This file is auto-maintained by `parser.py`. Do not edit manually unless |
| 15 | +adding new patterns that the parser cannot detect. |
| 16 | +""" |
| 17 | + |
| 18 | +DEFAULT_OPCODE_COUNTS = [1] |
| 19 | + |
| 20 | +# Scenario configurations using test_name.*OPCODE.* patterns |
| 21 | +# Keys are regex patterns checked in order; first match wins |
| 22 | +SCENARIO_CONFIGS = { |
| 23 | + # ACCOUNT QUERY OPERATIONS |
| 24 | + "test_selfbalance.*": [1, 10], |
| 25 | + "test_codesize.*": [1, 10], |
| 26 | + "test_ext_account_query_warm.*BALANCE.*": [1, 10], |
| 27 | + "test_ext_account_query_warm.*EXTCODESIZE.*": [1, 10], |
| 28 | + "test_ext_account_query_warm.*EXTCODEHASH.*": [1, 10], |
| 29 | + "test_ext_account_query_warm.*CALL.*": [1, 10], |
| 30 | + "test_ext_account_query_warm.*CALLCODE.*": [1, 10], |
| 31 | + "test_ext_account_query_warm.*DELEGATECALL.*": [1, 10], |
| 32 | + "test_ext_account_query_warm.*STATICCALL.*": [1, 10], |
| 33 | + # ARITHMETIC OPERATIONS |
| 34 | + "test_arithmetic.*ADD.*": [1, 10], |
| 35 | + "test_arithmetic.*MUL.*": [1, 10], |
| 36 | + "test_arithmetic.*SUB.*": [1, 10], |
| 37 | + "test_arithmetic.*DIV.*": [1, 10], |
| 38 | + "test_arithmetic.*SDIV.*": [1, 10], |
| 39 | + "test_arithmetic.*MOD.*": [1, 10], |
| 40 | + "test_arithmetic.*SMOD.*": [1, 10], |
| 41 | + "test_arithmetic.*EXP.*": [1, 10], |
| 42 | + "test_arithmetic.*SIGNEXTEND.*": [1, 10], |
| 43 | + "test_mod.*MOD.*": [1, 10], |
| 44 | + "test_mod.*SMOD.*": [1, 10], |
| 45 | + "test_mod_arithmetic.*ADDMOD.*": [1, 10], |
| 46 | + "test_mod_arithmetic.*MULMOD.*": [1, 10], |
| 47 | + # BITWISE OPERATIONS |
| 48 | + "test_bitwise.*AND.*": [1, 10], |
| 49 | + "test_bitwise.*OR.*": [1, 10], |
| 50 | + "test_bitwise.*XOR.*": [1, 10], |
| 51 | + "test_bitwise.*BYTE.*": [1, 10], |
| 52 | + "test_bitwise.*SHL.*": [1, 10], |
| 53 | + "test_bitwise.*SHR.*": [1, 10], |
| 54 | + "test_bitwise.*SAR.*": [1, 10], |
| 55 | + "test_not_op.*": [1, 10], |
| 56 | + "test_clz_same.*": [1, 10], |
| 57 | + # BLOCK CONTEXT OPERATIONS |
| 58 | + "test_block_context_ops.*COINBASE.*": [1, 10], |
| 59 | + "test_block_context_ops.*TIMESTAMP.*": [1, 10], |
| 60 | + "test_block_context_ops.*NUMBER.*": [1, 10], |
| 61 | + "test_block_context_ops.*PREVRANDAO.*": [1, 10], |
| 62 | + "test_block_context_ops.*GASLIMIT.*": [1, 10], |
| 63 | + "test_block_context_ops.*CHAINID.*": [1, 10], |
| 64 | + "test_block_context_ops.*BASEFEE.*": [1, 10], |
| 65 | + "test_block_context_ops.*BLOBBASEFEE.*": [1, 10], |
| 66 | + "test_blockhash.*": [1, 10], |
| 67 | + # CALL CONTEXT OPERATIONS |
| 68 | + "test_call_frame_context_ops.*ADDRESS.*": [1, 10], |
| 69 | + "test_call_frame_context_ops.*CALLER.*": [1, 10], |
| 70 | + "test_call_frame_context_ops.*ORIGIN.*": [1, 10], |
| 71 | + "test_call_frame_context_ops.*GASPRICE.*": [1, 10], |
| 72 | + "test_calldatasize.*": [1, 10], |
| 73 | + "test_callvalue.*": [1, 10], |
| 74 | + "test_calldataload.*": [1, 10], |
| 75 | + "test_returndatasize_nonzero.*": [1, 10], |
| 76 | + "test_returndatasize_zero.*": [1, 10], |
| 77 | + "test_returndatacopy.*": [1, 10], |
| 78 | + # COMPARISON OPERATIONS |
| 79 | + "test_comparison.*LT.*": [1, 10], |
| 80 | + "test_comparison.*GT.*": [1, 10], |
| 81 | + "test_comparison.*SLT.*": [1, 10], |
| 82 | + "test_comparison.*SGT.*": [1, 10], |
| 83 | + "test_comparison.*EQ.*": [1, 10], |
| 84 | + "test_iszero.*": [1, 10], |
| 85 | + # CONTROL FLOW OPERATIONS |
| 86 | + "test_gas_op.*": [1, 10], |
| 87 | + "test_jumpi_fallthrough.*": [1, 10], |
| 88 | + "test_jumpdests.*": [1, 10], |
| 89 | + # HASHING OPERATIONS |
| 90 | + "test_keccak_max_permutations.*": [1, 10], |
| 91 | + # LOGGING OPERATIONS |
| 92 | + "test_log.*LOG0.*": [1, 10], |
| 93 | + "test_log.*LOG1.*": [1, 10], |
| 94 | + "test_log.*LOG2.*": [1, 10], |
| 95 | + "test_log.*LOG3.*": [1, 10], |
| 96 | + "test_log.*LOG4.*": [1, 10], |
| 97 | + # MEMORY OPERATIONS |
| 98 | + "test_msize.*": [1, 10], |
| 99 | + "test_memory_access.*MLOAD.*": [1, 10], |
| 100 | + "test_memory_access.*MSTORE.*": [1, 10], |
| 101 | + "test_memory_access.*MSTORE8.*": [1, 10], |
| 102 | + "test_mcopy.*": [1, 10], |
| 103 | + # STACK OPERATIONS |
| 104 | + "test_swap.*SWAP1.*": [1, 10], |
| 105 | + "test_swap.*SWAP2.*": [1, 10], |
| 106 | + "test_swap.*SWAP3.*": [1, 10], |
| 107 | + "test_swap.*SWAP4.*": [1, 10], |
| 108 | + "test_swap.*SWAP5.*": [1, 10], |
| 109 | + "test_swap.*SWAP6.*": [1, 10], |
| 110 | + "test_swap.*SWAP7.*": [1, 10], |
| 111 | + "test_swap.*SWAP8.*": [1, 10], |
| 112 | + "test_swap.*SWAP9.*": [1, 10], |
| 113 | + "test_swap.*SWAP10.*": [1, 10], |
| 114 | + "test_swap.*SWAP11.*": [1, 10], |
| 115 | + "test_swap.*SWAP12.*": [1, 10], |
| 116 | + "test_swap.*SWAP13.*": [1, 10], |
| 117 | + "test_swap.*SWAP14.*": [1, 10], |
| 118 | + "test_swap.*SWAP15.*": [1, 10], |
| 119 | + "test_swap.*SWAP16.*": [1, 10], |
| 120 | + "test_dup.*DUP1.*": [1, 10], |
| 121 | + "test_dup.*DUP2.*": [1, 10], |
| 122 | + "test_dup.*DUP3.*": [1, 10], |
| 123 | + "test_dup.*DUP4.*": [1, 10], |
| 124 | + "test_dup.*DUP5.*": [1, 10], |
| 125 | + "test_dup.*DUP6.*": [1, 10], |
| 126 | + "test_dup.*DUP7.*": [1, 10], |
| 127 | + "test_dup.*DUP8.*": [1, 10], |
| 128 | + "test_dup.*DUP9.*": [1, 10], |
| 129 | + "test_dup.*DUP10.*": [1, 10], |
| 130 | + "test_dup.*DUP11.*": [1, 10], |
| 131 | + "test_dup.*DUP12.*": [1, 10], |
| 132 | + "test_dup.*DUP13.*": [1, 10], |
| 133 | + "test_dup.*DUP14.*": [1, 10], |
| 134 | + "test_dup.*DUP15.*": [1, 10], |
| 135 | + "test_dup.*DUP16.*": [1, 10], |
| 136 | + "test_push.*PUSH0.*": [1, 10], |
| 137 | + "test_push.*PUSH1.*": [1, 10], |
| 138 | + "test_push.*PUSH2.*": [1, 10], |
| 139 | + "test_push.*PUSH3.*": [1, 10], |
| 140 | + "test_push.*PUSH4.*": [1, 10], |
| 141 | + "test_push.*PUSH5.*": [1, 10], |
| 142 | + "test_push.*PUSH6.*": [1, 10], |
| 143 | + "test_push.*PUSH7.*": [1, 10], |
| 144 | + "test_push.*PUSH8.*": [1, 10], |
| 145 | + "test_push.*PUSH9.*": [1, 10], |
| 146 | + "test_push.*PUSH10.*": [1, 10], |
| 147 | + "test_push.*PUSH11.*": [1, 10], |
| 148 | + "test_push.*PUSH12.*": [1, 10], |
| 149 | + "test_push.*PUSH13.*": [1, 10], |
| 150 | + "test_push.*PUSH14.*": [1, 10], |
| 151 | + "test_push.*PUSH15.*": [1, 10], |
| 152 | + "test_push.*PUSH16.*": [1, 10], |
| 153 | + "test_push.*PUSH17.*": [1, 10], |
| 154 | + "test_push.*PUSH18.*": [1, 10], |
| 155 | + "test_push.*PUSH19.*": [1, 10], |
| 156 | + "test_push.*PUSH20.*": [1, 10], |
| 157 | + "test_push.*PUSH21.*": [1, 10], |
| 158 | + "test_push.*PUSH22.*": [1, 10], |
| 159 | + "test_push.*PUSH23.*": [1, 10], |
| 160 | + "test_push.*PUSH24.*": [1, 10], |
| 161 | + "test_push.*PUSH25.*": [1, 10], |
| 162 | + "test_push.*PUSH26.*": [1, 10], |
| 163 | + "test_push.*PUSH27.*": [1, 10], |
| 164 | + "test_push.*PUSH28.*": [1, 10], |
| 165 | + "test_push.*PUSH29.*": [1, 10], |
| 166 | + "test_push.*PUSH30.*": [1, 10], |
| 167 | + "test_push.*PUSH31.*": [1, 10], |
| 168 | + "test_push.*PUSH32.*": [1, 10], |
| 169 | + # STORAGE OPERATIONS |
| 170 | + "test_tload.*": [1, 10], |
| 171 | + "test_tstore.*": [1, 10], |
| 172 | + # SYSTEM OPERATIONS |
| 173 | + "test_return_revert.*RETURN.*": [1, 10], |
| 174 | + "test_return_revert.*REVERT.*": [1, 10], |
| 175 | + # TRANSACTION CONTEXT OPERATIONS |
| 176 | + "test_blobhash.*": [1, 10], |
| 177 | +} |
0 commit comments