Why can’t they use super computers to mine all the bitcoins?

I have very limited knowledge of bitcoin, but, I hope you don’t mind my asking this question:

As I understand it, “mining bitcoin” requires “significant” computational prowess. A lot of dedicated mining rigs have been built out of FPGAs, ASICs and GPUs. But, I have always wondered: would it not be possible to mine ALL the bitcoins if you had access to some of the most powerful computers? So, for argument sake, if the NSA decided to stop snooping upon people and instead decided to, you know, mine bitcoins… would they be able to mine all the bitcoins in just a few hours if they redirected all their super-computational-power towards this one problem: mining bitcoins? Other potential candidates for this game include, but are not limited to: NASA, DoE, etc.

I realize that running a supercomputer to mine bitcoins may NOT be efficient (because a super computer consumes too much power, costs a lot of money, etc) but for a govt agency all that money comes from taxes so …

Now, hypothetically, could “they” mine all the bitcoins in a few hours, or even in a few minutes if they redirected all their super-computational-power towards this one problem: mining bitcoins?

How to find the change / sender address given a txid?

Suppose I’m making a service like SatoshiDice and when I receive a transaction I want to give some money back. Where can I find the sender address?

If I run this, e.g.:

bitcoin-cli gettransaction 8386a8d2870c0df79f652ef4d981b21649ebf40601948c1c0709de0f02de8c8c

I get:

{
    "amount" : -0.00750000,
    "fee" : -0.00050000,
    "confirmations" : 10130,
    "blockhash" : "00000000000000002b44cdc1b2fe4ec2aa6b31b25ae8eedc8d1ef16799bd3114",
    "blockindex" : 13,
    "blocktime" : 1398584440,
    "txid" : "8386a8d2870c0df79f652ef4d981b21649ebf40601948c1c0709de0f02de8c8c",
    "walletconflicts" : [
    ],
    "time" : 1398584248,
    "timereceived" : 1398584248,
    "details" : [
        {
            "account" : "",
            "address" : "1Gxua3AptLgz1DWbG38dakLP4DVY2Jia4d",
            "category" : "send",
            "amount" : -0.00750000,
            "fee" : -0.00050000
        }
    ],
    "hex" : "01000000013c75459d163a5343725362a5b412dde392784814ec04c4e77df7ee5edbd10352010000006a47304402200ee65c9f757eb6c240efe5a7e4427e04174a32da14b1eef459d36d61d031f6e702202d6b5383f86f155d92a494e80a1242af7e160faf16d597ea457b6e3bf08bb1ca012102be7759e73363488269f0257158177f3295af42d1f3a6b2fdf8fb4380b1d16ae9ffffffff0250c30000000000001976a9144233e899673c755c11664d43d0a83a56d06ce23188acb0710b00000000001976a914af1ca5c63970b893a4ef79d030b28ca91ccd22ce88ac00000000"
}

I can find the address I am looking for in details -> address. But is this the right place to look? The details array can be empty or have more than one element?

I know there are two similar questions already: How to findout the sender of a transaction and What's the best way for a website to detect payments from green addresses? but the problem is that theses questions don’t explain if I can use gettransaction securely to find it.

Following the answer tip, I was able to do this:

bitcoin-cli decoderawtransaction "01000000013c75459d163a5343725362a5b412dde392784814ec04c4e77df7ee5edbd10352010000006a47304402200ee65c9f757eb6c240efe5a7e4427e04174a32da14b1eef459d36d61d031f6e702202d6b5383f86f155d92a494e80a1242af7e160faf16d597ea457b6e3bf08bb1ca012102be7759e73363488269f0257158177f3295af42d1f3a6b2fdf8fb4380b1d16ae9ffffffff0250c30000000000001976a9144233e899673c755c11664d43d0a83a56d06ce23188acb0710b00000000001976a914af1ca5c63970b893a4ef79d030b28ca91ccd22ce88ac00000000"

which produces:

{
    "txid" : "8386a8d2870c0df79f652ef4d981b21649ebf40601948c1c0709de0f02de8c8c",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "5203d1db5eeef77de7c404ec14487892e3dd12b4a562537243533a169d45753c",
            "vout" : 1,
            "scriptSig" : {
                "asm" : "304402200ee65c9f757eb6c240efe5a7e4427e04174a32da14b1eef459d36d61d031f6e702202d6b5383f86f155d92a494e80a1242af7e160faf16d597ea457b6e3bf08bb1ca01 02be7759e73363488269f0257158177f3295af42d1f3a6b2fdf8fb4380b1d16ae9",
                "hex" : "47304402200ee65c9f757eb6c240efe5a7e4427e04174a32da14b1eef459d36d61d031f6e702202d6b5383f86f155d92a494e80a1242af7e160faf16d597ea457b6e3bf08bb1ca012102be7759e73363488269f0257158177f3295af42d1f3a6b2fdf8fb4380b1d16ae9"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00050000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 4233e899673c755c11664d43d0a83a56d06ce231 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9144233e899673c755c11664d43d0a83a56d06ce23188ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1733nLJx6QrYa7AemEHXgq89G2NaWjPpRW"
                ]
            }
        },
        {
            "value" : 0.00750000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 af1ca5c63970b893a4ef79d030b28ca91ccd22ce OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914af1ca5c63970b893a4ef79d030b28ca91ccd22ce88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1Gxua3AptLgz1DWbG38dakLP4DVY2Jia4d"
                ]
            }
        }
    ]
}

This let’s me find the change address.

But can I skip these steps and take it from “details”?

What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?

I am wondering if I can use node.js and levelup to access a copy of the blockchain database directly.

But from what I can see, I need to know the name of the key(s) before I can get any data, as this is used in the get method of levelup.

However, I have not been able to find out anything about the possible key(s) associated with the values in the key value pairs, so I’m at a loss as to how I might retrieve the data.

Firstly, what are the keys in the key value pairs, and secondly is it possible just to select the first n records?

Why do I see a ‘Yay’ with a 70% match, and a ‘Booo’ with a 75% match?

Just what the title states.

I’m just a couple of days into this idle CPU utilization thing; I run a CPU miner (x-coin-minerd on a Windows 7 box).

Scrolling through the command line output I see several lines that say ‘accepted’ – some show a ‘Yay’, whilst others show a ‘Booo’. Yet some ‘Yay’ show a lower match (70%), and some ‘Boo’ show a higher match (>75%).

(The previous entries were lost, but the most recent Yay/Boo visible on the command line are posted below for reference)

[2014-06-24 08:37:25] accepted: 14/15 (93.33%), 89.76 khash/s (booooo)

[2014-06-24 08:37:45] accepted: 15/16 (93.75%), 89.75 khash/s (yay!!!)

Why do I see a ‘Yay’ with a 70% match, and a ‘Booo’ with a 75% match?

Bitcoin is not connected in regtest mode

I am having trouble using regtest mode on Linux. Using pre-compiled version 0.9.2.1 for linux and starting regtest mode as instructed on bitcoin.org:

<bitcoin-ver>-linux/bin/64>> ./bitcoind -regtest -daemon

The server starts but doing a getinfo returns ‘connections’ : 0. Tried experimenting with various rpc* settings in the .conf file. What exactly do I need to set in order to use regtest mode? Do I need to add real nodes via addnode for regtest? It doesn’t seem like I should need to. I was able to get a few connections by adding several real nodes one time but after a few minutes ‘connections’ dropped back to 0. Let me know if any additional info would help.

Beginning the process of buying bitcoins

I am interested in the process of buying bitcoins, but I have many questions. First and foremost, how do I begin this process? I am looking to make my bitcoin wallet as secure as possible, so how would I go about doing that? How would I incorporate the process of buying bitcoins with Tor?

Inv message structure

I am reading the Bitcoin wiki, and I see the inv message structure. I see it has a counter field for the objects and an inventory field. This inventory field has a list of objects (transactions or blocks), and I do wonder what it sends to the neighbors as to check if they have the transaction or block relayed. For example, is the block sent with its hash or with an id?