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

namadac balance executes many requests #2666

Closed
Rigorously opened this issue Feb 20, 2024 · 7 comments
Closed

namadac balance executes many requests #2666

Rigorously opened this issue Feb 20, 2024 · 7 comments
Labels
client enhancement New feature or request good first issue Good for newcomers prio:medium SDK

Comments

@Rigorously
Copy link

namadac balance --owner me first returns a balance, then triggers a rate limiter set to 30 per 10 sec.
namadac balance --token naan also triggers a rate limiter set to 30 per 10 sec, but does not return anything.
namadac balance --owner me --token naan returns a list of balances, but does not trigger the rate limiter.

The implementation of balance appears to be inefficient and could put an unnecessarily large load on nodes.

@Rigorously
Copy link
Author

Rigorously commented Feb 20, 2024

Same with a shielded transfer, but not a transparent to transparent transfer. Trigger was set to 100 requests per 10 seconds.

namadac transfer \ --source <your-established-account-alias> \ --target <your-payment-address-alias> \ --token <token> \ --amount <amount-to-shield>

@sug0 sug0 added enhancement New feature or request client SDK good first issue Good for newcomers prio:medium labels Feb 22, 2024
@Fraccaman
Copy link
Member

the problem is that both balance and shiedled transfer first are trying to sync the shiedled context and then they do the txs. Try to update to the latest release and use the shielded sync command first and the issue a balance query.

@Fraccaman Fraccaman reopened this Feb 22, 2024
@Rigorously
Copy link
Author

Syncing is now decoupled from the commands, the user has to manually sync. However the source of problem remains, fetching and scanning all blocks, which gets worse as the chain grows. Depending on the computing power of the client, it could actually become impossible to catch up when not continually syncing.

@HadesGuard
Copy link

totally agree with you @Rigorously

@Rigorously
Copy link
Author

I had planned to improve syncing. Alas, I cannot make it in time for the end of the Shielded Event. I would have taken inspiration from Zcash BlazeSync and WarpSync:

https://forum.zcashcommunity.com/t/zecwallets-blazesync-sync-entire-chain-in-60s/

https://hhanh00.github.io/zcash-sync/

@phat-kf
Copy link

phat-kf commented Apr 16, 2024

A Good improvement.

@HadesGuard
Copy link

HadesGuard commented Apr 16, 2024

when you start it @Rigorously? , we need it in the mainnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client enhancement New feature or request good first issue Good for newcomers prio:medium SDK
Projects
None yet
Development

No branches or pull requests

5 participants