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

[EVM] Offchain package - part 3 #6546

Open
wants to merge 16 commits into
base: ramtin/evm-offchain-part2
Choose a base branch
from

Conversation

ramtinms
Copy link
Member

@ramtinms ramtinms commented Oct 7, 2024

depends on #6545
Context:
the Offchain package allows off-chain software like (GW) to follow the EVM chain and be able to replay all transactions. It also facilitates running queries (e.g. eth_Call), making the complex internal details hidden from the user.

This PR provides the query functionality that can be used to query account meta (e.g. Balance, ...) and make eth_call supporting passing optional tracer and overriding values.

@ramtinms ramtinms marked this pull request as ready for review October 8, 2024 17:55
if err != nil {
return err
}
return baseView.Commit()
Copy link
Member

Choose a reason for hiding this comment

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

I must miss something here.

Does the Commit call persist the balance update into database?

If we want to override the balance for making a dry call, do we also need to revert the balance update after the dry call? Because otherwise, the dry call isn't "dry" since the database is updated, it will affect the next dry call. No?

Copy link
Member Author

Choose a reason for hiding this comment

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

storage that is passed to the baseView is of type storage.EphemeralStorage. so all the changes would be discarded.

Copy link
Collaborator

@m-Peter m-Peter left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@janezpodhostnik janezpodhostnik left a comment

Choose a reason for hiding this comment

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

lg2m

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.

4 participants