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

Investigate feasibility of storing EVM registers on transaction basis #729

Open
m-Peter opened this issue Jan 22, 2025 · 0 comments
Open

Comments

@m-Peter
Copy link
Collaborator

m-Peter commented Jan 22, 2025

Currently, the local state index, stores the EVM state changes per block, under a single register ID: https://github.com/onflow/flow-evm-gateway/blob/main/storage/pebble/register_storage.go#L80-L100 .

For certain cases, such as generating the trace of a transaction, it would be optimal if we can load the EVM for a given transaction index, on a given block. Now we are forced to replay all the preceding transactions in a given block, to generate the trace for the given transaction index: https://github.com/onflow/flow-evm-gateway/blob/main/api/debug.go#L331-L357 .

A good first step is to add some metrics, to count how many preceding transactions we need to replay, on average, before generating the requested transaction trace. And possibly measure the execution time as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant