Author

Topic: How do I use ZeroMQ to monitor addresses? (Read 733 times)

hero member
Activity: 554
Merit: 502
Developer!
December 25, 2016, 06:43:49 AM
#5
thanks
staff
Activity: 3458
Merit: 6793
Just writing some code
December 24, 2016, 11:36:45 PM
#4
is the rawtx validated or does it requires tx validation?
Before Core gives the user access to anything, it will always validate the data. The transaction is already validated when it tells you about it.
hero member
Activity: 554
Merit: 502
Developer!
December 24, 2016, 09:55:45 PM
#3
is the rawtx validated or does it requires tx validation?
newbie
Activity: 2
Merit: 0
December 22, 2016, 01:30:32 PM
#2
I've worked out the following scheme:

1. Listen for rawtx topic using ZeroMQ in order to receive raw transaction body.
2. Parse binary body and extract addresses from output scripts.
3. Compare addresses with local database in order to find matches.

Of course, list of pending transactions could be loaded into memory entirely in order to prevent too much requests to the database. Each address takes 20 bytes of memory, so you could store ~50K of them in 1MB of RAM.

Is this an optimal way to monitor specific addresses?
newbie
Activity: 2
Merit: 0
December 22, 2016, 11:42:25 AM
#1
Hello!

We're developing a Bitcoin service and we need to monitor local addresses for new transactions and transaction updates (confirmations).

ZeroMQ built into bitcoind looks like a pretty cool feature, however, as I see, it only receives IDs of the new transactions.

Is it possible to map transaction ID to Bitcoin address without issuing an RPC call to the node?

We don't want to flood the server with RPC requests, because new transactions are appearing very quickly.

Any suggestions are highly appreciated!  Cheesy

Thank you!
Jump to: