Bitcoin Forum
June 25, 2024, 05:54:06 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Calling './bitcoind decoderawtransaction' on big transactions  (Read 1012 times)
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 06, 2013, 07:30:08 AM
 #1

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 Smiley

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?
wumpus
Hero Member
*****
qt
Offline Offline

Activity: 812
Merit: 1022

No Maps for These Territories


View Profile
April 06, 2013, 08:51:39 AM
 #2

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.

Bitcoin Core developer [PGP] Warning: For most, coin loss is a larger risk than coin theft. A disk can die any time. Regularly back up your wallet through FileBackup Wallet to an external storage or the (encrypted!) cloud. Use a separate offline wallet for storing larger amounts.
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 06, 2013, 07:35:42 PM
 #3

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)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!