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

token balance wrong values 3.2.5 and 3.2.6 #1783

Closed
luckythai opened this issue Feb 24, 2023 · 11 comments
Closed

token balance wrong values 3.2.5 and 3.2.6 #1783

luckythai opened this issue Feb 24, 2023 · 11 comments
Assignees
Labels

Comments

@luckythai
Copy link

What happened:

node 3.2.5 and node 3.2.6 the token amount deviates from the actual amount.
Even a rescan does not solve the problem.

When using the nodes in the app, incorrect (too few) dfi token numbers are displayed. Access via api delivers the correct values.

When used only as a full node, the number of tokens is also displayed incorrectly using gettoken balances.

After rescanning the database, the problem still exists and the number of tokens is also displayed incorrectly.
gettokenbalances shows the same wrong values in the console.

a downgrade to 3.2.4 solves the problem and the values are correct again. With the fullnode and with the fullnode app.

@defichain-bot
Copy link
Member

@luckythai: Thanks for opening an issue, it is currently awaiting triage.

The triage/accepted label can be added by foundation members by writing /triage accepted in a comment.

Details

I am a bot created to help the DeFiCh developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the DeFiCh/oss-governance-bot repository.

@luckythai
Copy link
Author

luckythai commented Feb 25, 2023

The dfi number is less. also on the dex and gettokenbalanced.
The crypto token number is less. also on the dex and gettokenbalanced.
The dusd number is 0. also on the dex and gettokenbalanced.
The dtoken number is less. also on the dex and gettokenbalanced.
Only the Lp token and the utxo token number are correct.

defi.conf.zip
fullnode.conf.zip
bilder.zip
debug.log.zip
debug.log.HardWare2.Datenbank2.zip
Fullnode.zip
Fullnode.gettokenbalances.zip

@shohamc1
Copy link
Member

Trying to figure out if this is an RPC issue or an indexing issue, could you run getaccount on this address and see if the value returned is the same as the one on Defiscan?

@luckythai
Copy link
Author

Yes, under getaccount the values and tokens are correct the same Defiscan.
under gettokenbalances it remains buggy.
Nodes 2.3.6
Can I solve the RPC or indexing problem myself?

@shohamc1
Copy link
Member

Could you check if the balances are correct when using this build? This build is from this PR.

https://hub.docker.com/layers/defi/defichain/HEAD-9cd21adf7/images/sha256-463f61fa7fb7b139ffa97096f519438b463fdec20fd39719b592df7c7107ae4b?context=explore

You can copy over the binaries from /app/bin in the Docker container, or use the binaries in this ZIP file.
HEAD-9cd21adf7.zip

@luckythai
Copy link
Author

yes now the tokens and token values are correct with gettokenbalances. I took the zip version.
I think the sync load has increased.
Sync with the node and then test the node in the app.
will also test a snapshot where the purning is only carried out by the node.

the debug log is copied while node is running
debug.zip
task utilization.zip

@luckythai
Copy link
Author

Node-HEAD integrated in the app, the display and number are incorrect, but in the app console using gettokenbalances, the token number and tokens are correct.

The automatic pruning with the Node-HEAD (with a new snapshot using Node 3.2.1 and rescan) works faster on a low ram machine than before (7min, before 28min). The ram usage when pruning is the same as the Node 2.3.6-original. The sync afterwards is error-free.

Everything works as a node.
Node in the app the display is faulty using app-console but error-free and can therefore only be used with console.

Haven't rescanned any of the 2 versions with the Node-HEAD.

debug.zip

@jpressler
Copy link

+1 ... same issue

@dcorral dcorral mentioned this issue Mar 6, 2023
40 tasks
@prasannavl
Copy link
Member

@jpressler @luckythai could you check with https://github.com/DeFiCh/ain/releases/tag/v3.2.7 and let us know if it resolves the issue?

The new snapshots haven't been generated yet. Meanwhile, might a rollback to a block before the first on-chain governance cycle (say, block 2633960: 140b7877dbe43a6833dc6a9342ea148c1150a834fb50fa7d03a96a81c4805641) with

defi-cli invalidateblock 140b7877dbe43a6833dc6a9342ea148c1150a834fb50fa7d03a96a81c4805641 followed by
defi-cli reconsiderblock 140b7877dbe43a6833dc6a9342ea148c1150a834fb50fa7d03a96a81c4805641 to get the chain back to the tip, is now expected to fix the issue.

Could you let us know if this resolves it?

@luckythai
Copy link
Author

luckythai commented Mar 8, 2023

With 3.2.7 the gettokenbalaces query works without error. For each query, the tokens and rewards match defiscan.

The node also works in the app and all queries.
It no longer needs a transaction to make the new rewards visible. The transactions query and reward query under Balance takes a while and the memory and processor utilization is high during this time.

invalidateblock results in error code: -20 error message: (code67)
reconsiderblock was executed without an error code.

The reported errors no longer occur.

debug.node.zip
debug.App.zip

@prasannavl
Copy link
Member

Thanks @luckythai - much appreciated. Thanks for the info and helping the team debug the issue! The high utilisation will get resolved in the next network upgrade where we can remove some of the workarounds that's in place.

Closing as resolved for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants