Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: EIP-7708 #1105

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

codeofcarson
Copy link

@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-->

- 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 force-pushed the eips/prague/eip-7708 branch 2 times, most recently from 9afe917 to bb958c5 Compare February 3, 2025 15:02
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