autonity / aut

A command-line RPC client for Autonity
MIT License
11 stars 10 forks source link

The returned value of "aut account balance" is not correct while node is syncing #108

Closed jfaiza closed 1 year ago

jfaiza commented 1 year ago

Description of the problem detected :

While the node syncing the first time, the commande "aut account balance" of an address returns 0 when the balance is not zero of this address.

aiman commented 1 year ago

I'll need more information to determine if this is a valid bug or not.

If the connected node is still syncing, and the account balance is in fact 0 at the node's current block height, then the aut result seems to be correct.

However, if the account balance at the connected node's block height is positive, but aut is still returning 0, then we'll need to investigate this issue further.

Note that, with "full" sync mode, the node client can provide information about blocks as it retrieves them block-by-block, so aut block height will show an increasing number.

However with "snap" sync mode, which is now the default, the client will only be able to provide information about the genesis block until it finishes retreiving state for the initial checkpoint, so aut block height will show 0 until then.

Please confirm the block height of the connected node and the expected balance at that block height.

aiman commented 1 year ago

I was not able to reproduce the problem with 0 balance being reported when running aut account balance while the connected node is syncing. For example, trying with the network's operator account returns the correct balance even if the node is syncing with snap mode.

@jfaiza please re-open the issue if your issue persists.