Bitcoin Exchanges and Anonymity I'm new to Bitcoin and I have a few questions about Bitcoin Exchange and how the transactions work. To be more specific, the question is related about the level of anonymity of these transactions.

1) When I want to sell bitcoin through a Bitcoin Exchange, do I have to transfer the bitcoin to a Bitcoin Wallet created by the Exchange and related to my account on the Exchange, or I have just to "connect" my Bitcoin wallet to the account on the exchanger?

2) And when I will sell the bitcoin, the transaction will be displayed on the Blockchain right?
But can this transaction be identified as a transaction made on a Bitcoin Exchange or not? (So that someone can know that I've just sold my bitcoin through an Exchange).

3) Last question: It would be a good idea to access to a Bitcoin Exchange through a proxy chain (Or just a proxy server) to gain more anonymity?

Thanks in advance for any answer! :)

1) When I want to sell bitcoin through a Bitcoin Exchange, do I have
  to transfer the bitcoin to a Bitcoin Wallet created by the Exchange
  and related to my account on the Exchange, or I have just to "connect"
  my Bitcoin wallet to the account on the exchanger?

You'll have to transfer the bitcoins you want to sell to the wallet of the exchange. Each exchange implements a bitcoin wallet for every user within their system, and you can transfer money in and out of this wallet as if it were yours - please be cautious about storing large sums of bitcoins on the exchange wallet, because most exchanges have the private key of this wallet and could do whatever they want with the money on it. You have to trust the exchange to store your bitcoins.

  2) And when I will sell the bitcoin, the transaction will be displayed
  on the Blockchain right? But can this transaction be identified as a
  transaction made on a Bitcoin Exchange or not? (So that someone can
  know that I've just sold my bitcoin through an Exchange).

Since it's a bitcoin transaction, it will appear on the blockchain. A third-party can't tell it came from your specific exchange wallet. A third-party can probably only tell it came from your exchange, but can't tell it came specifically from you. Only the exchange knows you sold those coins. Obviously if the exchange database is breached (hint: NSA) then they can tell that you've sold those bitcoins.

  3) Last question: It would be a good idea to access to a Bitcoin
  Exchange through a proxy chain (Or just a proxy server) to gain more
  anonymity?

Not really. The exchange has your bank information and knows your identity. They don't expose the information to the public as I said earlier, but if someone gains access to their database, they can still tell that you've sold those bitcoins. Therefore accessing the exchange website through a proxy won't gain you much anonymity because they still have your banking details and know who you are.

I understand you're trying to sell bitcoins anonymously, but with the current way exchanges work (they need to prove your identity) this is actually quite hard to achieve. At least full-anonymity. If you're just worried about a third-party seeing that you've made a transaction, it will be quite hard for them to understand your identity unless they have access to the exchange database.


Build Namecoin from source I'm trying to install the current version of namecoin from github.

After much trouble and poking around, I found the official install instructions here:https://github.com/namecoin/wiki/wiki/Build-Namecoin-From-Source

Instructions are:

git clone https://github.com/namecoin/namecoin.git
cd namecoin/src
make -f makefile.unix namecoind

Only problem, there is no makefile.unix, only MakeFile and makefile.mingw

Anyone get through something like this?

The Makefile in that directory appears to be a perfectly good makefile. Perhaps the build instructions are out of date. So try:

make namecoind

(without the -f option, the make program automatically reads the file named Makefile).


What is the best method of getting the originating address of Bitcoin transaction? As far as I see there are currently two methods of getting the sender's address in a Bitcoin transaction:

Look up the input transaction and read the corresponding output address there (like this: How to findout the sender of a transaction)
Convert the public key in the scriptSig to the address (like this: Why does gettransaction report me only the receiving address?)

Is one of those preferable over the other one?

"Originating address" is not a valid concept in Bitcoin.

Some sites (like Satoshi Dice) try to make an educated guess but they might as well be throwing darts blindfolded.

The only safe way to refund Bitcoins is to explicitly obtain a refunds address from whomever you're accepting a payment from.

Anything else you do is going to break sooner or later when a customer pays you via a type of wallet or transaction which you weren't anticipating.

"Break" here means sending funds to the wrong entity, or even worse: permanently losing them by sending to an address for which no private key exists.


Is it possible to do a digital charge on delivery (COD)? I'm exploring having a bitcoin (or any blockchain) backed a distributed secure messaging system.

This is a peer to peer network that would pay for transport. In essence, it's the wild west, your key pair is your wax seal, and you've given someone $10 to deliver your letter back home to New York. I want to use Bitcoin to hold that $10 in escrow until the letter has been delivered.

I know Bitcoin can do multi-signature transactions but I'm not positive Bitcoin can do what I want, so I turn to this community.

Bitcoin gives us public and private keys for secure message delivery.
Bitcoin gives us the ability to pay people for transport.
We have 3 parties involved. A courier, sender and receiver.
We also have two transactions. One of the message from sender to receiver (or a key for said message), and one of the payment from sender to courier.

I'd like to ensure both transactions happen simultaneously. Without trust.

Here is one possible idea that I believe is almost what you want and quite likely (or so I hope!) both good enough and actually particularly good by incentizing all involved parties to collaborate to that goal. The basic idea is to incentize the recipient to sign for reception in a way that prevents him from lying just to collect the incentive.

Use multisig Bitcoin transactions, where the sender sends bitcoin into a multisig address requiring four distinct signatures, one from each party and a special throw-away one. The sender also performs his signature, authorizing a payment to the other two parties (say worth 9 dollar to the courier and 1 dollar to the sender) in a way that not only all other parties have to sign it, but beyond that yet another signature by the sender is required (using a fresh bitcoin address the sender generated only for this message). Instead of keeping the private key, the sender uses the public key of the recipient to encrypt the private key into a cyphertext that only the receiver can decrypt. This is possible with the ECC keys underlying bitcoin, although they are used in bitcoin in a different way, to generate signatures (but alternatively any other asymmetric crypto can be used, e.g. PGP/OpenSSL).

This way, only by completing the delivery can the payment proceed, and the sender cannot withdraw from his commitment anymore. It falls slightly short of what you desired (all payment going to the courier) because without an incentive to bother decrypting and finalizing the payment, it is likely that the recipient simply will not bother, creating significant risk to the courier of not getting paid. But with an incentive, and no means to change the split fraction, we can expect the recipient to usually (and with sufficient incentive, almost always) collaborate, which reassures the courier to go along with the scheme.

The obvious drawback of this scheme is that it requires off-blockchain communication, because (unless I am mistaken), partially signed multsig transactions do not get propagated across the network, and because of the encryption involved in transfering the private key to the fourth bitcoin address. Also, if you were not talking about a physical courier service, this solution does not apply, because having an encrypted communication channel to a sufficiently authenticated recipient (such that the sender already trusts sending to that person) implies that you can already pass any message without a courier as intermediary.

A maybe less obvious drawback is that the cypthertext attached to the message to be delivered must not be easily separated from the two, or your courier (or the wild west bandit robbing him) could just do that, and have only the ciphertext, not your message delivered in the hope that the recipient will collaborate in hiding the nondelivery by signing for collecting the incentive anyways. With digital messages, this can be achieved (e.g. xor the ciphertext with a hash of the message), but then again, for purely data-based messages, you do not need the courier if you have everything necessary for this scheme.


Proving a transaction is mine As an assignment in a digital security course, a group of 100 students was asked to transfer a small amount in bitcoins to a certain wallet. They promised they'd buy something for us from this money. As a proof that we made the transaction, we've been asked to hand in the transaction id.

I'm wondering what exactly restricts me of using blockchain.info to search for this wallet address, wait until someone else has made such a transaction, and then just use that transaction id.

Am I right that merely requesting the transaction id isn't enough here?

Of course, they could notice when two people hand in the same transaction id, but we're in different groups, so they may not notice.

See Is there a way to prove ownership of a transaction?, which suggests using the private key to sign a message. You could send a signed message to your professor with the transaction id. However, since you say you're in different groups, it can still be that someone from another group just uses your transaction id, and doesn't get caught.

I would suggest asking your professor to give everyone a different wallet address to transfer the money to, or to request that everyone signs his transaction id with the private key used for the transaction.


How does Bitcoin Core know that your private key relates to your public address? Are the private keys stored? When a user creates an account on Bitcoin Core, he is assigned private keys. And he needs to use these private keys in order to send transactions onto the network.

Does Bitcoin Core store these private keys in the application or in the public ledger? Are these private keys store on a private server by Bitcoin Core developers?

When you sign a transaction with your private key, how does Bitcoin Core know that this private key is related to your public address?

Does Bitcoin Core store these private keys in the application or in
  the public ledger?

the private keys are stored in the wallet, along with the public keys. Never (!) ever you would show the private keys to someone else, otherwise you'll loose the funds! This is why wallets are also secured...

  Are these private keys store on a private server by Bitcoin Core
  developers?

No, as mentioned before, in the wallet software. If the developpers had access to the private keys, they could steal all funds... doesn't make sense.

  When you sign a transaction with your private key, how does Bitcoin
  Core know that this private key is related to your public address?

The link between priv and pub keys is by the ECDSA logic.

The answers here are fairly generic, and deserve probably a whole chapter of a book, but I think I'll reference to Andreas' book "Mastering Bitcoin". It is an amazing book that'll definitely get you to go. It's freely available online here: http://chimera.labs.oreilly.com/books/1234000001802/index.html


How many BTC were seized in relation to the shutdown of Silk Road? I'm interested in the total amount of BTC that was seized in the Silk Road confiscation by the FBI. The reason I'm interested is so I can figure out what Bitcoin Addresses were used and how I can trace the usage of "Silk Road coins" in the network from today's date (the date the funds were seized) onward.

Q:

How many BTC were seized in conjunction with Silk Road?
What are those addresses?

According to this New York Times article of October 3, 2013:

  Investigators believe Mr. Ulbricht collected commissions of more than 600,000 bitcoins, the equivalent of $80 million, which they are trying to gain access to. So far, the authorities have seized 26,000 bitcoins, worth about $3.6 million, from escrow accounts into which Silk Road buyers placed funds.


Moving MultiBit wallet to new computer I have a MultiBit wallet and I need to transfer it to a new computer.  I'm not 100% sure which files/ directories need to be transferred.

I've done some reading but the discussion of private keys etc made things more confusing.

You should only transfer the .wallet file. This already includes the private key and therefor should NEVER be saved unencrypted in a server you do not control, or in a place which is not safe. You can import the .wallet file on your other computer and do your bitcoin thingies from there. Make sure to not run both wallets at the same time.

In the main folder of Multibit this .wallet file is stored. There is also an Wallet-data folder. In there there are several backups of the wallet, and the private key. You can also export this private key, and import it on the other computer. In that way, the wallet will be generated (and will hold exactly the same amount of BTC after synchronising) and you can also do everything you want. Maybe that is what confused you.


How to create a P2SH address which will be the hash of a redeemScript Suppose I have a redeemScript and I want to create a P2SH address corresponding to the hash of that redeemScript. How do I do it?

I was thinking of bitcore-lib but I'm not sure I am going in the right direction. Below is my staring point and I am not sure what to do next.

Also the scriptPubKey appears to be 0x04 and it has to be 0x05.

And how do I further generate my keys for this new address?

> var bitcore = require('bitcore-lib');
    undefined
    > var redeemScript = bitcore.Script.fromASM('OP_SHA256 001xxxxxxxxxxxxxxxxxxxx6 OP_EQUAL');
    undefined
    > var scriptPubKey = redeemScript.toScriptHashOut();
    undefined
    > scriptPubKey
    <Script: OP_HASH160 20 0x04xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6 OP_EQUAL>
    > scriptPubKey.toAddress()
    3xxxxxxxxxxxx
    > scriptPubKey.toHex()
    a914xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx287

Another option will be to use this:

https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/addresses.js#L19

Thanks!

Quick and dirty code for your task. Hope it helps.

1) Let us create address from secret.

static void p2sh_create ( )
{
  const MyByteArray secret ( QByteArray ( "My secret phrase" ) );
  const MyKey32 sha256 ( secret.sha256 ( ) );
  const MyByteArray redeemScript ( MyByteArray ( ).putInt8 ( OP_SHA256 ).putPush ( sha256 ).putInt8 ( OP_EQUAL ) );
  const MyKey20 hash160 ( redeemScript.hash160 ( ) );
  const QString address ( hash160.toStringP2SH ( ) );

  qDebug ( ) << "secret      =" << QString ( secret.toHex ( ) ) << "(in hex)";
  qDebug ( ) << "sha256      =" << sha256.toStringRev ( );
  qDebug ( ) << "redeemScript=" << QString ( redeemScript.toHex ( ) );
  qDebug ( ) << "hash160     =" << QString ( hash160.toHex ( ) );
  qDebug ( ) << "address     =" << address;
}

The output is:

secret      = "4d792073656372657420706872617365" (in hex)
sha256      = "73d83ecabab6ba96a47f03d0e21ffbdfeaab5d337b7e93a0cc2e85019190fb3f"
redeemScript= "a82073d83ecabab6ba96a47f03d0e21ffbdfeaab5d337b7e93a0cc2e85019190fb3f87"
hash160     = "fa3156d1e95111b0105fb538711bf8e19dadf1bd"
address     = "2NG482PHrj6f41UoqUHYGVkUR39oB3UvWkE"

2) Now let us fund the address 2NG482PHrj6f41UoqUHYGVkUR39oB3UvWkE. Follow the link https://testnet.coinfaucet.eu/en/ and ask for some test coins. Testnet faucet sent me 0.86978283 TBTC in transaction https://testnet.smartbit.com.au/tx/21c181c6052f6266ea6c936cf86111d6a2662a1f1e3251560b718fb8b1e6457d

3) Now create spending tx from this address.

static void p2sh_spend ( )
{
    const MyByteArray secret ( QByteArray ( "My secret phrase" ) );
    const MyKey32 sha256 ( secret.sha256 ( ) );
    const MyByteArray redeemScript ( MyByteArray ( ).putInt8 ( OP_SHA256 ).putPush ( sha256 ).putInt8 ( OP_EQUAL ) );
    const MyByteArray tx ( MyByteArray ( )
      .putInt32 ( TX_VERSION )
      .putInt8 ( 1 )
      .putArray ( MyKey32::fromHex ( "21c181c6052f6266ea6c936cf86111d6a2662a1f1e3251560b718fb8b1e6457d" ) )
      .putInt32 ( 1 )
      .putPrefixed ( MyByteArray ( ).putPush ( secret ).putPush ( redeemScript ) )
      .putInt32 ( TX_SEQUENCE )
      .putInt8 ( 1 )
      .putInt64 ( 86978283 - 200 )
      .putPrefixed ( MyByteArray ( ).putInt8 ( OP_HASH160 ).putPush ( MyKey20::of ( "2N8cj6kf3RkPHzQSCG13bvq6iXXWWPuGurZ" ) ).putInt8 ( OP_EQUAL ) )
      .putInt32 ( TX_LOCK ) );
    const MyKey32 txid ( tx.sha256d ( ) );

    qDebug ( ) << "tx   =" << QString ( tx.toHex ( ) );
    qDebug ( ) << "txid =" << txid.toString ( );
}

The output is:

tx   = "01000000017d45e6b1b88f710b5651321e1f2a66a2d61161f86c936cea66622f05c681c1210100000035104d79207365637265742070687261736523a82073d83ecabab6ba96a47f03d0e21ffbdfeaab5d337b7e93a0cc2e85019190fb3f87ffffffff01232e2f050000000017a914a89aec4cd53e6d74215332459b7fea3ec4aca9758700000000"
txid = "75e0904ca3f8895c6f6af45f1c7f3d1f9dcee32814ca144852bce669a5ee4421"

4) Now push the tx to the network: https://testnet.smartbit.com.au/txs/pushtx

5) Voila! https://testnet.smartbit.com.au/tx/75e0904ca3f8895c6f6af45f1c7f3d1f9dcee32814ca144852bce669a5ee4421


Work rejected. Server says: Stale or alien proof of work I get this error using BitMinter Client v1.3.2:

Work rejected. Server says: Stale or alien proof of work

about every 15 - 45 minutes, just mining on my GPU.

What is happening? What does it mean to have a proof of work rejected? How can I prevent it?

There will always be some stale work that is rejected by the server.

When there is a new block on the network (from any pool) we need to switch to building on top of this new block, at the new height. The server sends out new work data to all workers. But some of them are sending in work results at that moment, and it gets rejected because it is based on the old work data.

I would consider a reject ratio of 0.5% or lower to be normal and acceptable.


How can I officially prove that a Bitcoin private key is owned by an entity? I am the co-founder of an early-stage startup that aims to prove existence of various qualifications (academic, professional...) via the Bitcoin Blockchain.

In order to validate a piece of data, an issuer (say a university or other issuing body) would have to send a small transaction from their wallet which is managed by us.

Is there any way to officially prove (in this case in UK legislation) that a specific legal entity is in possession of a bitcoin private key and, therefore, to the coins associated with it? I know of a "statutory declaration" but is there anything more specific I can do?

Basically I would like to transfer ownership of the wallet to the customer, in order for myself to be criminally punishable if I upload qualifications to the Blockchain without their consent.

Is this at all possible?

Thanks!

A middle man trying to create a business around being a middle man with a technology thats supposed to remove intermediaries?

It seems like you could accomplish what you want with multisig wallet and counterparty.

In the example I have in mind,

The issuer could create an asset that represents qualifications. The issuer could invite their practitioners to a 2-of-2 multisig address and send the asset to that address.

Although we can't confirm if only those two parties have the keys, we can see where the asset came from (but it one scenario it can also be issued by the multisig address and never moved). We can rest assured that it would require both parties, one of which being the individual, to create a proposal to move the qualification asset. And these proposals will be rejected.

Another perk is that the asset can correspond to a centralized system.

Predictable, there's no place for your business in this mix, but that's probably the point, so I would like to thank you and your investors, in advance, for their charity in bringing this idea to the world. Should probably do an ICO


Why would Bitcoin-QT attempt to charge a processing fee, when I have my transaction fees set to zero? I'm attempting a test transaction of an amount less than 0.0015 BTC with my transaction fee set to 0 BTC, yet I'm getting this message:

  The total exceeds your balance when the 0.0015 BTC transaction fee is
  included.

The transaction fee should be free, right? Why would this happen?

Bitcoin-Qt enforces the reference implementation:

A transaction will be sent without fees if these conditions are met

It is smaller than 10 thousand bytes.
All outputs are 0.01 BTC or larger.
Its priority is large enough

Otherwise, the reference implementation will round up the transaction size to the nearest thousand bytes and then add a fee of 0.0005 BTC per thousand bytes. Users may override the default 0.0005 BTC/kb fee setting, but cannot control transaction fees for each transaction. Bitcoin-Qt does prompt the user to accept the fee before the transaction is sent (they may cancel the transaction if they are not willing to pay the fee).

Source


Receiving dollars directly into bitcoin wallet? Is there a way that I can set up my account to have my customers pay for services rendered in dollars directly into my bitcoin account via an online electronic funds transfer from their bank account?

BitPay appears to have an all-in-one solution that allows you to set up a store checkout in a lot of different currencies that will be handled through the use of Bitcoins. As I don't have a hands-on experience with that, I can't vouch for how the system works.

Another convenient way of setting up a payment system would be to use BitInstant which allows a user to quickly convert cash into Bitcoins through a variety of ways. It does not appear to be as automated as BitPay though, and you would have to handle your own payments.

Lastly, you can encourage your users to get their Bitcoins through more traditional means, such as the use of Bitcoin Exchanges. This option also requires you to handle the payments by yourself.


Why am I getting only about 3k to 300k hashes per second? I have written a python script to mine bitcoin.

I am however getting only 3k to 300k hashes per second

Here is the code:

import time
import hashlib
import random
import string

size_of_rand_input = int(input("Size of each random string: "))

def id_generator(chars=string.ascii_letters + string.digits):
    return ''.join(random.choice(chars) for _ in range(size_of_rand_input))

def CheckSpeed(number_of_hashes):
    t1 = time.time()
    for x in range(number_of_hashes):
        hashed = hashlib.sha256(str(id_generator()).encode("utf-8"))
    t2 = time.time()
    time_allotted= t2-t1
    returned = (time_allotted, number_of_hashes)
    return returned;

hashes = int(input("How many hashes would you like to perform: "))

x = CheckSpeed(hashes)

print("It took {} seconds to perform {} hashes!\n".format(x[0], x[1]))

You are limited by your machine clock speed and hashing library performance.
Scripting langs are not a good choice for CPU intensive operations.

Also, you are doing hashes sequentially, try multiprocessing: https://docs.python.org/2/library/multiprocessing.html


What language was it written? Different languages are used in coding the blockchain these days. Which was used in coding BTC and how is it superior to others?

The original bitcoin client created by Satoshi was coded in C++, and is maintained here, now known as Bitcoin Core: https://github.com/bitcoin/bitcoin/


Prompting an account name I made an account "hello" in bitcoin daemon and wanted to run this. Whenever i put in hello when prompted, getac1 would return empty array; whereas, getac2 and getac3 returns addresses associated with account hello. What am I missing?
Assume I put in proper username, password, ip address, and port.

<?php
require('easybitcoin.php');
$bitcoin = new Bitcoin("username", "password", "ip address", "8332");
//prompt function
function prompt($prompt_msg){
   echo("<script type='text/javascript'> var answer = prompt('".$prompt_msg."'); </script>");
   $answer = "<script type='text/javascript'> document.write(answer); </script>";
   return($answer);
}

//program
$prompt_msg = "Please enter account name";
$name = prompt($prompt_msg);

$getac1 = $bitcoin->getaddressesbyaccount($name);
$getac2 = $bitcoin->getaddressesbyaccount("hello");
$getac3 = $bitcoin->getaddressesbyaccount(hello);

print_r($getac1);
print_r($getac2);
print_r($getac3);
print_r($name);
echo "</pre>";
?>

This looks like a subtle issue with the code you are using and I do not think you are taking a sensible approach to getting the name back from the input. The javascript will not execute inside of your PHP, it only runs when sent to the browser.

When it executes your function prompt is called but the return is everything inside the quotes on line 7, which is not what you typed into the input but is exactly what is inside the quotes:

$answer = "<script type='text/javascript'> document.write(answer); </script>";

I should ask, in what mode are you executing or calling your PHP - PHP can be executed standalone or it can execute with a browser page request.

I would solve this in a very rudimentary fashion by creating a HTML form which only displays if some $POST option is not set with the input, setting up the form to post back to the same URL and checking first for the $POST data as said. Then, if the $POST data is set, go ahead and create the output page - all in the one PHP file.


How is this procedure a proof of reserve? i'm still learning about bitcoin, and i learned about the "proof-of reserve"-concept, that online wallets need to accomplish to prove they are having enough bitcoins for all their liabilities.

Now, the only procedure that i know of to do that is the one described in this document: https://www.bitstamp.net/s/documents/Bitstamp_proof_of_reserves_statement.pdf

This document describes how bitstamp is giving a proof of their reserves, by sending their whole cold storage amount to an adress of themself. So far, that makes sense.

What i don't understand is: What purpose has the signing of a selected message by the third party, described at the end of the first page?

Thanks for any help.

What i don't understand is: What purpose has the signing of a selected message by the third party, described at the end of the first page?

Without this step, it is possible that the transfer you're observing is entirely unrelated to Bitstamp. They could have watched the chain for a while, waiting for a transfer of sufficient amount, and then claim that it was theirs.

Assuming you trust the third party is in fact a third party, and is not colluding with Bitstamp, the signature proves that BitStamp in fact has control over the private key the funds were sent to, meaning they also have control over the funds.

Note that there is research around more advanced cryptographic techniques that do not rely on a third party, and don't require moving all funds around. For example, see this paper: http://www.jbonneau.com/doc/DBBCB15-CCS-provisions.pdf.


What is the Bitcoin equivalent of /dev/null? Which canonical address is a legitimate address that nobody can claim?


What hash rate should I expect using a BiFury with USB2.0 rather than USB3.0? I'm considering the BiFury which is generates ~5GH/s on a USB3 port. They say,

  Miner is designed to be used with USB 3.0 port or USB 3.0 hub (must meet min. 0.9A per port to achieve full hashrate)
  USB 2.0 support is also available but hashrate will be lower.

However they don't quote an expected hash rate for USB2.0. Will it be significantly lower?

I found that some USB2 hubs with enough amps (3-4) can take 3 BiFury each easily reaching 5.2-5.6 GH/s. I have 5 running off two 5V 3A hubs daisy chained off of a RaspberryPi with minepeon, works well. You 100% need a couple of fans to keep these cool, I am using arctic breeze, works fine. Errors are at about 4% and temps range from 38 to 50°.

So, the conclusion is… USB2 will work well with BiFury just make sure you have a good amount of amps to supply the thirsty 0.9A they need each! I think they are a good miner for people to get started without spending to much.


Can High CPU Droplets from Digital Ocean be used for Bitcoin Mining? Can the High CPU Droplets from Digital Ocean be used for Bitcoin Mining? Can they compete with GPUs?

Digital Ocean High CPU Droplets

No, neither CPUs nor GPUs of any kind are of the slightest use in Bitcoin mining.  This has been the case for several years, since the introduction of ASIC miners which are now many orders of magnitude more efficient.

See In the ASIC-age, is it worth starting mining Bitcoin at home?


Is it possible to estimate the Gini coefficient for Bitcoins and if the trend is increasing or decreasing? The Gini coefficient is a measure of the inequality of something's distribution, where a value of 0 represents total equality and a value of 1 maximal inequality.

Is it possible to perform this type of estimate on how bitcoins are distributed throughout the userbase? And/or is it possible to tell how this distribution is changing over time?

The owner of the Bitcoinica site has released some data from his site which may reflect the wider bitcoin economy. He gives a value for the Gini coefficient of:

Gini Coefficient = 0.87709

The Bitcoin Report site also releases a regular report on the number of bitcoins in the top 100 wallets. Although one person can own multiple wallets or a wallet of a exchange (e.g. MtGox) may contain coins with multiple owners so it is impossible to know for certain the real wealth distribution but it may have some correlation.
The Bitcoin Trader blog used the Bitcoin report data on the top 100 wallets and compared the data from May 1st and Oct. 29th 2011.
.
From the Bitcoin Trader:

The distribution of coins among the top 100 has evened out, as can be seen in the chart.
Even though 1,310,000 Bitcoins have been mined since May 1st, the top 100 have still managed to increase their relative wealth, and now hold 29.8% of all the Bitcoins ever created!

While  certainly not perfect these type of statistics may be give some indication of the trends in the wealth distribution in the bitcoin economy.


How to quickly check your mining speed? Is there some website that provides some webminer or other way for a person to check their mining speed without actually joining any pool or doing solo mining? Alternatively, are there some miners that can be pre-configured to perform mining on a specific pool with given credentials?

Or to put it in another way, if I wanted to simplify the process of checking a mining speed of a given computer for someone with minimal knowledge of what Bitcoin is, what websites or software should I use?

Very good question. Today I created a page at my pool for this purpose: http://bitminter.com/test

You don't get paid without registering and entering a name and password. But it is useful for the purposes you stated in the question. Just click the "test start" button. You need Java installed, and of course GPU drivers with OpenCL support if that's what you want to test.

PS: Thanks for the idea for this.


How can I protect my funds in the event a quantum computer breaks the ECDLP that Bitcoin relies on? An interesting question was posted recently, discussing the idea of hashed addresses being (not meaningfully) quantum resistant.

As Andrew's answer on that question points out, paying to a hashed address does not 'quantum-proof' your coins, however there is a mention of using a zero-knowledge proof of a BIP32 seed to recover coins safely, against the threat of a quantum computer capable of breaking the elliptic curve discrete logarithm problem (ECDLP).

If this is possible, then clearly there are advantages to more complex constructions for addresses (the BIP32 key-derivation function being apparently more quantum-proof, in this case).

So my question is: what address constructions are known to provide some level of safety from a quantum computer defeating the ECDLP? How is this safety provided? How can a user create addresses today, to allow themselves the best chance of having their Bitcoin-wealth survive a highly capable quantum computer?

Note that this question is meant to explore what a user can do now to mitigate the risk of the 'worst-case-scenario' of ECDLP being broken suddenly and unexpectedly soon; with time to plan there are obviously less scary ways to switch to a quantum-secure algorithm.

EDIT: for the sake of this question, lets assume that users have unanimously agreed to fork the chain from a certain block that was mined before the quantum-computer attack began, and the fork will lock all coins that are easily stolen by the QC (P2PK outputs, reused addresses, etc). Consider the case in which every bitcoin is stored at an address which will allow safe recovery, suddenly the potential damage to the network is lessened greatly. Even if this is unlikely, I think it is academically interesting.

We're deep in speculative territory here but, theoretically, if the elliptic curve algorithm were broken the entire Bitcoin system would immediately collapse.

Let's consider the case where you've successfully guarded your own funds somehow. How many public keys would still be out there vulnerable to such an attack?

Even though your "base" survived the attack, every other user out there who had UTXO on reused addresses would've been nuked and Bitcoin would have collapsed. You'd be the exceptional survivor. It'd be all over the news, dollar value would've gone to near zero, miners would stop and cut losses and so on.

So, in my view, there is no way to protect yourself individually against the eventual breakage of the elliptic curve discrete logarithm problem. Even if 90% of Bitcoin users had unspent UTXO's in safe unused addresses, the 10% that were hacked would cause immense damage to Bitcoin in a social sense.

Since Bitcoin obeys Metcalfe's law, network value being number of users squared, if enough users dropped out of the ecosystem, due to this kind of development in cryptanalysis, it'd surely deal a major blow to the community.

Not to mention another possibility: such a quantum computer could try brute forcing astronomic quantities of random numbers into private keys all day. Eventually they'd stumble on valuable wallets which could cause the community upheaval of "having broken Bitcoin" and its consequences. So having a known public key wouldn't necessarily be the only attack vector. I'm sure there are other possible attacks using quantum computing, perhaps unknown unknowns that would add immense risk to the system.

Math is the Bitcoin guardian, if it's somehow found to be vulnerable no man would be left standing in my opinion.


A "Hello World" of bitcoin? I would like to write a very simple program in bitcoin. I thought a simple C program that accepts the mined blocks would be appropriate. So I assume, the program would open a socket connection to some fixed relay node and start accepting the blocks. Could someone show how it could be done. Thank you.

[Edit:] I have since discovered what is probably best suited for the purpose. There is a minimal bitcoin networking stack implemented in python by Dr Christian Decker of ETH Zurich. It was used to gather results for some highly cited research papers on the bitcoin network but at the same time it is extremely readable too.

The easiest way if you come from web development and or you want to put a system in production is to use the most stable and updated implementation/API of Bitcoin Core

note: after downloading it it's best practice to check the md5/sha of the file you downloaded on bitcoin.org to be sure your installer is genuine

1) Install Bitcoin Core

2) Use it's CLI or JSON rpc APIs: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

there's no step 3!

This in the case your target is to run an app connected to most of the updated nodes, have the latest code with security fixes to at least sign and broadcast transactions, and obviously, query the blockchain!

glhf


How to know if cgminer is really mining? I have set up cgminer on a linux machine to mine litecoins. I already installed the nvidia driver for this. Yesterday at night I put it to mine (I guess) but I'm in doubt if it is really mining because the hashes per time is still zero as in the picture. How to know if it is actually minining or not?

CGMiner no longer has support for GPU or CPU mining at all. You are currently not mining anything. In order to do GPU mining, you will need to either compile it yourself to support GPU mining or get an ASIC or get an older version of CGMiner that supports GPU mining or find a fork of it that supports GPU mining.


How would a governmental Bitcoin ban work in practice? How does a potantial Bitcoin ban work in practice in a regime that a.) at least partially allows access to the Internet, and b.) has at least one payment system that is not closely monitored by the government, such as cash.

Some difficulties of enforcing such a ban I can imagine:

Outside exchange access

Although direct access to Bitcoin exchanges behind a nationwide firewall can be restricted (and most likely is), there always exist Tor, proxies, tunnels, VPNs etc. In the extreme case, one could think of using a phone as some sort of acoustic coupler to talk to the outside world, provided there is a counter part of such a tech behind that firewall. Or think of satellite access. Talking to a Bitcoin exchange to obtain coins doesn't require much bandwidth. Paying such an exchange could be an issue if, e.g. the banking system closely monitors all parties involved in credit card transactions. But there may be other ways of paying an outside exchange.

What means could be used to ban access to outside exchanges, and how effective can they be?
Running an exchange inside the country

Obviously such an exchange could only trade coins that are already inside the country if points (1) and (3) cannot be overcome, as far as one can talk about locality of coins in a meaningful sense. Is there anything that could prevent anyone running an exchange by means of splitting the coins already in possession for accepting cash, at an ad hoc spot that frequently changes?
Banning the Bitcoin network itself

Ports can be closed by ISPs etc., but that can be circumvented by simply using ports that must be open (HTTP(S), FTP, IMAP)). As with point (1), there can be simple makeshift ways of obtaining the blockchain from the outside, and transferring blocks with transactions from inside the country back into the blockchain.

As with point (1), what means could be used here, and how effective can they be? Also, how can mining be effectively banned?
Bringing coins into the country

Assuming there are no travel restrictions, so they can go overseas, obtain coins there and bring them into the country, either electronically disguised or encrypted on their devices, or as paper wallets that can easily be hidden.

What systems must be in place to prevent physical import of coins? How useful or practical are physical coins (I know they are not very secure, but that's not the point here), provided they can be inserted into electronic wallets again?
Payment

Obviously, officially registered businesses could not accept Bitcoin (at least not officially), but coins could easily be transferred from person to person once (1) is solved, provided they have the means to setup nodes and inject transactions into the blockchain.

How could a ban private to private even work? Is it even practical to impose such a ban?

It would be great if anyone could answer these questions also in the context of nations that are contentious or outright hostile towards Bitcoin, such as Mainland China, India, Kazakhstan, Bangladesh, Ecuador, Bolivia, Algeria etc.

You may be thinking about this the wrong way.

Most countries have a ban on cars driving above a speed limit. However this is not enforced by using technical means that prevent cars driving over the limit.

These rules are enforced by doing unpleasant things to people who are detected as having broken the rules.

You may go on to suggest that rules need technical means of detection. But remember that detection need not be perfect. If the consequence of detection is that you lose your job and you life is ruined, few people will take the risk.


In which output (0 or 1) a transaction fee is included? I need to know, if I have to pay a transaction fee, in which output of the transaction the fee is included? is it output 0 or output 1?
I suppose that normally there is only 2 outputs for a transaction.

Neither.

The transaction fee is the difference in value between the inputs and the outputs of a transaction.


How to know how many bitcoins does my offline generated address hold? Suppose I generate an address offline, using something like bitaddress.org

And then I receive some bitcoins on this address.

How do I know how much balance do I have on this address?

Whether an address was generated online or offline is irrelevant.

Any transaction that sends bitcoin to the address will be included in a block once it gets mined.

You can check the address balance by searching for that address in a block explorer such as https://blockexplorer.com/


Transactions from blockchain not confirmed for days Please anybody in the house to help with this transaction

https://blockchain.info/tx/4ad6cccbd988248d1718909da6d98aaa3872594dfafc1aca7c52c3dbb7bd6ff4
It has been unconfirmed for days

This transaction is not shown on any other block explorer I tried, namely Tradeblock and Blockcypher.

It has most likely been dropped or rejected.


How can I export the private key for an address from the satoshi client? If I want to transfer an address from the satoshi client into a different client, how can I find its private key to do so?

To export a private key from your Satoshi bitcoin-qt client:

launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase "your walletpassphrase here" 600
type: dumpprivkey [your Bitcoin address here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock


Trying to import Bitcoin ATM wallet into Armory I withdrew Bitcoins from Bitcoin ATM (Bitcoin mainnet, if that matters) into a wallet that it generated for me.  My intention was to import or sweep the generated wallet into Armory (or possibly Bitcoin Core).  [Warning: Newbie alert!]

The first thing I realized was the public and private keys that the ATM generated for me were in WIF format, and Armory seems to only want hex keys.  So I discovered pycoin and used ku.py to convert WIF to a hex secret exponent.  Armory seemed happy enough with the hex exponent, and asked me to confirm the apparent Bitcoin address.  The address was correct, so I confirmed and Armory began scanning something or other.  When it finally finished scanning, it told me there appeared to be no funds associated with the address.

The only people who saw the private key are myself and the ATM, and I'll assume it reasonably unlikely that the ATM was compromised.  If true, my funds still exist somewhere, but I don't know how or where to find them.  What am I doing wrong?

I'm very curious why does Armory scan the private key I have imported takes for a long time.

However, sweeping a bitcoin from a paper wallet should be very simple.
Install and use a Mycelium wallet app on your phone. Scan the QR private key on the paper wallet and send it to the Armory's QR receiving address.

In this case, you are using the Mycelium wallet as a bridge and nothing is compromised. You can also just throw away the paper wallet.

Just maybe the problem is with pycoin. I'm trying to use an offline bitaddress.org to import my private key to Armory.


Is there really no manual for Bitcoin Core? This is not the first time I'm desperately searching for Bitcoin Core help and finding none, but look at this: https://bitcoincore.org/en/doc/0.20.0/
That's the closest thing to a "manual" I can find. But it's about RPC commands. I've gone through their entire damn website (both ones, in fact) and made numerous web searches but find nothing resembling a manual. Where is the manual? Is there a manual?
Right now, I'm trying to get official descriptions of these two configuration options:

blocknotify
walletnotify

They are not mention anywhere on that page, and seemingly nowhere else officially. Am I supposed to guess what they mean and try to piece together information from ancient questions asked by random people online? How is anyone supposed to get a Bitcoin payment system running and actually use Bitcoin when there is no manual and a hundred BIPs are released per week?
The lack of information has caused countless of my projects to never get off the ground. I don't understand the mentality that a lot of people have that things are somehow "obvious" or "don't need a manual". Especially not when it's for a crucial piece of software which we're supposed to use to revolutionize the world.

There is a manual documenting both examples. The man page for bitcoind.
man bitcoind shows me:
       -blocknotify=<cmd>

              Execute command when the best block changes (%s in cmd is replaced by block hash)
        ....
       -walletnotify=<cmd>

              Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)

They're really not that hard to use.
Note that this machine runs a slightly older version of bitcoind. Newer versions support %w for the name of the wallet, as bitcoind now supports multiple wallets, in addition to %s for the transaction ID.


Bitcoin Core switch to release version? Running on Ubuntu 18.04, I have built Bitcoin Core from source, but the version is 0.18.99, and I would like to be running 0.18.0. I checked out v0.18.0, and went through the build steps again, yet it is still running 0.18.99.

What do I need to do to run 0.18.0?

Start by stopping your running version of bitcoin core if you have one

$ su - bitcoin

$ bitcoin-cli stop

Bitcoin server stopping

then install the last version

$ git clone https://github.com/bitcoin/bitcoin.git

$ cd bitcoin

$ git checkout v0.18.0

then compile it

$ ./autogen.sh

$ ./configure

$ make -j $(nproc)

Now you can start it

$ bitcoind --version

Bitcoin Core Daemon version v0.18.0

$ bitcoind -daemon

Bitcoin server starting


In NXT, which files store the contact addressbook data? When upgrading NXT, which files do I need to copy over that contain the NXT address book contacts? What other vital files should i copy over from the old version?

The contacts are stored in local browser database. You do not need migrate them.

Regarding upgrade, in most cases when using the zip file installation the best strategy is:
1. Stop the NRS
2. Delete the /lib library
3. Unzip the new version on top of the old version
When you start the NRS again it will migrate the database to the new structure, this can take a while, sometimes up to an hour.

If you need to install from fresh, copy over from your old installation:
1. The blockchain in the nxt_db folder, also the nxt_test_db forlder if you are using the testnet
2. The relevant properties in your nxt.properties


Chained Payments with bitcoin like Paypal Adaptive Payments? i have to develop an etsy-like store using bitcoins as currency trading;

As happen in the Etsy network, i have to hold back a fee for all the transactions made by all the sub-stores in the network;

 Chained Payments - ( buyer pay $100 to sub-store and sub-store give $10 to main-store )

              main-store
               $10 fee
buyer __          |
$100    \         |
         \__  sub-store-#
                 $90

i want to know if it's possible using bitcoins to have something like Paypal Adaptive Payments Chained Payments (maybe through some third party services)

thanks in advance for any feedback.

There's nothing out there that does this but it would not be a hard thing to create.  It's a relatively simple process:

set up payment for xBTC with a specific address to which to send the payment
when the payment arrives create a new transaction that sends some of the coin to an address owned by you and some on to the store owner's address

All of the complexity will be in the business rules: what's the percentage split, how long 'til you pass the coin along (in the case of shipping physical items you need to worry about a purchaser claiming against you for non-delivery), what happens if items are sourced in USD or other currency and translation is required, etc.


Transaction to Coinbase not showing up in account On 26th and 31st of January I transferred each 1 BTC (total of 2 BTC) from my Blockchain wallet to my Coinbase wallet. On the Blockchain site they show up as confirmed transfers. However, on the  Coinbase page they do not show up in my wallet. A 0.10 BTC transfer in December showed up right away.

There are phone numbers and e-mail addresses on the Blockchain site, I can't find anything on the Coinbase site.

Is there any way to reach the Coinbase site to inquire about the transfer?

CoinBase has a support portal where you can open a case: https://coinbase.desk.com/customer/portal/private/cases.

You have to log in with your CoinBase account to see this page.


How do pool server's handle multiple workers sharing one connection with Stratum protocol The stratum protocol supports authorizing multiple workers in a single connection. Unfortunately, I didn't find any documentation about how this should be handled by pool server software.

If multiple workers share the same extranonce1 (which is a per-connection unique string), wouldn't the workers duplicate work? Is this to be handled by the client?

Do all the workers use the same job_id for share submission?

Should a server send a job notify when the second, third etc. worker successfully passes authorization?

And finally, does anyone actually use this (multiple workers per connection) and for what purpose?

The client needs to handle dividing up the extranonce2 across all workers. Proxies can do this by moving part of the extranonce2 into the extranonce1.

Generally, the entire pool uses the same job_id for any given template, though it's only guaranteed to be valid across a single connection.

There is no reason for a server to send a new mining.notify when additional workers authenticate, though there is no reason they couldn't choose to either. You'll notice that most servers send the first mining.notify before any workers authenticate.

The practical problem with multiple workers on a single connection is that share difficulty is also set per-connection, and it is common that servers would want to give different workers their own difficulty levels.

While multiple workers is not especially common, it is helpful to reduce bandwidth on a large network where you may want to track pool statistics per-worker - or even conceivably per-chip (though no software supports that as of this time).


How do I use the new GPG signing feature with my Trezor? I read here that with the new firmware, a trezor can be used to generate GPG signatures. How does that work? Is there a tutorial? I didn't see anything on the satoshi labs website.

GPG Keys
"TREZOR can now securely generate GPG keys for signing of emails or documents (using the NIST256P1 and Ed25519 curves). Currently, this update does not allow for GPG decryption, a feature planned for next firmware update. For more information check out the great TREZOR Agent by Roman Zeyde."

https://medium.com/@satoshilabs/trezor-firmware-1-3-6-20a7df6e692#.9nmckr4yh

Complete instructions can be found here:

https://github.com/romanz/trezor-agent/blob/master/README-GPG.md

Generate a new GPG identity:

$ trezor-gpg create | gpg2 --import              # use the TREZOR to confirm signing the primary key

gpg: key 5E4D684D: public key "John Doe " imported

gpg: Total number processed: 1

gpg:               imported: 1

$ gpg2 --edit "${TREZOR_GPG_USER_ID}" trust      # set this key to ultimate trust (option #5)

$ gpg2 -k

/home/roman/.gnupg/pubring.kbx

pub   nistp256/5E4D684D 2016-06-17 [SC]
uid         [ultimate] John Doe
sub   nistp256/A31D9E25 2016-06-17 [E]

Sign and verify GPG messages:

$ echo "Hello World!" | gpg2 --sign | gpg2 --verify

gpg: Signature made Fri 17 Jun 2016 08:55:13 PM IDT using ECDSA key ID 5E4D684D

gpg: Good signature from "Roman Zeyde " [ultimate]"


I run bitcoin core. What should I prepare by August 1st? I'm not sure about UASF/BIP-148 but should I do something for the activation? Will bitcoin core dev release new version? I do support segwit by the way.

My bitcoind servers are used as a provider of utxo info and accepting signed transaction to broadcast. The wallet and mining feature are not used.

According to UASF Working Group

What do users need to do to enforce BIP148?
It is recommended that users do not update unless an economic majority commits to updating and users are aware of the risks and mitigations of a failed UASF deployment.
Users aware of the risks and who want to commit should use clients that enforce BIP148. Users that run full nodes would upgrade to one that enforces BIP148, or run their node behind an upgraded border node. Users of light clients (like mobile wallets) should check with each vendor to see their support for BIP148. We plan on documenting any public responses from wallets regarding BIP148 support.

This web-page describes the mechanism for any User Activated Soft Fork (UASF)


When a block is found the 10 latest shifts get paid. Finding blocks is a random event. Sometimes we find the next block quickly, other times it takes longer.

Sometimes it happens that it takes a lot of work before the next block is found by the pool. With PPLNS what then happens is that some of the work is not paid at all. The opposite happens when many blocks are found in quick succession. The same work gets paid many times and the pay is extremely good. Over time this evens out.

This is the nature of mining. If you were mining solo instead of in a pool the variance would be much greater. You could find a block and get 25 bitcoins after a few seconds. Or it could take you several years.


What is so special about chacha20 stream cipher along with poly1305 for message authentication codes? I am currently trying to dissect the low level cryptography protocols of the lightning network and I realize that in many places chacha20 is being used. I tried reading about it in the Wikipedia Article there it says:

  This gives Salsa20 and ChaCha the unusual advantage that the user can efficiently seek to any position in the key stream in constant time. Salsa20 offers speeds of around 4–14 cycles per byte in software on modern x86 processors, and reasonable hardware performance. It is not patented, and Bernstein has written several public domain implementations optimized for common architectures.

While I see the later parts about not being patented and optimzed for many architectures is nice I don't get the first sentence of the Quote. What does it mean that one can efficiently seek to any position in the key stream in constant time?

What is so special about chacha20 stream cipher along with poly1305 for message authentication codes?

There is nothing special about the combination. It's just a combination of two constructions (ChaCha20 for the stream cipher, Poly1305 for MAC) that are designed with similar goals in mind:

Easy to write a correct implementation in software
Optimized for performance of software implementations running on general purpose hardware. This is in contrast to many cryptographic primitives which are optimized for hardware implementation, but are suboptimal in software. This is mainly due to the use of integer addition operations in ChaCha20.
128-bit security level.

Furthermore the key derivation is informally standardized, allowing using a single key for both encryption and authentication. Having real-world constructions (for example OpenSSH) use this constructions gives confidence about security.

  What does it mean that one can efficiently seek to any position in the key stream in constant time?

Assume you're given n GiB of incoming encrypted data, but for some reason you're only interested in the last 1 MiB. With some ciphers, you'd need to do O(n) work to "skip" the first n GiB. ChaCha20, like most stream ciphers, permits decrypting any one MiB with same amount of work regardless of its position - essentially deriving the cipher output for arbitrary positions (aligned to a 64 byte boundary at least) with as much work as decoding sequentially.


How bitcoin core bootstraps [in source code] When the bitcoin core daemon starts first time it does not have the block database. It must be connecting to other nodes over network. But (I am assuming) it needs to know the at least one live node/peer address (may be more to be robust against down nodes) to connect to the network. Where in code that configuration is accessed? Basically looking for the home calling block of code.
I could try to go through the source https://github.com/bitcoin/bitcoin but I am sure someone will see this question who can point me to the source file to make it easier.

The following source line shows how a set of seed domains are used to bootstrap the network:
https://github.com/bitcoin/bitcoin/blob/06d573f053c63eb6521c62d210c5924418ae2b83/src/chainparams.cpp#L121

These are called seed nodes. Once the bitcoin core is connected to one live node successfully, it can receive more peer information from that node and continue to expand the network. It can then save that information on disk and if the system is restarted, it can reload from disk. If that fails it can go back to seed domains again.
The above list is accessed here:
https://github.com/bitcoin/bitcoin/blob/320e518b9062ea5510abd7876d22dc5bd3352535/src/net.cpp#L1591

And then it is looped through here:
https://github.com/bitcoin/bitcoin/blob/320e518b9062ea5510abd7876d22dc5bd3352535/src/net.cpp#L1620


Send an email when there is activity on a NXT / Ardor account address in php? Let say I have a nxt node up on my lamp server and I want to monitor a few NXT / Ardor addresses for activity and then email me. How can this be done? Is there a special setting or a snippet of php code I can use to do something like this? Or do I have to constantly query the NXT server to check if an address has any activity at all?

I know about https://arguseyes.net/ to monitor transactions, but was wondering how to do it myself.

you can write up a PHP script to grab all the transactions within a set timeframe of the account. Save them in a file.

schedule a cron job to run the PHP every few minute, when it runs, compare the new transactions with the saved one.

If it's new, send an alert email, and update the file.


What methods are currently used to embed additional data into the Bitcoin blockchain? Yes, I do understand that it is inappropriate to pollute the already large blockchain with data not necessary to make the currency work. But I know people are using Bitcoin as an underlying system for certain applications, like data storage or reaching common consensus about matters not directly related to the currency itself.

What methods are mostly employed to inject the blockchain with arbitrary data (like custom scripts representing data or payouts to addresses that represent data)? Is there a need to stop this in order to prevent an undownloadable large blockchain from forming in the future? If so, how can this be accomplished?

The accepted method of doing this is by putting the data in the output script along with op code OP_RETURN which tells clients to mark the transaction as invalid. This way, it doesn't use up as much resources on clients who don't care about non-transaction related data.

There are two schools of thought regarding putting arbitrary data in the blockchain. Some believe that as long as the method used to put arbitrary data in the blockchain follows all the rules of the bitcoin protocol, there is no harm done and that it actually strengthens the network by increasing usage. Others believe that it is detrimental and that these kinds of data should be kept from using up resources on a network that is designed to process transactions and not designed to store arbitrary data.

In my opinion, it all really comes down to what miners think about these kinds of use of the blockchain and from their perspective , they really don't care. To a miner, it makes no difference what the transaction is as long as it pays a transaction fee ,and they can add it to their block. So I believe that this kind of usage of the blockchain is here to stay.


Get BCH from blockchain.info after fork I had a fraction of BTC on blockchain.info before the 1st of August and I didn't touch them at all afterwards.

I never got my private keys (nor the 12 words) from my blockchain.info wallet (or if I did god knows where they are).

Question: if I try to get my private keys (bip39) now will they be the same so that I can get BCH following this guide http://www.coinpurveyor.com/how-to-claim-bitcoin-cash-from-blockchain-wallet/?

Thanks

(PS. another useful guide: https://coinomi.freshdesk.com/support/solutions/articles/29000013719-how-to-get-bitcoin-cash-from-many-wallet-software-services-with-coinomi)

UPDATE - THE ULTIMATE SOLUTION:
https://www.coindesk.com/couldnt-claim-your-bitcoin-cash-btc-com-now-has-a-tool-for-that/

Yes.

Haven't looked at those guides in particular, but I was able to redeem BCH from a blockchain.info wallet by exporting my private keys following this guide: https://bl4nkcode.info/bitcoin/how_to_export_blockchain_wallet_private_key, and then importing them into Electron-Cash.


How do miners communicate in Bitcoin/ Decentralized Network? 1.)If there is no central authority maintaining database how miners differentiate among other miners.

2.)Do they have there own database which have details(Mac/IP address) of neighbouring miners .

