spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.41k stars 3.08k forks source link

Addresses tab keeps scrolling to top #5576

Open mykhi opened 5 years ago

mykhi commented 5 years ago

Every few seconds (on some kind of refresh I guess) the addresses list in addresses tab jumps to the top, it's quite irritating if you are scrolling and trying to look up something. (v. 3.3.8)

SomberNight commented 5 years ago

related to https://github.com/spesmilo/electrum/issues/4920 (at least as far as that the nice fix would be to use QAbstractItemModel)

relativisticelectron commented 4 years ago

I have this issue in version 4.0.2. One-server mode True Running an own electrs through tor unconfirmed transactions (no idea if that causes the refresh every 5 seconds)

SomberNight commented 4 years ago

The addresses (and coins) tabs should be refactored in a way that avoids recreating the list of items on every refresh.

@relativisticelectron it's a bit weird that it happens every 5 seconds.. if you wait for a few minutes, assuming a fully synced wallet, does it still refresh the tab every 5 seconds? what do you have in the log?

As I said, it's completely expected that this happens with the current way the tab is written (this issue has been there for a very long time) -- I just find it surprising that it refreshes the tab that often and that consistently for you.

relativisticelectron commented 4 years ago

@relativisticelectron it's a bit weird that it happens every 5 seconds.. if you wait for a few minutes, assuming a fully synced wallet, does it still refresh the tab every 5 seconds? what do you have in the log?

The electrs log:

2020-07-24T21:48:30.025+02:00 - TRACE - RPC PeriodicUpdate
2020-07-24T21:48:32.720+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.scripthash.get_history\", \"id\": 172, \"params\": [\"xxxxxxxxxxxxxx\"]}\n")
2020-07-24T21:48:33.417+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"mempool.get_fee_histogram\", \"id\": 173}\n")
2020-07-24T21:48:33.441+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.estimatefee\", \"id\": 174, \"params\": [25]}\n")
2020-07-24T21:48:33.491+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.estimatefee\", \"id\": 175, \"params\": [10]}\n")
2020-07-24T21:48:33.491+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.estimatefee\", \"id\": 176, \"params\": [5]}\n")
2020-07-24T21:48:33.492+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.estimatefee\", \"id\": 177, \"params\": [2]}\n")
2020-07-24T21:48:35.305+02:00 - TRACE - RPC PeriodicUpdate
2020-07-24T21:48:38.198+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.scripthash.get_history\", \"id\": 178, \"params\": [\"xxxxxxxxxxxxxx\"]}\n")
2020-07-24T21:48:38.223+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.scripthash.get_history\", \"id\": 179, \"params\": [\"xxxxxxxxxxxxxx\"]}\n")
2020-07-24T21:48:38.239+02:00 - TRACE - RPC Request("{\"jsonrpc\": \"2.0\", \"method\": \"blockchain.scripthash.get_history\", \"id\": 180, \"params\": [\"xxxxxxxxxxxxxx\"]}\n")
2020-07-24T21:48:40.534+02:00 - TRACE - RPC PeriodicUpdate

electrum logs:

D | util.profiler | HistoryModel.refresh 0.0002
D | util.profiler | AddressList.update 0.0261
I/w | wallet.Multisig_Wallet.[wallet-name] | set_up_to_date: False
I | synchronizer.[wallet-name] | receiving history xxxxxxxxxxxxxxxxxx1 3
I/w | wallet.Multisig_Wallet.[wallet-name] | set_up_to_date: True
I | storage.WalletStorage | saved path-to-/wallet-name
D | util.profiler | WalletStorage.write 0.0333
I | gui.qt.history_list.HistoryModel | refreshing... reason: update_tabs
D | util.profiler | HistoryModel.refresh 0.0002
D | util.profiler | AddressList.update 0.0343
I/w | wallet.Multisig_Wallet.[wallet-name] | set_up_to_date: False
I | synchronizer.[wallet-name] | receiving history xxxxxxxxxxxxxxxxxx2 2
I/w | wallet.Multisig_Wallet.[wallet-name] | set_up_to_date: True
I | storage.WalletStorage | saved path-to-/wallet-name
D | util.profiler | WalletStorage.write 0.0230
I | gui.qt.history_list.HistoryModel | refreshing... reason: update_tabs
D | util.profiler | HistoryModel.refresh 0.0003
D | util.profiler | AddressList.update 0.0333

My suspicion is that it is related to my electrs (via tor, One-Server-Mode) setup. When I kill electrs, then the connection is lost and the address tab is usable again. I am currently building the newest version of electrs and will test it with this. .... The problem is also present with the newest electrs version.

Clues:

It must depend either on the specific transactions (e.g. unconfirmed tx) or on the specific 2/3 watch-only wallet.