Title: Calling './bitcoind decoderawtransaction' on big transactions Post by: running on April 06, 2013, 07:30:08 AM I want to go through blockchain to do some analytics, without reliance on external tools.
getrawtransaction -> decoderawtransaction worked so far, but I got stuck at this transaction https://blockchain.info/tx/42f4500dec4c6f8cd41337767bdf7e2caa48c153ae2114334a645ac927d03766 When I try to pass it up to decoderawtransaction, it just tells me Code: Can't exec "/bin/sh": Argument list too long. Now what can I do with that? One possibility I could think of is just call blockchain.info API on those few transactions, that are giant, but I don't want to do that if I don't have to :) The other possibility is digging into bitcoin source code and changing decoderawtransaction in rpcrawtransaction.cpp so it could read the transaction from a standard input. Is there any other possibility? Title: Re: Calling './bitcoind decoderawtransaction' on big transactions Post by: laanwj on April 06, 2013, 08:51:39 AM This is not a limitation of bitcoind, but of the shell.
The solution would be to make a small Python script that passes the transactions to the RPC API (for example, from stdin) instead of relying on the command line. Title: Re: Calling './bitcoind decoderawtransaction' on big transactions Post by: running on April 06, 2013, 07:35:42 PM This is not a limitation of bitcoind, but of the shell. The solution would be to make a small Python script that passes the transactions to the RPC API (for example, from stdin) instead of relying on the command line. A-ha! Thanks! Actually I now found out it's a kernel limitation, not bash one. Anyway, for anyone else with the same problem finding this by chance: very simple scripts that do just what John Smith suggested are here on wiki https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) |