Friday, May 24, 2024

json rpc – Bitcoin RPC BrokenPipeError on particular block/transaction

I’ve a easy python app operating via the blockchain as follows…

rpc_connection = AuthServiceProxy("http://%s:%s@"%(rpc_user, rpc_password))
for b in vary(blockStart, blockEnd): 
    block = rpc_connection.getblock(rpc_connection.getblockhash(b)) 
    for txid in block['tx']:
        raw_tx = rpc_connection.getrawtransaction(txid)
        decoded_tx = rpc_connection.decoderawtransaction(raw_tx)
        for output in decoded_tx['vout']:

It efficiently runs via all blocks from block 1 till block 115,257 the place it encounters “BrokenPipeError: [Errno 32] Damaged pipe”. It errors on transaction 11 (with txid 1c67abba71d570d0f0643b3d4ed93f528a68ef1c6a21e6d1f72535a15b0ce030). Typically it errors on the rpc_connection.getrawtransaction line and generally it errors on the rpc_connection.deriveaddresses line however each instances with a Damaged pipe.

What’s unusual is that if I simply run the script for the only transaction it really works wonderful and I discover that the transaction earlier than transaction 11 (i.e. transaction 10 with txid c45b2940e403a1598faaae33a24e385c92b4f051929a49fe3b079ef04b1e2dbc) returns an unlimited end result for rpc_connection.getrawtransaction() (pages and pages of console ouput) whereas all of the others are about 3 strains of console output, and so I am questioning if maybe that is associated to reminiscence utilization or timeouts or some conf setting that I haven’t got?

Has anybody run into an identical downside earlier than? Additionally, I am guessing everybody will get the identical huge end result for rpc_connection.getrawtransaction('c45b2940e403a1598faaae33a24e385c92b4f051929a49fe3b079ef04b1e2dbc')? Actually respect any ideas on one of the simplest ways round this downside.

Related Articles


Please enter your comment!
Please enter your name here

Latest Articles