Transcript for #bitcoin-dev 2017/10/16

01:41 ginseng hi, im trying to decide on a bitcoin python rpc library, and it seems like peter todd's python-bitcoinlib has the most features in addition to just rpc interface. however, the rpc documentation seems to be empty? i can only seem to find rpc documentation for jgarzik's python-bitcoinrpc
01:42 ginseng
01:43 ginseng am i missing something here?
02:20 Chris_Stewart_5 ginseng: I'm not sure if either those projects are actively maintained anymore
02:21 esotericnonsense ginseng: bear in mind that interfacing with RPC using python is trivial; a library isn't really required for most cases (batching is about all I can think of right now)
02:23 esotericnonsense you need a http client but, well, tons of maintained http libraries are available, i'm using aiohttp
02:26 ginseng yeah true, i could just use python-jsonrpc but supposedly it is inefficient
02:26 ginseng whereas python-bitcoinrpc has some optimizations
02:26 ginseng
02:27 ginseng in any case i just got python-bitcoinrpc to work
22:13 ginseng im building a block explorer and have the following question: why does most of the related info out there suggest syncing it to a database like mysql and then querying the database from the web application? Can't i just directly query the blockchain from python-bitcoinrpc and return this info to client requests?
22:13 ginseng im curious about the advantages/disadvantages
22:13 ginseng suggest syncing the blockchain to a database*
22:15 Dizzle ginseng: it probably depends on what your queries actually are, but you may find things that require multiple calls to the Core RPC daemon just to get what you want, or things that just aren't fast. Core itself is querying it's own databases, which are indexed for very specific things.
22:17 Dizzle But you absolutely can back your app up with Core RPC daemon. You can load balance your requests to multiple Core daemons if it isn't for wallet operations.
22:18 ginseng Dizzle: i see. why do u say "if it isn't for wallet operations"? I am also interested in building a wallet as well
22:23 Dizzle I'm talking specifically about a Core-managed wallet. In this case, load balancing requests to multiple Core nodes would require some kind of syncing of wallet state between those nodes. Not pretty. It tends to be recommended that your app manage its own wallet, but use full nodes to interact with the blockchain and the bitcoin network. The wallet feature built into core is optimized for personal use; I'd recommend running your Core nodes
22:23 Dizzle with -disablewallet.
22:27 Dizzle And when I say wallet, I mean a collection of addresses intended to be used for sending, receiving or storing bitcoin by an entity represented in your app (e.g. an account on your app or your app/company itself)
22:32 phantomcircuit ginseng, because only a limited number of things are indexed
22:33 phantomcircuit for a block explorer you likely want several hundred gigabytes of indexes
22:46 ginseng Ah, I didn't realize that. I assumed a static blockchain would be fine but the problem seems to be much more complex. This was helpful for anyone else curious:
22:52 Dizzle That looks like a well-thought-out article. *bookmarks*