test_set_code_to_precompile_not_enough_gas_for_precompile_execution()¶
Documentation for tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_precompile_not_enough_gas_for_precompile_execution@26332146.
Generate fixtures for these test cases for Osaka with:
fill -v tests/prague/eip7702_set_code_tx/test_set_code_txs.py::test_set_code_to_precompile_not_enough_gas_for_precompile_execution --fork Osaka
Test set code to precompile and making direct call in same transaction with intrinsic gas only, no extra gas for precompile execution.
Redundant from EIP-8037: EIP-8037 replaces the one-dimensional gas model this test verifies. Auth intrinsic cost becomes (STATE_BYTES_PER_AUTH_BASE + STATE_BYTES_PER_NEW_ACCOUNT) * cost_per_state_byte per auth (state gas), plus PER_AUTH_BASE_COST (regular gas). Auth refund for existing accounts goes to state_gas_reservoir instead of refund_counter, making the discount calculation (PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST) and receipt gas expectation invalid.
TODO: Add EIP-8037-specific variant in tests/amsterdam/ that verifies receipt gas and auth refund under EIP-8037's 2D model.
Source code in tests/prague/eip7702_set_code_tx/test_set_code_txs.py
3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 | |
Parametrized Test Cases¶
This test generates 18 parametrized test cases across 2 forks.