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

Fetching shielded balance via SDK nor extension working #662

Closed
zenodeapp opened this issue Mar 12, 2024 · 6 comments · May be fixed by #716
Closed

Fetching shielded balance via SDK nor extension working #662

zenodeapp opened this issue Mar 12, 2024 · 6 comments · May be fixed by #716
Labels
App: Namadillo bug Something isn't working discussion

Comments

@zenodeapp
Copy link
Contributor

zenodeapp commented Mar 12, 2024

Hey,

image

Whenever I attempt to query a shielded balance for a viewing key via the SDK, I get just a lot of POST request to my rpc endpoint. This just continue to go on. While I don't mind to wait whether it will actually result in something, this will definitely not be feasible for a multiple user front-end.

The extension way gives a:
Error: No results have been found on Vault-error.

Again, this is probably due to the current shielded-sync approach and you guys are likely working at it. But wanted to express this as to see whether it's a me-problem or a common one amongst us all.

ZEN

@zenodeapp
Copy link
Contributor Author

Close this asap if it's already a known issue. Don't wanna let the issues tab become bloated like the main namada-repository 😅.

@thousandsofthem
Copy link

Extension without balances is pretty useless, if i can't see own balance then i can't use shielded transactions. Don't work for me as well

@pnam1609
Copy link

pnam1609 commented Mar 21, 2024

Now, SE network have 190k block and spend more than 2 day can shielded sync. So i tried reduce time fetching MASP. This is my PR: #667. And i still working on it

@mateuszjasiuk
Copy link
Collaborator

mateuszjasiuk commented Mar 22, 2024

Hello. To give you more context about the issue. The problem is that atm we have to query each block to produce shielded context which takes a long time. For SE, as of now, it means querying 160 000 blocks. If you use interface(namada.me) this won't work as we timeout query function after some time(there was a reason for that which is not really that important to this conversation :)).

What is more:

  • if you did not do any shileding/unshielding this means querying 160 000 blocks each time as context is only saved when it detects some change in relation to viewing keys that you provided. This also means that once you add another shielded account you have to query everything from the beginning
  • if you made shielding transfer at block 100 000, and once you fetched shielded context, this means that every next shielded context fetch will start from block 100 000
  • currently published extension uses Namada SDK in version 0.31.8 which is outdated and some of the functionalities might not work with the SE

Upsides:

  • we have a 0.32.0 bump PR which removes the timeout for query_balance
  • there was a recent change to the Namada SDK which allows you to pass a block index that is a starting index of the shielded context fetch, which allows to write some improvements, like storing index of last fetched block in frontend or whatnot

@zenodeapp
Copy link
Contributor Author

Hello. To give you more context about the issue. The problem is that atm we have to query each block to produce shielded context which takes a long time. For SE, as of now, it means querying 160 000 blocks. If you use interface(namada.me) this won't work as we timeout query function after some time(there was a reason for that which is not really that important to this conversation :)).

What is more:

  • if you did not do any shileding/unshielding this means querying 160 000 blocks each time as context is only saved when it detects some change in relation to viewing keys that you provided. This also means that once you add another shielded account you have to query everything from the beginning
  • if you made shielding transfer at block 100 000, and once you fetched shielded context, this means that every next shielded context fetch will start from block 100 000
  • currently published extension uses Namada SDK in version 0.31.8 which is outdated and some of the functionalities might not work with the SE

Upsides:

  • we have a 0.32.0 bump PR which removes the timeout for query_balance
  • there was a recent change to the Namada SDK which allows you to pass a block index that is a starting index of the shielded context fetch, which allows to write some improvements, like storing index of last fetched block in frontend or whatnot

Hey thanks for this update and thorough description! I'll check this out at the end of this week and see what I can do to get something working with the current state of the SDK!

@jurevans
Copy link
Collaborator

@zenodeapp Hello! Just FYI - I'm closing this issue as we're revamping shielded balances right now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: Namadillo bug Something isn't working discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants