The entire purpose of proof-of-work mining is to force participants to spin their wheels doing busywork.  It takes about 10 minutes to mine a block because the difficulty automatically changes so that it always takes about 10 minutes to mine a block.  When more hashing power is added to the network, the difficulty increases to accommodate.  The time it takes to mine a block is intentionally set to 10 minutes.

You should read What exactly is Mining? for clarification.


How can I create a raw transaction in hex format with Bitcoinj?

Don't build the entire parent transaction, just build the outpoint, which is all that is relevant for encoding a transaction to hex. Specifically use this constructor

EDIT: More specifically, cannot recreate the parent transaction unless you have ALL relevant information for that transaction (inputs, locktime, outputs etc..). To use the constructor I linked below you will need to also provide the output index of the output you are spending on your parent transaction.


If so, what would be the max amount that a mining client can increment the ntime value?

bitcoind will accept a block and push it out to the network as long as it is valid. Because of that, it's incredibly lenient. Quoting from bitcoin wiki:

  A timestamp is accepted as valid if it is greater than the median timestamp of previous 11 blocks, and less than the network-adjusted time + 2 hours

It almost never matters. Because bitcoind is a single-user mining program, it's almost always on the same computer as the mining agent. If the mining agent needs to get more work units, it doesn't use up extra bandwidth.


There is a section in the help which describes what each file is and the the data it contains. It is in the section 'More technical details' called 'File descriptions'.

The wallet file (without the numbers) is the main wallet file. It contains your private keys and the relevant transactions.

The wallet file with the numbers in the name is a rolling backup file. The numbers are a timestamp and it is 'the wallet that was saved just beforethe last save'.

The files with the suffix 'info' contain the labels for your addresses.

Private key exports are typically given the extension 'key'.

You can backup your wallet either by :

Closing MultiBit and then copying the wallet and info files.

Or

Exporting your private keys to a private key export file. This only contains private keys (no labels,  no transactions). You can import it into a new wallet and it regenerates the wallet (but currently you lose your address labels).

For higher value wallets I recommend backing up using both techniques and to two separate devices (just to be on the safe side).

Note that the MultiBit wallets are not deterministic so if you create more receiving addresses you will have new private keys created. You will want to redo your backups. You can choose how many new receiving addresses to create at a time (1, 5, 20 or 100) so I normally add more than I think I'll need for that wallet to save me the bother of re-backing up.

The wallet format is in a format called protobuf. This is the format used in the bitcoinj library and is also used in the Schildbach Bitcoin Wallet.

Developers can easily read and write this file format in other languages like C, C++, python though to my knowledge no-one has written parsers for the data format yet.

Different clients tend to have import and export at the private key level (as that is the crucial data) and it's more standardised. The MultiBit private key export files can be imported directly into blockchain.info and the individual private keys can be transferred to and from anything that supports the WIF private key format. Pretty much all the clients import/ export this private key format.


How do I use the getblocktemplate RPC command of Bitcoin Core GUI? I tried the following usages but none of them worked

The GUI's debug console operates similarly to a shell. It needs quotes around the entire JSON string so that it is first interpreted as a string before the JSON is parsed. Then, if you used double quotes, you need to escape the quotes that are part of the JSON so that they aren't misinterpreted.
A valid way of writing this command is
getblocktemplate "{\"rules\":[\"segwit\"]}"

Alternatively, to avoid additional escaping, you can use single quotes on the outside:
getblocktemplate '{"rules":["segwit"]}'


What is the proper way to update C-Lightning?

I just deleted the original folder and installed from scratch.


How does an SPV node verify an unconfirmed transaction?

First, nobody should rely solely on unconfirmed transactions.  This applies equally to full node operators and SPV wallet users.

  Bob's wallet verify that the coins being spent existed at one time? Request the Merkle path and transaction for all outpoints referenced in the unconfirmed transaction's input list.

Yes, that can be done now.  I doubt any wallets do that now, as with the current P2P network design it would be slow and not definitive.

It would be slow because the network protocol does not allow requesting arbitrary transactions.  In order to get a particular transaction, you have to set a bloom filter and then keep requesting merkle blocks until you find the block that contains the transaction.  In the case of a negative search, this would require requesting a merkle block for every block on the block chain, or downloading about 32 MB of data and forcing your full node peer to scan its entire about 30 GB block chain.

It would not be definitive because anyone can withhold data from an SPV node.  For example, the full node that notifies the SPV node about an unconfirmed transaction can include merkle blocks to each of the inputs, proving that they exist on the block chain.  But the full node can't include any proof that those inputs haven't been previously spent on the block chain.

When some form of UTXO commitments gets implemented, it will become possible for full nodes to prove to SPV nodes that an input was unspent up to the tip of the SPV node's header chain.  However, it that still doesn't offer any guarantee that the transaction won't be double spent anyway.  (In short, it decreases the full node's ability to lie without making unconfirmed transactions any more secure.)

  Could a similar mechanism be used to further verify that Alice's unconfirmed transaction doesn't double spend coins?

No, this is fundamentally impossible because an unconfirmed transaction is just data.  Alice could create and broadcast transaction T paying Bob and then create transaction T' (a double spend) that she keeps secret on her hard drive.  Because it's a secret, you don't know about T', but it's still a valid double spend.

There are various proposals to allow full nodes to relay information about broadcast double spends, such as Gavin Andresen's relay first double spend or Peter Todd's replace by fee, but none of these can provide a method to verify there are no double spends in existence for a particular input.

It's also possible to change how Bitcoin verifies signatures to require either mathematical ECDSA one-show signatures or consensus one-show signatures.  This wouldn't stop double spends, but it would mean that anyone who had two signatures for the same input could create a third spend taking all the money for themselves.  (E.g. if a miner running a full node received T and T', it could create and mine T3 paying the full input value to itself.)

This would obviously disincentivize creating public double spends, but it wouldn't stop them.  Worse, there are some easy ways around the disincentives for systematic fraudsters, but everyday users like you and me who occasionally need to make double spends for legitimate reasons (e.g. because a transaction isn't confirming) couldn't safely make them any more.


How is a Transaction protected from tampering before inclusion in a Block?

The entire transaction (except for the signatures) must be signed with the appropriate key for each transaction output it claims. Tampering with any of the outputs with invalidate all the signatures.


Is the new Google Compute Engine suitable (and affordable) for running a bitcoind instance?

Comparing the GCE's pricing to Amazon EC2's pricing for the cheapest tier, it appears that Google would be cheaper should the CPU usage be small (which in case of bitcoind it should be in most cases). However, as GCE is still early in development, few people could run benchmarks on it and the prices can change abruptly (much like the prices of Google App Engine changed after the early beta period).

As it stands, Google Compute Engine looks like a viable option for cheap hosting of bitcoind.


Besides transaction validation, are there any other uses of the Script language in Bitcoin

Is Script also used to validate block, network, or any other data?

No. Scripts are only included in transactions and can only read some data from the transaction and the block the transaction is included in. Scripts are only used for transaction validation as they specify the conditions required to spend an output.

  Seem like there are a lot of OP codes not in use or deprecated. Why were they added in the first place? Am I missing something?

To allow for scripts that can have a lot of different conditions. Those opcodes can be used to create smart contracts on Bitcoin.

There are some opcodes that are disabled (nothing is "deprecated") because they can be abused to perform various attacks on nodes verifying transactions containing them.


Most likely, you need to change permissions on those files:

$ chown apache config.php database.php bitcoin.php
$ chmod g+w config.php database.php bitcoin.php

Of course, if you're not using apache or the groupid of the webserver you're using is different, you might need to change "apache" to something else.

Read up on linux file permissions to understand this stuff better.


TL;DR: No. Your bitcoin-core pass-phrase cannot be used to recover your bitcoin.

i was told the need of a private key

If you have the private key, you can recover access to your bitcoin.
If you have a recovery phrase and know which bitcoin wallet you used, you can recover the private key and recover access to your bitcoin.
Otherwise those bitcoin are gone forever.

i promise a reward to anyone who helps me out?

Expect to receive lots of email from scammers and very convincing professional conmen.
Don't give anyone your private-key or your recovery-phrase. The only circumstances you should ever do that is in front of a lawyer paid by you with proof of the helper's identity and a signed contract in her hand. Otherwise you will lose even more money.
People can help you without knowing your private-key or recovery-phrase. If they say they can't help you without those things, they are conmen.

If i installed the latest version of Bitcoin core with the same wallet phrase will i see that old address back with the balance.

No.

Any suggestions would be appreciated

Are all of the words in your passphrase in the BIP39 list? If so it is a recovery-phrase not a pass-phrase. If so it would be associated with a different type of wallet than the "bitcoin core" wallet.
If so, download a wallet application that uses BIP39 and try using your recovery phrase in it. Be very careful not to download malware. Start with wallets that don't require an online service to work.

Bitcoin core "passphrase"

Note that in the "bitcoin core" wallet, the Passphrase is used to encrypt your wallet. It is not a recovery phrase. You cannot recover access to your bitcoins using only the pass-phrase of a lost wallet.

Importing private keys into a new "bitcoin core" wallet
See also

How do I import a private key into Bitcoin-Core? where Rick's answer is

Run Bitcoin-Core
Select Help (to the right of Settings)
Select Debug Window
Select Console
If you encrypted your wallet, unlock it by entering walletpassphrase "YourLongPassphrase" 600 next to the > input box
Next to the > input box type importprivkey <bitcoinprivkey> (Note that the private key must not have spaces, remove them if they are included in your backup)

Example: importprivkey 5KJvsngHeMpm884wtkJNzQGaCErckhHJBGFsvd3VyK5qMZXj3hS

Note that the 'bitcoin core' wallet does not use a recovery phrase. You cannot recreate your private key from a recovery phrase using bitcoin core. The only "pass-phrase" used with bitcoin core grants access to the wallet, it is not the private key and cannot be used to recreate the private key.
Without the private key, the bitcoins are gone forever.


I inverted 2 digits to a wallet in a transfer

Normally a Bitcoin address is in the Base58Check or Bech32 format. Both of these formats have a checksum incorporated specifically designed so that wallets can detect if there is a typo in the address. It is strange that the wallet allowed you to submit the transaction.

There is no way to contact the owner of a wallet that can spend a specific Transaction Output (coins)

Transactions cannot be reversed. Under no circumstances. Even if you can proove that you are the owner.

BUT!!!
As we speak, October 30, 2020
The mempool is full, allegedly because miners in China are moving due to the rainy season. So the hash power has dropped and many low fee transactions have not been processed yet.
So, use a blockchain explorer to check if your transaction has been processed.
If not, then you can try to double-spend it by providing a higher fee for miners.
Higher fee transactions are processed first.


My assessment is that Mining Pools are the only mining operations that will exist and their fees will make the pool operators money, but the actual miners will only know Booms & Busts as the spot price, electricity costs, difficulty, etc will always vary.

If you want to make money in the mining world, your best option is to start a pool.


how i can make bitcoin address generator like mycelium gear using php script

The step you're missing is actually generating the public keys, since addresses are just hashes of a public key. Mycelium uses BIP39 with BIP32 to produce deterministic public keys, using the BIP44 scheme AFAICT. The following example does the same in PHP using the composer package: bitwasp/bitcoin.

Disclaimer: I maintain the library in question.

use BitWasp\Bitcoin\Bitcoin;
use BitWasp\Bitcoin\Mnemonic\Bip39;
use BitWasp\Bitcoin\Mnemonic\MnemonicFactory;
use BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeySequence;
use BitWasp\Bitcoin\Key\Deterministic\HierarchicalKeyFactory;

$generate = true;
$math = Bitcoin::getMath();
$bip39 = MnemonicFactory::bip39();

if ($generate) {
    $mnemonic = $bip39->create();
} else {
    $mnemonic = 'glad car usual air stomach again ecology champion ranch radar meadow wolf shrug film over glue chalk derive inform always ivory anchor jaguar umbrella floor topple click polar grid economy hint raccoon canal nose organ prepare differ escape utility major dirt scan soul shiver mention raw smoke rhythm';
}

// Produce HD root key from mnemonic
$entropy = $bip39->mnemonicToEntropy($mnemonic);
$hdRoot = HierarchicalKeyFactory::fromEntropy($entropy);

// Lets derive a branch:
$sequence = new HierarchicalKeySequence($math);
// purpose' / coin_type' / account' / change / ...
$branch = $hdRoot->deriveFromList($sequence->decodePath('44h/0h/0/0'));

// Now lets print the first 5
for ($i = 0; $i < 5; $i++) {
    $child = $branch->deriveChild($i);
    echo $child->getPublicKey()->getAddress()->getAddress() . "\n";
}


Can someone please explain how Lightning paths are working and what effect large centralized hubs have?

If you want to route a lightning payment via your node, your channel(s) must hold at least a balance of the to-be-routed amount, right?  If not, your node by definition cannot be chosen as a potential routing path.

yes this is true. If you don't have enough bitcoin to forward you cannot forward a payment.

  So, in the future, when we dream about mass adoption: in the financial markets space, where many large amounts will be transacted: Only a few "big" corporate nodes with large balances in their channels, can be chosen for routing  of large amounts, right?

I believe that the many large amounts is a strong assumption. I believe the amounts of financial transactions should be Zipf distributed with the vast majority of transactions being small and only a few transactions being large.
In the latter case (which is the one you ask about): if you want to transact a large value just open a new payment channel to the recipient (which with wumbo channels will be possible in the future). It is useful as they can spend the amount then. Also you could do it offchain but no need to.

  Or is there an algorithm in place, where an amount of for example 100million could still be routed via a list of channels held by multiple nodes (sort of "hopping" through multiple channels until you arrive at 100million - for example 10+10+10+10+10+10+10+10+10+10)

Also note that in the future AMP (atomic multi-path) routing will be implemented so that large payments can be split into various small payments. It is well known how to implement AMP and it is part of the BOLT 1.1.

  Or is the lightning putting you always to a direct path to the ONE single channel that has the 100million available as balance?

Path selection is not part of the lightning network protocol. It really depends on the implementation or even on you as the user as you are allowed to specify a path.

  Second, I would like to know how the lightning algorithm is deciding via which channels/nodes to route payments?

see above. Generally people try to find shortest paths that are likely to have enough liquidity.

  Because many articles say that like 0.6% of all Lightning nodes are routing like about 85% of the overall lightning payments. And those 0.6% happen to be the ones with highest "capacity"

Many articles?

The last statement doesn't seem provable to me. Since onion routing makes payments private, we would only know for our own node which routes we have taken and how many payments we have forwarded. While it is likely that most routes go through high capacity nodes the exact numbers are pure speculation. Could be more could be less.

  Why is that? Why not more evenly distributed?

I'd say because currently only a few people have been #reckless enough to provide large liquidity to this cutting edge technology in which due to potential software bugs one still could lose funds.

  And what is the meaning of "capacity"

Capacity is the amount of bitcoin sent to the 2-2 multi-sig wallet that is used to anchor a payment channel. This should not be confused with the balance which are the two outputs in the secret commitment transaction from that 2-2 address. The balance is sometimes referred to as inbound and outbound capacity but it is only known to the channel owners.

  3) What roles play WatchTowers in the future? And what influence could they have regarding (de)centralization of lightning?

Watchtowers have been proposed as a service in which a third party monitors your channel state and helps you to make sure that your channel partner does not try to steal BTC from your channel by publishing an old state. In general it makes the lightning network safer to use. If that incentivises high capacity nodes to provide more liquidity or low capacity nodes to provide more liquidity we cannot say and is pure speculation.

btw, please be specific what you mean when you talk about "centrality". My feeling is that you mean nodes having high liquidity. I would much more prefer to talk about betweenness centrality.

Also keep in mind that the bigger issue with watch towers is that they might gather so much information about ongoing payments that the privacy of the lightning network is at risk.

  4) Is there some sort of "penalty" in place when a node withholds a payment or does not route a payment? Or are these technically non-valid scenarios?

Short answer: Not really.

However, holding a payment up to the maximum CLTV_delta means that you cannot use that liquidity in your HTLC output to route other payments. Which means the node will earn less fees. So, economically a node is incentivised to route a payment as quickly as possible.

However, if a node wants to act in a delaying way to disturb the network it can do so. It is up to the nodes who are connected to that node to track such behavior and close their channels or to the sender nodes to not select this particular node for routing.

Also, keep in might that a node can at max hold 483 HTLCs per payment channel. So, you could only delay a small amount of transactions if you want to delay them for a long time.

  5) Censorship:  How is transaction censoring possible in lightning ecosystem?
  What are the scenarios here, and any preventing mechanisms planned/already in place? An article in https://news.bitcoin.com/lightning-network-centralization-leads-economic-censorship/  writes: "" A large miner (or even a majority cartel of miners) cannot effectively censor your transactions, because ANY miner can include your transaction in a block. But the same is not true for LN hubs. They can effectively censor your transactions, because NOT any hub can route your payment. Example: Megabank “A”, “B”, and “C” all decide to become Lightning Hubs. They all acquire customers and have channels open between the 3 banks. This allows customers from any of the banks to send money to other customers of those 3 banks. You, being a freedom-loving individual, decide to open a channel with an anonymous hub known only as T35G7. Guess what. Megabanks A, B, and C don’t want to open a channel with T35G7. So you can’t send to any of their customers since there’s no available route.
  ""

No, this is not true. While Megabank A, B and C could decide not to route a payment that you initiate to T35G7 this will be hard in practice. First, every single "Megabank" does not know that this is a payment from you to this node unless the route looks like this You--> A --> B --> C --> T35G7 AND the Megabanks share all their information. In that case, you could see the banks as one node and the path looks like that You--> MEGABANK --> T35G7. In that case, yes, MEGABANK could refuse to forward a payment but it does not even know that You wanted to pay T35G7 because the route could actually look like this: some sender --> .... --> You --> MEGABANK --> T35G7 --> ... --> some receiver.

Also, what those described megabanks certainly cannot do is to prevent you from opening a direct channel with T35G7 which is the thing you should do anyway if you can't find a route on the network.

BTW the absurdity of the described scenario could also be transferred to Bitcoin mining if you have a cartel of bitcoin miners. Because that cartel could just agree to not mine on top of the blocks from other miners which includes such a transaction. If the cartel is a real cartel with more than 51% of the mining power, they can effectively censor any transaction...

  6)  Finally, at the end of the day, my basic desire is to understand in what extent, within what ramifications, CAN Lightning become a highly centralized ecosystem, instead of a highly decentralized one.

The lightning network is a protocol on top of bitcoin. It is a well-known set of rules for people that consent to use Bitcoin in a certain way. In that sense, it is totally optional and always boils down to Bitcoin. Payment channels really are just 2-2 multi-sig wallets in which your funds are not locked as they can (under good circumstances) be moved around without the necessity to wait for Bitcoin miners or the blockchain or and empty mempool.

I always compare the lightning network with the world wide web. It is an open permissionless standard that anyone can participate. Might there be some "megabanks" providing high liquidity and utility which become dangerous. Certainly. The same happened with the Web and the emergence of huge Web companies that have integrated extremely deeply into our everyday live. However, it is always the choice of the user to use such actors. The lightning network itself like the Web is a decentralized technology. This does not prevent central services to emerge but as said they don't have to be used and certainly don't control the technology or the protocol.

So, I really hope I could bring some light to all the paranoia that is being spread by some people...


How can i verify my txs with my own full node?

You should use the gettransaction (TXID) command that returns information about a transaction belonging to your wallet. Then just check the confirmations field.

Sample Call: bitcoin-cli -testnet gettransaction 5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589

Sample Response:

{
    "amount" : 0.00000000,
    "fee" : 0.00000000,
    "confirmations" : 106670,
    "blockhash" : "000000008b630b3aae99b6fe215548168bed92167c47a2f7ad4df41e571bcb51",
    "blockindex" : 1,
    "blocktime" : 1396321351,
    "txid" : "5a7d24cd665108c66b2d56146f244932edae4e2376b561b3d396d5ae017b9589",
    "walletconflicts" : [
    ],
    "time" : 1396321351,
    "timereceived" : 1418924711,
    "bip125-replaceable" : "no",
    "details" : [
        {
            "account" : "",
            "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
            "category" : "send",
            "amount" : -0.10000000,
            "vout" : 0,
            "fee" : 0.00000000
        },
        {
            "account" : "doc test",
            "address" : "mjSk1Ny9spzU2fouzYgLqGUD8U41iR35QN",
            "category" : "receive",
            "amount" : 0.10000000,
            "vout" : 0
        }
    ],
    "hex" : "0100000001cde58f2e37d000eabbb60d9cf0b79ddf67cede6dba58732539983fa341dd5e6c010000006a47304402201feaf12908260f666ab369bb8753cdc12f78d0c8bdfdef997da17acff502d321022049ba0b80945a7192e631c03bafd5c6dc3c7cb35ac5c1c0ffb9e22fec86dd311c01210321eeeb46fd878ce8e62d5e0f408a0eab41d7c3a7872dc836ce360439536e423dffffffff0180969800000000001976a9142b14950b8d31620c6cc923c5408a701b1ec0a02088ac00000000"
}

Reference: https://bitcoin.org/en/developer-reference#gettransaction


What, if anything, can I do to recover bitcoin that was stolen from my MtGox acct in June, 2013?

There is nothing that can be done with just a public address and an IP(as the real IP is most likely behind proxy/vpn/etc...).

Kraken was selected by the MtGox trustee to assist MtGox creditors in investigating missing Bitcoin, filing claims, and distributing remaining assets.
The due date for accepting MtGox creditor claims via online submission has past.
But creditors may still be able to submit claims via the offline claims method.


Predict multi signature transaction size

pubkeySize=33
sigSize=72

SizeOfRedeemScript = 1+n*pubkeySize+1+1
SizeOfScriptSig = 1+m*(1+sigSize)+SizeOfVarIntFor(RedeemScript)+SizeOfRedeemScript
sizeOf(input) = 32+4+SizeOfVarIntFor(SizeOfScriptSig) + SizeOfScriptSig + 4

SizeOfScriptPubKey = SizeOfVarIntFor(SizeOfRedeemScript) + len(script)
sizeOf(output) = 8 + SizeOfScriptPubKey

sizeOf(tx) = 4 + SizeOfVarIntFor(numInputs) + sum(SizeOfInputsArray) + SizeOfVarIntFor(numOutputs) + sum(SizeOfOutputsArray) + 4

Basically, once you know m & n (for your multisig), whether public keys are compressed (pubkeySize), plus the number of inputs and outputs, plus the types of outputs, you can come up with a pretty accurate figure for the size.


Bitcoin mining algorithm - target - Java

The difficulty is a part of the block header called "bits". It is the 72nd to 75th bytes of the block header and looks like this in hex:

bits = 0x76270618

Remember this is little-endian! Actual big-endian version is 0x18062776
Take the first byte as the “exponent” and the other three bytes as the “coefficient”

Exponent = 0x18 = 24

Coefficient = 0x062776

Plug into this formula:

Coefficient * 2**(8*(Exponent - 3)) =
0x0000000000000000062776000000000000000000000000000000000000000000

And that's how you can calculate difficulty from bits.


Where can I find well-written criticism about Bitcoin?

Here's the page on the wiki where weaknesses are addressed.


Is RSK going to be implemented on bitcoin only?

That would depend on the devs of said fork. (And the devs of RSK aswell probably)

I for one have not really looked into who supports what, but a quick google search hinted me that Bitcoin Cash for example, (https://twitter.com/viabtc/status/896016235816562688) might have interest in implementing RSK aswell.

I wouldn't be so quick to argue that this couldn't / won't be implemented in other bitcoin forks.


What’s the opcode sequence for doing the reverse of Multisig?

The following scriptPubKey describes the desired contract:

OP_IF
    OP_DUP OP_HASH160 <Bob's pubKeyHash>
OP_ELSE
    <now+30 days> OP_CHECKLOCKTIMEVERIFY OP_DROP
    OP_DUP OP_HASH160 <Victor's pubKeyHash>
OP_ENDIF
OP_EQUALVERIFY OP_CHECKSIG

Bob can spend the output using the scriptSig <Bob's signature> <Bob's pubKey> OP_TRUE
Victor can spend the output after 30 days using the scriptSig <Victor's signature> <Victor's pubKey> OP_FALSE.


How to send requests to a testnet faucet to collect coins at my address?

I don't know the github projects for this argument (also the question on the project here is off topic).

  I would like to build a bot

Why do you want to create a bot to request the tBitcoin? you have needed a big quantity of bitcoin for your application test?
if yes I think this is not a correct street, the Bitcoin testnet is a network for the developers and in this network, the money is mined my a low difficulty.
So for the respect of other developers if you have neet big quantity of tBitcoin to do mine it. (a reference for do it).

Another possibility is using the regtest network od bitcoin, (you can build your local network, a reference of regtest)

  What is the link? How to send the request? If there's a github repo about something related? Any documentation?

However, these reference of the faucet bitcoin testnet are available here but the request depend of the site that implements the faucet


bitcoin-cli has a -datadir option so you can specify the data directory of your other bitcoind instance. It will use that parameter to read the bitcoin.conf and .cookie files in the other data directory so that it can connect to the other bitcoind instance. With that parameter, you can send RPC commands to it, including the stop command.

Alternatively, you can stop bitcoind by finding its PID (using ps) and the kill command. kill be default uses SIGTERM so bitcoind will actually safely shutdown by going through its shutdown process.


That address is a bech32 encoded address, which is a new style of address used on the Bitcoin network, that starts with bc1....

It seems that the Blockchain.info explorer has simply not been updated to properly interpret and present this newer address type. The addresses you listed are perfectly valid.


How do you get a job in the Bitcoin/Blockchain industry?

Look at the backgrounds of the top Bitcoin core devs.

Here are the top 3:

Wladimir J. van der LaanUniversity of Groningen
Institute for Mathematics and Computing Science (IWI)
Pieter Wuillecomputer science degree at U. of Leuven
Gavin AndresenBachelor's degree in computer science from Princeton


How can I get my node listed on Blockchain.info's connected nodes list?

Running BitcoinQT or bitcoind you are a full node in the Bitcoin Network - you receive and transmit Blocks and Transactions. Even better, if you have port 8333 open on your router and machine, other peers can connect to you which is also very useful for the Network.

To be listed as a node connected to blockchain.info, you need to connect to their client (with a specific runtime parameter for example, or by chance). I am not aware as to what IP they are using. However, you don't need to be connected to blockchain.info to be a node - being connected to anyone else on the Network using the standard client makes you a node.


My bitcoint-qt client is crashing due to insufficient file descriptors repeatedly even after I set the ulimits to 65535

and the answer is....

if you use a shared folder on a VM the linux open file desc spec is irrelevant.
So I created a diskimage directly mounted in the host...
and voilà problem solved by avoiding the vbox host shared folder service indirection.
maybe playing with the vbox host config and system config would have helped as well.....


The easiest way to do this is to have the QR code be a URL. For example, http://www.example.com/bitcoingiveaway/E34IKJ. Just assign a unique code to each location, the E34IKJ in my example.

What that web page does is up to you. It has to track how many times it has been accessed, of course. The first time, it can send a form that allows a person to fill in some kind of identifier, which can be a Bitcoin address. You then send them the coins (or if using some kind of account, credit their account).

Making this work without the scanners having Internet access is much trickier. It can be done, but it would require your to control the scanning devices such that they included a time stamp, and there would be no way to reliably inform people whether they were first right at the point of scan.

Another possibility for the "first come, get coins" model is to have the QR code be the actual private key used to claim the Bitcoins.


How to add support for segwit address and legacy with bitcoin core 0.16?

Quoting Suhas Daftuar's response to the issue you opened:

  In 0.16, we changed the consensus parameters for regtest so that segwit was always active. This was mentioned briefly in the release notes https://github.com/bitcoin/bitcoin/blob/v0.16.0/doc/release-notes.md#testing-changes, along with a workaround to replicate the old behavior.

  I am surprised that you're not seeing the assertion failure mentioned in the release notes, but I suspect this is the cause of what you're seeing.

So this is expected, but only affects regtest.


Bitcoin core has keypool option enabled by default, so when you install it a %n of keys will be generated and saved on your PC so when you generate Bitcoin address the address is coming from keypool which is already saved on your PC.

So, Your bitcoins should be on your PC, just give it some time to reindex.

and check debug.log file.


Securing a wallet and multiple addresses

Yes, your "wallet.dat" contains all your keys, and when you make new keys then they will be added to your wallet.dat. If you encrypt your wallet.dat, then all keys in it will be encryptet and all keys added to it will also be encryptet.
Your founds is not stored in your wallet.dat. The founds are stored in the blockchain (which everyone can download via a huge p2p network).
Yes. Your wallet.dat only contain the private keys to spend coins. Everyone can at all time send you coins (whether your connected to the internet or not).
No. The USB stick will only be able to spend coins send to the first 3 addresses (as the USB stick's wallet.dat will only contain private keys to the first 3 addresses).
As long as your client has the longest blockchain, then coins send to you can NEVER be removed again (unless someone spends them, with the private key only you know). However note that coins can first be "trusted", when there is enough confirms ("0 confirms" just means that someone has sent you a transaction, but it will first be "trustable" when it's included in the blockchain and enough blocks confirms that the blockchain will never be forked under your transaction. But usually 6 confirms should be enough).
Type your address on a trusted website, e.g. https://blockchain.info/ and look at the balance. Some clients support "watch-only" addresses (they only store your bitcoin address and not your private key), but I don't think Bitcoin-QT supports this (yet).
I don't know much about litecoin, but most of the "public/private key" stuff, apply to all cryptocoins (e.g. you can watch an address without storing the private key, etc).


Is there any part of a bitcoin transaction that is 'random' or could not be predicted?

There is always an inherent way to control the transaction. Try to create it, if you don't like the result, try again.

If your game gets popular enough, it may be economically viable to effectively spend computing power on mining transactions that game it.


Let me answer your questions out of order:

  What's the point of bitcoin mining / how they are put in to circulation?

https://bitcoin.stackexchange.com/a/3201/2306

  what happens if my computer is destroyed. Are those bit coins gone forever?

Yes.

  Wouldn't this cause the supply of bit coins to go down overtime until eventually there are very few bit coins left?

Yes.


Why will or will not the bitcoin infrastructure become unsustainable?

I will let Satoshi Nakamoto answer this:

  Long before the network gets anywhere near as large as that, it would
  be safe  for users to use Simplified Payment Verification (section 8)
  to check for  double spending, which only requires having the chain of
  block headers, or  about 12KB per day.  Only people trying to create
  new coins would need to run  network nodes.  At first, most users
  would run network nodes, but as the  network grows beyond a certain
  point, it would be left more and more to  specialists with server
  farms of specialized hardware.  A server farm would  only need to have
  one node on the network and the rest of the LAN connects with  that
  one node.

  The bandwidth might not be as prohibitive as you think.  A typical
  transaction  would be about 400 bytes (ECC is nicely compact).  Each
  transaction has to be  broadcast twice, so lets say 1KB per
  transaction.  Visa processed 37 billion  transactions in FY2008, or an
  average of 100 million transactions per day.   That many transactions
  would take 100GB of bandwidth, or the size of 12 DVD or  2 HD quality
  movies, or about $18 worth of bandwidth at current prices.

  If the network were to get that big, it would take several years, and
  by then,  sending 2 HD movies over the Internet would probably not
  seem like a big deal.

  Satoshi Nakamoto

Link: http://www.mail-archive.com/cryptography@metzdowd.com/msg09964.html


How can I verify the BTC supply with my own node?

To verify the supply, you have to compute the theoretical maximum issuance based on the block subsidy schedule. Then you can use the gettxoutsetinfo RPC which will output the total amount of Bitcoin in the UTXO set in a field named total_amount. Lastly you check that the amount in the UTXO set is less than or equal to the theoretical maximum issuance.


What is the max character limit when creating a Bitcoin Brain Wallet?

Brainwallet algorithm uses hash function of entered data for creating privkey. So, there are no limits.


How did this block end up on blockchain.info?

Blockchain.info is a special Bitcoin node created especially for it's purpose. So, it will act differently as well.

I suppose Blockchain.info's created configured it so to keep a record of all information it comes across, including orphaned blocks.

You might think that it is risky to do so because knowing this, people can try to flood the servers with irrelevant data. However, even with difficulty 1, it costs way more resources to create valid blocks than it will take for Blockchain.info to store them. It will only be possible to add a block every few minutes with regular mining hardware. Considering the mining profits you could earn by regular mining, I think it's safe to suppose no one is going to try flooding the Blockchain.info server.


Can a single transaction have multiple outputs going to the same address?

It is possible. Here is an example: http://blockchain.info/tx/4199f709bfab79f54938e80e11dc75c21a95e3183f8e8994306f5ff272fde42a

However, the bitcoin-qt GUI doesn't allow creating such transactions.

Such transactions might be useful in the context of colored coins, or where encoding information is involved.


Open-source blockchain explorer for regtest mode

I managed to point Abe to regtest just by using datadir=/home/$USER/.bitcoin/regtest in the config file and following the official instructions.


Yes.  It is legal to buy cryptocurrencies in the USA and they are taxed like property by the IRS.

See https://en.wikipedia.org/wiki/Legality_of_bitcoin_by_country_or_territory#North_America

From the WIKI:

  The U.S. Treasury classified bitcoin as a convertible decentralized
  virtual currency in 2013.[26] The Commodity Futures Trading
  Commission, CFTC, classified bitcoin as a commodity in September 2015.
  Per IRS, bitcoin is taxed as a property.[27]

  In September 2016, a federal judge ruled that "Bitcoins are funds
  within the plain meaning of that term".[28]

  [26] "Statement of Jennifer Shasky Calvery, Director Financial Crimes
  Enforcement Network United States Department of the Treasury Before
  the United States Senate Committee on Banking, Housing, and Urban
  Affairs Subcommittee on National Security and International Trade and
  Finance Subcommittee on Economic Policy". fincen.gov. Financial Crimes
  Enforcement Network. 19 November 2013. Retrieved 1 June 2014.

  [27] "IRS Virtual Currency Guidance : Virtual Currency Is Treated as
  Property for U.S. Federal Tax Purposes; General Rules for Property
  Transactions Apply". www.irs.gov. Retrieved 2017-04-22.

  [28]
  https://www.reuters.com/article/us-jpmorgan-cyber-bitcoin-idUSKCN11P2DE


As a workaround for the problem that you are facing - instead of using Bitcoin Core to send BTC to your account with the exchange, you might want to try exporting your wallet's private key from Bitcoin Core, then importing the private key to your account at the exchange.  See https://wallet.coinbase.com/faq/ (under 'Can I switch from my existing wallet app like Metamask, MyEtherWallet, etc.?') for information on how this is done with Coinbase.  Then, your BTC will be available in your account at the exchange.


If you trade with bitcoins, how do you manage to "explain" anti-laundering authorities the money-in & money-out?

I think your premise is flawed - when trading on Mtgox or other exchanges, there will only be transfers between you and Mtgox. If you're a day trader most trades will be internal on Mtgox and not be settled by the banks at all.

Even if they do "send a notice to anti-laundering authorities", it doesn't mean the next day they will show up at your doorstep to arrest you, it just means those authorities are aware of the transactions, and if they detect a suspicious pattern they may ask you questions. In this case you can just tell the truth.


Why do leading ASICs manufacturers sell their chips?

I think the simple answer is that a company doesn't have to be a "Bitcoin believer" in order to manufacture Bitcoin mining hardware.  The companies that produce ASIC chips also produce other products for other industries.  They are perfectly profitable just selling their chips to mining equipment manufactures, and probably don't feel the need to enter the world of speculation on a young, digital currency.

At their core, these companies are silicon chip factories, and there is lots of demand for custom silicon chips in the market.  There's no need for them to change up their business model and become Bitcoin mining facilities.

Don't forget that during the California Gold Rush, the wealthiest man in town was the guy selling shovels :)


Bitcoin unconfirmed transaction help me please

The bitcoin network is overloaded. You must wait 1-3 days before your transaction will go through. There is nothing you can do now but wait.

Next time, you may send transactions with a higher fee so a miner gives it more priority.

Don't spend any money on a site that claims they can speed up your transaction. They are scams.


How to check BTC transaction when buying face to face?

Does your cellphone have a web browser? There's many good web wallets (such as https://greenaddress.it/en/) which would allow you to simply open it in a web browser. If you don't have QR code capabilities, then your only resort is to have him/her write your bitcoin address, character by character. Once (s)he's sent the bitcoins, your web wallet will alert you that it's arrived and you're good to go. You must of course have an internet connection on your phone.

PS: if it's a large amount of money you're transferring, you should probably wait 10 mins or so to get at least 1 confirmation.


Is there a way to squeeze more hashing rate from a weak hardware?

12-14Mh/s is about right for the 5450. It's not that the card is weak, it's just that you're trying to make it do something it was never designed to do.


Invoking the listunspent command via json-rpc on a full node

The issue is that you are sending the 1000 parameter as a string, not as a number. The JSON type when the RPC server receives it will be a string, which is incorrect. It does not convert this to an integer implicitly so you need to explicitly set the type. So instead you should be doing:

JObject data = JObject.Parse(RequestServer("listunspent", new List<Integer>() { 1000 }));


What hash algorithm is used in Bitcoin Cash?

BCH and BSV both use SHA256 as their POW algorithm, as does Bitcoin (BTC).


What exactly is the input for the Hash pointer in block k+1?

(https://en.bitcoin.it/wiki/Protocol_documentation is a good resource for technical details about the protocol)

At the topmost level, blocks contain three things:

80 byte block header.
VarInt for the number of transactions in the block (N).
N concatenated transactions.

The block header contains:

4 byte version number
Prev block hash pointer.
Merkle hash/root of the N transactions in the block. (See What is the Merkle root?)
Block timestamp
Difficulty to solve the block encoded as an integer.
Nonce - an easy number to change to try different hash values.

I think you are asking: what is the 2nd block header parameter in block k+1?

Each hash pointer in a block to point to the previous block is SHA256(SHA256(80 byte header of block k)).

  Is the input for the hash pointer in block k+1 just the transactions in block k or is it the transactions in block k as well as the hash of block k-1?

It's just the hash of the header. The header contains a hash of the transactions, though, the merkle root.

  Does the hash pointer in block k+1 look like this : H(k) or this : H(k||H(k-1))?

Neither.

  In block k+1, there is a bunch of data as well as a hash pointer for the block k. But does block k+1 contain a hash of the entire block k (so, the data and H(k-1))? Because if block k+1 contained a hash of the entire block k then it should contain a hash of the hash already contained in block k right?

You do need the hash pointer in block k to be able to calculate the hash pointer in block k+1. Verifying the hash pointers and their difficulties is a small part of the work of miners.


How can one simulate and analyze attacks on the Bitcoin network?

The regtest operational mode of bitcoind is not as similar to testnet as you might think. The regtest mode offers you a totally local Bitcoin blockchain which is easily controlled by your local bitcoind with low difficulty. According to this post, it is furthermore possible to build a network out of multiple local bitcoind instances, such that you have a local Bitcoin network of your own.

You can control this network freely, but you can only simulate behavior that bitcoind allows you to assume. I am not aware of whether or not this is sufficient for your cases. If not, you could maybe try to fork bitcoind and somehow add the behavior you want to achieve...


Does a margin trade influence the order book?

It does influence the order book. Margin trading is a 2-step process :

you borrow currency A. This has no influence on the order book
You then sell currency A to buy currency B. This influences the order book.


what should I do when CDF is really high?

CDF is a measure of the pool's (bad) luck in the near past. By the nature of randomness (and how it applies to the process of mining), every pool will have times of good and bad luck, and nothing can be done to fix that.

If you are mining at a pool using a hopping-proof method such as PPLNS or DGM, you don't need to do anything when the CDF is high. The CDF represents the pool's luck in the past, but your reward for continued mining depends only on the pool's luck in the future, and thus the CDF has no effect.


What is the most effective way to buy bitcoin from swiss francs?

Switzerland takes part in the SEPA (Single Euro Payment Area); the Bitcoin exchanges that do SEPA transfers will probably be the ones with lowest costs for you.

I expect your bank will charge you for converting between CHF and EUR. If you want to convert often you may want to open a euro denominated account instead.


How is mining associated to blockchain transactions?

How users / nodes see it:

When transactions are made, they stay in nodes' memory pools ("mempool") until a block that contains them, becomes mined and relayed. When this happens, that transactions become a permanent member of the blockchain (unless that block is orphaned).

How miners see it:

Miners' major incentives are block rewards. However, to maximize their profit, they can also include transactions in their block (According to BlockChair, 124k of 510k blocks include no transaction.) If they include transactions in their block, they'll be able to collect their transaction fees. That's why most of the blocks include transactions (and the miners who don't include transactions are mostly illogical).

tl;dr When miners include your transactions, your transactions become a permanent element of the blockchain. They do this to collect your transactions' fees, to maximize their profit.


What precautions should be taken to protect a Ripple wallet?

You can keep your wallet offline most of the time. See this. You'll need to go online to check your balance or spend.

Beyond that, I'd also advise you to only use the client while online with that computer.

For Bitcoin, you can keep your wallet airgapped permanently with Armory, but I don't think there's an equivalent solution for Ripple.


Are there ready-to-use indexed bitcoind data files available somewhere?

If you're going to trust someone to give you a pre-indexed version of the blockchain, you are trusting them about the entire history of transactions. They can claim whatever they want (within certain bounds), and your client will accept it. If there is a mistake in the data (either deliberately or accidentally), it will result in the client rejecting the future valid chain at some point, potentially landing you in a side chain (which may be under control of the attacker). If many people would use the same source for their pre-indexed files, they would all end up on the same side chain, living in their own happy world. Both chains (the real one, and the side one) would allow every existing output to be spent once; if this happens on a large scale, it is a disaster for Bitcoin.

Of course, the long waiting times are a real problem (the upcoming 0.8 version should be significantly faster, though) but if you can't spend the resources and time to maintain a fully validating node (like the reference client implements), consider using a lightweight client like Multibit. It does not offer the same security, but it is better than trusting a centralized instance to tell you history.


Does there exist a SPV-client in another language than Java?

I'm writing a BitcoinJ port for .NET (C#, Visual Basic, etc), but since I'm doing it on my free time, it's nowhere near complete.

Other way to use BitcoinJ in .NET is through IKVM (which I didn't use due to some limitations).

I don't know about other languages, but I hope this is helpful.


How to open the port 8332 on EC2 instance?

In the Type dropdown menu, change HTTP to All TCP; enter 8332 as the port number; enter the IP of the computer that will be sending RPC requests under 'Source.'


What security threats does blockchain technology solve or present?

The problem Bitcoin solves

Bitcoin provides a method for tracking scarce digital assets. This was previously solved by central entities providing an authenticator role and exerting control. Bitcoin solves this problem by creating a truth source from network consensus. Besides for its payment application, this truth source can be employed in a number of different ways, such as proof of existence, identity management, and due to its limited supply perhaps as a digital gold.

By nature, decentral systems are inefficient: For a big entity, i.e. countries or companies, with reasonable grounds to trust their own central truth source, there are more efficient ways of accounting their monetary flows.

Blockchains in general are only as valuable as they are secure, so I think it will be unlikely that there will be numerous competing services based on different blockchains, rather I think that there will be few, and additional services built on top of them, in the fashion of Colored Coins or sidechains.

Blockchain Security Vulnerabilities

As moshaholo already said the only known fundamental vulnerabilities are double-spending and majority attacks. While these are currently reasonably unlikely in Bitcoin, other blockchain projects with less hashpower have turned to implement additional measures to protect their integrity:

Alternative Mining algorithm, e.g. Merged Mining, Scrypt, X11, X13, X15, NIST5, POS, SHA-3, multialgorithm mining
Alternative Difficulty adjustment algorithms, e.g. Kimoto Gravity Well
Extensive Checkpointing

There may be bugs in Bitcoin Core that haven't been discovered yet, however the implementation of alternative client software is helping to uncover unexpected behaviour as the network matures.

Lesser problems include that correct time cannot be enforced on the network, traceability of payments can lead to reduced fungibility and loss of privacy.

Are there entry and exit security concerns?

While interaction on the blockchain is secure and mostly trustless, there are challenges with

wallet security
exchanging currency for bitcoin: counter-party risk, fraud by charge-back, scams
verifying authenticity of business partner's information

Identity on the network

As every user can use as many addresses as they want, identity on the network can be fairly private or as public as one wants. Privacy takes some effort, as one can reveal common ownership of addresses e.g. by using them together as inputs for a transaction, or by creating obvious change outputs.


In the basic Wallet based in QT, How can i get by RPC the stored addresses and labels?

The closest I know of is

listreceivedbyaddress 0 true

https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list says:

  Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress. It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true.

Similar questions (different answers)

How to get all addresses - including the "change" addresses - from bitcoind?


Total amount of nodes and avarage active peer number

Does anyone know where to find a reliable source for finding out a total amount of active bitcoin nodes?

http://getaddr.bitnodes.io/ tracks listening peers on IPv4 and IPv6 only. The number is subject to gaming if people desire, there's no assurance that any of the nodes there are actually useful to connect to. At least some of the nodes listed will be duplicate due to them having both an IPv4 and IPv6 socket open at the same time and thus appearing as "two" nodes.

  How many peers does each active node have in average?

Bitcoin nodes will only attempt outgoing connections which are in ranges of IP addresses that are not close together, specifically for IPv4 it won't connect to any two nodes that are in the same /16 block. This means that any node running on a popular area such as a VPS host or EC2 node will likely see substantially less incoming activity than one running in a less densely populated area. This is an attempt to raise the cost of a large scale sybil attack against the network by increasing the diversity of IP addresses needed to gain an extremely large number of connections.

As a result you have to be very careful how you gain statistics about the number of incoming connections, because not all listening sockets are equal in the eyes of a client attempting to find peers. As far as I am aware nobody does this sort of data collection on a wide scale and publishes the results, but it is probably in the high tens of connections inbound on most nodes judging by my own experience.

  Is there a limit to how many peers one node can have?

The default is 125 maximum, 8 outgoing and 117 incoming.

Absent this the number is bounded by the constraints of the system it is running on.


What prevents rewriting the history of a chain with a different difficulty?

I think this would be considered a time warp attack.

What prevents this strategy from working is actually quite simple, as explained in https://bitcoin.stackexchange.com/a/37960/26673:

  Bitcoin nodes do not compare chains by their height. (Although they used to do this.) They calculate the total work in each chain (nChainWork), and compare by that. This is calculated by looking at the number of attempts it would take, on average, to find each block, and summing it.

My question assumed that blockchains were compared by height — but they are actually compared by the amount of work encapsulated. So a chain mined with competitive difficulty would clearly represent more work than a forged one "solo mined" with a much lower difficulty reached per block.


Is it true that a bitcoin transaction can go unverified and eventually get dropped by the system?

Transactions with low fees get low priority and may not EVER get verified (or mined) before being dropped from the system. Is this true?

Yes.  However they can be resent, potentially with a higher fee.

  That's a huge flaw in the system if it is.

Matter of opinion.

  How can any kind of commerce happen with this "feature"?

You have to think about things a little differently.  Sending the transaction isn't the end of the story; confirmation is.  The sender has to be responsible for monitoring the progress of the transaction until it is confirmed, and to be willing to either increase the fee or eventually give up on the transaction as no longer economical.  Likewise, the recipient needs to not assume that a transaction is final as soon as it's sent; instead, they have to wait until it is confirmed before shipping goods or services.  Escrow services can help with this, playing a role similar to that of a credit card company.

I think everyone wishes the situation were simpler and that we had a system where nobody had to wait to have their transactions confirmed.  But we don't yet have such a system, and there doesn't seem to be any obvious design that would solve this problem while remaining scalable, decentralized, and reasonably easy to transition.  In the meantime, however, despite your concerns, an awful lot of commerce can and does happen with Bitcoin as it is.  People consider the limitations and adapt accordingly.

  I am beholden to some god-like entities (miners) for my transaction to be verified, then how is this better than central banks?

Miners aren't centralized.  Anyone who buys appropriate hardware can be a miner.  So there are lots of miners competing to confirm your transaction, and you can expect that it will be confirmed just as long as you offer enough of a fee.  With a central bank or credit card company, they can block your transaction for non-economic reasons: you come from a country they don't like, your credit rating isn't good enough, etc, etc.  In that case you might not be able to make a transaction at all, or you might have to pay more than other people receiving similar service.

In other words, transaction confirmation isn't necessarily designed to be cheap or fast, but it is designed to be fair.


Average cost of mining per BTC over time

This is a chart of blockchain.info's estimated miner operating profit.
The chart makes a number of assumptions which are listed below.

Electricity consumption is estimated based on power consumption of 650 Watts per gigahash and electricity price of 15 cent per kilowatt
hour. In reality some miners will be more or less efficient.
For profit margin hardware costs are estimated to be $1000 per gigahash every
2 years, and bandwidth $1 per gigahash per year.

It is also entirely possible that miners will start only accepting transactions that pay fees, and possibly increase the amount of fees they take to increase the amount of BTC per block. But the amount of fresh bitcoins taken from mining will almost certainly affect the price.


What is the waste ratio of the overall network?

The waste ratio you are talking about is different from the one mentioned there.

What you are talking about is the difficulty: if the network's total hash rate is X hashes/second, then the difficulty is set such that it requires 600*X hashes to create a block on average. This does not mean that separate miners are wasting their work, because if the difficulty increases, so does how much every block is "worth" in terms of contribution to the network. They are all simultaneously looking for the next block, and all of them have at every point the same chance. Every attempt to find the new block is independent from all others, and independent from how much time they or others have already spent on it.

What that page is talking about is loss of security. When blocks do not propagate immediately to other peers across the network, miners are effectively competing with each other rather than building on top of each other's work during that time (they are always competing for income, but here I mean competing to build the next best chain itself). Their work is wasted because the hashrate an attacker has to compete with is lower than the sum of the hash rates of the honest contributors.


You're supposed to run a 2nd daemon and let that one connect to the first one


This certainly is possible---but unless you define the "several ways" to verify that A has the funds, the solution must exclude this key component. Here is one possible solution:

Special Multisignature Bitcoin-Address

Create a 3-of-5 multisignature Bitcoin address to which A transfers the Bitcoin in question. A owns 3 of the 5 participating addresses, whilst B and C contribute one each. Next A prepares a partially signed transaction that is signed with only one of his keys.

To eventually access the funds, B and C must both sign this transaction (or ask A for further signing). But it does not tie up the funds in that A can still access the Bitcoin using only his own keys.

Note that this only protects A from either B or C unilaterally taking possession of the bitcoins involved, but it does not offer any reassurance to B or C that the bitcoins will remain available to them in the future. That may create a particularly perverse incentive for intermediary B and recipient C to conspire into splitting the pot among them rather than adhering to whatever B's responsibilities in this matter were supposed to be.


How to check if my node is fully sync'ed

Calling getblockchaininfo is your best bet.  It includes a field called verificationprogress, which is an estimate of how much of the chain you have validated.

Alternatively, compare headers to blocks.  If headers is higher, it means that your node has validated the headers for blocks that it has yet to validate.  When these numbers match up, it either means you are up to date, or for some reason your node isn't receiving any more block headers.  Unfortunately, this doesn't tell you how much further you have to go, since headers may be well behind the rest of the network.  You can always compare these values to those provided by an online block explorer.  Still, when these numbers match (or are 1 apart), it generally means you are synced.

There are also some good suggestions on this question:  How to know if bitcoind synced?


How do I get my funds from bitstamp into my wallet?

Login to Bitstamp account >> Deposit >> Bitcoin >> here is your Bitstamp deposit address.

To transfer bitcoins to your Multibit wallet, again Login to Bitstamp account >> Withdrawal >> Bitcoin >>  here you can enter your Multibit wallet address and bitcoin amount.


I have sent a person some bitcoin. He never sent me the goods. How can I get my funds back?

Bitcoin transactions cannot be reversed unless some kind of escrow is implemented. Take this as a hard learned lesson. Sorry for your loss.


Why is mempool deleted when restart bitcoind and how to keep it?

So far, no released versions of Bitcoin Core exist that store the mempool on disk. That's why it's called the mempool; it's a pool of unconfirmed transactions kept in memory.

Version 0.14 is expected to introduce automatic dumping of the mempool to disk at shutdown.


Why does getdata have a field for the number of inventory entries?

The documentation you are linking too is wrong, the bitcoin developer reference indicates you can send multiple inventories inside of a GetData message.


Transfer incoming funds from Bitcoin Core to another wallet before blockchain sync is completed

After watching more than 100 videos, because I couldn't find a solution here, I was able to regain access to my BTC successfully from my old QT wallet without synchronizing the 310GB of blocks.  The solution is to import the private key of your old bitcoin-QT into a new Electrum wallet (this happens without fee):

Install from Electrum.org and create a new Electrum wallet  choosing the option "Import Bitcoin address or private keys"
Install from Bitcoin.org and create a new Bitcoin-Core wallet.
If Bitcoin Core is already open, stop the main sync in the lower right corner.
Turn off Bitcoin Core. Go to C:\User\yourname\AppData\Roaming\Bitcoin\wallets\your new wallet\wallet.dat
Obviously, this new Bitcoin Core wallet was never used, so delete the wallet.dat file
Paste your  old-wallet.dat file (the one you backed up years ago from your bitcoin QT), rename the pasted old-wallet.dat to wallet.dat
Open Bitcoin Core again --> hide --> stop synchronization (bottom right) --> Window --> Console --> Type below the command dumpprivkey and the old public address --> Enter.
When your private key appears, copy it. (In my case it didn't ask for my old passphrase.) Now go to your new Electrum wallet and paste the private key in the "Import Bitcoin address" box -> Next.
(do it in private and without cell phone cameras).
Now enter a new password twice and accept the wallet encryption.
Ready, now you have access to your BTC (with the same old public address) to spend or send them wherever you want,   but since your private key is exposed, I recommend you send them as soon as possible to a new destination that is safer (even if you have to pay a fee this time).


What prevents a majority attack from undoing transactions of others?

I believe what the wiki is implying, is that the other user's transactions won't be double spent.  Because the attacker does not have the other user's private keys, he can't spend his coins to a new transaction during the attack.  He could prevent those transactions from going into blocks, but still has no access to the coins.  That's what I think is meant by "without their cooperation".


Delegating the creation of a transaction

Yes this is possible, and there are a couple of clients that let you do this out of the box. Electrum is popular for this.

The purpose of the private key is that you are able to "sign" the transaction. Once the transaction has been created and signed actually anybody can broadcast it to the network.

I understand that it is even technically feasible not to use the bitcoin client but recreate a transaction, sign it and broadcast it as a string.

Edit to answer third point also in an edit from the OP: If you are suggesting that you can possibly drop off signed transactions everywhere using the same bitcoins to create a double-spend, you would also have to prevent any one of the recipients from broadcasting. As soon as the transaction is broadcast you can consider that those coins are spent, because a later transaction would be rejected. It is not therefore in the interest of the recipient to hold a transaction for you. The answer is in another function of the original code which allows escrow payments.

Localbitcoins.com operate an escrow process, I couldn't say for sure if they use the original functionality in the bitcoin code or have written it themselves, but essentially it is the same idea. Coins from your unspent balance are set aside and only released when certain conditions are met. This prevents the double-spend because once the coins are in the escrow they cannot be used in another transaction.

I think you ought to have a look at how transactions are actually constructed, as it is not as simple as saying that "I have a balance of n bitcoins and I spend x bitcoins". There is the notion inputs and outputs, spent coins and unspent coins.


Is it possible to identify a wallet from an address?

No, there is not.

Bitcoin is what is called "pseudonymous", meaning that a bitcoin address does not reveal information about the owner of that address.  Bitcoin addresses (like the one you posted) are derived by using two types of cryptographic operations, elliptic curves and hash functions...both of which only operate in one direction.  Even if you could reverse this process for a given address, all you have is a private key.  That private key does not contain any information about who generated the key, nor which other keys/addresses are associated with it.

There are blockchain analysis techniques that can be performed to attempt to associate a bitcoin address with other addresses (with a variable degree of certainty), but even that will not give you what you are looking for unless you can associate one of those addresses with someone's identity.  This would require your query to be supplemented with additional information not found on the Bitcoin blockchain.  If you do not possess that additional information, you cannot associate an address with an identity.


Can I long USD/BTC instead of shorting BTC/USD?

Long USD/BTC is the inverse of short USD/BTC, which is identical to short BTC/USD.


Blockchain and user rights to ask for personal data removal

In general, cryptocurrency is not an online service separate to the user, the user is a node and is a part of the service. Still, the definition of online service is not a good fit for the most part.

Speaking of Bitcoin, the only personal data is your private keys. Everything else is broadcast at some point, it is like beaming some of your public data into outer space via satellite, bouncing from star to star (node to node) and then saying that you want it taken down. Only your private keys are personal data and they are never broadcast (unless you make a bad mistake outside of Bitcoin!).

If it comes to law, the purpose for deriving your public keys and addresses is to send/receive Bitcoin which requires broadcasting. You can no sooner take it back than you could mistakenly post a valentine in a print newspaper then expect the newspaper to take back all copies and have your public data erased because you have changed your mind.


What are the regulated exchanges out there?

You are always taking a risk having your BTC on an exchange. By sending BTC to an exchange you pretty much trade your BTC for their tokens that you can later trade back to BTC, assuming they don't get hacked, seized by the FBI or just steal them.

If you are planning exchanging BTC to another currency i would recommend withdrawing the other currency asap from the exchange. The only reason for leaving your money on an exchange is to daytrade. Most people that daytrade will lose money doing it and not even realize it.
You might make a profit if you compare your initial fiat investment to your current fiat value. What you need to consider is if you made a profit compared to just holding BTC. You should also consider the risk of something happening to the exchange and the risk increased with time as long as you have your money on an exchange.


There was a great service back in the day called https://www.moneypacket.org/. You can send bitcoin with email. I think it still works so it seems like a great solution to your problem.


Blockchain removing invalid transactions

A transaction cannot be removed from a blockchain without recomputing the block that contains that transaction and all blocks that came after it. The best you could do is to have a transaction that nullifies the transaction that inserted the data.


Replacing ECDSA (SECP256k1) with Schnorr signatures

Schnorr will replace ECDSA, the signing algorithm, but both still use the same elliptic curve and thus the same public and private keys, etc.

Regardless, compatibility with ECDSA must be kept too even if Schnorr is used, because otherwise all old nodes would see the schnorr signatures as invalid signatures, and all old transactions would be seen as invalid by new nodes, creating a hard fork. It's likely that a new OP code would be introduced for schnorr signature checking, perhaps introduced in a new witness version, to keep it as a soft fork. If introduced, it will need a new type of address, to distinguish it from the addresses which should be checked using ECDSA. So both types of address would be compatible with all new nodes, in the same way that new bc1 native witness addresses are compatible with new nodes alongside P2SH and legacy addresses


How do you connect to the Bitcoin Client?

You need to run either Bitcoin-Qt or bitcoind on your system.  Create a bitcoin.conf file containing the following lines:

rpcuser=your-userid
rpcpassword=your-password
server=1

You can then connect to your bitcoin node by specifying address 127.0.0.1 and port 8332.  Use the userid and password you specified in the bitcoin.conf file.

While it is possible to open port 8332 to allow remote users to connect to the local node, this is not a good idea for security reasons because it allows access to your wallet.  Instead, your users would communicate with your application and your application would then make the necessary RPC calls to the local node.


What are the minimum fees for Ardor and Child Chain bundlers like Ignis and others?

The fee structure can be found on this fees chart for Ardor provided by Jelurida, the developers of Ardor.
There is no fee to mine, and no fee to bundle. But when you bundle, you are receiving child chain tokens, such as IGNIS, BITSWIFT, or AEUR, and then paying the forgers (miner-equivalent for Ardor) the respective fee in ARDR based on the chart that I linked. As a bundler, you get to set the rate that you would like, the maximum amount of fees you're willing to pay, and other settings.
Running a bundler is also a great way to convert ARDR into child chain coins because unlike using the Coin Exchange feature on Ardor where you can trade child chain coins and ARDR against each other, you won't be paying fees yourself for making the trade. It's not as fast though since it depends on the transaction volume on that respective child chain.

Transaction Type / Fee (ARDR) / Reasons

Default Ardor fee 1 permanent transaction
Default Child Chain fee 0.01 prunable transaction
New account fee 1 creates permanent global entity
Balance leasing 0.1 Ardor chain only, not frequently used
Ardor Coin Exchange 0.5 permanent transaction
Asset issuance 100 create permanent global entity, Ignis chain only, not frequently used, need to reduce scam assets
Singleton asset issuance 1 + 1 per 32b Ignis chain only, more frequently used, but still creates global permanent entity
Asset increase 10 Ignis chain only, rarely used
Dividend payment 0.1 needs processing, not frequently used
Set asset control 10 Ignis chain only, not frequently used, asset issuers only
Set account control 1 Ignis chain only, not frequently used
Cloud data upload 0.1 + 0.01 per 1kb prunable, but takes space
Poll creation 1 + 0.1 per option > 20 + 0.2 per 32b > 288b not frequently used, need to keep until poll is over, takes space
Phasing approval 0.01 per approved tx needs processing
Account info 1 + 1 per 32b permanent, Ignis only, rarely used
Set account property 0.1 + 0.1 per 32b permanent, Ignis only, not frequently used
Alias assignment 1 + 1 per 32b creates permanent unique entity, not frequently used
Shuffling (total) 0.12 takes space, but prunable, not frequently used
Shuffling penalty 10 IGNIS, 10 Bitswift must be affordable, but not negligible
Currency issuance 4 / 100 / 2500 creates permanent unique entity, not frequently used
Marketplace listing 0.2 + 0.2 per 32b takes space, need to keep until delisting, not frequently used
Marketplace delivery 0.1 + 0.2 per 32b takes space, need to keep Permanent message 0.1 + 0.1 per 32b permanent
Prunable message 0.01 per 1k prunable
Phasing appendix 0.01 balance independent, 0.2 balance dependent + 0.01 per 32b size depends on size and complexity, needs processing
Composite phasing appendix 0.02 + 0.02 per 32b + per poll fees determined by phasing complexity Referenced Tx deposit 10 refundable


Where can I find graphs the values of alternative crypto currencies?

at http://www.ltc-charts.com you can see long term charts for litecoin


Are Bitcoin signatures currency specific?

All coins use ECDSA to sign transactions in a similar manner, the main difference between most coins is what would constitute a valid signature, typically the first character(s) of a public address (e.g. bitcoin starts with 1 or 3 and litecoin starts with L). Therefore a certain public key could not be used directly to sign a transaction of another coin, with exception to coins such as devcoin, which uses the same address type.

You could write a program which starting from a certain private key, auto-increments until a valid address is found.


Why does decoded block data not match coinbase transaction input?

Segwit changed the transaction format. This new format is specified in BIP 144. This new format is actually a modification to the original transaction format. The changes are just additions to it.
Specifically, what you are missing is that the field immediately following the version number is a single 0 byte (referred to as the marker byte), instead of the input count. This was done specifically to make a transaction appear as if it has no inputs to a legacy transaction parser. Following this marker byte is a flag byte, which currently is a single 1 byte. Then you have the input count, inputs, output count, and outputs as was previously. The last change is that following the outputs, instead of the lock time, there are multiple arrays containing the witness data for inputs. Lastly the locktime ends the transaction as previously.


What dead simple algoritm can be used for generating checksums by pen and pencil?

When it comes to doing an easy calculation by hand, you are going to run into a problem.  An important part of a cryptographic hash function is unpredictability.  It is this unpredictability that allows us to use a cryptographic hash function as a proof of work.

For comparison, let's use a simple checksumming method on the alphabet.  Normally, a checksum is used to detect copy errors during a transmission or copy of data.  A simple method would be to count the number of vowels in the message, and append this number to end.  For example:

This message is checksummed

becomes

This message is checksummed|7

A simple checksum like this can be used to check if a vowel as accidentally turned into a consonant, or a consonant accidentally turned into a vowel (not very useful, I know).  If either of those two types of errors were to happen during transmission, the checksum wouldn't match on the receiving end, and we'd know there has been an error.

This mrssage is checksummed|7  <--- the checksum is wrong, so there's an error

This simple checksum is also a hash function, as it maps a larger block of data to a smaller chunk of data.  Obviously, this is a terrible hash function with an extremely high collision rate, but it's a simple enough example to calculate with pen and paper.

Now let's see what happens when we try to use this hash function as a proof of work.  We need to also add a nonce value that can be changed to modify the output of the hash function, without modifying the important part of the message.  I'll use the form message|nonce|hash.  Let's say that someone performing the proof-of-work needs to find a nonce such that the hash digest is greater than or equal to 10.  For example, the following would satisfy the proof-of-work:

This message is checksummed|aaa|10

When the message is hashed (checksummed) together with the nonce, we meet the proof-of-work.

The problem, however, is that our hash function is non-cryptographic, and therefore reversible.  Starting with our target value of 10, and our message of This message is checksummed, we can perform the checksum on the message and then do simple arithmetic to generate an acceptable nonce.  There is no unpredictability in the system.

If you use some sort of pen and paper hash function, you are almost certainly going to run into this problem.  Likely, those attending your class will see right through it, and not understand the purpose of the proof-of-work.  In the case of this example, it would be pointless.

If you choose to use a method like this, it is probably worth explaining to your class the significance of cryptographic hashing functions.  Otherwise the entire concept of proof-of-work doesn't make sense.


Bitcoind -walletnotify more than 6 confirmations?

The Bitcoin Core -walletnotify should only run at most twice for a typical transaction:

When the transaction enters the local node's mempool
When a block arrives containing that transaction.

I haven't tested this, but it looks like the code may also send a notify if the transaction is conflicted, if it is no longer confirmed after a reorg, or when it is confirmed by a different block after a reorg.

But that means you should only be notified until 1 confirmation, not 3 as you say in your question.

There is no setting that lets you choose when you get notified.  However, you can build this feature for yourself using a -blocknotify command that calls one of the RPCs, such as listtransactions.  Then you can check the confirmations field for each transaction and trigger an action if it's greater than or equal to 6.

You can alternatively use the listsinceblock RPC to list all transactions in the wallet that aren't part of the fifth most recently confirmed block or an earlier block.  (That is, transactions that don't yet have six confirmations.)


What is the purpose of the "Message" field when sending a Bitcoin Core transaction?

I think it is entirely up to you how to use these fields.
As you noted, the Label and Message are not part of the Bitcoin network protocol, not part of the Bitcoin transaction data or blockchain. But they can be communicated to the other party.
The label and the message are encoded into the QR code that you can generate. So the recipient of the money (sender of goods or services) will see the label and message if they scan a QR code.
The QR code contains text:
bitcoin:address?amount=1.234&label=labeltext&message=messagetext

So, for example, your label could be "order 12345" and the message could be "For delivery between 9 a.m. and 5 p.m."


You can use Elliptic Curve Diffie-Hellman, assuming you have the public keys, and not just addresses.  Bitcoin addresses are derived from public keys, not public keys themselves, so you'd be required to share the raw public keys.

Here's another resource, which links to a python example creating a shared symmetric key with the secp256k1 curve used by Bitcoin.


Why does the age of the coin in my wallet matter?

The Bitcoin.org client only cares about age when a coin is real recent (like in the last day).  Any coins older than about a day are all treated equally.

The reason recent coins matter is because the client wants to lessen the chance that legitimate spending would be considered as being spam or a denial of service attack.

If coins were recently received and then are being spent fairly quickly right after the network can't know if that is someone trying to grief the network or if that is a legitimate transaction.   But a transaction made with older coins is almost certainly not being used for the purpose of griefing the Bitcoin network.

So then by requiring fees for "spam-like" transactions, if an attacker is griefing the Bitcoin network it is going to have a cost.

That's the extent of it -- a way to make attacking bitcoin expensive while allowing normal, legitimate use to remain low cost or free.


Is there a site that tracks volume over time?

Try this site, data is shown graphically but can be downloaded in *.CSV or *.XLS file as well... http://data.bitcoinity.org/markets/volume/30d?c=e&t=b


A Wallet for many blockchains (not just the bitcoin blockchain)

The Exodus Project might be of interest: http://www.exodus.io
It's a multi-currency desktop wallet with shapeshift (altcoin exchange) already built-in. You can already download a beta version of it, official launch is going to be this summer according to the projects homepage.

I can't find an example better than https://www.omniwallet.org right now, but I think there have been other multi-currency online wallets around for a while. Exodus however is the first dektop multi-currency wallet I know of.


How will the 2mb hard fork be implemented?

August 1st has nothing to do with BIP 91, nor will segwit become active on August 1st due to either of BIP 148 or BIP 91. The current projected date for segwit to become active (assuming that BIP 91 is enforced) is August 24th.

The segwit2x hard fork to 8 MB block weight is currently implemented as occurring 12960 blocks following the activation of segwit. For this to happen successfully, all nodes and miners must upgrade to software that implements segwit2x. The activation will be by flag block; there is no miner signaling.


What does the sum column in Ripple.com order book mean?

The sum is the total value of all orders up to and including this one.


How do I resolve an accidental double spend?

A double spend is not possible. A double spend attempt, yes. You might try and (accidentally or intentionally) broadcast two different transactions that spend the same bitcoins. But only one will eventually get included in a block.

If you say one payment has 8 confirmations, then that's the one that became final ('set in stone') and the other will never happen.


How did anyone buy bitcoins before exchanges?

On messageboards like bitcointalk and chatrooms. People would use Paypal or other digital payment systems to send dollars. You could also trade in person through meetups and localbitcoins.com which still happens today.


Blockchain is some concept. There are different implementations of blockchain. Most of them open source. The most notable one is the cryptocurrency Bitcoin with their reference implementation -Bitcoin Core.

Blockchain.com is just the company with the website which provides some services related to the bitcoin cryptocurrency and owns very attractive web address.


How do you determine whether Bitcoin Core is synced fully or not from the RPC API?

Use getblockchaininfo and check the value of the initialblockdownload field. If it is true, BItcoin Core is still syncing. If it is false, it is done syncing (or very very close to done).


How is address recognized between wallets

Addresses are a standard encoding of data used by Bitcoin and other altcoins. When you enter an address into a wallet, it will decode it in the specific way that all wallets know to decode an address.

  How different is this process from PGP ?

PGP has nothing to do with Bitcoin (or cryptocurrencies) at all whatsoever.


Can a company handle 70% of all bitcoin trading?

@MaxSan is correct. Mt. Gox was only an exchange where people would buy and sell bitcoin. The 51% rule applies to a single entity (miner/pool) have 51% of the hashing power of the entire bitcoin mining network.


Mycelium: Restore backup from Android to iOS

After lots of suffering I managed to do it. Very unfortunately mycelium does not even support importing their old keys.

Fortunately they provide a backuputil which converts the private key in their format into WIF (Wallet Import Format): https://github.com/mycelium-com/wallet/tree/master/backuputil

I takes some effort to built this tool but afterwards you obtain the private key in WIF format. This in turn can be entered in the new Mycelium on iOS.

Again, very unfortunately, the key is NOT imported but rather the funds transfered to the Mycelium account. This results again in unnecessary transfer fees.


Are you running the miner as root? Do the devices show up when you run lsusb ?

In my experience, your user doesn't have access to the buses to talk to the devices, but putting sudo at the start (running as root) let me see and talk to my devices.

(I'm using cgminer compiled from source for LTC mining rather than BTC, but the principle should be the same.)


When does signaling for SegWit start exactly?

Signaling will commence with the first difficulty retarget after November 15th 12am UTC (i.e. midnight between 2016-11-14 and 2016-11-15).

See BIP0009 State Transitions:

  All blocks within a retarget period have the same state. This means that if floor(block1.height / 2016) = floor(block2.height / 2016), they are guaranteed to have the same state for every deployment.

Which means that blocks will only switch state when a new difficulty period begins after the starttime.

This means that signaling for SegWit will begin sometime on the 19th in the afternoon (UTC). The earliest that SegWit could activate therefore is the 17th of December (two difficulty periods later).


bitcoind API sendrawtransaction error 500

You cannot send one transaction twice. If you have already sent it from bitcoin commandline, then it will fail with -22(cli) or 500(http) error.

500 means incorrect data: insufficient funds, bad syntax, bad type, impossible command...

Try to cast to string: $bitcoin -> sendrawtransaction((string)$tx_data), and do var_dump($tx_data) to find the type.

If it doesn't help, send this POST request from cURL, as in tutorial: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Command_line_.28cURL.29


For Application Development is bitcoind RPC the Only Way?

You have many options but Bitcoind is a popular one due to its initial ease.

Use Bitcoind
Use an API such as Coinbase or Blockchain.info be careful as these can be slow and not as secure.
Use one of the many libraries made for various languages. Bitcoinj for Java, Libbitcoin for C++, Gocoin for Golang, and for other languages like Python and Javascript you can always find tools in a github search. This is the search for Python libraries in python.


To be blunt bought bitcoin in 2009 at 25 cents have not touched it

Spending Bitcoins requires the knowledge of the private key corresponding to the address holding the funds. These keys are managed by each user individually. Without the key, the coins are rendered unspendable.
Given the lack of details, I assume that you no longer hold a copy of the wallet that held the private keys. If that is the case, your funds are lost. If my understanding is incorrect, please edit your question to add more details.


scriptpubkey is the locking script, it contains the condition to spend this output, so XXX is the hash referent to the address that is receiving, that´s why is different.


What will happen when SHA 256 needs to be replaced?

I'm assuming you mean what will happen to Bitcoin if SHA256 is discovered to no longer be suitable for use as Bitcoin uses it. First, such a thing is likely to happen very gradually. We'll first see hints of weaknesses and attacks that currently take millions of years will shrink to thousands of years and then hundreds of years. So there will be plenty of time to arrange a change.

Note that Bitcoin addresses also use RIPEMD-160, which is likely weaker than SHA-256. However, the way they're used, weaknesses in RIPEMD-160 might not actually create problems for Bitcoin.

Basically, whatever changes needed to be made to the protocol would have to be worked out. Possibly any other changes deemed advantageous could be made at the same time, since protocol-breaking changes are rare. Some fields may need to be expanded.

A particular block would be picked, after which the new methods would start. Everyone would have to upgrade before then.

I think every effort would be made to keep the block header size the same so the mining algorithm didn't have to change. This may mean having to add an intermediate header. The intermediate header would contain the larger hashes of the previous block, transaction tree, and so on. The hash of the intermediate header would go in the block the miners try to mine, reducing its three hash fields to just one. (And allowing the nonce to be expanded to 64-bits! Yay!)

If addresses or transactions had to change, then after that chosen block, new-style transactions would be permitted. Coins not transferred to new-style accounts might become vulnerable to attack, in theory. Because Bitcoin transactions already have input and outputs that function in a logically independent way, there would be no problem with importing coins with an old-style address/signature and sending them to a new-style address.


Understanding Multi-threading (boost) in bitcoin initialization

The boost::thread_group class doesn't do very much. It's basically just a container of threads. It doesn't really have any scheduling or dispatch functions. That this thread is part of a thread group doesn't really matter.

The CScheduler code allows a thread to run a task at a particular time. It requires a thread to run the various tasks that it schedules. This code creates a thread to runs those tasks for this CScheduler and adds it to the thread group.


As of today Jan-2014. How much drive space does the following coins blockchain data take?

6 january 2014
Bitcoin blockchain: 14.9 GB (the size of the /data/blocks folder)


Private key generation bitaddress.org vs application wallet (armory / bitcoin-qt)

There are different issues with generating cryptographic keys in general (including private keys for bitcoin) on a downloaded client versus a client served online, as bitaddress.org does. However, I think you yourself should be the judge of what is "more trustable." Here are the issues:

Code integrity
The problem in both cases is if your client is trustworthy, or possibly compromised. There are many aspects to this question, including if you trust the original programmer to get everything right, and not actually put in some bitcoin-stealing spyware. Possibly more interesting is the question if you would detect it if somebody (maybe a cybercriminal?) were to alter the code before you execute it. For downloadable clients, the question is basically if you check its integrity by comparing its checksum with what is published by a reputable source. This gives some security if you do, and if you trust whatever source you may get the checksum from, but in the end, even if you do, it essentially boils down to, at best, trusting whatever entity compiled the client for you. For the web-served javascript program from bitaddress.org, you do not even get a chance to check it yourself---meaning you absolutely have to trust its operator (and possibly the NSA) to serve an uncompromised program.

Quality of random number generator
Any private key is generated from randomness. If too much of it were predictable, that would defeat its ability to remain a secret. And that's the weak spot, because many computers in actual use are not too good at generating random numbers, either because they do not have a dedicated source of randomness built-in, or because the software used does not have access to it. With a computer you use interactively, you should be mostly fine, because timing jitter in your key presses, mouse motion, etc., is typically used to harvest strongly random numbers. A well-written downloadable client should have access to such facilities via your operating system and, typically, the SSL libraries---and yet, in practice, a lot of weak implementations have been found, including in a mainstream Linux distribution years back and, recently, in the Android operating system, actually affecting Bitcoin key generation. See the Guardian's article about Google confirming the problem. Any javascript implementation, like bitaddress.org, may be both worse and better off by having less direct access to such random number facilities.

Execution environment
Could any malware you might unwittingly have on your computer interfere, either spying on your keys or by weakening the keys your generate? For the downloadable client, we are essentially talking about vulnerabilities of your OS (plus your usage of your computer). For the javascript-based bitaddress.org, some vulnerabilities of your web browser that "only" allow interfering with something inside the browser might pose additional risk.

Opportunity and effort vs. reward trade-off for an adversary
Sometimes it is more dangerous to go the same route as everybody else by presenting, collectively, a larger incentive to exploit this route. Sometimes it could be more dangerous to do the opposite and possibly ending up using a solution that has received less public scrutiny and might, without one's knowledge, contain critical vulnerabilities.


You should be able to add your current user to the plugdev group in Linux to be able to access the GPU as a standard user.  This can be accomplished by the following command:

  sudo usermod -G plugdev -a whoami

There may be some additional bits of information that are relevant in the README on the cgminer website.


No, addresses are randomly generated and carry no information about what wallet they are associated with.


The only thing you need to spend bitcoins is a Private Key, I recommend that you create a Private Key beeing offline, then import it to Bitcoin Core wallet or Electrum Bitcoin wallet (if you don't want to download the complete blockchain) these are the most secure protocols.

First you need to create a Private Key, it consist on a 32 byte array on HEX format(64 characters), you can use SHA256, for example: ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb

Its highly recommended that you make this process offline and the input of the SHA256 should be as random as you can.

Then convert it to Wallet Import Format (WIF) following this guide: https://allprivatekeys.com/what-is-wif.

Then import WIF to the wallet:

Bitcoin Core: https://en.bitcoin.it/wiki/Help:How_to_import_private_keys_in_Bitcoin_Core_0.7%2B

Electrum: https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/