Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,18 @@ class CallDataTestType(Enum):
],
)
@pytest.mark.with_all_refund_types()
@pytest.mark.filter_combinations(
lambda refund_type, refund_tx_reverts, calldata_test_type, **_: not (
refund_type == RefundTypes.STORAGE_CLEAR
and refund_tx_reverts
and calldata_test_type
== CallDataTestType.DATA_FLOOR_BETWEEN_TX_GAS_BEFORE_AND_AFTER
),
reason=(
"STORAGE_CLEAR refund is zero on revert, so the (post, pre) "
"interval that DATA_FLOOR_BETWEEN needs is empty"
),
)
@pytest.mark.valid_from("EIP7778")
def test_varying_calldata_costs(
blockchain_test: BlockchainTestFiller,
Expand All @@ -388,17 +400,6 @@ def test_varying_calldata_costs(
2. tx_gas_after_refund < calldata_floor < tx_gas_before_refund
3. calldata_floor > tx_gas_before_refund
"""
if refund_type == RefundTypes.STORAGE_CLEAR:
if (
refund_tx_reverts
and calldata_test_type
== CallDataTestType.DATA_FLOOR_BETWEEN_TX_GAS_BEFORE_AND_AFTER
):
pytest.skip(
"calldata_cost cannot be between pre and post refund gas"
"since refund is zero when execution reverts"
)

match refund_type:
case RefundTypes.STORAGE_CLEAR:
bytes_to_add_per_iteration = b"00" * 2
Expand Down
Loading