test_multi_block_observed_coinbase_balance()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py::test_multi_block_observed_coinbase_balance@c74f1a67.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py::test_multi_block_observed_coinbase_balance --fork Amsterdam
Observe coinbase balance between state-creating transactions.
A reporter contract reads BALANCE(COINBASE) and stores it.
This makes receipt_gas_used directly observable: if a client
computes a different receipt_gas_used for prior transactions,
the stored balance will differ and the state root will not match.
Block 1
Tx 1: SSTORE zero-to-nonzero (coinbase earns fee).
Tx 2: Store BALANCE(COINBASE) in slot 0.
Block 2
Tx 3: Child spills state gas then reverts; parent SSTOREs
(coinbase earns fee through different code path).
Tx 4: Store BALANCE(COINBASE) in slot 0.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_multi_block.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.