fix: use current exec state when querying validator table#1234
Merged
Conversation
Contributor
|
@karlem Somehow the first impression that strikes is shouldnt we try to update the |
raulk
reviewed
Dec 17, 2024
Contributor
There was a problem hiding this comment.
@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.
Alternatively, we could forego this state query entirely and:
- Guarantee we have always have a fully initialized ValidatorCache at the start.
- Merge the power updates onto our ValidatorCache.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #1233
The issue has been resolved by using the current execution state instead of the previous state retrieved through the read-only view. This ensures that the validators cache accurately reflects the latest set of validators, preventing the panic.