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" : [
            "value" : 0.00750000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 af1ca5c63970b893a4ef79d030b28ca91ccd22ce OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914af1ca5c63970b893a4ef79d030b28ca91ccd22ce88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [

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 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.

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?

What is chainwork?

If I run the RPC call getBlock on the bitcoin-qt client it gives me field called chainwork containing a hash. I cant find any information what this value is about.


getblock 0000000000000000073dacdd0178da5158bd78c543fbc79bd0dacf56a2021bcc


"hash" : "0000000000000000073dacdd0178da5158bd78c543fbc79bd0dacf56a2021bcc",
"confirmations" : 1,
"size" : 182400,
"height" : 304962,
"version" : 2,
"merkleroot" : "b144b39759d4669cb92ca8b9084d68d1f05f1e28e16887bf062f37e3b5f79fd2",
"tx" : [
"time" : 1402334610,
"nonce" : 2351732739,
"bits" : "185d859a",
"difficulty" : 11756551916.90395200,
"chainwork" : "0000000000000000000000000000000000000000000086859f7a841475b236fd",
"previousblockhash" : "000000000000000031132699bcb917e7e6ce3cc6cce1f20b6ad36a437436c821"

What are some of the advantages & disadvantages of the following: Colored Coins and Counterparty

Seeing the release of coinprism wallet for colored coins and I’m also playing with Counterparty.

What are the main differences among these two competing decentralized asset managers?

I see that counterparty.co has their own currency XCP, but colored coins does not. Now the question is how many of these XCP coins does the developers control or the first few people that created them?

And couldn’t colored coins adopt what Counterparty is currently doing and make them obsolete? If not, why?

ECDSA Signature and the “z” value

The following link contains details on how to reverse the ECDSA signature if given two identical “R” values.


I have read over this and there’s one part I don’t understand; how he got the “z” values.

Does a copy and paste of
“OP_DUP OP_HASH160 70792fb74a5df745bac07df6fe020f871cbb293b OP_EQUALVERIFY OP_CHECKSIG” (minus the quotations) into a ripemod-160 hashing function produce that result?

Did he have to essentially copy and paste some other string? Did he just ripemod or sha 256d? Did he have to do it more than once?

I’ve read up on these things but I just cannot decipher their programming description of how to do it. The non-programming descriptions don’t show “hey this ‘xyzx’ is what I’m referring to when I say ‘message to be signed'” or whatever. Many things on that page and on the


Seem as though they could adequately be described as the “message to be signed” besides the fact I don’t know what type of hash is being applied to even compare my calculations with the ones shown on the first link.