helium / blockchain-etl

Blockchain follower that follows and stores the Helium blockchain
Apache License 2.0
64 stars 37 forks source link

Explorer DC balance for router show invalid value #149

Closed disk91 closed 11 months ago

disk91 commented 3 years ago

As it has been detailed in this router issue - https://github.com/helium/blockchain-core/issues/763 The explorer does not report the right DC balance for the router wallets.

basically, when a state channel is closed, the blocked DC amount is released but not in the explorer DC balance. The Packet transfer operation does not update the explorer DC amount also exemple for 11awcuSbVURPkXX3FbKC7KF6bgEPRZqqPzv1FTEYABMLttUr13E on April 7th, explorer DC balance is 15,563,887 DC but the real wallet is 15,663,698 DC

Difference between two numbers (99811) explained by:

It seems that the DC balance is resync on token burn transactions

madninja commented 3 years ago

This is an etl/api issue. Moving there

disk91 commented 3 years ago

As a complement, on next state channel close with 279 DC consumption, the balance has became: 15 528 698 Delta is 35189 ; so this time, the blocked DC for that specific SC has been released and the DC balance has been decreased by the 189 previous DC consumption. The new DC consumption has not been applied.

madninja commented 3 years ago

Was this fixed since then @disk91 ? As part of validator work accounts are now updated in etl when the ledger updates them as part of a ledger post-commit hook.. Hopefully that avoids delayed account balance updates