-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
Description
Currently Bitcoind supports JSON-RPC 1.0 and couple of 2.0 features
If you look at existing implementations - 61 of 71 works ONLY with 2.0 version.
And in reality there is no Java library that supports 1.0
http://en.wikipedia.org/wiki/JSON-RPC#Implementations
Moreover - wiki page looks outdated, I think that all libs except 2-3 support only 2.0 version.
We need main features from JSON-RPC 2.0 (http://www.simple-is-better.org/rpc/#differences-between-1-0-and-2-0):
- Transport independence. Bitcoind should not throw 500 http error on every exception. It's only for crashed code.
For example, there is no Java JSON-RPC lib that provide sufficient support for hadling 500 http error. So, if you develop Java service that uses Bitcoind - you are not able to work with custom Bitcoind exceptions. (https://github.com/bitcoin/bitcoin/blob/master/src/bitcoinrpc.h)
Otherwise you either have to write from scratch or modify existing library, what generally is not easy. Moreover, nobody except you will support this lib for JSON-RPC 1.0 - Reduced fields. Some libraries throw an error if the fields "error" and "result" are found together - it's true for JSON-RPC 1.0, but wrong for 2.0
- named parameters
Full support of 2.0 is preferable.
P.S. In recent days, I'm implementing a Java service that uses Bitcoind - guys, this is hell. The current interface is not suitable for real-world applications that deal with money. I don't understand why version 1.0 instead of 2.0 was choosen...
winteraz, lutangar, BrannonKing, gregdhill, nick4fake and 3 more