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

Implement z_gettotalsaplingnotescount rpc call #4463

Closed
kowalski opened this issue Apr 18, 2020 · 0 comments · Fixed by #4465
Closed

Implement z_gettotalsaplingnotescount rpc call #4463

kowalski opened this issue Apr 18, 2020 · 0 comments · Fixed by #4465
Labels
M-has-pr To-be-removed (GitHub has linked:pr filter) use case

Comments

@kowalski
Copy link

We would like to ask to implement a rpc call that will return a length of wtx.mapSaplingNoteData structure. We would like to have a very "cheap" way of knowing if znode received a note since last time we check.

Today we (Zbay team) use z_getreceivedbyaddress call for each observed address which we call frequently. This proves to be very expensive in terms of CPU usage, because every call requires decrypting all the notes in the wallet.

If there is an endpoint giving the overall count we can just call it first and immediately know that there is no need for scanning each address (if count is the same as last time we've checked).
We will only rescan addresses (using z_getreceivedbyaddress) if the count has changed since the last call.

This will allow us to drastically reduce number of calls Zbay is making and consequently reduce the footprint it has for the OS.

@mdr0id mdr0id added the M-has-pr To-be-removed (GitHub has linked:pr filter) label Apr 20, 2020
@zkbot zkbot closed this as completed in 0dbb2d0 Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-has-pr To-be-removed (GitHub has linked:pr filter) use case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants