How fast is BitcoinJ for getting UTXOs(/UnspentTXOuts)?

1

I'm making an app where I need to be able to get unspent TX outs very quickly for addresses I do not know beforehand.

Now this is supported by Bitcoins architecture in that you can have a pruned merkle branch and TX data taking only ~300 bytes and of course someone could index that by addresses.

The question is how quickly can BitcoinJ do this?

Will it synch up the whole chain using bloom filters or can it directly poll BitcoinD nodes for UTXO data for a specific address?

I worry that if it synchs the whole chain then even with bloom filters it will take maybe 10 seconds.

Martin Clemens Bloch

Posted 2015-08-18T16:04:28.257

Reputation: 137

Answers

1

The question is how quickly can BitcoinJ do this?

It's not fast enough for that particular use-case.

Will it synch up the whole chain using bloom filters or can it directly poll BitcoinD nodes for UTXO data for a specific address?

It always uses bloom filters, and if you search for one additional transaction, it needs to search through those blocks again.

I worry that if it synchs the whole chain then even with bloom filters it will take maybe 10 seconds.

10 seconds is very optimistic. The remote node needs to go through all ~50GB of blockchain data, and compare each transaction against your bloom filter.

It sounds like your needs would be better served by something that allows you to query by address, like the Electrum network or Blocktrail's API.

Nick ODell

Posted 2015-08-18T16:04:28.257

Reputation: 26 536

Ah crap, already imported BitcoinJ. Well off to look at Electrum then, thanks though :)Martin Clemens Bloch 2015-08-19T07:00:57.573