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

Create an API that enables you to simulate execution of an action and see what state keys it touches. #1552

Open
richardpringle opened this issue Sep 13, 2024 · 2 comments · May be fixed by #1610
Assignees
Labels

Comments

@richardpringle
Copy link
Collaborator

The Recorder struct from the vmwithcontracts example should be moved into the core of the hyper-sdk because it's likely useful for all vms.

Originally posted by @aaronbuchwald in #1493 (comment)

@aaronbuchwald
Copy link
Collaborator

This should be similar to #1550 w/ the exception that it will need to execute against a full trie view (support a sequence of dependent R/W operations) rather than using ReadState to get an atomic read of the keys specified by StateKeys

@aaronbuchwald
Copy link
Collaborator

This should move

func (j *JSONRPCServer) simulate(ctx context.Context, t actions.Call, actor codec.Address) (state.Keys, uint64, error) {
to be a general purpose call next to
func (j *JSONRPCServer) Execute(
.

Separately, we should update merkledb to smoothly transition the returned immutable state (using last accepted) to using the historical revisions to provide a consistent view that does not get invalidated when a block is accepted.

@tsachiherman tsachiherman self-assigned this Sep 26, 2024
@tsachiherman tsachiherman linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants