Bitcoin Forum
May 12, 2024, 09:31:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: regarding: bitcoind's memory of spent transactions  (Read 466 times)
Cinnamon Cayenne (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 0



View Profile
November 23, 2013, 11:55:49 PM
 #1

I had thought it would be possible to navigate the river of Bitcoin history via the RPC API.

For block headers, it seems, this is true:
Code:
$ getblock 000000001c920d495e1eeef2452b6d1c6c229a919b28196c103ecffebabee141
{
    "hash" : "000000001c920d495e1eeef2452b6d1c6c229a919b28196c103ecffebabee141",
    "confirmations" : 78106,
    "size" : 647,
    "height" : 50001,
    "version" : 1,
    "merkleroot" : "ee3a2d2b895cafacff526d06a55b55e049cf84a9735e4a63f7fd08f96d0f4649",
    "tx" : [
        "e1882d41800d96d0fddc196cd8d3f0b45d65b030c652d97eaba79a1174e64d58",
        "7940cdde4d713e171849efc6bd89939185be270266c94e92369e3877ad89455a",
        "f84761459a00c6df3176ae5d94c99e69f25100d09548e5686bd0c354bb8cc60a"
    ],
    "time" : 1270917100,
    "nonce" : 56717043,
    "bits" : "1c2a1115",
    "difficulty" : 6.08547691,
    "previousblockhash" : "000000001aeae195809d120b5d66a39c83eb48792e068f8ea1fea19d84a4278a",
    "nextblockhash" : "000000002066d7f9b134c30b5005b7bf5fbfa52f279883f1fde793dcdc964266"
}
However, should I dig deeper...
Code:
$ getrawtransaction e1882d41800d96d0fddc196cd8d3f0b45d65b030c652d97eaba79a1174e64d58
01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff080415112a1c02cc00ffffffff0100f2052a01000000434104c1b5671c8975087cc796d6ea73d2407591528b5c669106f9b6ab6ef6e373a57553e14866aaeffc44a9f58e5ee0c7faa7add7474f0a2c55a22cb40b949fdc933cac00000000
Code:
$ getrawtransaction 7940cdde4d713e171849efc6bd89939185be270266c94e92369e3877ad89455a
error: {"code":-5,"message":"No information available about transaction"}
The pattern, of course, is that the first transaction's outputs remain unspent, whereas the second transaction's coins have long since moved elsewhere.

If historical, spent transaction data can be queried via another interface in the reference client, or if there is another client that can provide it, I should very much like to know.
1715506310
Hero Member
*
Offline Offline

Posts: 1715506310

View Profile Personal Message (Offline)

Ignore
1715506310
Reply with quote  #2

1715506310
Report to moderator
1715506310
Hero Member
*
Offline Offline

Posts: 1715506310

View Profile Personal Message (Offline)

Ignore
1715506310
Reply with quote  #2

1715506310
Report to moderator
1715506310
Hero Member
*
Offline Offline

Posts: 1715506310

View Profile Personal Message (Offline)

Ignore
1715506310
Reply with quote  #2

1715506310
Report to moderator
In order to get the maximum amount of activity points possible, you just need to post once per day on average. Skipping days is OK as long as you maintain the average.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715506310
Hero Member
*
Offline Offline

Posts: 1715506310

View Profile Personal Message (Offline)

Ignore
1715506310
Reply with quote  #2

1715506310
Report to moderator
1715506310
Hero Member
*
Offline Offline

Posts: 1715506310

View Profile Personal Message (Offline)

Ignore
1715506310
Reply with quote  #2

1715506310
Report to moderator
1715506310
Hero Member
*
Offline Offline

Posts: 1715506310

View Profile Personal Message (Offline)

Ignore
1715506310
Reply with quote  #2

1715506310
Report to moderator
gmaxwell
Staff
Legendary
*
Offline Offline

Activity: 4172
Merit: 8419



View Profile WWW
November 24, 2013, 01:00:10 AM
 #2

Add txindex=1 to your bitcoin.conf, and restart bitcoin with -reindex.  It will rebuild your database with an index of all transactions. Adds about 1.4Gbytes of required storage.
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!