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

Fix fetchMissingData with remote blockchain #430

Closed
mitschabaude opened this issue Sep 20, 2022 · 3 comments · Fixed by #691
Closed

Fix fetchMissingData with remote blockchain #430

mitschabaude opened this issue Sep 20, 2022 · 3 comments · Fixed by #691
Assignees
Labels
berkeley-incentivized bug Something isn't working to-discuss Issues to be discussed further

Comments

@mitschabaude
Copy link
Collaborator

No description provided.

@mitschabaude
Copy link
Collaborator Author

mitschabaude commented Sep 20, 2022

doesn't seem to do the right thing anymore
causing stuff like

Error: x.get() failed, because the zkapp account was not found in the cache. Try calling `await fetchAccount(zkappAddress)` first.

@mitschabaude mitschabaude added the bug Something isn't working label Sep 21, 2022
@bkase bkase self-assigned this Sep 27, 2022
@bkase bkase removed their assignment Oct 24, 2022
@bkase bkase closed this as completed Oct 31, 2022
@shimkiv
Copy link
Member

shimkiv commented Nov 5, 2022

@shimkiv
Copy link
Member

shimkiv commented Nov 23, 2022

Issue still persists.

  • Deploy zkApp with some initial account state (say, appState[0] = 2);
  • In SnarkyJS Web version reload the page after SC deployment to make sure the state won't be available and zkApp SC instance will be re-instantiated if needed;
  • Invoke zkApp's method with some constraints (for example the update one passing same value 2 as was used with deployment) by calling it in Web version, similarly to updateOnChainZkAppStateWeb() method.

SC method invocation will result in the error like this "Error: assert_equal: 0 != 2", where 0 means that the current state of the account is unknown.
But should you manually fetch the account's state after this, like calling the await fetchAccount(...), and invoke update method again - you will receive the correct (for this SC) error "Error: assert_equal: 4 != 2", where 4 means that now account's state reflects the truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
berkeley-incentivized bug Something isn't working to-discuss Issues to be discussed further
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants