8000 fixUtxo - flag logs need more information for blockbook fix UTXO · Issue #1252 · trezor/blockbook · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fixUtxo - flag logs need more information for blockbook fix UTXO #1252

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

Closed
panduraju50 opened this issue May 7, 2025 · 6 comments
Closed

Comments

@panduraju50
Copy link

added option -fixUtxo=true, to fix utxo transactions, it would be great if the logs shows how many rows left and how much ETA or aleast per block how much time it took all that.

@panduraju50
Copy link
Author

we get the following repeatedly:

Blocks 1000: alternative 1000, conservative 1000, economical 1000
E0507 10:42:09.609415 127899 rocksdb.go:2334] FixUtxos: row 338995001, addrDesc ad:0020701a8d401c84fb13e6baf169d59684e17abd9fa216c8cc5b9fc63d622ff8c58d, error balance 1941900298, checksum 3587000746, from txa 1945125818, txs 1166868, fixed false
I0507 11:02:04.937890 127899 alternativefeeprovider.go:46] alternativeFeeProviderCompareToDefault
Blocks 1: alternative 2000, conservative 3005, economical 2840
Blocks 6: alternative 1000, conservative 1759, economical 1759

@panduraju50
Copy link
Author

After running utxo fix it took one and half day for BTC:

a 4225151506, txs 730, fixed false E0507 14:01:11.866089 127899 rocksdb.go:2334] FixUtxos: row 1400156176, addrDesc ad:a914ffe11ab8d7fb9c91fd54892c6a8b2a11105a5d7987, error balance 12069232, checksum 12808697, from txa 12069232, txs 1023, fixed true I0507 14:01:12.027923 127899 rocksdb.go:2350] FixUtxos: finished, scanned 1400333170 rows, found 22792 errors, fixed 2479 I0507 14:01:12.048960 127899 rocksdb.go:175] rocksdb: close

When i start with -fixutxo=false i got following logs, this means should i run fix again? I understand that out of 22792 errors fixed 2479. Or should i leave it with false for sometime?

I0507 22:44:11.292218 170053 xpub.go:98] Evicted 0 items from xpub cache, cache size 0 W0507 22:44:13.991997 170053 rocksdb.go:599] rocksdb: address [bc1q9d22jvwt9mfx8tz20mcckvtk8akx646hfx3t32] hex 'ad:00142b54a931cb2ed263ac4a7ef18b31763f6c6d5757' reached negative balance -88058, resetting to 0 W0507 22:44:17.476227 170053 rocksdb.go:599] rocksdb: address [bc1q3709utzl64wmn276vcjayjefqmgysleq76gdzp] hex 'ad:00148f9e5e2c5fd55db9abda6625d24b2906d0487f20' reached negative balance -13495, resetting to 0 W0507 22:44:17.520241 170053 rocksdb.go:599] rocksdb: address [bc1qa8q44xr4jjz7h8jr0h6s54npnugc2g9u2ax7fc] hex 'ad:0014e9c15a98759485eb9e437df50a56619f118520bc' reached negative balance -13424, resetting to 0 W0507 22:44:17.534521 170053 rocksdb.go:599] rocksdb: address [bc1q9dxxsul9v90wx5hzp8kz5g8d4jauylkxvyp0p7] hex 'ad:00142b4c6873e5615ee352e209ec2a20edacbbc27ec6' reached negative balance -13404, resetting to 0 W0507 22:44:17.548318 170053 rocksdb.go:599] rocksdb: address [bc1qzrfcvr8288yk9gphpyy29x9f9d0z85x5qqzftv] hex 'ad:001410d3860cea39c962a0370908a298a92b5e23d0d4' reached negative balance -13375, resetting to 0 W0507 22:44:17.589741 170053 rocksdb.go:599] rocksdb: address [bc1qz0r4nlpd26wec2nw5f8lfdk6sjjye95m6x0zz8] hex 'ad:001413c759fc2d569d9c2a6ea24ff4b6da84a44c969b' reached negative balance -13287, resetting to 0 W0507 22:44:17.721215 170053 rocksdb.go:599] rocksdb: address [bc1qla0ju29qhk6pjcgfjns00vvn7j93d7598gxltu] hex 'ad:0014ff5f2e28a0bdb419610994e0f7b193f48b16fa85' reached negative balance -13088, resetting to 0 W0507 22:44:17.728409 170053 rocksdb.go:599] rocksdb: address [bc1qxdha73xekzglf5uj8568uxret809eq23n4h3rc] hex 'ad:0014336fdf44d9b091f4d3923d347e187959de5c8151' reached negative balance -13073, resetting to 0 W0507 22:44:17.743679 170053 rocksdb.go:599] rocksdb: address [bc1qg0mjvspyr3e3ykl3qr08jdmyve88cyhgv83knc] hex 'ad:001443f72640241c73125bf100de793764664e7c12e8' reached negative balance -13047, resetting to 0 W0507 22:44:17.768484 170053 rocksdb.go:599] rocksdb: address [bc1qxdha73xekzglf5uj8568uxret809eq23n4h3rc] hex 'ad:0014336fdf44d9b091f4d3923d347e187959de5c8151' reached negative balance -13014, resetting to 0 W0507 22:44:17.847111 170053 rocksdb.go:599] rocksdb: address [bc1qzrfcvr8288yk9gphpyy29x9f9d0z85x5qqzftv] hex 'ad:001410d3860cea39c962a0370908a298a92b5e23d0d4' reached negative balance -12897, resetting to 0 W0507 22:44:18.108865 170053 rocksdb.go:599] rocksdb: address [bc1q76g6a6vhznn35dta3arrlh4vdumzpwugkwmk0e] hex 'ad:0014f691aee99714e71a357d8f463fdeac6f3620bb88' reached negative balance -14632, resetting to 0 W0507 22:44:18.151975 170053 rocksdb.go:599] rocksdb: address [bc1qla0ju29qhk6pjcgfjns00vvn7j93d7598gxltu] hex 'ad:0014ff5f2e28a0bdb419610994e0f7b193f48b16fa85' reached negative balance -14572, resetting to 0 W0507 22:44:18.190614 170053 rocksdb.go:599] rocksdb: address [bc1qxull7ddnf925hve35tpdvqu6zvv5sqkf9734tt] hex 'ad:0014373fff35b349554bb331a2c2d6039a13194802c9' reached negative balance -14483, resetting to 0 W0507 22:44:18.228169 170053 rocksdb.go:599] rocksdb: address [bc1qzrfcvr8288yk9gphpyy29x9f9d0z85x5qqzftv] hex 'ad:001410d3860cea39c962a0370908a298a92b5e23d0d4' reached negative balance -14380, resetting to 0 W0507 22:44:18.242682 170053 rocksdb.go:599] rocksdb: address [bc1q2p6twv4p772rztz5cw727jckzsemn3dnanwvm2] hex 'ad:00145074b732a1f794312c54c3bcaf4b161433b9c5b3' reached negative balance -4930, resetting to 0 E0507 22:44:18.276929 170053 rocksdb.go:586] Utxo 8b763562302d3027709f2648cbff8b430ec722cf5bcb5016971a8739aa06ebe7:25 not found, utxosMap size 0

@panduraju50
Copy link
Author

Also noticed that all negative balances resetting to zero.

60913, resetting to 0 W0507 23:04:18.859495 171050 rocksdb.go:599] rocksdb: address [121wSxKErz7CsJE4GerzRkmYgmL4HvHgZM] hex 'ad:76a9140b25938510b0f1a35c6499c0a2a909528972249088ac' reached negative balance -59570, resetting to 0 W0507 23:04:19.510343 171050 rocksdb.go:599] rocksdb: address [1HWpA23JizSZT26vyhasmjA3wimApWvJM1] hex 'ad:76a914b52570583563bc85ea5b6de05d1c86dd1889dfb688ac' reached negative balance -65398, resetting to 0 W0507 23:04:19.930433 171050 rocksdb.go:599] rocksdb: address [1EhXAfzNRdkR3Nd5jcmQSUHb16dS44a5CD] hex 'ad:76a914964374a29643345da3af8d37d7c2d4056fa3141d88ac' reached negative balance -24839, resetting to 0 W0507 23:04:21.992147 171050 rocksdb.go:599] rocksdb: address [16bJ6bs7K2W8WnmLif7Dp5sUbmwXmeQ1o8] hex 'ad:76a9143d550b09cc6ad0e6cfc52c4de1ee91b7b00330b088ac' reached negative balance -65418, resetting to 0 E0507 23:04:22.491125 171050 rocksdb.go:586] Utxo c817921ca8fbccf099948f780237f48a5d1e9fb370c8e55cbdb022cdf8a9aed0:156 not found, utxosMap size 0 W0507 23:04:22.753117 171050 rocksdb.go:599] rocksdb: address [133uWk4Bs47dyQVk6VPeijyoNJNDRczHJs] hex 'ad:76a914167ceb417c4fa42c6b522946b0dfca8f22a6acad88ac' reached negative balance -65401, resetting to 0 W0507 23:04:22.844965 171050 rocksdb.go:599] rocksdb: address [14Wk5VHWPK5DwuGgRdjmXBkG676DQzPord] hex 'ad:76a91426886640a2c0d80512074808919ab57bd9cf348b88ac' reached negative balance -65396, resetting to 0 W0507 23:04:23.081936 171050 rocksdb.go:599] rocksdb: address [1N8pjzvPBFLjGH825fMAUnedCadcF4Epev] hex 'ad:76a914e7d567d9e58d60887bb4a81288623c90f521c67b88ac' reached negative balance -65390, resetting to 0 W0507 23:04:23.470716 171050 rocksdb.go:599] rocksdb: address [1BSE2tYdJ6iCfWmokhz17sN4BXB1QfSvxP] hex 'ad:76a91472768931fde83eeb2ce98455bb4947c247b903bc88ac' reached negative balance -20077, resetting to 0 W0507 23:04:23.550428 171050 rocksdb.go:599] rocksdb: address [1GVuFVFos3KS6cRt5RwTnxUbb2jHsMfspr] hex 'ad:76a914aa01264c8b7a97278109d9a89ebe8b6e7939e64e88ac' reached negative balance -8452, resetting to 0 W0507 23:04:23.750661 171050 rocksdb.go:599] rocksdb: address [1KZjVx9mbYxxhj4vc9p7wzjJPRYLcSoaRC] hex 'ad:76a914cba30d2801ef31acabd546e7084ed2f72ec6deca88ac' reached negative balance -31597, resetting to 0 W0507 23:04:23.778294 171050 rocksdb.go:599] rocksdb: address [1BRe2udykkqUFYKZRhp2h5vhF4v8c44ber] hex 'ad:76a914725a278807bafa1cee9aee2201919183d2c12b1f88ac' reached negative balance -16772, resetting to 0 W0507 23:04:23.859581 171050 rocksdb.go:599] rocksdb: address [1M1yr5pTECy6o529YFChArNSkRn1azJE8T] hex 'ad:76a914db91f7f278a0ef6746884e3170d280a22e9100e288ac' reached negative balance -56005, resetting to 0 W0507 23:04:23.908418 171050 rocksdb.go:599] rocksdb: address [1AGbGgwANVwpRi5xcaqU7nmssxbyJHYAfA] hex 'ad:76a91465abfaa2cbe84c6ea7546d162a2b68122616faca88ac' reached negative balance -65385, resetting to 0 W0507 23:04:23.992207 171050 rocksdb.go:599] rocksdb: address [146vFCtNfwupNsq4m7uTZLjSGMMrdFSf6W] hex 'ad:76a9142206e75dcb72b5e0efb96ab64e262404288a195f88ac' reached negative balance -13953, resetting to 0 I0507 23:04:24.319245 171050 xpub.go:98] Evicted 0 items from xpub cache, cache size 0 W0507 23:04:24.526708 171050 rocksdb.go:599] rocksdb: address [14NSvL8dMQFGiYCfLpbfGY6WrjNPgvLmfp] hex 'ad:76a91424f6bfc12d53598e324b18df2ce36e50313bbb9888ac' reached negative balance -65478, resetting to 0 W0507 23:04:28.205714 171050 rocksdb.go:599] rocksdb: address [1D1t5EFP4jwuiUqbHvbzQY2duzT1jgCutb] hex 'ad:76a91483cc24964b4451d80ab2383ac36e30dc289f6ec988ac' reached negative balance -65322, resetting to 0 W0507 23:04:28.254068 171050 rocksdb.go:599] rocksdb: address [15MTqUGLKeRrWtZwNxieNdtYVsAVkVdxPB] hex 'ad:76a9142fbf3942ef17d5fc9d8a76c307d211ab74d437df88ac' reached negative balance -22043, resetting to 0 W0507 23:04:28.292958 171050 rocksdb.go:599] rocksdb: address [1J1aPsC5TzZhXbYh87n2p1jt4Z3JC638Ti] hex 'ad:76a914ba9603b148fdded39a96adde7d9767f7217b99eb88ac' reached negative balance -52643, resetting to 0 E0507 23:04:30.571991 171050 rocksdb.go:586] Utxo 1a188ca102a6fa150e5b40804acfcc6f138c17c882b5f80c4c010fcc29bc6f3e:1 not found, utxosMap size 0 W0507 23:04:30.575820 171050 rocksdb.go:599] rocksdb: address [bc1q6svv6z00e5lqdua7x03xmqnj2dzywsru6shap5] hex 'ad:0014d418cd09efcd3e06f3be33e26d8272534447407c' reached negative balance -3952, resetting to 0 W0507 23:04:31.404628 171050 rocksdb.go:599] rocksdb: address [1B18DTrj5oe7yzscBvnVCAUn2EQp9SV6Gb] hex 'ad:76a9146db747cfeecbba235e10f0f530d9d00e5fda717488ac' reached negative balance -65306, resetting to 0

@panduraju50
Copy link
Author

Ahh, the negative balances cant be fixed ? is that the reason we got this ? out of 22792 errors fixed 2479.

@panduraju50
Copy link
Author

@martinboehm , is the -fixutxo=true is a onetime fix for utxo? or how can we know we should run this fix?

I understand that after we start the blockbook service with option -fixutxo=true we should wait until it gets completed.
Then we should start the blockbook service again with option -fixutxo=false.

But I want to understand is this one time fix?

Lets say i have the following logs when the fix is completed which means -fixutxo=true

FixUtxos: finished, scanned 1400333170 rows, found 22792 errors, fixed 2479 I0507 14:01:12.048960 127899 rocksdb.go:175] rocksdb: close

This means that scanned rows should be scanned again?

In my opinion it should scan again, but is there a way to check faster? or from some block to some block?

@martinboehm
Copy link
Contributor

This should be a one time fix. It should not be needed any more, it was used a long time ago as a fix to a bug...

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

No branches or pull requests

2 participants
0