3.)Decentralized system feels absurd when i was trying to create blueprint where i was thinking to create a downloadable executable program ( socket programming for intercommunication) but i got struck how would communication take place b/w miners,user.

4.)Can you give me a little insight that if i want to run any consensus program on 10 computers connected to internet how would it work .

Bitcoin is a gossiping network. There is no hierarchy among the nodes, each node operates at equal privilege level. Bitcoin has an established protocol defining how nodes communicate with each other, and some stepping stones to find the first peers (although they could easily be replaced by other on-boarding mechanisms).

Whenever a node learns new data on the Bitcoin network, it gossips to its peers about that data. As every node connects to multiple peers, the information will generally reach every participant eventually.

Block data has special propagation guarantees: the blockchain ensures that the whole network converges on a shared ground-truth regarding the network state and new blocks are relayed with priority.
Some nodes that are otherwise indistinguishable from other participants use the transaction data they collected from the gossip network to author new blocks. Some of the so-called "miners" run additional communication protocols to expedite communication between each other, but this is not required.


BIP118 (SIGHASH_NOINPUT) vs. ANYPREVOUT I understand the motivation for SIGHASH_NOINPUT - it would help with offchain payment channels. It was proposed already in the Lightning paper but Eltoo will effectively work just with something like that. But what exactly is the ANYPREVOUT BIP about? It seems like some extension to be used with taproot scripts. But I don't seem to get why you need a special public key type and chaperone signatures. Can anyone explain this part in plain english please?

The differences between SIGHASH_NOINPUT (BIP 118) and SIGHASH_ANYPREVOUT (proposed update to BIP 118) were discussed at the Sydney Socratic Seminar in July 2020.

There is not a real conflict between the proposals apart from the
naming. The NOINPUT original proposal was we want to have this
functionality and we’ll do it when the next version of SegWit comes
along. The next version of SegWit is hopefully Taproot. The original
way it was proposed meant that eltoo would’ve had to have been a
CHECKMULTISIG script path rather than key aggregation Schnorr key path
potentially. It is not technically any worse than what the original
concept was by having to go through the script path. It is just the
next progression now that we have some idea what the next version of
SegWit should look like.


How to see my bitcoins in another app? I have a small amount of money in Bread which I got a year ago. I see the money when I log into Bread.

Now I have installed Blockchain. As far as I understand, my bitcoin cents are somewhere in the big block chain and are not bound to a specific app.

How do I connect the Blockchain app to my existing wallet which I see in Bread? Is it even possible?

As far as I understand, my bitcoin [..] are somewhere in the big block chain and are not bound to a specific app.

This is correct, what is held within your app is the private key that allows you to spend the bitcoins held at that key's address. Without the key, the coins cannot be spent.

So, to make the bitcoins accessible in your blockchain.info wallet, you can do one of two things:

Send a bitcoin transaction using bread, to a receiving address generated by your blockchain.info wallet.
Import your bread wallet into blockchain.info, by inputting the bread wallet seed phrase or private keys into the blockchain wallet. Doing this will copy the keys held in your bread wallet, effectively creating two instances of the wallet instead of just one.

I don't know your exact reasoning or circumstance for switching wallets, but for what its worth, I like the security model used by bread much more than the one used by blockchain.info. At any rate, make sure your seed phrase is stored in a secure place!


Is equihash/scrypt suitable for pooled mining? A "sequential memory-hard" PoW scheme cannot be parallelized effectively thus I imagine you also can't distribute solving the puzzle between participants in a pool? How does that work with scrypt then - for instance how do litecoin mining pools work?

Correct me if I am wrong, but equihash is "just" memory-hard. I understand you are solving a generalized birthday problem among randomly generated bitstrings. But my question here is: how does the pool verify you are actually doing meaningful work. Like with a "traditional" PoW you submit partial solutions that don't match the network difficulty but still have some difficulty "attached" that prove you did some work.

For equihash I believe there is no "partial" solution, either you find the inputs that xor to zero or you don't. What am I missing?

Are there any zcash mining pools out there yet? How do they ensure "fairness"?

I found https://minezcash.com/zcash-mining-pool/ so apparently there are quite a few zcash mining pools already.

Regarding the difficulty question I am currently looking at https://github.com/str4d/zcash-pow/blob/master/pow.py What is irritating me is that there still is a SHA256 calculation apparently.


Are JBOK wallets used at all? JBOK (just a bunch of keys) wallets generate the keys independently from each other.
In contrast, HD wallets are hierarchical and deterministic: They need a seed (e.g. a couple of words) and can generate the keys with that. This allows HD wallets to have a convenient backup mechanism: Just store the seed (e.g. 12 words with Trezor Model T, 25 words as with Trezor Model One, 24 words, 12/24 words with Exodus, 12 words for coinbase, 12 word for Electrum). I'm uncertain if any of those wallets use it, but the procedure is described in BIP 32 / BIP 39 / BIP 44.
Every single wallet I've checked is a HD wallet. Do JBOK wallets (still) exist? Do they have advantages over HD wallets?
For example, I could imagine that JBOK wallets are more secure because they are simpler. Are there any known issues that come from the way the keys were derived / errors in the implementation?

All wallet software that I know of has migrated from JBOK to some form of deterministically derived keys. The first wallet with deterministic key derivation that I know was Armory around 2011-2012, and its scheme inspired BIP32, which formed the basis of many key generation standards that followed. Obviously, software that predates these schemes did use JBOK (in particular, the Bitcoin reference software did, before it was called Bitcoin Core). These days Bitcoin Core still supports JBOK wallets (e.g. if you load a wallet created by an old version), but new wallets by default are BIP32 based.
As far as advantages goes, I know of one: JBOK wallets "unsteal" themselves over time. If someone finds your wallet file with keys, they have access to your current funds, and a number of future keys that are typically included in the backup. But over time, as you create more receive addresses and transact, moving old coins to new change addresses, these coins become out of reach for an attacker.
It's a small advantage only, and presumably not considered important enough to weight up against the advantages of easier backups.


Seed discovery for bitcoin core client I just installed bitcoin core client (from github) and started the client. It took around 24 hours to install the full block chain. Where did the blockchain come from? How did did my bitcoin core client find its first peer on the network?

Bitcoin Core chooses peers in the P2P network in a few ways:

it tries to connect to peers it already knows about, or
it connects to peers it learns about by querying volunteer-run DNS services, or
it connects to one of a number of hardcoded seeds

Once connected to the P2P network, peers rumor possible other nodes they know about, and the node builds a picture of the network using these responses. On a fresh installation there's no known peers, so the discovery begins at the seed nodes.


Does a Bitcoin node need to scan through the whole blockchain in order to be 100% sure that a transaction sent to it is genuine? Does a Bitcoin node need to scan through the whole blockchain in order to be 100% sure that a transaction sent to it is genuine (especially when some inputs are derived from coins generated in the very early days)?

Yes. It doesn't have to do all the work when it receives the transaction, of course. If it's in sync with the network, it's already scanned the whole blockchain.


How does Bitcoin Core sort memory pool transactions by fee? I'm trying to understand the algorithm Bitcoin Core uses to sort memory pool transactions by fee.

Gavin's fee rework proposal states:

  Next, sort all remaining memory pool transactions by fee-paid-per-kilobyte, and include as many as will fit until the block is maximum block size bytes big, not including "free" transactions (transactions with fee-per-kb of less than the default spam threshold of 0.0001 BTC/kilobyte).

This makes sense, because a miner should want to load a block with transactions carrying the most "fee density", or fee per byte.

However, reviewing the CreateNewBlock function in miner.cpp, it's not clear how Bitcoin Core accounts for transaction length when prioritizing memory pool items:

// Prioritise by fee once past the priority size or we run out of high-priority
// transactions:
if (!fSortedByFee &&
    ((nBlockSize + nTxSize >= nBlockPrioritySize) || !AllowFree(dPriority)))
{
    fSortedByFee = true;
    comparer = TxPriorityCompare(fSortedByFee);
    std::make_heap(vecPriority.begin(), vecPriority.end(), comparer);
}

TXPriorityCompare seems to just look at absolute fee:

public:
    TxPriorityCompare(bool _byFee) : byFee(_byFee) { }

    bool operator()(const TxPriority& a, const TxPriority& b)
    {
        if (byFee)
        {
            if (a.get<1>() == b.get<1>())
                return a.get<0>() < b.get<0>();
            return a.get<1>() < b.get<1>();
        }
        else
        {
            if (a.get<0>() == b.get<0>())
                return a.get<1>() < b.get<1>();
            return a.get<0>() < b.get<0>();
        }
    }
};

In other words, this looks like a sort on absolute transaction fee, not fee density. What am I missing?

The excerpt you're showing is for the priority area in blocks. The concept of "priority" in the source code corresponds modified bitcoin-days-destroyed per kilobyte. It is only used for a small portion of the block size (max 50kB by default in Bitcoin Core 0.11.x, and max 0kB by default in 0.12.x, it can be changed with a configuration setting).

Look at the rest of CreateNewBlock, which uses sorting by feerate, by iterating an index on the mempool that is pre-sorted by feerate (=satoshi per kB).


Bitcoin-qt Wallet empty I just reinstalled Bitcoin-qt and exchanged the new wallet.dat file with my old one. The Address for receiving coins is shown correctly in Bitcoin-qt but the balance is 0.00 BTC. The Block chain is up-to-date and if I check the Address with Blockexplorer it says my Bitcoins are still on this Account. Why is the Balance 0 BTC in Bitcoin-qt?

Try this:  start bitcoin-qt with the command line switch "-rescan".  That should re-download all transactions, including those in and out of your wallet.

I can't guarantee this will work, but I had to do this when I upgraded to the newest version of Bitcoin-qt after a long time of not updating.


Are no orphaned blocks mined in the Bitcoin network? I can't find orphaned blocks in the Bitcoin network from July with references to blockchain.info.
Does this mean the bitcoin network centralization?
I like C. Decker's paper "Information Propagation in the Bitcion Network."
But if the stale rate is 0, this paper's equation can't apply to the Bitcoin.

probably the chart at https://blockchain.info/ja/charts/n-orphaned-blocks is broken. here you can see some new orphans blocks: https://blockchain.info/en/orphaned-blocks


How are nodes supposed to update their inclusion proofs with Utreexo? With Utreexo, full nodes can build and verify blocks without storing the UTXO set. This is done by using proofs that the UTXOs in a transaction are included in the Utreexo accumulator. These proofs are broadcast with the transaction. To update the Utreexo accumulator, the only thing required are the UTXOs to be added, and the inclusion proofs of the now-used outputs to be removed.
However, I don't see anywhere in the paper that describes how unused inclusion proofs are updated in this process. It only mentions that "maintaining and updating proofs of every element in the set incurs no additional computational cost above computing the roots". I would guess that in the process of adding or deleting leaves, every UTXO who's proof changes will be touched, and could therefore be easily extracted simultaneously. Does anyone know more in depth how that process would happen?
Also, bonus question: do other kinds of accumulators (eg RSA accumulators) have a way of keeping proofs up to date like this?

Quick answer:

I don't see anywhere in the paper that describes how unused inclusion proofs are updated in this process

For a single block, a single batch proof is sent. There are no unused inclusion proofs since only one is sent. This "batch proof" proves the inclusion of all the UTXOs in the given block.
A "proof" that only proves the inclusion of a single utxo is only sent when for a transaction that would be going into the mempool.

how unused inclusion proofs are updated in this process

Since the proofs for a single utxo vary block to block, there isn't an "update" per say but a new proof is generated for every new block.
Longer answer:

I don't see anywhere in the paper that describes how unused inclusion proofs are updated in this process

To answer your question, we need to take a look at how accumulator proofs would differ when receiving a block vs receiving a transaction.
We recall that Utreexo is essentially a Merkle Tree. A Utreexo node is only required to keep the root of this tree. For a tree like so:
 14
 |---------------\
 12              13
 |-------\       |-------\
 08      09      10      11
 |---\   |---\   |---\   |---\
 00  01  02  03  04  05  06  07

A Utreexo node can only keep the root and still be a fully validating node. Such node's view of the tree may look like this:
 14
 |---------------\

 |-------\       |-------\

 |---\   |---\   |---\   |---\

A "proof" is all the utxos needed to hash up to the root. For the above tree tree, to prove the inclusion of 00, the proof would include the hashes of (01, 09, 13)
The verifying node would make a tree like this and hash up to the root. If the calculated 14 from the inclusion proof matches the 14 it stored, the 00 utxo is verified to exist.
 14
 |---------------\
                 13
 |-------\       |-------\
         09
 |---\   |---\   |---\   |---\
 00  01

To prove utxo 01, the proof would include the hashes of (00, 09, 13).
Notice the overlap in the proofs for 01 and 00. 09 and 13 are required by both 00 and 01. Furthermore, 01 is needed to prove 00 and 00 is needed to prove 01.
If given the above proof of 00, we can also verify 01:
 14
 |---------------\
                 13
 |-------\       |-------\
         09
 |---\   |---\   |---\   |---\
 00  01

Because a single block has a lot of these overlaps, we can just send one proof to verify all utxos being spent. There are no unused proofs to speak of.

how unused inclusion proofs are updated in this process

I find it helpful to not think of Utreexo as a black box that generates proofs but as a tree structure.
This tree is updated every block. So for every new block, the required proofs will change.
For the above tree of:
 14
 |---------------\
 12              13
 |-------\       |-------\
 08      09      10      11
 |---\   |---\   |---\   |---\
 00  01  02  03  04  05  06  07

If this tree is modified with the removal of node 07. The resulting tree will look like so:
  12
  |-------\
  08      09      10
  |---\   |---\   |---\
  00  01  02  03  04  05  06

Notice how the proof for 00 changed to (01, 09) from the previous proof of (01, 09, 13).
In the implementation, there aren't any "proofs" that are being kept and updated, but rather a single tree for a block in which the proofs are derived from.


Lightning Network: what if one broadcast an old transaction? I understand that after a channel is created, A and B need to agree and sign to create a new transaction. The new transaction overrides the previous transaction. A or B could quit the channel by broadcasting the transaction onto Bitcoin network so that the transaction is final:

txn 0: A:0.5, B:0.5
txn 1: A:0.3, B:0.7
txn 2: A:0.9, B:0.1

A or B quit channel, broadcast txn 2, so A will have 0.9 and B will have 0.1

But what if B quit the channel, broadcasting txn 1 rather than txn 2 on to the Bitcoin network? Wouldn't the txn 1 becomes final and B could walk away with 0.7?

Apparently there is a time until which A can question the transaction because he will have proof for the later transaction that has happened. And B will lose all the money in the channel for broadcasting a previous transaction.


What is the pool in Nicehash? I am new to Bitcoin and recently have invested in bitcoins. I came across Nicehash when I was planning to get into Bitcoin mining. I understand that Nicehash gives you an option to rent hash power for mining. But what I don't understand is the pool option in it. What exactly are the pools in Nicehash and how do I create a pool account or join a pool or something? I don't want to spend any money on Nicehash without understanding what exactly it is used for.

...about is the pool option in it.

The best feature of NiceHash is that they allow you to choose for which pool to mine. So, you can choose the pool. Actually it's a feature that all cloud mining websites should have, but unfortunately NiceHash is the only one.


cgminer doesn't detect GPU in ssh session I have AMD Radeon HD 6450 card and Ubuntu is my OS. If I log in normally and start cgminer it works properly and detect my graphic card. Now my monitor is turned off and I connect to my computer by ssh. In this scenario cgminer does not detect my graphic card:

[2013-12-22 13:35:09] Started cgminer 3.7.2
 [2013-12-22 13:35:09] clDevicesNum returned error, no GPUs usable
 [2013-12-22 13:35:09] No devices detected!
 [2013-12-22 13:35:09] Waiting for USB hotplug devices or press q to quit
 [2013-12-22 13:35:09] Probing for an alive pool
 [2013-12-22 13:35:09] Pool 0 difficulty changed to 256
 [2013-12-22 13:35:10] Network diff set to 3.23K

I suspect that the card is idle because monitor is turned off. To solve this I enabled X11 forwarding in my ssh session but It did not help.

sudo aticonfig --lsa
* 0. 01:00.0 AMD Radeon HD 6450

* - Default adapter

What can be cause of that situation? Is possible that card is idle? How to check that and how to force card to starts?

EDIT

My cgminer start script:

#!/bin/sh
export DISPLAY=:0
export GPU_MAX_ALLOC_PERCENT=100
export GPU_USE_SYNC_OBJECTS=1
cd /mypath/cgminer-3.7.2-x86_64-built
./cgminer [parameters]

EDIT

sudo aticonfig --adapter=all --odgt
No protocol specified
No protocol specified
ERROR - X needs to be running to perform AMD Overdrive(TM) commands

The reason for this is that the X-Server that is handling the GPUs is not available in the SSH session. Try prefixing all commands with DISPLAY=:0. This tells cgminer which X-Server instance to use. The cgminer command then simply becomes:

DISPLAY=:0 ./cgminer -u ...

You can also fix this for the current session with the following

export DISPLAY=:0

this defines the variable in a bash shell (see your shell's documentation for details if you're using another shell). Putting this into your .bashrc file might be a good idea if you intend to use it only over SSH .


How to combine separately signed inputs from different users? With two separate signed raw transactions from two users, how would one go about 'batching' these manually (combining the inputs and outputs into a single transaction)?

Is this a viable solution for groups of users attempting to save on fees, or would the extended length of the resulting transaction negate any real savings?

With two separate signed raw transactions from two users, how would one go about 'batching' these manually (combining the inputs and outputs into a single transaction)?

If you are trying to combine two independently signed transactions together it would include a number of constraints on how the amount can be spent and how the transaction is structured. This is because when we sign transaction, we include the serialized transaction as the message (until we have SIGHASH_NOINPUT). The constraints are the following:

The version and nLocktime of both transactions would have to be same.
The individual transaction inputs would need to be signed with ANYONECANPAY|SINGLE SIGHASH flag. The ANYONECANPAY allows adding additional inputs to the transaction. However, if you sign with ANYONECANPAY|NONE, the signer is at a risk of his output being excluded from the transaction as he has not committed to any outputs. Signing with ANYONECANPAY|ALL binds all the outputs and hence no other outputs can be added. All of this means, the signer can only send money to a single address/script and hence cannot include a change output to send remaining money.

The #2 point is true if the signer does not trust any centralized entity in batching the transaction. A signer can however, sign with ANYONECANPAY|NONE flag and assume that when the centralized entity broadcasts the transaction they will sign the transaction with ALL flag in order to bind all the outputs to the transaction.

  Is this a viable solution for groups of users attempting to save on fees, or would the extended length of the resulting transaction negate any real savings?

Transaction fees are based on the weight of the transaction. Signatures, outpoints of tx referenced, and locking script occupy the vast majority of that which cannot be done away with batching transactions signed independently. You will only be saving transaction costs on things that are common like 4 byte transaction version, 4 byte nLocktime, 2 bytes for number of tx inputs/outputs.

Batching is generally done to mask who pays to whom (eg. coinjoin) not to save fees. But even in that case the batching server gives the senders a final serialized transaction containing all the inputs and the outputs that all of them sign with sighash_all flag. Each input is not signed independently.


What's "walletconflicts" in listtransactions method output Here's an output of listtransactions method

[
{
"account" : "",
"address" : "mz2A28GQxWrYgMn2z9pRqaUFNqTMyhk1sJ",
"category" : "receive",
"amount" : 6.30000000,
"confirmations" : 157,
"blockhash" : "00000000befa3ef184f6c3cdec8814b945bad9e3f7ce9eb38e3102bcf4c030c0",
"blockindex" : 9,
"blocktime" : 1397675516,
"txid" : "f517350f088d235878ecab8d5241f0b6e59a4081eec22031c449d0d01d79ed66",
"walletconflicts" : [
],
"time" : 1397672026,
"timereceived" : 1397672026
}
]

what's walletconflicts, it's array of what ? transaction ids, maybe ? i couldn't find any documentation even in Bitcoin console.

This is new. It is a field, which contains txids which hold the same data as the original transaction (but has different txids).

See ID-malleation bug


Mining: Memory clock speed theory I am mining on Radeon HD 7850 2G

I increased GPU clock speed to max 1050 available in AMD overdrive.
and then I started to increase memory clock speed.
Mining performance is dropping when memory clock speed is higher then 1250.

1300 - 327
1290 - 320
1280 - 313
1270 - 310
1260 - 307
1255 - 341
1250 - 361
1245 - 361
1240 - 360

Does clock speeds must be multiple?

Is there some formula that shows the best values for mining?

My 7850 has very similar characteristics. 1250Mhz works the best. I doubt there is a formula as my 7870 is much happier with 1500Mhz. Remember that video memory has error correction. Sometimes is can run quite high with lots of errors which will reduce your performance.


Install 2 Electrum wallets in a same computer I have an Electrum Wallet in my computer, and I'd like to transfer my BTC to another Electrum Wallet, with a new seed and new adresses.

Is it possible to have 2 Electrum Wallets in a same computer? If so, how can I install it?

Is it possible to have 2 Electrum Wallets in a same computer? If so,
  how can I install it?

You able to have as many wallets as you want. You dont need install electrum twice, all you need it is create new wallet.

I assume you already have a wallet with password.
Run electrum and choose your wallet from the dialog:

Save that wallet somewhere in other place, and create another one with a new seed and new adresses. Then send from one to other.


Can Bitcoin Tech be Used to Protect Journalists Over eight Nigerian journalists are currently in police detention because they published investigative news stories that didn't sit well with the government of the day.

How can the bitcoin technology help journalists facing government suppression, especially regarding giving up their information sources?

Can the blockchain technology be used in a way to protect journalists from having to reveal the identities of their sources? How?

Bitcoin is a network that allows participants to hold and transfer value amongst each other. A journalist could use it to transact with sources, or perhaps to withhold their money from the grasp of an over-reaching government, but it will not protect a journalist that is publishing articles from an angry government.

A journalist could publish anonymously, and perhaps request support through bitcoin. In such a situation, the journalist may need to be careful they do not leak their identity, so they may have additional considerations in receiving the bitcoin (ie. being careful to not tie their identity to the received coins in any way).

  Can the blockchain technology be used in a way to protect journalists from having to reveal the identities of their sources?

Bitcoin could allow the journalist and their sources to engage in pseudonymous transfers of value, but this is different than preventing the journalist from revealing sources. A technology like PGP encryption would be a much more appropriate way for a source to communicate sensitive information to the journalist.


Can an FPGA for mining be used to crack deterministic keys? Deterministic keys are based on the sha256 hashing function.  As described in the link below deterministic keys use the same hashing function.

https://en.bitcoin.it/wiki/Deterministic_wallet

Is it possible for an FPGA to be repurposed to quickly find the hashes for poorly chosen keys?

An FPGA can do anything, by definition (Field Programmable Gate Array) they can run any bitstream you care to write for a specific task. The BIP0032 wallets you're thinking of however are 128bit keys with significant key stretching, so not a chance in hell will you ever crack one. That's by design.


What are the equations to convert between bits and difficulty? If we take block hash 0000000000000006770c3806960539ca83a24facbd99ea212f37f2a0e6a5629a for example.

The difficulty as a 32 bit float is 50810339.04827648. The difficulty in bits as an unsigned 32 bit integer is 424970034?

What are the equations to go from difficulty -> bits and bits -> difficulty?

Answer shamelessly stolen from stackexchange:

  Difficulty encoding is thoroughly described
  here.

  Hexadecimal representation like 0x182815ee consists of two parts:

  0x18 -- number of bytes in a target
  0x2815ee -- target prefix

  This means that valid hash should be less than
  0x2815ee000000000000000000000000000000000000000000 (it is exactly
  0x18 = 24 bytes long).

  Floating point representation of difficulty shows how much current
  target is harder than the one used in the genesis block.

  Satoshi decided to use 0x1d00ffff as a difficulty for the genesis
  block, so the target was
  0x00ffff0000000000000000000000000000000000000000000000000000.

  And 50810339.04827648 is how much current target is greater than the
  initial one.

How the Bitcoin client converts from bits -> difficulty:

uint256& uint256::SetCompact(uint32_t nCompact, bool *pfNegative, bool *pfOverflow)
{
    int nSize = nCompact >> 24;
    uint32_t nWord = nCompact & 0x007fffff;
    if (nSize <= 3) {
        nWord >>= 8*(3-nSize);
        *this = nWord;
    } else {
        *this = nWord;
        *this <<= 8*(nSize-3);
    }
    if (pfNegative)
        *pfNegative = nWord != 0 && (nCompact & 0x00800000) != 0;
    if (pfOverflow)
        *pfOverflow = nWord != 0 && ((nSize > 34) ||
                                     (nWord > 0xff && nSize > 33) ||
                                     (nWord > 0xffff && nSize > 32));
    return *this;
}

How the Bitcoin client converts from difficulty -> bits:

uint32_t uint256::GetCompact(bool fNegative) const
{
    int nSize = (bits() + 7) / 8;
    uint32_t nCompact = 0;
    if (nSize <= 3) {
        nCompact = GetLow64() << 8*(3-nSize);
    } else {
        uint256 bn = *this >> 8*(nSize-3);
        nCompact = bn.GetLow64();
    }
    // The 0x00800000 bit denotes the sign.
    // Thus, if it is already set, divide the mantissa by 256 and increase the exponent.
    if (nCompact & 0x00800000) {
        nCompact >>= 8;
        nSize++;
    }
    assert((nCompact & ~0x007fffff) == 0);
    assert(nSize < 256);
    nCompact |= nSize << 24;
    nCompact |= (fNegative && (nCompact & 0x007fffff) ? 0x00800000 : 0);
    return nCompact;
}

Converting from target to difficulty, in shell. Create file target-to-difficulty.sh:

#!/bin/bash
echo "ibase=16;FFFF0000000000000000000000000000000000000000000000000000 / $1" | bc -l

Usage:

$ ./target-to-difficulty.sh 000000000000000024DBE9000000000000000000000000000000000000000000
29829733124.04041574884510759883


Lightning network and lightweight clients How will the lightning network handle lightweight clients?

Do I understand it correctly that opening a payment channel require writing on the blockchain to protect against double-spend? The integrity being protected by the penalty of losing all bitcoin in the channel if writing a older transaction to the blockchain than what the counterparty do.

If I have a friend I trust and open a payment channel to him/her, I can afford having my bitcoin invested in the channel being locked while he/she is offline.

If I lose connection to an "anonymous" node I automatically found on the network, I won't know if it ever will return online. Therefore I would like to reclaim my bitcoins invested into that channel. Thereby taxing the blockchain and incurring transaction fees. (In the worst case scenario a group of people want to mess with me and anonymously create a lot of dead payment channels. Sure they will only bind as much bitcoin for me as they collectively bind themselves. But unless someone already have found a way to mitigate this, you might not want to be a merchant selling burnable flags in a world with the Lightning network.)

If I understand this correctly, won't this result in centralization? If I want to pay with the lightning network from my cellphone, I would need to use a full lightning network node (always online) or have pre-existing payment channels to nodes that trust me. (friends, my bank, full node in my cellar etc.)

Is this a real problem? Has someone found a way to mitigate it?

How will the lightning network handle lightweight clients?

Most steps during the payment process in an LN channel don't actually require full knowledge of the blockchain or even the unconfirmed (mempool) transactions. This is because the transactions involved deal with 2-of-2 multisig scripts, where both parties have to sign off on each transaction to make it valid, so they both can stay aware of all transactions made relevant to the channel they share without monitoring the blockchain.

The exception is for dispute mediation. If Alice tries to broadcast an older version of a commitment transaction, someone needs to see that transaction to take Alice's portion of the funds from it. This is an aspect that can be trustless-ly outsourced, though. It can even be incentivized with a small fee.

  Do I understand it correctly that opening a payment channel require writing on the blockchain to protect against double-spend?

First you establish a refund from the funding transaction, then you broadcast the funding transaction which needs to be mined into the blockchain before payments can be made in the channel securely.

  The integrity being protected by the penalty of losing all bitcoin in the channel if writing a older transaction to the blockchain than what the counterparty do.

Exactly, the payment channel is crafted in such a way that previous states of the channel cannot be broadcasted. Technically they can be broadcasted, the penalty for doing so is just losing all of your portion of the funds in the channel, so neither party will broadcast previous states of the channel.

  If I have a friend I trust and open a payment channel to him/her, I can afford having my bitcoin invested in the channel being locked while he/she is offline.

A lot hasn't been figured out in this area, but my guess is typical consumers wouldn't open a lot of channels with people who may be offline frequently. A consumer might open a channel with a business they frequent, and who has servers set up to be running with negligible downtime. Then consumers can pay each other through those businesses or other dependable nodes.

  If I lose connection to an "anonymous" node I automatically found on the network, I won't know if it ever will return online. Therefore I would like to reclaim my bitcoins invested into that channel. Thereby taxing the blockchain and incurring transaction fees. (In the worst case scenario a group of people want to mess with me and anonymously create a lot of dead payment channels. Sure they will only bind as much bitcoin for me as they collectively bind themselves. But unless someone already have found a way to mitigate this, you might not want to be a merchant selling burnable flags in a world with the Lightning network.)

I think you've essentially hit the reason that you don't want to just open up a bunch of channels with various anonymous nodes. They can become unresponsive, and you might have to wait a day or at least a few hours to get your funds out of the channel, plus paying transaction fees. Merchants still wouldn't mind connecting to many consumers, they just probably wouldn't be trying to route payments through consumers.

I should note that payment channels don't have to be funded from both parties. A channel you open with a merchant might have you putting 1 bitcoin into it and them putting 0 bitcoins. Then only you can pay the merchant, but the merchant probably isn't going to be trying to route payments through you (a consumer who would likely be offline 99% of the time), so that's okay with them.

  If I understand this correctly, won't this result in centralization? If I want to pay with the lightning network from my cellphone, I would need to use a full lightning network node (always online) or have pre-existing payment channels to nodes that trust me. (friends, my bank, full node in my cellar etc.)

The difficulty of running an always-online node would be so low, that there would probably be a lot of competition. Merchants would definitely be at an advantage. That is how I predict channels would form, through merchants, and merchants would act as the intermediaries.

  Is this a real problem? Has someone found a way to mitigate it?

Even if the network does become fully centralized around a small minority of nodes, those nodes still can't really do much harm. If one or two becomes unresponsive, payments will just route through other nodes. Like I said before, the barrier to entry for running a lightning node should be pretty low, so there will likely be a fair amount of competition.