-
Notifications
You must be signed in to change notification settings - Fork 463
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
Feature/verifytrie admin rpc #7962
base: master
Are you sure you want to change the base?
Conversation
public ResultWrapper<string> admin_verifyTrie() | ||
{ | ||
if (_blockTree.Head is null) | ||
{ | ||
return ResultWrapper<string>.Fail("Head is null. Unable to know state root to verify."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially can we pass the BlockParameter
where we want to verify tries?
Also potentially should we add admin_availableStateRoots
, where it would look-up where state root is available in some block range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, why not.
_logger.Error($"Error in verify trie", e); | ||
} | ||
|
||
}, TaskCreationOptions.LongRunning); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we were removing LongRunning
because of some reason, @benaadams ?
{ | ||
if (_blockTree.Head is null) | ||
SearchResult<BlockHeader> headerSearchResult = _blockTree.SearchForHeader(block); | ||
if (headerSearchResult.Object is null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a check if state root is available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
admin_verifyTrie
RPC.Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing