Author

Topic: Electrum address syncronization (Read 201 times)

newbie
Activity: 2
Merit: 2
September 27, 2019, 02:53:11 PM
#5
Thank you guys for your help!
I finally desided on this tool: https://github.com/dan-da/hd-wallet-addrs
With a little or even no modification this will do almost exactly what I wanted. At least this will allow me to do it fast. If the number of addresses will grow and I will be limited in allowed rates (by third party services) I will switch to full node and/or electrumx. it would be nice if I reached the permissible limits soon, then the project is working!
legendary
Activity: 1568
Merit: 1041
1GhxHtabWhEpdb7e7oEJ2vd542n33BwTHR
September 27, 2019, 05:30:51 AM
#4
If you want to do this through Electrum, you'll probably end up having to make an Electrum server. Here is a bit of the API:
https://electrumx.readthedocs.io/en/latest/protocol-methods.html

That should get you started. Specifically the RPC interface sections. This is for the ElectrumX server in Python by the way.
legendary
Activity: 3472
Merit: 10611
September 27, 2019, 12:04:25 AM
#3
Which methods it uses? Does it really import all these addresses into currently connected remote node and then calls listunspent no matter how many addresses I insert into the wallet?

what you are looking for is not in Electrum source code but in server source code. the Electrum code is just the client that is sending the request to the Electrum node/servers which will then be processed by them and they return the response. they way servers work is that they have already indexed their blockchain (which is why it needs a much bigger disk space compared to a regular node) so they can look up requests easier.
i'm not really sure what code they use but i believe most of them are running this: https://github.com/kyuupichan/electrumx
legendary
Activity: 3766
Merit: 1742
Join the world-leading crypto sportsbook NOW!
September 26, 2019, 04:57:41 PM
#2
Not a programmer so I can't link the code snippet

What I can tell you is that electrum servers have custom limits about how many queries per hour a single IP may do. After that limit the connection is cut and restored throttled for a generous amount of time.
newbie
Activity: 2
Merit: 2
September 26, 2019, 02:37:48 PM
#1
I need to periodically check the balance of a number of bitcoin addresses (a few tens or hundreds addresses). I noticed that Electrum may syncronize a thousand or more imported addresses in a matter of a few seconds. But I failed to realise how it is done searching through Electrum source code.

Which methods it uses? Does it really import all these addresses into currently connected remote node and then calls listunspent no matter how many addresses I insert into the wallet?

Can you please point me to a code snippet that implements such funtionality
Jump to: