crypto-power / cryptopower

A cross-platform SPV (DCR, BTC & LTC) privacy wallet built with go.
ISC License
42 stars 27 forks source link

sync stuck at 99% #641

Open dreacot opened 1 month ago

dreacot commented 1 month ago

got this complaint from a user, so far been unable to reproduce

see the logs below

2024-09-19 15:51:03.462 [INF] WLLT: Upgrading database from version 1 to 26
2024-09-19 15:51:04.914 [INF] DCR: Opened wallet
2024-09-19 15:51:07.480 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 15:51:07.482 [INF] DCR: Loaded 0 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:12:47.956 [INF] DCR: Discovering used accounts
2024-09-19 16:13:25.412 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:13:25.413 [INF] DCR: Address manager shutting down
2024-09-19 16:13:25.414 [INF] DCR: Sync fully cancelled.
2024-09-19 16:13:30.274 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:13:30.297 [INF] DCR: Loaded 145 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 15:51:03.462 [INF] WLLT: Upgrading database from version 1 to 26
2024-09-19 16:13:33.605 [INF] DCR: Discovering used accounts
2024-09-19 16:14:19.416 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:14:19.419 [INF] DCR: Address manager shutting down
2024-09-19 15:51:04.914 [INF] DCR: Opened wallet
2024-09-19 15:51:07.480 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:14:47.641 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:14:47.662 [INF] DCR: Loaded 207 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:14:49.806 [INF] DCR: Discovering used accounts
2024-09-19 15:51:07.482 [INF] DCR: Loaded 0 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:12:47.956 [INF] DCR: Discovering used accounts
2024-09-19 16:15:52.550 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:16:26.191 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:13:25.412 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:13:25.413 [INF] DCR: Address manager shutting down
2024-09-19 16:16:26.193 [INF] DCR: Address manager shutting down
2024-09-19 16:16:26.206 [INF] DCR: Sync fully cancelled.
2024-09-19 16:13:25.414 [INF] DCR: Sync fully cancelled.
2024-09-19 16:13:30.274 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:16:33.774 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:16:33.795 [INF] DCR: Loaded 403 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:13:30.297 [INF] DCR: Loaded 145 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:13:33.605 [INF] DCR: Discovering used accounts
2024-09-19 16:16:35.546 [INF] DCR: Discovering used accounts
2024-09-19 16:17:38.849 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:14:19.416 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:18:58.274 [INF] DCR: Account 0 next child indexes: external:0 internal:0
2024-09-19 16:18:58.275 [INF] DCR: Updating DB with discovered addresses...
2024-09-19 16:14:19.435 [INF] DCR: Sync fully cancelled.
2024-09-19 16:14:41.876 [INF] DCR: Opened wallet
2024-09-19 16:18:58.335 [INF] DCR: Upgrading wallet from legacy coin type 20 to SLIP0044 coin type 42
2024-09-19 16:14:47.641 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:14:47.662 [INF] DCR: Loaded 207 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:18:58.343 [INF] DCR: Discovering used accounts
2024-09-19 16:14:49.806 [INF] DCR: Discovering used accounts
2024-09-19 16:15:52.550 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:19:01.773 [INF] DCR: Address manager shutting down
2024-09-19 16:19:01.779 [INF] DCR: Sync fully cancelled.
2024-09-19 16:16:26.191 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:16:26.193 [INF] DCR: Address manager shutting down
2024-09-19 16:20:01.964 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:16:26.206 [INF] DCR: Sync fully cancelled.
2024-09-19 16:16:33.774 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:20:24.375 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:16:33.795 [INF] DCR: Loaded 403 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:16:35.546 [INF] DCR: Discovering used accounts
2024-09-19 16:20:24.383 [INF] DCR: Sync fully cancelled.
2024-09-19 16:17:38.849 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:18:58.274 [INF] DCR: Account 0 next child indexes: external:0 internal:0
2024-09-19 16:21:10.068 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:18:58.275 [INF] DCR: Updating DB with discovered addresses...
2024-09-19 16:18:58.335 [INF] DCR: Upgrading wallet from legacy coin type 20 to SLIP0044 coin type 42
2024-09-19 16:18:58.342 [INF] DCR: Upgraded coin type.
2024-09-19 16:18:58.343 [INF] DCR: Discovering used accounts
2024-09-19 16:21:51.167 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:21:51.168 [INF] DCR: Address manager shutting down
2024-09-19 16:19:01.779 [INF] DCR: Sync fully cancelled.
2024-09-19 16:19:08.217 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:19:08.237 [INF] DCR: Loaded 424 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:22:12.877 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:19:10.654 [INF] DCR: Discovering used accounts
2024-09-19 16:20:01.964 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:22:14.780 [INF] DCR: Discovering used accounts
2024-09-19 16:20:24.375 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:20:24.376 [INF] DCR: Address manager shutting down
2024-09-19 16:25:04.670 [INF] DCR: Sync fully cancelled.
2024-09-19 16:25:10.923 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:20:24.383 [INF] DCR: Sync fully cancelled.
2024-09-19 16:20:59.854 [INF] DCR: Opened wallet
2024-09-19 16:25:13.199 [INF] DCR: Discovering used accounts
2024-09-19 16:21:10.068 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:21:10.089 [INF] DCR: Loaded 489 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:21:13.029 [INF] DCR: Discovering used accounts
2024-09-19 16:21:51.167 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:21:51.168 [INF] DCR: Address manager shutting down
2024-09-19 16:21:51.186 [INF] DCR: Sync fully cancelled.
2024-09-19 16:22:07.634 [INF] DCR: Opened wallet
2024-09-19 16:22:12.877 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:22:12.910 [INF] DCR: Loaded 506 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:22:14.780 [INF] DCR: Discovering used accounts
2024-09-19 16:23:42.179 [INF] DCR: Discovering used addresses for 1 account(s)
2024-09-19 16:25:04.655 [INF] DCR: Cancelling sync. May take a while for sync to fully cancel.
2024-09-19 16:25:04.
663 [INF] DCR: Address manager shutting down
2024-09-19 16:25:04.670 [INF] DCR: Sync fully cancelled.
2024-09-19 16:25:10.923 [INF] DCR: The wallet has been unlocked without a time limit
2024-09-19 16:25:10.943 [INF] DCR: Loaded 615 addresses from file '/private/var/mobile/Containers/Data/Application/EDADCC7A-D055-476C-8AEA-BBEC513BAE72/Library/Application Support/mainnet/dcr/1/peers.json'
2024-09-19 16:25:13.199 [INF] DCR: Discovering used accounts

iPhone 14

ukane-philemon commented 1 month ago

2024-09-19 16:19:10.654 [INF] DCR: Discovering used accounts 2024-09-19 16:20:01.964 [INF] DCR: Discovering used addresses for 1 account(s) 2024-09-19 16:22:14.780 [INF] DCR: Discovering used accounts

Turns out address discovery is the reason why the progress bar seems stuck. It's not stuck but the user can't tell the difference btw the different sync stages.

dreacot commented 1 month ago

yeah, we should break down the progress bar to report on the different sync states

dreacot commented 1 month ago

this seems to be an upstream issue