test_bal_intra_tx_round_trip_after_prior_tx_write()¶
Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py::test_bal_intra_tx_round_trip_after_prior_tx_write@87aba1a3.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py::test_bal_intra_tx_round_trip_after_prior_tx_write --fork Amsterdam
Verify a per-tx no-op SSTORE round-trip is not recorded as a storage change when an earlier tx in the same block wrote the slot.
Per EIP-7928 §Storage, a write is compared against "the storage value
as of immediately before the current block_access_index (i.e., the
cumulative state from all prior indices, falling back to the pre-block
state)", and "a no-op write MUST NOT remove storage_changes entries
from earlier indices for the same slot".
Both txs call the same contract whose runtime SSTOREs 0xff then 0x42
to slot 1. Tx 1 changes slot 1 from 0 to 0x42 (real change). Tx 1's
write becomes tx 2's baseline, so tx 2's 0x42 -> 0xff -> 0x42 nets to
a no-op and only tx 1 appears in storage_changes (with tx 1's entry
left intact).
Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_cross_index.py
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 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.