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

feat: firehose live tracer #53

Draft
wants to merge 33 commits into
base: feature/erigon-live-tracer-port
Choose a base branch
from

Conversation

dhyaniarun1993
Copy link
Collaborator

@dhyaniarun1993 dhyaniarun1993 commented Dec 11, 2023

I have opened this PR just to monitor the change

Missing Commits
streamingfast/go-ethereum@8849451

Comment on lines 828 to 831
if f.isPrecompileAddress(a) {
return
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

How this method is not working but propagating the precompile down to StateDB works. I think it will be important to understand what is the difference.

That being said, the native tracer Git commit s1na/go-ethereum@ee58cc7 implements it differently, I think porting those will be needed

Copy link
Collaborator Author

@dhyaniarun1993 dhyaniarun1993 Dec 15, 2023

Choose a reason for hiding this comment

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

That being said, the native tracer Git commit s1na/go-ethereum@ee58cc7 implements it differently, I think porting those will be needed

These changes are already ported in statedb: precompile check before onNewAccount commit. I removed precompile check from here since it being done at statedb now.

How this method is not working but propagating the precompile down to StateDB works. I think it will be important to understand what is the difference.

In the old firehose implementation, we take the precompile flag on the AddBalance here. If you check the references of AddBalance, In majority of the cases we are sending hardcoded false instead of checking against the precompile config. Because of this even precompiled contracts are getting logged in the NewAccount in some cases.
Whereas in new implementation, each and every account was checked against the precompile config.

In this commit, I added a new flag checkPrecompile, that denotes if new account should be checked against precompiled address or not. I am sending checkPrecompile values according to the firehose old implementation to make the new tracer backward compatible.

@maoueh Let me know what you think

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.

2 participants