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

refactor: expose API to perform intermediate read-only queries on state #1236

Open
raulk opened this issue Dec 17, 2024 · 0 comments
Open

refactor: expose API to perform intermediate read-only queries on state #1236

raulk opened this issue Dec 17, 2024 · 0 comments
Assignees

Comments

@raulk
Copy link
Contributor

raulk commented Dec 17, 2024

There are several occasions in which the ABCI app needs to perform a query on the intermediate state prior to committing it. One such example is #1234.

Currently we're working around the lack of such an API by using modify_exec_state, which downgrades safety.

Let's implement the corresponding API so we can retain safety, and let's migrate illegitimate use cases to it.

Prior discussion

@cryptoAtwill Unfortunately the FVM executor does not expose read-only semantics through its execute_message API.

So we'd have to add a method to "fork" the executor/machine using the intermediate state tree root (which you can get from machine.state_tree()) and a BufferedBlockstore over the original Blockstore (machine.blockstore()), which we discard after we finish the query.

Originally posted by @raulk in #1234 (review)

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

No branches or pull requests

2 participants