Skip to content

Conversation

@codeofcarson
Copy link
Contributor

@codeofcarson codeofcarson commented Feb 3, 2025

What was wrong?

EIP-7708: ETH transfers emit a log

This is a prospective implementation of EIP-7708 and is not intended as a final candidate for merge. Rather, it is intended to illustrate one approach to the implementation, and to generate feedback that can be used to sharpen the specifications for this EIP.

How was it fixed?

During the development several approaches were considered, but what seemed to make sense in the end was to create a new function for this specific type of log, and to invoke that function from three key places where transfers occur. The first in selfdestruct, the second in call (both in system.py), and the third in execute_code (interpreter.py). By targeting critical paths in the flow of processing transfers, we can minimize implementation footprint and bring sharp focus to the changeset.

An issue that is inherent to the implementation of this EIP is that the Logs are stored in the EVM (_vm/_init.py), which makes it difficult to test in an automated way due to problems accessing the correct instance of the EVM at runtime. A creative approach is needed here. We do not want to sacrifice code coverage unless we have no practical option. In lieu of this, I opted to make local changes to my branch and use the python debugger to gain a view into the state of the system at runtime in order to check that the log parameter was being properly set in the EVM instance during different transfer scenarios.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

Carson Wilcox added 5 commits February 3, 2025 09:07
- Many TODOs
- Outstanding questions about converting between types.
- Not clear how to measure the "size" of the transfer amount for the memory call that log_n invokes.
- I think I might also need to log for delegatecall
- Unclear how to get the memory start position for selfdestruct
@codeofcarson codeofcarson changed the title DRAFT: eips/prague/eip 7708 DRAFT: EIP-7708 Feb 3, 2025
@codeofcarson codeofcarson marked this pull request as draft February 3, 2025 14:15
@codeofcarson codeofcarson closed this by deleting the head repository Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant