test_bal_cross_block_ripemd160_state_leak()¶
Documentation for tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py::test_bal_cross_block_ripemd160_state_leak@892e6d1e.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py::test_bal_cross_block_ripemd160_state_leak --fork Amsterdam
Ensure internal EVM state for RIMPEMD-160 precompile handling does not leak between blocks.
The EVM may track internal state related to the Parity Touch Bug (EIP-161) when calling RIPEMD-160 (0x03) with zero value. If this state is not properly reset between blocks, it can cause incorrect BAL entries in subsequent blocks.
Prerequisites for triggering the bug: 1. RIPEMD-160 (0x03) must already exist in state before the call. 2. Block 1 must call RIPEMD-160 with zero value and complete successfully. 3. Block 2 must have a TX that triggers an exception (not REVERT).
Expected behavior: - Block 1: RIPEMD-160 in BAL (legitimate access) - Block 2: RIPEMD-160 NOT in BAL (never touched in this block)
Bug behavior: - Block 2 incorrectly has RIPEMD-160 in its BAL due to leaked internal state.
Source code in tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py
2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.