Skip to content

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

Merged
Gabriel-Trintinalia merged 3 commits intobesu-eth:mainfrom
Gabriel-Trintinalia:add-state-to-state-override
Feb 2, 2025
Merged

Simulation: Add state to StateOverride (eth_call, eth_simulateV1).#8166
Gabriel-Trintinalia merged 3 commits intobesu-eth:mainfrom
Gabriel-Trintinalia:add-state-to-state-override

Conversation

@Gabriel-Trintinalia
Copy link
Copy Markdown
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 <gabriel.trintinalia@consensys.net>
Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
@macfarla macfarla self-assigned this Feb 2, 2025
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 besu-eth:main Feb 2, 2025
@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
…esu-eth#8166)

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
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