ethereum / ethereum/execution-specs
Investigate using `apply_fork` unconditionally instead of conditionally calling `apply_dao` in `t8n`
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 505
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 116
Description
In our `t8n` implementation, we currently conditionally call `apply_dao`:
https://github.com/ethereum/execution-specs/blob/5e8aeb3e5b4ba6d2ff2308b1ab9625ef0c38a4f6/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py#L49-L50
Every fork implements an `apply_fork` function. For example:
https://github.com/ethereum/execution-specs/blob/5e8aeb3e5b4ba6d2ff2308b1ab9625ef0c38a4f6/src/ethereum/cancun/fork.py#L95-L114
Maybe we could do something like the following instead:
```python
fake_chain = BlockChain(blocks=[], state=state, chain_id=1)
t8n.fork.apply_chain(fake_chain)
self.state = fake_chain.state
```
_Originally posted by @SamWilsn in https://github.com/ethereum/execution-specs/pull/737#discussion_r1149771273_
Contributor guide
Assessment
This issue has not been assessed yet.