Bitcoin Forum
June 14, 2024, 11:48:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to look at non-wallet transactions?  (Read 1049 times)
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 05, 2013, 01:54:40 PM
 #1

I want to be able to look at other transactions not in my wallet ("non-wallet" as bitcoind calls them).

I found out it's not possible using bitcoind. It is possible to call external API, but I don't want to do that since I will be doing it in bigger numbers and I don't want to spam other services.

Is it possible somehow using either bitcoind or some other tools?
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 05, 2013, 02:02:26 PM
 #2

To reply to my own topic:

blockexplorer seem to use this branch
https://github.com/jgarzik/bitcoin

but it seem to be unmantained.
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 05, 2013, 02:23:44 PM
 #3

It seems like getrawtransaction is meant to do this.

However, it just fails at some transactions. Say I want this transaction

https://blockchain.info/tx/6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4
http://blockexplorer.com/tx/6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4
http://blockchain.info/rawtx/6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4

The transaction ID is 6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4 . If I try

Code:
./bitcoind getrawtransaction '6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4'

I get

Code:
error: {"code":-5,"message":"No information available about transaction"}
However, if I try
Code:
./bitcoind  getblock '000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506'
I got

Code:
{
    "hash" : "000000000003ba27aa200b1cecaad478d2b00432346c3f1f3986da1afd33e506",
    "confirmations" : 82622,
    "size" : 957,
    "height" : 100000,
    "version" : 1,
    "merkleroot" : "f3e94742aca4b5ef85488dc37c06c3282295ffec960994b2c0d5ac2a25a95766",
    "tx" : [
        "8c14f0db3df150123e6f3dbbf30f8b955a8249b62ac1d1ff16284aefa3d06d87",
        "fff2525b8931402dd09222c50775608f75787bd2b87e56995a7bdd30f79702c4",
        "6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4",
        "e9a66845e05d5abc0ad04ec80f774a7e585c6e8db975962d069a522137b80c1d"
    ],
    "time" : 1293623863,
    "nonce" : 274148111,
    "bits" : "1b04864c",
    "difficulty" : 14484.16236123,
    "previousblockhash" : "000000000002d01c1fccc21636b607dfd930d31d01c3a62104612a1719011250",
    "nextblockhash" : "00000000000080b66c911bd5ba14a74260057311eaeb1982802f7010f1a9f090"
}

So the blockchaind knows about the transaction. It just doesn't tell me about it.
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
April 05, 2013, 02:46:57 PM
 #4

Armory has arbitrary transaction lookup, but armoryd is fairly immature and has a stupid crash-on-every-new-blockfile bug (every week or so).  But if you're just using it to for arbitrary lookup, you can add a function call to the python code to get any information you want about any transaction.  Hopefully that bug will be fixed in the next couple weeks.

It's very straightforward if you can access it via python code (armoryengine.py).  You can checkout the project and check extras/sample_armory_code.py for how to access arbitrary blocks & transactions.
 
I don't recommend it (yet) for a production environment, but it is usable for lots of things.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1178


View Profile WWW
April 05, 2013, 04:11:15 PM
 #5

http://bitcoin.stackexchange.com/questions/9147/getrawtransaction-error-code-5/9152#9152

I do Bitcoin stuff.
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 05, 2013, 04:15:21 PM
 #6


That solved the issue! Amazing and thank you!
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1178


View Profile WWW
April 05, 2013, 04:16:37 PM
 #7

It was in 0.8.0's release notes Wink

I do Bitcoin stuff.
running (OP)
Newbie
*
Offline Offline

Activity: 40
Merit: 0


View Profile
April 05, 2013, 08:09:41 PM
 #8

Strange issue - it doesn't work on the very first transaction in blockchain.

http://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Code:
~/bitcoin-0.8.1-linux/bin/64$ ./bitcoind getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
error: {"code":-5,"message":"No information available about transaction"}

It works on all the others, though. I would suggest it's some off-by-one-error in bitcoin.
Zeilap
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
April 05, 2013, 08:26:38 PM
 #9

Strange issue - it doesn't work on the very first transaction in blockchain.

http://blockexplorer.com/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f

Code:
~/bitcoin-0.8.1-linux/bin/64$ ./bitcoind getrawtransaction 4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
error: {"code":-5,"message":"No information available about transaction"}

It works on all the others, though. I would suggest it's some off-by-one-error in bitcoin.
The transaction in the genesis block is unspendable and is not indexed in the database.
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!