-
Notifications
You must be signed in to change notification settings - Fork 100
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
StateService: broken findstates
handler in case of destroyed/updated contract
#650
Comments
findstates
handler in case of destroyed contractfindstates
handler in case of destroyed/updated contract
The same problem may happen while trying to find the historical states of the updated contract if its hash has been changed. |
N3 will not change the contract hash when update. |
We should use |
Thank you, forgot about it. Then the issue is relevant for destroyed contracts only. |
Describe the bug
The new
findstates
RPC API introduced in #638 seems to be broken. The reason is in this and this lines of the method.findstates
triesGetProof
for historical state, butGetProof
asks ContractManagement for the contract ID. As a result, for those contracts that have been destroyed and for the historical states of that contractsfindstates
will throw an exception, because ContractManagement is not able to get historical contract ID of destroyed contract.Expected behavior
findstates
should get historical proof, i.e. fetch historical contract ID from MPT (using GetHistoricalContractState method) to get proof for the first and the last states.Platform:
The text was updated successfully, but these errors were encountered: