Skip to content
Merged
Show file tree
Hide file tree
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 @@ -78,6 +78,7 @@ def deploy_deterministic_factory_contract(
fund_tx = Transaction(
to=deploy_tx_sender,
value=fund_amount,
gas_limit=200_000,
gas_price=gas_price,
sender=seed_key,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_recover_funds(
del index

remaining_balance = eth_rpc.get_balance(eoa)
refund_gas_limit = 21_000
refund_gas_limit = 200_000
tx_cost = refund_gas_limit * gas_price
if remaining_balance < tx_cost:
pytest.skip(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ def __init__(
address_stubs: AddressStubs | None = None,
block_number: int = 0,
timestamp: int = 0,
funding_gas_limit: int = 200_000,
**kwargs: Any,
) -> None:
"""Initialize the pre-alloc with the given parameters."""
Expand All @@ -260,6 +261,7 @@ def __init__(
self._address_stubs = address_stubs or AddressStubs(root={})
self._block_number = block_number
self._timestamp = timestamp
self._funding_gas_limit = funding_gas_limit

def code_pre_processor(self, code: Bytecode) -> Bytecode:
"""Pre-processes the code before setting it."""
Expand Down Expand Up @@ -638,6 +640,7 @@ def _fund_eoa(
target=label,
to=eoa,
value=amount,
gas_limit=self._funding_gas_limit,
)

if fund_tx is not None:
Expand Down Expand Up @@ -855,6 +858,7 @@ def _resolve_fund_addresses(self) -> None:
target=d.address.label,
to=d.address,
value=d.amount - current_balance,
gas_limit=self._funding_gas_limit,
)
new_balance = d.amount
else:
Expand All @@ -869,6 +873,7 @@ def _resolve_fund_addresses(self) -> None:
target=d.address.label,
to=d.address,
value=d.amount,
gas_limit=self._funding_gas_limit,
)
new_balance = current_balance + d.amount

Expand Down Expand Up @@ -977,6 +982,7 @@ def pre(
max_fee_per_gas: int,
max_priority_fee_per_gas: int,
dry_run: bool,
sender_fund_refund_gas_limit: int,
request: pytest.FixtureRequest,
) -> Generator[Alloc, None, None]:
"""Return default pre allocation for all tests (Empty alloc)."""
Expand All @@ -1000,6 +1006,7 @@ def pre(
chain_id=chain_config.chain_id,
node_id=request.node.nodeid,
address_stubs=address_stubs,
funding_gas_limit=sender_fund_refund_gas_limit,
)

# Yield the pre-alloc for usage during the test
Expand All @@ -1025,7 +1032,7 @@ def pre(
# Build refund transactions
refund_txs: List[Transaction] = []
skipped_refunds = 0
refund_gas_limit = 21_000
refund_gas_limit = sender_fund_refund_gas_limit
tx_cost = refund_gas_limit * max_fee_per_gas
for idx, eoa in enumerate(funded_eoas):
account = eth_rpc.get_account(eoa, skip_code=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
action="store",
dest="sender_fund_refund_gas_limit",
type=Wei,
default=21_000,
default=200_000,

@fselmo fselmo Mar 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I figured we should bump the default here since this is already targeting a branch with EIP-8037 in it. This should make it so we don't have to pass the updated gas limit via the flag for these tests to properly run but I think this is a good configuration change to make anyhow. Both of these seem like complementary changes to me.

help=(
"Gas limit set for the funding transactions of each worker's sender key." # noqa: E501
),
Expand Down
Loading