test_genesis_hash_available()¶
Documentation for tests/frontier/opcodes/test_blockhash.py::test_genesis_hash_available@ffe48572.
Generate fixtures for these test cases for Bogota with:
Verify BLOCKHASH returns genesis and block 1 hashes.
Regression test: Blockchain test infrastructure must populate block hashes before execution. Without this, BLOCKHASH returns 0, breaking dynamic address computations like BLOCKHASH(0) | TIMESTAMP.
Tests both genesis (block 0) and first executed block (block 1) hash insertion by calling the contract in block 2.
Bug context: revm blockchaintest runner wasn't inserting block_hashes, causing failures in tests with BLOCKHASH-derived addresses.
Source code in tests/frontier/opcodes/test_blockhash.py
Parametrized Test Cases¶
This test generates 4 parametrized test cases across 17 forks.