electrs icon indicating copy to clipboard operation
electrs copied to clipboard

electrs logs report "less efficient method of querying" electrs server

Open Overtorment opened this issue 4 years ago • 8 comments

We have an issue: https://github.com/BlueWallet/BlueWallet/issues/4336

Probably electrs wants us to always connect, keep connection alive and subscribe to all scripthashes we are interested in. In BW we dont subscribe, as user sessions might be very short, so we try our best to quickly connect, query about scripthashes, and then dont care if user terminates the app or connection closes (which happens when user suspends the app on iOS. OS simply closes all sockets of suspended apps)

Overtorment avatar Jan 07 '22 12:01 Overtorment

I guess ignore the warning then?

Anyway, may be interesting if we had some alternative notification mechanism so that electrs could wake up the app (e.g. by POSTing to some notification server). This would require extending the protocol and maybe even authentication. What do you think @romanz?

Kixunil avatar Jan 07 '22 16:01 Kixunil

I prefer to refactor the code so the index-related functionality will be in a seprarate crate from the RPC-related functionality. Then, it would be possible replace the whole Electrum RPC with something more REST-like, similar to how it's done in https://github.com/bwt-dev/bwt/blob/5f92c4717bdc474302305823dcf60fd3425ba8c0/src/webhooks.rs#L27.

romanz avatar Jan 08 '22 07:01 romanz

Is there a timeline on when this will be worked upon? Right now I'm facing an issue, if I import a wallet into BlueWallet that has a long history of past transactions and try to refresh the list, electrs sometimes crashes with a long list of this error in the logs.

niteshbalusu11 avatar Apr 26 '22 02:04 niteshbalusu11

I'm seeing the same logs with Sparrow wallet

caheredia avatar May 25 '22 19:05 caheredia