Difference between PRV balance displayed by Incognito wallet and getbalancebyprivatekey RPC

@daniel Please consider the below-mentioned example:
Let us consider two virtual nodes ie Vnode A and Vnode B. (Note: OTA Keys of both the nodes have been submitted to our full node using authorizedsubmitkey)

  1. Vnode A
    PRV wallet balance displayed by Incognito Wallet- 0.01356
    PRV wallet balance displayed by getbalancebyprivatekey rpc- 0.0083

  2. Vnode B
    PRV wallet balance displayed by Incognito Wallet- 17.3022
    PRV wallet balance displayed by getbalancebyprivatekey RPC- 0.0085

So clearly the balance displayed by the RPC call was inaccurate
So I Resubmitted the OTA keys of Node A and Node B to our full node, waited for the OTA keys to sync, and used the getbalancebyprivatekey RPC call again and this time the balance return by the RPC call was the same as that displayed by the incognito wallet ie it returned accurate balance.

Can you explain to me why was the RPC displaying a different balance before and why did it display the correct Balance upon resubmitting the OTA key?

Do I have to always resubmit OTA keys after any transaction ie withdrawing or transferring prv’s to a different wallet?
I assumed submitting the OTA key was one-time scenario but it seems like if I make a new transaction and then use the getbalancebyprivatekey RPC, it won’t return an accurate value.

Let us consider another example:
Node C had 11 prv’s, but the getbalancebyprivatekeyrpc returned 0
I transferred 33 prv’s to node c and the RPC returned 33 instead of displaying 44 (11+33)
@sid

This is weird, to be honest. The RPC result and wallet result should be the same, in all cases. I never encountered this situation before, and from what I can think of, there might be something wrong with how the full-node cached your coins. I’ll look into it, thanks for reporting.

But did this happen frequently? Did you restart the node right after submitting?

As I said, they should be the same. I’ll into it.

No, one-time with authorization is sufficient.

1 Like

@daniel - thank you for a prompt response. I’ll let @anirudh.chauhan reply, but we haven’t restarted the full node as yet. We compared the block heights for the beacon and all eight shards of our full node - to match it with Incognito’s full node and they match perfectly. This led us to believe that nothing should be wrong with our full node, except something to do with weird caching, which is still unclear.

I’m also tagging @Jared so he is aware. Thank you!

3 Likes

Well noted, thank you.

1 Like

Try sending all your PRV to your same account. Copy you incognito addresses, and send all to your self.