4 ms·
Quick note to anyone looking to build bitcoin-based apps - although something like this is probably useful for some applications, you don't actually need a comp
by robbles 13y ago
Quick note to anyone looking to build bitcoin-based apps - although something like this is probably useful for some applications, you don't actually need a complicated bitcoin client library to interface with the blockchain.
The bitcoin daemon, bitcoind, handles the protocol for you and can run as a headless server. It has a simple JSON-RPC protocol that you can use to create wallets, send and receive transactions, etc. You could write your own client for it in any language quite easily, and for most languages, there's an OS implementation already.
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls...
In fact, I'd argue that running a cluster of bitcoind servers is probably a better approach, due to separation of concerns. Also, I'd guess that the C++-based and widely used bitcoind is probably faster and more stable than this node-based implementation. Not to knock this project - it's just going to difficult to compete.
- kordless 13y agoDo you suggest putting a proxy in front of a few of them and how stable is it?
- deleted 13y ago[deleted]
- aaron-lebo 13y agoYes but with the caveat that what you can do is limited. The bitcoind rpc interface exposes blockchain information about your local wallet and addresses you own only. So it is great for that. However, let's say you wanted to do something like have the user input their bitcoin address into an input and you returned the balance or a history of transactions from that address. You couldn't actually do that unless you also got and imported the user's private key (effectively giving you control of it). blockchain.info and similar services use custom code to do that stuff.
- kylebrown 13y agoThe node/js implementations provide a stream interface to bitcoin, for watching transactions live and doing real-time updates. Its very difficult to do that with the bitcoind API because it is only polling functions. Whereas push/event-based handlers and filters are natural on a node implementation (eg watch all new transactions for a particular bitcoin address, how to do that using bitcoind, without long polling?).
- vbuterin 13y agoIMO, bitcoind is a terrible idea. The huge deal-breaking problem with bitcoind is that it provides no way to query for transactions associated with a specific address unless you import that address into the client and give it the private key. This severely restricts your freedom to do your own wallet management, and compromuses security if you want to have many Bitcoin nodes on many semi-secure servers for redundancy. I personally recommend either SX (see http://github.com/vbuterin/node-sx http://github.com/vbuterin/node-sx for an HTTP pass through server, and I have one running at http://multisig.info:3001 http://multisig.info:3001) or if you are okay with centralization then plain old blockchain.info.
- nly 13y ago> The huge deal-breaking problem with bitcoind is that it provides no way to query for transactions associated with a specific address unless you import that address into the client and give it the private key. The reason bitcoind doesn't provide the feature you're after is because it's not actually possible to tie an address to a comprehensive set of transactions. Addresses are hashes of public keys... public keys which may or may not have been used in isolation, or in one of several common conventions, to make a transaction. Only a particular implementation programmed to parse a predetermined set of transaction script types can actually determine what subset of transaction outputs are spendable, and what consistutes your wallets balance. The protocol itself has no concept of wallets or balances
- makomk 13y agoThat's not a problem in practice; if you give someone an address and they use it to pay with any conforming client, the resulting transaction will conform to one predictable, easily parsed format. Yes, there are numerous other transaction types possible with the same underlying public key, but they are represented by different addresses in all cases.
- wmf 13y agoI don't understand how this problem might manifest in the real world. Can you give any examples of transactions that could not be recognized without the associated private key?
- muyuu 13y agoThis is why so many people (used to?) get stolen their hot wallets. This was the bog standard way of doing things in the Bitcoin world up to mid-2012 or so. The things you can do with Bitcoind in real time that are not suicidal to do on a server are very limited.
- robbles 13y agoWhat's the difference in wallet security between bitcoind and this library? At some point, you HAVE to store some hot wallets on a server. Is it easier to implement a dynamic cold storage system for wallets without bitcoind?
- muyuu 13y agoNope you don't have to, and you don't have to store BTC private keys at all in the server.
- sktrdie 13y agobitcoind is not designed to scale at all. Just look at the transaction malleability issue that has been terrorizing the exchanges. This has to do with them writing shitty wallet software to overcome bitcoind's limitations. We need more implementations that interact with the blockchain that work at scale. However, this Bitcore just seems to sit on top of bitcoind, making it not very interesting imho [1] It is designed to run server side on node.js or client side in a web browser and interect with a trusted bitcoin node (i.e. a bitcoind instance) 1. http://blog.bitpay.com/2014/02/14/introducing-bitcore.html http://blog.bitpay.com/2014/02/14/introducing-bitcore.html