wallet transactions over a 30 day period...

+2 votes
Under central bank regulations, we have to monitor the last 30 days of any receipts of funds to one or more addresses, each of which has been given send and receive permissions. We store the KYC status of a user identified by a hash of full name, DOB and email or phone so that once a user is verified they can add as many addresses as they like, which we store on our DB or on chain. We then monitor each address for total inwards amounts for last 30 days and add them up for each user, and then revoke the send and receive if over 100,000 Pesos..next day we can give them permissions if the amount is less.

Question is, what is the most effective way to do the transactions search for transactions in this way?.. I have an idea, using listaddresstransactions, but perhaps there are ways I haven't thought of that are more effective?
asked Oct 17, 2017 by mark

1 Answer

+1 vote

Yes, you can use listaddresstransactions for addresses that a node is tracking. Or you can build an off-node database of transactions that is populated using getblock (verbose=4). Note that in the latter case you would need to ensure that "change" sent from an address to itself does not count as volume transacted.

answered Oct 18, 2017 by MultiChain
What would be the limits for one node to track addresses? - Each address would get the receive and send permissions for the owner via a quick check of the KYC chain, so we are looking at millions of addresses being tracked. I suspect the second option might be better, using offchain DB with getblock...might be more efficient?
If you're talking about the wallet tracking the transactions for an address (e.g. via importaddress) then the current version of MultiChain will not perform well for more than a few thousand addresses.
Sorry for jumping into this thread, but are there any plans to upgrade the current multichain wallet capabilities in terms of tracking addresses?
...