-
Notifications
You must be signed in to change notification settings - Fork 188
getaccountstate
returns the wrong balance of NEO
#578
Comments
You'll need to specify an address with a mismatch. |
@localhuman I PM'd you. |
NEO and GAS are based on UTXO so only problem I can think of is the 'dead fork' incident. @jseagrave21 if you know the block number when the transfer happened, then you can use getblockhash to compare. They should mismatch for faulty vs correct nodes. |
@wy I spoke with @localhuman and am going to try to import the address as watch only so I can compare transaction history that way. I check the most recent transactions and it is not that. Additionally, I still don't understand how the calc of NEO could be incorrect and GAS is correct. |
Although I haven't confirmed completely, I think this issue is caused by missing block information for some RPC nodes. For example, block 2669088 is corrupted on http://108.252.121.18:10332. I queried 3 different RPC nodes running NEO-Python and got 2 similar responses and 1 different and none of them were correct. I queried 2 different RPC nodes running NEO-Cli and got 2 similar responses and both were correct. |
When querying http://108.252.121.18:10332 about block 2669088, I get the following: for for and for |
Here are the results of my findings after querying each listed neo-python RPC node on HappyNodes:
cc @wy |
This issue seems to be separate from the block corruption issue. After testing with @hal0x2328 , we were able to call every tx associated with the subject address. However, Should I create a separate issue for the corrupted blocks? |
@localhuman @hal0x2328 After further testing, I think the issue is in the chain db, not in the Using a fresh pull of the master branch, I created a wallet and imported the wif of my suspect address. Running |
I've got a theory about what may be causing this, but a fix is waiting on my np-import to finish. |
I will close this issue as soon as I can personally verify #611 has fixed the issue. Right now, I am waiting for an updated |
@localhuman I performed
Now, the balance is:
This is wrong and similar to the last two IPs listed in the previously mentioned comment. |
@localhuman with the most recent bootstrap file you posted
I think it would be good to include this bootstrap file in the next neo-python release. Good work! 🎉 |
Current behavior
getaccounstate
returns the wrong balance of NEO. NEO-cli returns the correct balance.GAS balance seems to be correct
PM me on Discord if you want a specific address to query (I only figured this out because I queried one of my addresses)
Expected behavior
getaccountstate
should return the correct balance of both NEO and GASHow to reproduce
You can use this script in Python to test if the balances match:
Your environment
This is based on live RPC calls
The text was updated successfully, but these errors were encountered: