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

(WIP) cache codehash for performance #471

Closed
wants to merge 3 commits into from
Closed

Conversation

samalws-tob
Copy link
Contributor

@samalws-tob
Copy link
Contributor Author

Ran benchmark, this removes ExtractContractMetadata from the flamegraph, just about doubles gas/second, and increases calls/second by about 50%

Need to clean this up a lot, I think we can remove the cachedGethCodeHash entirely and keep only one of the gethCodeHashToCodeHash's but I'm not sure which of them to keep, should be easy enough to figure out
Also I need to check the assumption that geth's codehash value is different during init vs during runtime. If it's not true we need to change gethCodeHashToCodeHash to a map[bool]map[common.Hash]*common.Hash. Might want to do this anyway just to be safe

@samalws-tob
Copy link
Contributor Author

#472

@samalws-tob samalws-tob closed this Sep 5, 2024
@samalws-tob samalws-tob deleted the cache-codehash branch September 9, 2024 18:30
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