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

Simulation: Add state to StateOverride (eth_call, eth_simulateV1). #8166

Conversation

Gabriel-Trintinalia
Copy link
Contributor

@Gabriel-Trintinalia Gabriel-Trintinalia commented Jan 24, 2025

PR description

The state field functions similarly to stateDiff, but with the added functionality of clearing the storage before applying the diff map.

refs #5788

Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
@macfarla macfarla self-assigned this Feb 2, 2025
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

non-blocking suggestion

(key, value) ->
account.setStorageValue(
UInt256.fromHexString(key), UInt256.fromHexString(value)));
});
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe extract lines 472-475 to a method and call it for state and stateDiff - something like setStorageValues or applyStorageOverrides ...

Copy link
Contributor

Choose a reason for hiding this comment

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

or maybe 470-475 and pass a boolean for whether to clear first

@macfarla macfarla added the doc-change-required Indicates an issue or PR that requires doc to be updated label Feb 2, 2025
@Gabriel-Trintinalia Gabriel-Trintinalia enabled auto-merge (squash) February 2, 2025 23:36
@Gabriel-Trintinalia Gabriel-Trintinalia merged commit 8d360a3 into hyperledger:main Feb 2, 2025
43 checks passed
@bgravenorst bgravenorst removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Feb 4, 2025
pullurib pushed a commit to pullurib/besu that referenced this pull request Feb 6, 2025
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.

3 participants