Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: xychix on December 09, 2015, 02:37:52 PM



Title: Full blockchain, search for values on pub-key (using python)
Post by: xychix on December 09, 2015, 02:37:52 PM
Hello,

I want to be able to do (quite a few more than blockchain.info will allow me) query's on the available bitcoins at a public address.

Therefore in the past I'd downloaded the full blockchain using bitcoin-qt and was using bitcoin-abe to place this all in a MySQL database.
https://github.com/bitcoin-abe/bitcoin-abe

with that solution I could use python to query the coins sources available at a public address.

This however requires storing the while blockchain twice (original + mysql).
Are there already more efficient ways of doing this?

regards,
xychix


Title: Re: Full blockchain, search for values on pub-key (using python)
Post by: achow101 on December 09, 2015, 03:26:43 PM
You could directly query the leveldb databases that bitcoin core uses. You can also use the rpc commands that bitcoin core has available.


Title: Re: Full blockchain, search for values on pub-key (using python)
Post by: xychix on December 09, 2015, 03:29:52 PM
You could directly query the leveldb databases that bitcoin core uses. You can also use the rpc commands that bitcoin core has available.

Thanks I was on my way of checking that out. Just installing a new ubuntu server and will install bitcoin and let that pull in the blockchain. as that would be the way to start anyway :)


Title: Re: Full blockchain, search for values on pub-key (using python)
Post by: moneyart on December 09, 2015, 07:37:44 PM
Quote
You can also use the rpc commands

Can you tell a little bit more about rpc commands? I didn't find them in the console when I type in help.


Title: Re: Full blockchain, search for values on pub-key (using python)
Post by: YarkoL on December 09, 2015, 08:14:31 PM
https://github.com/petertodd/python-bitcoinlib


Title: Re: Full blockchain, search for values on pub-key (using python)
Post by: achow101 on December 09, 2015, 11:02:32 PM
Quote
You can also use the rpc commands

Can you tell a little bit more about rpc commands? I didn't find them in the console when I type in help.
Those commands are all of the ones you can access through the console. They can also be accessed using the bitcoin-cli utility and through http posts to the rpc server. You can find the list of commands and how to use them at https://bitcoin.org/en/developer-reference#bitcoin-core-apis