ethereum / ethereum/execution-specs

pre.fund_eoa() should be able to internally discern between execute and fill modes

Open
#1,892 2 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
Python
Stars
1.2k
Forks
505
Avg merge
2d 14h
Merged PRs (30d)
116

Description

In the convo I had with Louis reg. #1885, the following was mentioned:

```
I think this is why the current `execute remote` flow is failing. From my understanding of the implementation, here we intend to fund 1 wei to `aux_address`. However, `pre.fund_eoa()` does not work this way, it creates a new EOA instead of funding an existing account.

I experimented with manually injecting the account, but this only works in `fill` mode:
```python
pre[aux_address] = Account(address=aux_address, balance=1)
```

The correct solution might be to create funding transactions instead:
```python
funding_tx = Transaction(
to=aux_address,
value=1, # 1 wei to create the account in the trie
gas_limit=21_000,
sender=deployer_eoa,
)
funding_txs.append(funding_tx)
```
```
_Originally posted by @LouisTsai-Csie in https://github.com/ethereum/execution-specs/pull/1885#discussion_r2605687417_

It's a bit odd that something that the framework could handle behind the scenes is enforced to be defined in the test directly.
In this case, the `pre.fund_eoa()` doesn't allow to after fund accounts for which we want a specific address.
This is something that breaks the `fill/execute` compat. As I'm now forced to make my scenario only `execute-viable` vs only `fill-viable`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.