Bitcoin-related bounties What is the most common way for one to announce new Bitcoin-related bounties in the community? Is there some website that mediates in the process, or is everything done through the Bitcoin forum?

I've seen some bounty sites pop up every now and then. Can't remember any of them. This fact alone suggests that you would not get anywhere the same kind as exposure as on the forum.


How to buy bitcoins with Dwolla now 6/14/13? Since Bitinstant has deactivated dwolla deposits and campbx has a 31 day wait, besides otc, is there any other exchange ??  Maybe a foreign exchange ?

thx

Try to buy at localbitcoins.com if you are comfortable dealing with strangers. May be use escrow.

https://localbitcoins.com/buy-bitcoins-online/usd/dwolla/


Mining Bitcoin Wallet's Private Keys Instead of Blocks Instead of mining Bitcoins directly, couldn't one of these huge processing farms dedicate their processing power to instead discovering the private keys of the largest wallets on the ledger?

I realize randomly guessing private keys is unlikely. However unlikely though, it would seem you'd increase your likelihood for each additional guess and a mining farm could do a lot of guessing with 24 hours a day 365 days a year. And, any particular guess could be the lucky one that cracks the wallet.

I'm asking this question not because I want to do this. I'm asking it because "if I can think of it" someone else is probably already trying it.

Each day, this farm could query the top 10 wallets in the ledger and just do random private key guesses all day long. If these big accounts switched wallets each day, it wouldn't matter, a farm would be guessing on those new wallets constantly (what ever is top 10, at any given time, could be constantly randomly guessed at).

What prevents this?

To mine a block it is "enough" to guess the nonce that results in a hash compatible with the current difficulty level.

To guess a private key to a specific wallet you need on average 2^255 tries. Even the simple act of counting (not checking if that number is a key to some btc, just counting) from 0 to 2^255 with an ideal binary counter requires more energy than that provided by converting the whole mass of the Sun into energy.
Not impossibile, "just" infeasible

Even if you are fine by guessing a private key to a random wallet out of a few million the amount of tries to do is not that much different in absolute terms and the reasoning still applies.

Google returns many funny trivia about how really immense is the keyspace, some with elaborate calculations too, such as that if we made a book with 255 keys per page containing all the possible keys that book would have 904625697166532776746648320380374280100293470930272690489102837043110636675 pages. (www.directory.io)

Anyway, there is a project named "large bitcoin collider" that tries to guess private keys, obviously with "not much" success... (https://lbc.cryptoguru.org/about)


JSON-RPC to detect double-spent TXs How can I be positive that one of the incoming payments to my bitcoin-core was double-spent after it was confirmed once by the network, through the JSON-RPC interface?

Related questions:

How do I detect a double-spend?
Accepting 0-confirmation transactions and detecting double-spends with open source solution
https://bitcointalk.org/index.php?topic=327767.0 (GHash.IO and double-spending against BetCoin Dice)

If your node received the original spend, the listunspent RPC will display the transaction with "-1" confirmations, as will any other RPCs that would normally list the transaction.  The source code calls this conflicted: "not in the mempool and not in the block chain."  This feature was first included in 0.9.0.

If your node never received the original spend (perhaps because it was offline at the time) or the now-stale block that contained it, it doesn't have any way to know about that original spend, so there's no information you can get from an RPC.


What would you do while a hard fork lasts? It is conceivable (though generally buried with cognitive dissonance, I imagine) that a hard fork might not get resolved.  This almost happened once before, and the miners picked the fork that solved the problem (a fork that would otherwise have lost, mind you).  This was human intervention at its finest.

But what if it wasn't fixed?  How long do you think it would take for bitcoin clients to appear that would ensure that your transaction is broadcast to both forks so that anyone seeing only one chain would see your transaction?  Who would run into a lot of trouble in this scenario?  I think people relying on transaction irreversibility might get antsy, and that bothers me a little, but only a little.  The worst people using bitcoin generally rely heavily on irreversibility, and the best people nearly always have some way to re-do any reversed transaction (rebroadcast is built into the standard client).

I don't want to encourage hard forks.  I just want to frustrate the people who secretly yearn for one in order to destroy cryptos.

I view a valid transaction as good, but susceptible to being hidden.  It is the blockchain that currently prevents it from being hidden, but that is not the only way to make sure everyone on the planet can know that the owner of a private key has reassigned the bitcoins it controls to a private key that I own.

A contentious hardfork (where some portion of the network doesn't agree to modify their consensus rules) is effectively a doomsday scenario, there's no making this safe or making tools which allow you to transact on two chains simultaneously with no ill effect.

  This almost happened once before, and the miners picked the fork that solved the problem (a fork that would otherwise have lost, mind you).

That does not reflect current understanding of how BIP50 operated.

The chain abandoned by human intervention was actually the correct one, the decision was made just because a majority of the networks nodes were using buggy software that would have had to have been updated very quickly. Nodes running 0.7 or earlier software could randomly fail out of consensus (with 0.8, or even just with other nodes running the same version) depending on their own environmental influences.

It's a little out to argument if fixing the implementation was a hard fork or not, but BIP50 is not an applicable example for gaining knowledge about how the network might operate under intentionally changed operating conditions.

  How long do you think it would take for bitcoin clients to appear that would ensure that your transaction is broadcast to both forks so that anyone seeing only one chain would see your transaction?

There is no scenario in which two networks can continue to happily operate in unison.

The two chains of differing consensus rules will fall out of synchronization. Inevitably due to a single transaction not confirming, being mutated between the chains changing the TXID, or someone spending a coinbase output, transactions on one side will become invalid where they would otherwise be valid on the other.

Rebroadcasting your transaction doesn't mean anything if it literally cant't exist in both chains, no wallet vendor will bother doing this for the extreme amount of development time required to make it work functionally, and the high amount of user confusion it would cause.
Clients on one side (or both) will ban their peers for not following consensus rules. This is part of a long list of denial of service attack prevention measures which include sending invalid blocks and wasting validation time on something that can never be accepted. Nodes that disable this rule may find that they reorganize onto different chains and flip flop between them
If two fictional companies Coinbarse and Bitflinux decide they will follow alternate chains, then there is an opportunity for every Bitcoin owner with an account on each to double their money. Simply sell your BTC twice for USD on each chain and you've got double the USD you would otherwise, the markets clearly couldn't survive this sort of behavior one way or the other.

  The worst people using bitcoin generally rely heavily on irreversibility, and the best people nearly always have some way to re-do any reversed transaction (rebroadcast is built into the standard client)

That does not accurately portray the behavior of the system, and I'm not sure how that couples with "worse" people. If somebody pays you with a mature coinbase output which is reorganized out of the chain, then you are stuck without your money no recourse.  If someone pays you and an alternate payment included in a different block, then you are stuck without your money no recourse. The vast majority of users do not use wallets which rebroadcast transactions, and in almost all scenarios where payments could be reversed there is a high probability that they could also become invalidated as well.

The simple answer is just that if you don't want dangerous and undefined things like this happening, don't go along with the belief that 75% of the mining hashrate is "consensus". Work towards solutions which don't actively destroy the ecosystem, and have complete agreement on their implementation and execution.


Ardor API: Not able to use POST requests with Axios due to CORS issues I am having issues with POST requests to the Ardor API. This code:

<!DOCTYPE html>

Preflight request to CORS enabled Ardor Node fails

The result should appear here

<button type="button" onclick="myFunction()">Try it</button>

fails during preflight. Chrome:

  Failed to load http://localhost:26876/nxt: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:3000' is therefore not allowed access. The response had HTTP status code 403.

What I understand is that it is not me who needs to send the 'Access-Control-Allow-Origin' header but the Ardor/NXT node.

Likely its just me not getting it. There are options around, you can change the content type, is that possible with NXT API? Is that something anybody had to do?

Its just failing for POST, GET works fine.

Thanks for any pointers in the right direction.

Ardor versions prior to 2.1.0e rejected the OPTIONS Http method. This method is now enabled so the problem should be fixed.

It appears that Axios uses an OPTIONS Http request to check if CORS is enabled and since it was forbidden the response was a 403 response.


What libraries should I use for E-Commerce We are developing some automated payment functions for Bitcoin. We want to automate transactions via a backend server setup; what libraries would be best suited?

I've found two libraries so far:

Java has BitcoinJ
C++ has bitcoin-qt

Would a thin or selfish client suffice ?

Do they support QR codes ?

P.S. I would prefer a Java over C++ coming from a C# background.

I developed a solution using bitcoind (bitcoin-qt).

It was very easy with PHP + RPC Class, but bitcoind has some limitations which make it not very suited as a backend/library.


Multisig vs Multi input transaction signing Let's say we have a 2 of 2 multisig address that we want to spend from, so the transaction should be signed by both of the private keys.

Now let's say we have a transaction with two inputs, so once again the transaction should be signed by both of the private keys of the inputs.

So how does these two differ in implementation? Even on conceptual level? Are these procedures the same?

They are fairly different things and represent very different use cases.

Imagine you are the head of the party planning committee and you have two workers (A and B) to help you buy items for the party. You are given 1 bitcoin to fund the party.

You have two options.

You can split the funds up between A and B. For example, you could give A and B each 0.5 bitcoins in two separate outputs. If they need to buy something worth more than 0.5 bitcoins, they will need to combine their outputs as inputs to the same transaction. However, for items less than 0.5 bitcoins, A and B will be able to act independently to purchase items (or steal the funds!).
You can jointly give A and B the 1 bitcoin in a 2 of 2 multisig address. Now for any purchase they will need to agree in order to spend from the party committee's funds.

To summarize:

Spending a 2/2 multisig output:

Spends a single previously UTXO and requiring two keys to sign.

Spending multiple inputs:

Spends multiple previously UTXOs and requires each input to be signed separately.

With regards to signing these types of transactions, they have to be done slightly differently.

When signing an input that spends a 2/2 multisig output, the transaction is signed by the two keys and they are encoded into the same scriptSig of the one input. The transaction only becomes valid when both keys have signed with valid signatures.

For example, suppose the scriptPubKey of the previous 2/2 multisig output is:

OP_2 {pubkey1} {pubkey2} OP_2 OP_CHECKMULTISIG

The the scriptSig to spend that output would be:

{pubkey1's signature} {pubkey2's signature}

Notice how they are in the same input's scriptSig.

When signing two different inputs, assuming their previous scriptPubKeys look something like this:

{pubkey1} OP_CHECKSIG

and

{pubkey2} OP_CHECKSIG

Then the two inputs would have scripSigs in this format (respectively):

{pubkey1 signature}

and

{pubkey2 signature}

NOTE: I've used simple scriptPubKey's to be try to be clear about how it generally works, but you should probably use Pay-to-script-hash multisig address and pay-to-pubkey-hash addresses instead of the raw multisig and pay-to-pubkey scriptPubKeys that I used in this example.


Profit by programming a Bitcoin service (wallet) in an "only-now" bc adopting country? A country where I am from appears to take Bitcoin into an interest right now.

I am a senior programmer at one company and have done several projects, but right now I am mostly interested in the opportunities that might appear from Bitcoin to a programmer at my small european country.

I appear to have a domain bitcoin.abc and bitcoins.abc, where abc stands for my country tld name.

I went to freenode chat #bitcoin, #startups, asked out several people, but could not find any helpful information about an opportunities that one might get in my case.

I wonder if there is anything I can use such domain names and a programming knowledge, with interest in such a decentralized system and get on a way to profit.

I don't really know, but, perhaps building a new wallet, or such? I would really appreciate any ideas, thoughts or resources to read for me on my case. Thanks.

Use your domain to sell bitcoins for fiat in your country. That's the most profitable thing you can do.


Can't generate same addresses as bitcoincore using xprv from bitcoin-core First of all all addresses below are for testing purposes so I don't care about private keys.

So dumped wallet created by Bitcoin-qt v0.16.2:

extended private masterkey: xprv9s21ZrQH143K3mYiBBH7MwWV9VTkeB5q5sxEFGgvLbLqRZ3xPVAKvwyxSLVtTcL2tz665vdZnHLrMQPr6MWGKdDHYoncZmUNiUgtShGCmZE

From what I can understand from the rest of the dump the first receive address is:
addr=3DhmoRSx2bjxyJm7A1Crs3bCPnVcEx51fE hdkeypath=m/0'/0'/0'

Now I am trying to generate same addess using bitcoinjs-lib but haven't had any success so far with it.

import { HDNode } from "bitcoinjs-lib";
const key = HDNode.fromBase58(
 "xprv9s21ZrQH143K3mYiBBH7MwWV9VTkeB5q5sxEFGgvLbLqRZ3xPVAKvwyxSLVtTcL2tz665vdZnHLrMQPr6MWGKdDHYoncZmUNiUgtShGCmZE"
);
console.log(key.derivePath("m/0'/0'/0'").getAddress()); // prints 1NoQERVA18v5WcFUbgvz22tDGigmAkqy4U

Now I get confused becuase I use same derive path but I get 2 different addresses and on top of that looks like address from dump is multisig? Is it becuase of multisig?

If so how should I generate wallet.dat that is not multisig and is HD.

looks like address from dump is multisig?

It is not multisig. Bitcoin Core does not generate multisig addresses.

That address is a P2SH wrapped Segwit address. The same private key can be associated with multiple addresses since there are different types of addresses. The type of address you that you are generating with bitcoinjs-lib are P2PKH addresses. However Bitcoin Core is making P2SH-P2WPKH addresses.

You should be able to get the same address if you do something like

bitcoin.payments.p2sh({
      redeem: bitcoin.payments.p2wpkh({ pubkey: key.derivePath("m/0'/0'/0'").publicKey })
})


How could a time warp attack be prevented? jarpian explains what a time warp attack (AKA zeitgeist attack) is:

  This is a 51% attack where the attacker sets the block timestamps artificially to lower the difficulty, allowing him to profit more coins than his hash rate would warrant. It works because the difficulty adjustment formula is based purely on timestamps that can be chosen quite freely by the attacker. In particular, the timestamps are not required to be in increasing order. ArtForz explains the attack in detail here.

  This attack was used against the new Geist Geld block chain. Geist Geld difficulty adjusts every 16 blocks making the chain particularly vulnerable against this attack. An attacker targeting Bitcoin would have to mine a full set of 2016 blocks at the current difficulty before starting to get any benefit compared to a "normal" 51% attack.

Obviously, performing this attack would be horrendously expensive. (Coinometrics places the cost at about $463 million at time of writing.)

However, if you were successful, you could lower the difficulty and increase the block rate by a factor of 4 every 2 weeks, letting you mint coins more than every 10 minutes.

The obvious way of fixing this - changing the block retarget period from (2016*n, 2016*n + 2015) to (2016*n, 2016*n + 2016) is problematic. Blocks produced by the new implementation would be invalid in the old implementation, and vice-versa. (Source)

So, how could a time warp attack be prevented in a non-disruptive way?

The simple solution is a soft fork that requires each block's time be equal to or greater than the time of the previous block on the block chain.  That is, time on the block chain can't go backwards.

If time can't go backwards, then the attacker can't artificially lower difficulty except by mining blocks with times in the future, and the network already rejects blocks more than 120 minutes into the future.

This proposal is a soft fork because non-upgraded miners will accept a more difficult chain whose times only increase or stay the same.  If implemented the same way as BIP34, the supermajority of hash rate would be upgraded before the new rule was applied, minimizing disruption.


Is there a listing of strange or unusual scripts found in transactions? I'm studying scripts and am looking for strange or unusual scripts that have appeared in any of the *coin networks..(outside the standard ones listed on this page)

Is any one person, or website listing non-standard transactions that are not generated by the default client?

Ideally there would be an analysis of the script and what's going on, but I'm not picky.  I'd even settle for a command line method to extract this data and discover it myself.

My goal is to learn what contracts are occurring in each network and determine the frequency of each. (How popular is multi-sig tx over time)

Alternatively, I can use this as a tool to learn how people are using the scripting language.

Blockchain Info has a list of strange transactions that its nodes received but were unable to verify.


Public Key + Private Key enough to backup? I invested in bitcoins and unfortunately I have problems to understand the system. Perhaps you can answer me the following questions?

1.a) I know my public and my private key. Do I still have to backup my wallet.dat?

1b) If I need the wallet.dat: There is no point in saving my public and private key, if I need the wallet.dat anyways, right?

If I secure my wallet.dat with a strong password, can I put the wallet.dat just on dropbox and send it to a few friends or do I have to keep the file more private?
Is the decripting function of Bitcoin-QT enough?
Am I okay with these actionsteps:
Encrypting my wallet with Bitcoin-QT and writing my password on paper
Writing my public key and private key on paper
Sending the bitcoins from mtgox to my public address
Using the backup option of Bitcoin-QT and send the backup to dropbox + a friend I trust

Please let me know if I need more steps or I can take a step out.

Thanks!

Knowing your private and public keys is enough to be a backup of that address. If you only have one address all you would have to do is create a new wallet and import that private key.

Why backup the entire wallet.dat then?

Because restoring the wallet.dat saves you the step of importing the keys from the command line. Most people find it easier to backup a file than understand the details of keys and addresses.
Because many users have a lot of addresses. If you have a hundred addresses, restoring one wallet file is quicker than restoring each private key.
Because of change addresses. The default client ends up creating a lot of change addresses automatically. You may think you know your private/public key pair, but if you've conducted some transactions in the standard client it is likely that you also have a bunch of change addresses that you aren't directly aware of and aren't displayed in the GUI.
Because of the address buffer. The standard client keeps a buffer of 100 addresses that it intends to use. This means that even restoring a wallet.dat can sometimes save you even if you don't have an up-to-date backup of your wallet. (Because the transactions/addresses that aren't in your wallet are probably in that buffer of addresses.)

In short, yes, the private/public keypairs are the important thing and if you know them (say by keeping them in a paper wallet or encrypted somewhere) you can recreate your wallet. But there are lots of mistakes you can make (such as forgetting change addresses) if you are manually tracking keys. If you aren't certain what you are doing, you may find backing up the wallet.dat as the easiest approach.


What is the difference between inbound and outbound connections? I have port 8333 open with 8 outbound and 2 inbound connections.

Is my node transmitting and receiving transactions and blocks from both types of connections? Or does the "inbound" flag mean I am just downloading from that peer, and not sending any information back?

If, for the sake of saving RAM, I set maxconnections to 8, will they all be outbound? Even if port 8333 is open? In this configuration, is my node still "helping" the network?

If your node initiated the connection, it's outbound, otherwise it's inbound. Nodes will send and receive data from both types of connections exactly the same way.

maxconnections sets a limit on the total number of connections, so if you set it to eight, your node will probably initiate connections to other eight nodes before any node can initiate a connection to it.

Keep in mind that according to this forum post, each open connection will take only a few kilobytes of RAM, so reducing the number of connections might not save all that much of memory.

EDIT: By running a full node that has no slots for incoming connections, you act as a leecher, and you do more bad than good for the Bitcoin network, as Gavin Andresen said on Reddit. You would help the network if you allowed a few inbound connections. As discussed earlier, that's unlikely to take up any significant amount of RAM.


Has PoS really been proven secure under comparable assumptions as Bitcoin? I am just reading this paper which claims to be a formal proof that Cardano's latest Ouroboros PoS protocol ("Genesis") gives similar security guarantees than Bitcoin's PoW protocol. Unfortunately, it is 64 pages long and presupposes a lot of earlier work that I need to get comfortable with, as well, so even though I am relatively confident in my understanding of these things, a thorough evaluation will take me quite some time.

So I was wondering if anybody (say Andrew Poelstra, Pieter Wuille?) had already checked this out and could give their opinion. Because on one hand this is a very bold claim that would invalidate the folklore view on this topic (PoS has fundamental security issues that can't be overcome), and on the other hand the authors seem quite legit and serious in their approach.

I do realize that even if it were true, this doesn't mean that PoS is useful for bootstrapping a system like Cardano. But couldn't it be an alternative for Bitcoin, say, after another one or two halvings?

The Ouroboros line of work proves security comparable to Bitcoin's security. The proofs of security in Ouroboros are similar in style to the Backbone proofs of security, which show that Bitcoin is secure. To my knowledge, there are no alternative proofs of security for Bitcoin which are formal - these are the best results we know of that illustrate that Bitcoin is secure, beyond informal hand-wavy non-mathematical arguments (such as "but you can't find a security bug, so it must be secure").

In both of these settings, there are certain assumptions made, which are as follows:

For proof-of-work, in the first version of Backbone from 2014, Bitcoin was shown secure in a synchronous model. This model splits time into discrete portions ("rounds" in Backbone, "slots" in Ouroboros) during which the players are allowed to mine and then broadcast any blocks found throughout a round. Messages sent during a round are anonymous (i.e., unauthenticated) and can be reordered by the adversary (hence the need for a consensus protocol). The adversary is also "rushing" in that it can use its own mining power after it has observed what the honest parties have done during that same round and prior to allowing messages to travel on the network. The assumption is that no messages are lost. This is a necessary assumption to prove Bitcoin secure - if the network is split, then you can't hope for your 50/50 honest majority to continue creating the longest chain.

The synchronicity requirements were relaxed in the current version of backbone revised in 2017 in which the model is semi-synchronous. The first version of Backbone also showed that Bitcoin is secure if the difficulty is kept constant. A follow-up work on Backbone from 2016 showed that it remains secure in a variable difficulty setting. These proofs hinge on an honest majority assumption which is made precise in the papers. More precisely, it is required that the adversary has mining power which is lower than the honest mining power by a fixed constant which makes up for non-uniquely successful rounds (i.e., rounds during which multiple honest parties find a block and hence will cause a short accidental fork on the blockchain).

The assumptions in the proof-of-stake setting of Ouroboros are similar network-wise to Backbone. The model is mostly borrowed from Canetti's Universal Composability framework, in the sense that there exists an environment which can influence the execution. Proofs in the "environment-including" model are powerful in that they can speak of any execution in which the adversary is able to tell people exactly what to do beyond the requirement that the honest parties run the honest protocol. For example, the adversary can corrupt players of their choice.

In Ouroboros, the assumption which is dual to Backbone's "honest mining majority" is "honest stake majority", i.e., that at any moment in time, the majority of stake belongs to the honest parties. This is a strong assumption which may or may not hold true, so it depends on what you're willing to accept. Another assumption made in Ouroboros is that stake shifting is bounded. This seems like a reasonable assumption: It means that all money cannot change hands instantaneously. However, the construction hinges on this bound to specify the security parameters such as epoch length. In the practical system, these parameters take concrete values which allow for specific bounds to be attained.

Ouroboros Praos achieves better security guarantees than Ouroboros: It allows the adversary to corrupt any honest party instantaneously, whenever she feels she needs to. This is a strong adversary (hence the system is more secure), and is also a similar assumption to Backbone. For proof-of-stake, it's an important achievement, as the adversary could retroactively corrupt parties who were successful in staking a block so that she can create multiple competing blocks. To my knowledge, practically deployed proof-of-stake chains such as Blackcoin do not enjoy such guarantees (and really cannot make any claims, since they do not have security proofs).

Ouroboros Genesis makes the above results stronger in that the parties are dynamic (and can, e.g., go offline) and the security is proven in a stronger model.

All of these works (the proofs for both Bitcoin and Ouroboros) also use the Random Oracle assumption, which some cryptographers dislike.

All of these approaches are comparable to other lines of work such as Snow white and ALGORAND. In my opinion, Ouroboros achieves better guarantees, has good design decisions, has formal security proofs, and functions in a model that is quite similar to proof-of-work-based systems (especially Praos). It would take an extensive analysis to compare them all side-by-side.

In the end, whether you are happy with the security assumptions and threat model in these works is up to your requirements. Overall, these works achieve some good guarantees, but some results are left to be desired. For example, honest majority may hold most of the time, not all of the time, but there has been no exploration of whether security is guaranteed in these settings (neither in Bitcoin nor in Ouroboros). I do suspect that Bitcoin is more resilient to extreme conditions, but no such guarantees have been proven.

Generally, one thing to note is that these limitations/assumptions also hold for Bitcoin: The best formal proofs we have for Bitcoin work in a limited model which is close, but not exactly the same, as the real construction. To conclude, Backbone is the best analysis we have for Bitcoin, and it makes an analysis which is comparable to Ouroboros. Hence, its security guarantees do match the security guarantees we have for Bitcoin, if you equate staking honest majority with mining honest majority, at least as long as provability is required.

If you'd like to understand these papers yourself, and judge for yourself whether they achieve your desired outcomes, I recommend that you read the GKL Backbone paper first. You can read the first portion where it talks about Common Prefix, Chain Quality and Chain Growth, as well as Liveness and Persistence. Then I recommend that you read Ouroboros, maybe followed up by Ouroboros Praos. These should give you a good idea of what this line of work is about. You're right that understanding Ouroboros Genesis has a lot of prerequisites. You can get a good understanding of the results regarding the security of proof-of-stake without reading that particular paper though.

Disclaimer: I am Aggelos' PhD student (Aggelos wrote Backbone, Variable Backbone, Ouroboros, Ouroboros Praos, Ouroboros Genesis - I did not contribute to these papers); my current scientific work is used in Cardano, which is an implementation of Ouroboros. My view may be biased.


blockchain.info says password is incorrect, and wont allow me to access my BTC I had a wallet ID through blockchain.info. I signed in, received my BTC from where I bought it, all was good.

I wrote down my 12 words for recovery and have them.

I changed my password to something that I know and logged off.

When I came back, it says the password was wrong and wouldnt let me log in (YES, I'm 1000% sure my password is correct).

I used the recovery tool and the 12 phrases and got emailed a new wallet ID...my BTC are not there.

My new password does not work for my original wallet ID.

This seems to be a common problem and I would really appreciate some help.

BTC REWARD IF YOU CAN HELP ME!

What do you mean the btc are not there, does a transaction show up when you used the phrase to recover? if so then it was probably stolen, if not, then you used the wrong phrase.


Who can see my IP address while using Electrum Who exactly is my IP exposed to when sending transactions in Electrum.  I'm assuming the server operators can see it every time I connect (to query the servers about my balances).

When I make a transaction, is my IP recorded and logged into blockchain.info (or is it the IP of the server who relays the transaction).

If so, does this make Electrum unsafe to use with larger balances? i.e tying large amounts to a single IP?

Your IP is exposed to the Electrum server(s) you communicate with. Since anyone can run an Electrum server, you should consider this to be public exposure. These servers could record your IP if they wish to, and use it for any purpose. This is more exposed than running an ordinary full client: in that case, your IP is exposed to your peers, but even your immediate peers don't know it was you who created a given transaction. In either case, someone could record the IP they first saw the transaction from, which would often be geographically near you (maybe even your IP).

This does not make it unsafe in the "people can digitally steal my coins" sense, but it does reduce anonymity. This might make it unsafe in the senses of: "people can more easily find me and beat me until I tell them my password so they can steal my coins" or "people can arrest me for my actions" (if you're doing something illegal).

If you're concerned about that, you could run through Tor to hide your IP.


How does exchanges like bitrex exchange coins so fast ? For example i transfer my bitcoin to bitrex. It will take mining fee and a huge time ( few hours ) to actually appear in bitrex wallet.

Now from bitrex i can transfer between Bitcoin -> Neo -> Bitcoin -> Eth -> Neo instantly without any mining fee.

How it actually does that ?

Here what i think:

After i transfer them my bitcoin to my online bitrex wallet, they transfer it to their own secret GLOBAL wallet of that coin.

Then we just do exchange on their database not in real.

Then when withdrawal they transfer it from their GLOBAL Neo wallet  -> my online neo wallet -> my offline neo wallet.

Thats just my thought i know its wrong but i need someone to explain me that.

Exchanges work with promises. If you deposit 100 USD, they promise to let you withdraw 100 USD later. If you trade for e.g. BTC, they only change this promise to letting you withdraw BTC. Exchanges accomplish this by swapping promises between users.

There are no actual transactions on the blockchain (except you deposit or withdraw to or from the exchange). That is why you e.g. can buy 0.5 NEO, where NEO on the blockchain is not divisible.

This is also why technically you do not own the BTC as long as they are on the exchange.


Freelancer.com-like website but based only on BC payments using some sort of escrow-like system to make sure that employer has enough money? Can a project similar to Freelancer.com or elance.com but based only on BC payments be created or the implementation of BC transfer between the employer and the freelancer would be too complicated?

I mean, i.e. freelancer.com is using escrow for transactions etc.

Is something silimar possible to develop but only for BC? If yes, is there some company that can do it like e.g. https://www.escrow.com/index.asp but with bitcoins?

Such projects are possible with Bitcoins. Generally, what you can do with money, you can do with Bitcoins.

Escrow services in Bitcoin were popping up every now and then in the earlier days of Bitcoin, but I don't recall any of them becoming too popular. However, setting up an escrow-like service should be fairly simple. If you need some help, you can drop me a line ;).


Get Bitcoin Wallet balance with Python On a tutorial in Youtube
it uses pybitcointools. Upon searching it's github repository, I have found that it was not maintained anymore. Are there any alternative to this library which can get wallet balance?

Thank you.

Assuming you have a Bitcoin node to execute RPC calls against (i.e. you're running bitcoind with the RPC turned on), you can do this rather simply with pyjsonrpc:

#!/usr/bin/env python
from pyjsonrpc import ServiceProxy

bitcoin = ServiceProxy("http://127.0.0.1:8332")  # this is your bitcoind node and RPC port
bitcoin.username = 'testuser'  # rpcuser
bitcoin.password = 'testpass'  # rpcpassword
print(bitcoin.getbalance())


How to measure profit and losses in bitcoin investment? If I buy BTC at $1,200 and then sell it at $1,500 it is clear that I have made a profit of $300 minus the exchange fee. If I keep buying BTC at the same price over and over, and the price keeps increasing, I can measure all my gains in a similar way: just subtracting the current rate minus the price I have bought the BTC at. However, how can I measure profit or losses when buying BTC at different prices?

For example, say I bought 1 BTC at $1,200 and then 1 BTC at $1,500. If I sell 1 of these 2 BTC at $2,000, what buying price should I measure this sell against, $1,200 or $1,500, to calculate my profit. Maybe an average or weighted average of the prices? Am I missing something basic?

I am no expert in finances, but I look at profit calculation of investment in fungible goods in the way shown below:

Total Profit(between time t1 and time t2) = Total assets at t2 - Total assets at t1

Your total assets at time t would be your fiat in USD at time t + value in USD of your BTC at time t.

Total assets at t1 = $1200 + $1500 = $2700 (When you bought 2 btc)

Total assets at t2 = *$0 + $2000*2 = $4000* (Just before selling 1 btc at $2000)

Total assets at t3 = *$2000 + $2000*1 = $4000* (After selling 1 btc at $2000)

Total Profit = ($2000 + 1btc) - ($1200 + $1500) = (1btc - $700) which depends on bitcoin price.

Instead of talking of profit per transaction, it is better to talk in terms of timestamps. Profit earned between t1 and t2 is $1300 and between t2 and t3 is $0.

If it were 2 distinct houses, which you bought at $1200 and $1500, then it made sense to calculate profit on the house which you sold, but because of fungible(almost) nature of bitcoin it makes sense to look at it as mentioned above.


Will general non-standard transactions ever be allowed? To the best of my knowledge, currently "Satoshi" client relays and most pools accept only standard (transfer or generation) transactions. Besides, community is working on M-of-N transaction type. Adding non-standard transaction to the blockchain is nowadays pretty problematic.

While currently enabling arbitrary scripts in transactions could be disastrous due to possible bugs in code (or in the script system itself), I wonder if it is planned to allow arbitrary transactions somewhere in the future, or will most of the network always be restricted to some set of "good" transaction templates?

The current development direction (January 2013) is to tighten up the IsStandard() checks even more. For example, we would like all signatures to conform to a very strict, canonical encoding to make life more difficult for potential attackers.

Allowing more opcodes or opcode patterns (or all opcodes/patterns) to be considered IsStandard() is certainly possible; before doing that I'd like to see a thorough analysis of the possibility for mischief using the current set of opcodes  and a lot of prototyping on the test network (where the IsStandard() check already allows all enabled opcodes).


What are the steps in building bitcoind on Mac OS X 10.6? Following the instructions in build-osx.txt (which seem sadly out of date) leaves me without a file named libboost_system.a.

Here is how I built boost:

% cd boost_1_42_0
% ./bootstrap.sh
% ./bjam architecture=combined address-model=32_64 macosx-version=10.6 \
    macosx-version-min=10.6 link=static runtime-link=static -a \
    --toolset=darwin --prefix=/Users/`whoami`/bitcoin/deps install

I had to edit the makefile.osx to add some include paths, but I could not find libboost_system.a. What am I missing?

Also, I needed to compile OpenSSL because OS X only comes with dynamically linked libraries.

If you just want to build Bitcoind once then Gavin's method seems like the most straight forward. If you want to develop for Bitcoin it's worth setting up an Xcode project.

Create a blank Xcode project in your bitcoin root directory.
Create a new target called bitcoind
Drag all the files from the src folder into Xcode, make sure you have bitcoin selected in add to targets.
Remove the README, Makefiles and any other none .h .cpp

Add "./deps/include" to "Header search paths"
Add "./deps/lib" to "Library Search Paths"

Add libssl and libcrypto to your linker flags (The system ones should work fine)

In Build phases add the required libraries. Should look something like this (excluding the mysql libs)

Depending on what version of Xcode your using You might need to change the Default compile to gcc as clang seems to have problems with cryptopp, or you can just move cryptopp to deps and import the .a.

Apologies I cannot be more precise, I did write down instructions at the time but i seem to have lost them. You can build for 10.6 & 10.7 with no changes required other than setting the SDK in Xcode.


Found my wallet on my external HDD but it has changed the adress and it was empty after synchronising. I can see in blockchain.info that its not empty Can anyone help me,i found my wallet from 2013 on my HDD. I noticed that it has changed its adress and there were no BTC on it after synchronising on my laptop. I can see in blockchain.info.com that its not empty.

Bitcoin Core does not have "the address". There is no "the address" in a wallet. Wallets have more than one address, and every time you want to receive Bitcoin, it will give you a new address. This does not mean that old addresses are forgotten or deleted. They are still there and the wallet still knows about them.

You will not be able to see your balance without syncing the entire blockchain. If the version of Bitcoin Core you have is old, I highly suggest that you install the latest version of Bitcoin Core and let it sync from scratch. To do this, download and install Bitcoin Core 0.15.1 and then delete everything in the data directory except for the wallet.dat file. Then start Bitcoin Core and let it fully sync.


Is there a way for merchants to insist on a tx fee to increase likelihood of the tx (eventually) being accepted into the blockchain? I understand that some transactions may never get into a block, esp those with zero fee or with a fee below the current suggested minimum (which makes me wonder about tx fee inflation, but that's another Q).

Can a merchant accepting BTC for small purchases say, in effect, "I'll accept your $3 BTC payment for a coffee with zero block confirmations but I do want to see that you sent it with at least x Satoshis of fee?" Or perhaps this is already the case?

If this does, or were to happen, what mechanism(s) would the merchant use in order to get this small assurance?

In short, no.  You can tell the customer whatever you want on your webpage, at your point of sale, or in the memo field of a BIP70 invoice---but once the transaction has been sent to the network, there's no way for the customer to take it back.  (Except for double spending, but that's discouraged.)

In the long-term, miners will likely change their transaction-selection process to allow for child-pays-for-parent fee calculation.  For example, imagine merchant-created unconfirmed transaction B spends an output from customer-created unconfirmed transaction A.  Currently, most miners use a naïve formula for selecting whether to include those transactions in their block attempts:

If transaction A pays a high enough fee per kilobyte, include it in the block.
If transaction A is included and transaction B pays a high enough fee per kilobyte, include transaction B as well.  (Note, consensus rules don't allow including child transaction B before its parent transaction A.)

In child-pays-for-parent, the miner will do the calculations above the same but also do a third calculation:

If transaction A's fee plus transaction B's fee is high enough per kilobyte of the combined size of transaction A plus transaction B, include both transactions in the block.

This allows merchants to effectively add a fee to any low-value transactions, helping to encourage miners to confirm those transactions quickly.  This method does have some overhead, so having the customer pay an appropriate fee would be ideal, but it can help prevent transactions from getting stuck.


How are eth transaction faster than btc? If I'm not wrong miners are trying to find nonce that satisfies a rule.

Then why is btc so slow? I want a technical answer.

Can btc ever match eth speed, given no politics?

Most simple and foreseen reason:

Bitcoin's blocktime is set at 10 minutes,
while Ethereum has a block every 10-20 seconds, making it much faster.

  See Ghost protocol, https://www.cryptocompare.com/coins/guides/what-is-the-ghost-protocol-for-ethereum/

So no, bitcoin will probably never be able to match Ethereum's speed. ( In it's current state)

(Unless they would implement something like the lightning network.)


Are electrum's private keys 512 bits or 256 bits long? I have recently been going through the python source code for electrum and encountered the following lines of code at the mneumonic.py file starting from line 130:

def mnemonic_to_seed(self, mnemonic, passphrase):
        PBKDF2_ROUNDS = 2048
        mnemonic = normalize_text(mnemonic)
        passphrase = normalize_text(passphrase)
        return pbkdf2.PBKDF2(mnemonic, 'electrum' + passphrase, iterations =
              PBKDF2_ROUNDS, macmodule = hmac, digestmodule =
               hashlib.sha512).read(64)

We see clearly that it returns a 64 bytes or 512 bit seed instead of what we all know a bitcoin priv key should be - 256 bits.
Is this the final function to be called for priv key generation or are there steps or functions that I missed?

Is this the final function to be called for priv key generation or are there steps or functions that I missed?

You are missing a lot of steps.

The seed value is 512 bits because more bits is more secure, and BIP 32 specifies that a seed value between 128 and 512 bits should be used. It does not matter what the length of the seed value is because it will get hashed anyways and the result is 512 bits.

BIP 32 uses 512 bits because the value is split in half for two 256 bit values. One of those is the private key, the other is the chaincode.


createrawtransaction online createrawtransaction is a bitcoin-cli command that generates a raw transaction given one ore more transaction ids and a list of Outputs, which are the destination amounts that will receive the funds.

AFAIK, The raw transaction is only based on the blockchain, and does not require any private key or address; the signing process is done separately, using signrawtransaction.

If the createrawtransaction process requires no secret keys, is there a way to generate a raw transaction online, using a web service?

That's correct, a private key is not required to use createrawtransaction. The private key is only required during the signing process of signrawtransaction just as you stated in your question.

If you are looking for a web service that will allow you to create a raw transaction online, I suggest you check out http://coinb.in it does exactly this, as well as broadcast the transaction, and allow you to save a local copy to sign the transaction offline.


multisig without knowing one of the keys I want to construct a 1-of-2 multisig script and I don't know one of the keys, I only know its address. Question is, is that possible?

So I was thinking if it is possible to construct a script that would have 2 branches, first branch would be allowing the first public key which I now to spend the money. And the 2nd branch would need a spending script to provide the public key which would then be duplicated on the stack, then hashed in order to get the address from it, this address would be compared to the address I know and if that matched, it would allow spending the coins.

Indeed, if you have a public key and then the hash of another public key, you can build a script that behaves similarly than a 1-of-2 multisig. Something like this would do the trick:

OP_DUP OP_TOALTSTACK <pubKey1> OP_CHECKSIG
OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY
OP_CHECKSIGVERIFY OP_ENDIF
<0x01>

The output script will be unlocked if either a signature validated with pubKey1 is provided or a valid signature and a public key that match pubKeyHash2 are provided.

In the first case, the user with pubKey1 spends with a valid signature:

ScriptSig: <signature1>

Evaluation:

<signature1> OP_DUP OP_TOALTSTACK <pubKey1> OP_CHECKSIG OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature1> <signature1> OP_TOALTSTACK <pubKey1> OP_CHECKSIG OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature1> <pubKey1> OP_CHECKSIG OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
0x01 OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<0x01>

Note that since the first OP_CHECKSIG returns True, the opcodes inside the conditional are not executed, and the script terminates succesfully  (leaving 0x01 in the stack).

In the second case, the user with pubKeyHash2 spends with a valid signature and revealing the public key matching the hash:

ScriptSig: <signature2> <pubKey2>

Evaluation:

<signature2> <pubKey2> OP_DUP OP_TOALTSTACK <pubKey1> OP_CHECKSIG OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> <pubKey2> <pubKey2> OP_TOALTSTACK <pubKey1> OP_CHECKSIG OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> <pubKey2> <pubKey1> OP_CHECKSIG OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> 0x00 OP_NOTIF OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> OP_FROMALTSTACK OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> <pubKey2> OP_DUP OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> <pubKey2> <pubKey2> OP_HASH <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> <pubKey2> <pubKeyHash2> <pubKeyHash2> OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<signature2> <pubKey2> OP_CHECKSIGVERIFY OP_ENDIF <0x01>
<0x01>

In this case, the first OP_CHECKSIG fails, so the code inside the conditional is executed. This code validates the signature and public key with pubKeyHash2, and makes the script fail if any of the validations fail. If both validations are passed, then the script pushes 0x01 to the stack, terminating successfully.

PD: Please don't use this script in the mainnet without first having checked that it works as expected ;)


What is the maximum idle time for a node to be considered active? Maybe I'm wrong but I remember I read somewhere that a node will be considered active for a certain period even if it is not responding for a certain time (something in the order of minutes).

Does anyone know if this is true?

If this is the case, how long is the maximum idle time for a node?

If there is no traffic on a connection, nodes will periodically send a message to maintain the connection. If a node has not communicated on a connection for more than 90 minutes, it is assumed to be disconnected and a new peer will be found.
A more detailed explanation is given in the book Mastering Bitcoin by O'Reilly Chimera. The specific explanation is given here


Can I use Antminer S7 PSU to supply the Antminer D3+? I can purchase Antminer D3+ at good price, but they sell it without PSU.

I have Antminer S7 PSU  to supply the Antminer D3+?

In theory it should work. The Antminer D3+ uses less than 500 watts whereas a S7 power supply provides over 1000 watts.

You should make sure that the power supply is compatible in other respects. You need to make sure the S7 power supply and the D3+ that you are considering are made for the same voltages and frequency (which vary across the world)


What benefit does bitcoin provide over using a credit card? I am brand new to Bitcoin. I am retired investor.

What benefit would using Bitcoin have over, say, using a credit card, etc.? It appears that Bitcoin is primarily designed for businesses, buying, selling, and using Bitcoin as the exchange medium.

I saw a chart which showed the Bitcoin/USD value at approximately $32 and then dropped to $2 and now is back around $15 as of August 18, 2012.

I don't consider these to be competitors.

Credit cards are a convenient way of doing payment processing on top of fiat currency. Bitcoin is a digital currency on itself.

Sure, Bitcoin today can function as a very rudimentary way of doing payments (just like cash-via-mail can be), but it's not particularly good at it - all it provides is storing and transferring value. What I hope is that in the future it will become a platform upon which payment processors can build. Since the currency is already inherently digital, building a payment platform on top of it should be significantly easier. Furthermore, since it is decentralized, everyone has the ability to become their own payment processor (or bank...).


Prove that xpub matches xprv? I'm researching a paper wallet system where I generate an HD xpub/xprv
using an offline laptop. I write down the xprv by hand. I capture the
xpub via QR code using my phone, to transfer to an online full node.

One potential attack vector is to replace the receiving addresses with
addresses under the attacker's control. To combat this, I plan to
print out the xpub as a QR code, and occasionally using the offline
laptop (which has no state), scan it in and generate a new batch of
receive addresses which I can then manually verify match those created
by the full node.

But since the printed xpub QR code necessarily transited several
untrustworthy (i.e. online) computers before reaching paper, how can I
be sure it wasn't tampered with in transit?

Question: if I generate a single receive address (e.g. m/0/0), send
some small amount of BTC to that address, create a PSBT withdrawal
using the online node, then successfully sign that using the xprv on
the offline node, is that sufficient to prove that the xpub is
authentic?

In other words, is it feasible that an attacker could modify the xpub
such that m/0/0 matches my xprv, but (e.g.) m/0/1 matches the
attacker's xprv? (And if that is feasible, how might I validate that
the printed xpub matches the xprv for all possible addresses?)

No that is not possible as it will require reverse engineering the HMAC-SHA512 function or finding a double collision that will generate the same keys. The xpub key is an encoded form of the extended key which is basically the concatenation of the public key and chain code at the account level. You include this extended key along with an index number (0 for receiving and 1 for change) into the HMAC-SHA512 function to get a child extended key. This child extended key will be fed again into the HMAC-SHA512 function again along with the index number (now this will be incremented sequentially to generate number of addresses like 0, 1, 2...) to display the addresses.

Now to achieve a situation that you mentioned, the attacker will have to create a xpriv in such a way that the corresponding xpub when passed through the SHA512 function twice (with the same index numbers) will generate the first address identical to yours, but different after you increment the index numbers. This means, the attacker will have to find two collisions to get the same first address. This is an impossible feat.

  But since the printed xpub QR code necessarily transited several untrustworthy (i.e. online) computers before reaching paper, how can I be sure it wasn't tampered with in transit?

When you import such extended key into a web server or an online application, you should generate some addresses and check they match the addresses you generated on your air gapped device to see that the service/server was not compromised when importing the xpub


Is there a list of mining pools' Bitcoin nodes IPs? Is there a list containing the IPs of Bitcoin nodes owned by various mining pools?

The following list will have inaccuracies. I have not been maintaining it as much recently. Some ips are known not to belong to a particular pool but are marked as such because they located nearby (e.g. same datacenter).

http://pastehtml.com/view/c7rf4x1gc.rtxt

Again no guarantees of accuracy *


Is it possible to use bitcoin as interplanetary money/store of value? Let's say humans have finally made a successful colony on Mars, how useful would bitcoin be to transfer value between Earth and Mars?

And if it won't work with the current implementation, what would need to be changed in order for btc to be used interplanetary?

Assume there is no Mars cash or any monetary system, they just decided to use bitcoin for everything. It however has to be on the same blockchain that Earth is using.

Possible problems to consider:

how would mining work? Lets say a miner on Mars and a miner on Earth both solve a block at the same time, because of ~8 minute delay between the two planets who would get the reward and how to deal with such a problem?

NOTE: I will be updating and modifying this questions to make it more concise and to the point.

Let's say humans have finally made a successful colony on Mars, how useful would bitcoin be to transfer value between Earth and Mars?

If you're talking about the Bitcoin blockchain in its current form, it will restrict mining to one of both planets.

Bitcoin's assumptions include a block propagation time between miners is negligible compared to the interblock time (10 minutes). We've already seen the effects of a few seconds block propagation time on Earth: miners being forced to build upon each other's work without validating, to avoid orphaning during that time. This incentive encourages centralization, hurts Bitcoin's security (especially for light clients), and makes mining (even) less permissionless to enter.

The distance between Earth and Mars can be up to 401 million km, when they're on opposite sides of the Sun. Following the laws of relativity, it is fundamentally impossible to communicate between them in less than 22 minutes in that case. A propagation time of 22 minutes would utterly destroy any ability to mine on both sides. As there is a delay of 22 minutes before Earth can mine on top of a block created by Mars, or the other way around, but not when a planet mines on top of a block created by itself, you would end up with an almost persistently forked chain between the two. The slower planer would eventually always switch over to that of the faster planet, making the faster planet win far more blocks than proportional to its hashrate. Effectively, the delay between the two planets turns mining into a race rather than a lottery.

  And if it won't work with the current implementation, what would need to be changed in order for btc to be used interplanetary?

The above issue could probably be solved by using a chain with a ~1 week interblock time rather than 10 minutes, to compensate for the larger propagation time.

If we're fine with mining being controlled by one of both planets (effectively giving that planet the arbitrarily censor the other planet's transactions), it would probably work fine.

There are other issues though; another problem is partitioning. Bitcoin strongly relies on peers in the network to be able to communicate without ending up on their own islands of connectivity. There would need to be multiple independent communication links between the two planets to avoid a partition between Earth and Mars. If mining is knowingly on one side, the worst effect of a connectivity failure is just the lack of ability to see confirmations on the other side, though it may take hours (=a few roundtrips) to notice this.


Simple explanation of how a hash timelock function works with an atomic trade of bitcoin / litecoin trade without a 3rd party? From my understanding a hash timelock function trade or atomic swap involves 2 transactions one separate blockchains. The BTC user named Bob is making a trade with Alice for her LTC. Assuming its a 1 to 1 trade and neither party trusts one another.

User bob makes a btc transaction sending his coin to an address they both control via multi-sig with 2-3. Meaning it needs 2 signatures to in order to make it a valid transaction. This address also has a "time lock" feature of being able to lock the coins for 60 minutes? (is that even a thing?)

Now Alice does the same thing with her LTC by locking it in another address with multi-sig.

They both see that the coins are locked away in these 2 addresses and they will be locked for 60 minutes.

Within this this 60 minutes, alice or bob signs the transaction of one of these addresses.

Once its proved its signed, now they will proceed to the next address to sign.

Now BOTH transactions are signed and is ready to be broadcasted.

I got this far, but I'm unsure if this was the correct way of understanding how an atomic swap might work. Can someone make it even more simple to understand?

My other question is what stops one of them trying to steal both of the coins once the lock is expired?

I am leaving out a few details here, but this will get you thinking on the right path...

Alice and Bob have accounts on both the Bitcoin and Litecoin networks. Bob has Bitcoin, but wants Litecoin. Alice has Litecoin and wants Bitcoin. They do not trust each other.

Both agree to trade Bob's 1 Bitcoin for 2.5 of Alice's Litecoin.

Alice starts the transaction with a contract on the Litecoin network. The contract states that she will deposit 2.5 Litecoin into Bob's Litecoin account, if Bob can provide a password (called a "Preimage") that produces a certain hash. If Bob does not provide the preimage within 21 hours, the Litecoin goes back into Alice's account.

So, the contract has Alice's account, Bob's account, 2.5 Litecoin, the hash of the preimage, and 21 hour expiry.

Bob can examine the contract by browsing the blockchain. He can see if he likes the terms. If he does, he can build a contract on the Bitcoin blockchain. That contract is very similar. It has:

Bob's account, Alice's account, 1 Bitcoin, the same hash that appeared in the contract on the Litecoin network, and a 10 hour expiry.

Alice can examine the contract on the Bitcoin network. If she likes the terms, she can use her preimage to "unlock" the 1 bitcoin. When she does, that preimage is published on the Bitcoin blockchain, and Bob can see it. He uses that preimage to "unlock" his 2.5 Litecoin on the Litecoin network.


How do miners accept a hard fork If a hard fork occurs and is broadcast to the bitcoin network, is there any manual intervention for miners to accept the fork?

A hard fork means that the consensus rules of the fork are incompatible with the current consensus rules. So in order for miners to accept a hard fork, they would need to be running software that views those consensus rules as valid. This means that they have to manually intervene to change their software prior to the fork in order to accept it. So yes, there is manual intervention for a miner to accept a hard fork.


Can Taproot be used to commit arbitrary data to chain without any additional footprint? A common way of committing some data to the chain is through an OP_RETURN with some hash. Doing this marks an output unspendable, but the output still requires some footprint (and cost) on the chain as it contributes to the TX hash.
So I'm wondering if it is possible to embed some data in an OP_RETURN in a script of a TapLeaf which is never intended to be part of a spend. If we assume that the Taproot output is spent using the key path, and it has already confirmed, it should be possible to later reveal the paths and scripts containing the OP_RETURNs, and it could be proven that the TapTweak hash did indeed commit to these hashes via the TapBranch hashes.
A single transaction could commit to a large number of OP_RETURNs which have no on-chain outputs, but whose hashes are indirectly committed to the chain. These could be revealed individually to whatever parties they concern. The paths and scripts would have no presence on the blockchain.
Maybe this doesn't even require the OP_RETURN as you could just use the TapBranch/TapLeaf hash itself as the data you wish to commit.
Would this not significantly reduce the cost of services like colored coins, timestamping services, etc, which commit their data directly onto the chain?

Yes, you can commit to data this way, but there is nothing special about Taproot here.
The Pay-to-Contract construction used to tweak the root key in Taproot is generally usable, and has in fact been used for exactly this purpose. In fact, it is one of the mechanisms used in OpenTimestamps to commit to timestamped data (including a variant sign-to-contract which makes a signature commit to data rather than a public key). It is also used in Blockstream's Liquid pegin mechanism, where transfers from Bitcoin to Liquid pay to an address derived using a tweaked key of the federation, which commits to the transfer information.
In fact, using an additional leaf in Taproot for this is overkill, and would inevitably increase the depth in the Merkle tree for at least one other leaf - resulting in increased spending cost. Just using pay-to-contract or sign-to-contract directly on one of the public keys involved can be done with zero cost to on-chain spending policies.

Would this not significantly reduce the cost of services like colored coins, timestamping services, etc, which commit their data directly onto the chain?

Decent timestamping services already use better techniques.
For colored coins it depends whether they just need timestamping or actual publication of data. My understanding is that it's generally the latter (as otherwise, they need another censorship-resistant channel to transfer the actual data, which could then probably be used directly).


Someone bought bitcoins via hacking my PayPal account, how can I retrieve the bitcoins? Someone has been purchasing Bitcoins using my PayPal account - which was obviously hacked.  PayPal won't let me close the account yet.  I'm going to be charged NSF fees by my bank - I have the Bitcoin wallet address that the sale was made to: -

  Please confirm you want the Bitcoin deposited into Wallet: 1Jvgp9Qcr5D3K37gcfjsp4L5Csg8wwReye

I need to cancel that account, whoever it belongs to.

That is not possible.  By the decentralized design of Bitcoin, nobody has the ability to "cancel" the coins in an address held by someone else.

I'm sorry you were hacked, but it is almost certainly impossible to recover, block, or trace the funds at this point.


To what degree can Bitcoins on a hard disk be protected against hacking? This is a question that came to my mind after reading this other question from someone who had "found a heap of BTC" on a hard drive. In that persons case they had originally been purchased many years ago.

The questions I wanted to ask is about a possibly scenario where the exchange from which he bought these Bitcoins has since been hacked.

The questions I have:

Isn't Bitcoin always also somewhere online and not just solely
on the hard drive?
If Bitcoin is always also online (e.g. at some exchange /
repository), and the online repository has been hacked, could that
guy in the other question get his BTCs back based on the data he has
on his hard disk (or: what data would he need to have on the HD in
order to be able to get his BTCs back in the event they are stolen
from the online repository)?

Update: with the reference to "repository" I did not mean that there is a central repository. Just that when BTCs are purchased through exchanges such as Coinbase, the BTC is often stored at a repository at such an exchange. The question was about what happens to the BTCs if the exchange is hacked, as happened to e.g. Yapizon and Bithumb.

You should completely forget about the notion of a Bitcoin being "located" online or on a particular computer.  It isn't a good metaphor for the way the currency actually works.

There are addresses, each one with an associated private key.  Each address has an associated balance; if the balance is greater than 0, then some bitcoins "belong" to that address.  The blockchain or transaction register, which contains information about the balances of all addresses, is stored "online" by all nodes on the Bitcoin network.  This is maybe what you are thinking of when you say "Bitcoin is somewhere online".

However, to actually spend coins, you have to have the private key, with which you can create a transaction sending some coins from the address to some other address.  The private key is an actual piece of data that can be stored on a particular computer (or a phone, or a piece of paper, etc).  It is normally held only by the owner of the coins, and not by anyone else.

When a customer buys coins on an exchange, initially the coins are held by the exchange itself, which means that they belong to an address whose private key is held only by the exchange.  They just update their internal books to indicate that this customer is now entitled to withdraw those coins (see below).  The customer doesn't have a copy of that private key.  If the exchange is hacked at this point and its private keys are accessed, the attacker can transfer the coins to his own address.  After that happens, the exchange's private keys become useless and can no longer control what happens to the coins, but the attacker can spend them as he pleases.  The coins have effectively been stolen by the attacker.  Neither the exchange nor the customer can get them back.  The exchange might reimburse the customer, but that is strictly between the exchange and the customer, and the Bitcoin protocol itself cannot force this to happen.

The customer can also withdraw the coins, by instructing the exchange to transfer them to a new address, of which the customer (and only the customer) holds the private key.  After this is done, the customer is the only one who controls those coins; the exchange's private key is now useless.  If the exchange is hacked at this point, nothing happens to those coins.  However, if the customer is hacked (or accidentally erases her private key, etc), then she loses the coins.  The exchange cannot do anything to help recover them, since it never had a copy of the customer's private key.  (In the case of hacking, the private key wouldn't help anyway.)


Find who all donated/transacted to/with a particular website/person I wanted to know is there a way to find if a person donated to a particular site or made a transaction with a known address. I mean I know it could be looked up on blockchain easily, but what I am trying to say is if you have an address of a person and you want to know whether a person has used it on a particular site or not, how would you do that? Is there a website which does that - take two addresses and reveal whether they ever transacted or not?

There is no way to achieve what you want effortlessly. I am not aware of any public free site that does what you want and any service that does this kind of work would not be cheap.

Short of sorting through the blockchain looking for transactions related to the address of the known person A and then trying to correlate other addresses that transacted with known person A address from other web sources could you begin to try do what you wish to accomplish.
For instance wikileaks donation addresses are public, you can search for if person A address paid the wikileaks address but thats a lot of either manual work, coding your own scripts, or paying someone else for the work.


My wallet balance says I have 12 mBTC but only allows me to send 2.63 mBTC. How can I fix this? I have 12mBTC but when I try to send a transaction, after I enter the amount (allocating enough for fees) Electrum says that I have only 2.63 mBTC. When I go back to check, every transaction I received is confirmed for more than a week, how do I fix this?

It might be, that you collected a lot of small transactions in your wallet. And if Electrum assembles a new transaction, it adds a fee, which is calculated in satoshis per byte, and for sure deducted from the amount you have. This way you can only spend less satoshis, than you actually have. In times of high fees, it does not make sense to create a tax. But today, as of July 2017, fees are very low, and you can give it another try. I posted a similar reply here:

Why was the transaction fee more for a 20 mBTC transaction than for a 25 mBTC transaction?


Ripple's validation of transactions / Ripple white paper? Is there a ripple white paper or some safe source to understand how the transactions are validated and made in the ripple network?
VS Bitcoin, XRP is not mined, so how is the agreement reached? (I understand that there is some kind of prioritisation of transactions and the first one agreed gets validated to avoid double-spending, but how does that work if it is not via mining?)
Is there some complete explanation to how Ripple works? Not the oversimplified stuff, but something that actually explains the whole process?

Thank you!

Is there a ripple white paper or some safe source to understand how the transactions are validated and made in the ripple network?

Yes. See consensus process and reaching consensus articles.

  VS Bitcoin, XRP is not mined, so how is the agreement reached? (I understand that there is some kind of prioritisation of transactions and the first one agreed gets validated to avoid double-spending, but how does that work if it is not via mining?)

Through consensus between validators (masternodes). They agree on which transaction goes first and sign the new ledger (block). This answer provides some additional details.

  Is there some complete explanation to how Ripple works? Not the oversimplified stuff, but something that actually explains the whole process?

The links above provides a good explanation.


Where can I see the "official" texts of BIP 100 and 102? I only see BIP 101 officially at https://github.com/bitcoin/bips/blob/master/bip-0101.mediawiki.  Is there a reason that 100 and 102 don't show up here as well?  Couldn't they all just be listed as drafts?

BIP 102 was submitted as Pull Request, which you can see here: https://github.com/bitcoin/bitcoin/pull/6451

The latest draft of BIP 100 that I could find was here:
http://gtf.org/garzik/bitcoin/BIP100-blocksizechangeproposal.pdf
but it might be out of date.


How to convert channel id from c-lightning to lnd? Sorry for the dumb question, but I'm not very good in lightning network...
 So I have two daemons: c-lightning and LND.

Channels from the c-lightning comes like this 505580:1917:1;
Channels from the LND comes like this 556369376388317185;

Is it possible to bring them to a single format? For example c-lightning convert to simple integer like LND in order to find same channels from both daemons?

https://github.com/lightningnetwork/lnd/blob/8379bbaa9b259544c2c8591782a78d7384680b2a/lnwire/short_channel_id.go#L25-L43

// NewShortChanIDFromInt returns a new ShortChannelID which is the decoded
// version of the compact channel ID encoded within the uint64. The format of
// the compact channel ID is as follows: 3 bytes for the block height, 3 bytes
// for the transaction index, and 2 bytes for the output index.
func NewShortChanIDFromInt(chanID uint64) ShortChannelID {
    return ShortChannelID{
        BlockHeight: uint32(chanID >> 40),
        TxIndex:     uint32(chanID>>16) & 0xFFFFFF,
        TxPosition:  uint16(chanID),
    }
}

// ToUint64 converts the ShortChannelID into a compact format encoded within a
// uint64 (8 bytes).
func (c ShortChannelID) ToUint64() uint64 {
    // TODO(roasbeef): explicit error on overflow?
    return ((uint64(c.BlockHeight) << 40) | (uint64(c.TxIndex) << 16) |
        (uint64(c.TxPosition)))
}


Why is the exchange rate of Bitcoins the same for everyone? If I open Google and type 1 Bitcoin to Dollar I'm returned with a number (as of writing, "1 Bitcoin equals
246.09 US Dollar"). But where does this number come from?

Given the decentralized nature of Bitcoins (there are no banks, governments or whatsoever), shouldn't each exchange have its own rate? How can there be a unique, widely-accepted exchange rate, valid for everyone?

When exchange 'A' sells bitcoins for 200 dollars and exchange 'B' buys bitcoins for 300 dollars, there will be people who buy at 'A' and sell at 'B' as long as they can make money on it. This is called 'arbitrage'.

Because of the open markets, people are free to do as they please, so there are people who buy and sell solely to make mere cents on the dollar. Because of this, there is usually not a lot of difference between the exchanges. The only difference in price between the exchanges as we can see them right now, is because of trading and/or withdrawal fees. (Exchange 'A' is 1 dollar cheaper than exchange 'B', because exchange A requires 1 dollar per withdrawal, meaning in the end you end up paying the same amount for 1 bitcoin at both exchanges.)

Because of arbitrage, Google can pretty safely say the price of bitcoin is about XXX dollars / euros because if one exchange would go up or down with the price, they all would. (Exceptions sometimes occur, when one 'big fish' / whale dumps a lot of bitcoins on 1 exchange only, crashing the price on exchange 'A', but not immediately on exchange 'B'. Of course, because of arbitrage, this difference will become smaller with time.) Therefor there is no need to let a user know which exchange offers the lowest price, because they will most likely offer bitcoins for about the same price anyway.

Also, exchanges do not 'set' an exchange rate, they merely offer people with bitcoins the opportunity to sell them to people looking to buy bitcoins. If everyone would suddenly start asking 1000 dollars per bitcoin (even though right now they're worth $245 each), there would be no other choice than to buy bitcoins at 1000 dollars each. Other than that, there is no way of 'setting' the price. (This price is never set by the exchange, only by the sellers.)

Technically speaking; Google gets the number by using the API (Application Programming Interface) of an exchange. Exchanges such as Kraken offer API's from which software can request the latest exchange rates. This way Google can let its users know what the latest exchange rate is.


Can malicious peer hack freshly installed bitcoin-core node I'm considering two scenarios of hacking freshly installed bitcoin core node.

Does freshly installed bitcoin-core node have genesis block included in the installation?
This fresh node contacts some peer for downloading blockchain. Can malicious peer give node wrong chain? Is this attack possible and how is it mitigated in bitcoin?

Does freshly installed bitcoin-core node have genesis block included in the installation?

Yes.

  This fresh node contacts some peer for downloading blockchain. Can malicious peer give node wrong chain? Is this attack possible and how is it mitigated in bitcoin?

There is no way for the chain to be "wrong" that would not be detectable to the node. If it's invalid, the node will reject it. If there's a longer chain, the node will reject the shorter chain. If it's the longest, valid chain, it's not wrong.


Why max target is not (2^256 - 1)? I'm reading https://en.bitcoin.it/wiki/Difficulty

And I don't get why max target is not (2^256 - 1) which is 0xFFFFFFFFFFFF... but 0x00000000FFFF...?

If the maximum target was 2256-1, every candidate block would be a valid block.

As even the CPU miner in Bitcoin's first software release was capable of doing 100 kH/s or more, this would have led to a very rough start of the chain, with 1000s of blocks produced per second until the difficulty adjusted.

Because of that reason, the maximum target was probably set to a level that would guarantee not too frequent blocks after genesis.


How does Abe or any blockchain explorer determine transaction size? I was looking over the Abe code once again, and came to a stumbling point. I can't understand how this is accurate:

tx['size'] = len(tx['tx'])

Transaction size is simply the length of the raw transaction string? I did not think that 1 character of that string was equal to one byte.

Edit: while tinkering around with this with a simple python command line program, I was able to determine that the block size is actually half of the raw transaction string length. I also found out this:

http://en.wikipedia.org/wiki/Hexadecimal

  Each hexadecimal digit represents four binary digits (bits), and the primary use of hexadecimal notation is a human-friendly representation of binary-coded values in computing and digital electronics. One hexadecimal digit represents a nibble, which is half of an octet or byte (8 bits).

Though it still doesn't answer the question, why isn't the size divided by two in the ABE source code?

What you are looking at is the length of a string of hexadecimal characters. When representing data has a hex string, one byte is represented with two characters.  However the software does not store the block or transaction data as a hex string, it just stores it as an array of bytes which is later represented as a hex string with each byte having 2 characters. So when the software gets the size of the transaction, it just gets the number of bytes stored in the array, and since each byte corresponds to 2 characters in hexadecimal, when you get the hex string, the hex string will be twice as long as the number of bytes that the block or transaction actually is.


Any idea how to download a small part of the chain for testing purposes? I am experimenting with Python and Rust libraries on my laptop. I don't actually want to get a node going on it and download the full chain; I just need some blocks to play with.

I want to keep my question general enough though; what is the easiest way for someone to download just a small portion of the blockchain, given specific beginning and end points in block numbers? Are there any libraries that would do that either in Python, JS, or Rust (or any other languages, so my question applies to all developers)?

As far as I know, there is no way to download arbitrary blocks (although I suspect it's not too hard to do if you implement your own client).

If you just want blocks for testing, you won't have much trouble finding bootstrap.dats that contain a few hundred thousand blocks. Alternatively, you could just run bitcoin core for half an hour or so and get a few thousand blocks from the start of the chain - The early blocks are mostly empty and download pretty quick.


Changed Merkle Root and Genesis Hash - Not Compiling I am kindly asking the expert programmers of this wonderful forum to enlighten me on why the updated QT I have created, does not properly open when running ./stonecoin-qt , but rather dumps core and shows the incorrect genesis block for the -testnet flag

after updating all the parameters in the github repo below

  https://github.com/advantage-project/stonedfork

  ./autogen.sh && ./configure && make

I have updated all the information inside the chainparams.cpp (public keys, magic bytes, spork keys, genesis, merkle, everything) and successfully recompiled to update and reflect the changes I have made

however when I attempt to run either the daemon or qt mainnet or -testnet it fails to properly open and instead aborts and dumps the core, however when I leave the original details in, it opens perfectly fine.

What do I need to do after changing the merkle and genesis in the src to successfully run the QT GUI or daemon without crashing?

**(also, when I run the ./stonecoin-qt -testnet , it shows the main net genesis hash, rather than the testnet genesis hash, which is different)

Thank you :)

Do you have all of the checkpoint blocks that are referenced within the source for the coin you are cloning commented out or removed?

I had a similar problem my first go at cloning a coin with it's own blockchain.

Also, what did you use to generate your genesis hash? What software/parameters.

I can recommend a piece of software if the problem lies within the parameters that make up your genesis block.

Also, the Assert error your receiving is due to the genesis hash for your testnet parameters not being valid for the rest of the genesis hash input values. I would double check under testnet in chainparams.cpp and make sure that ALL the values (nonce, timestamp, pzTimestamp, genesis reward, bits) are correct for the given genesis hash.


What is a good resource to learn about bitcoin I’ve got to this point reading various blogs, articles, other stackexchange threads and watching Youtube videos on the subject and still have a ton of questions. I don’t expect the questions below to be answered here, they are just for illustrating my level of understanding and what I’m confused about. What I’m really asking here is to be pointed to an online resoursce (tutorial, lecture, course, etc), that can help me answer ALL these questions below:

1) Ok so I keep hearing about creating a wallet. And just about every resource I’ve come across goes into talking about using something like blockchain.info or coinbase or some site. Now to my understanding, the wallet is essentially made up of two components: the private and public key. So creating a wallet (account) on a site means I’m pretty much allowing the site to know what my private key is, correct? Don’t want an ethical discussion here. Technically speaking, they have my private key correct? If so, how is a bitcoin wallet created this way different to online banking except with no insurance, because it’s some random 3rd party site? I must be missing something here, surely...

2) Next I hear about mining. Being rewarded for solving complex mathematical puzzles and what not. “Complex”? Really? Are they like...differential equations or NP-hard problems? So just, trying a new nonce? Is that really all there’s to this “complex puzzle”? Trying random numbers till something works?

3) Then I hear about specialised mining hardware, and mining farms, and what not. Guessing it’s all to do with (2) above. But what about the actual ‘verification’ bit with transactions? Is that automated too now or?

4) “When a group of transactions is verified and the proof or work done, a new block containing these transactions is added to the block chain once it receives sufficient confirmations”. Oh dear lord, where do I even begin asking about this one. Let’s see...which transactions does one ‘select’ to verify and put in the next block, what happens when someone else creates another block containing some of the transactions you’re attempting to verify as well, what actually does a block contain, is it a hash of all transactions or, wtf confirms a block, is that even a thing, who does that, what’s their incentive? Head exploding People invest in this without knowing all these details, really!?
https://m.youtube.com/watch?v=6HFtk29k7-Y

5) “When you send bitcoins to an address, the transaction is broadcast to the network”. What network, how is it broadcast, is there some API that gets called with a request or? Is there some software I MUST download to become a node in this network?

6) Merkel trees. What now?

Ok, so hopefully that gives a good indication of where I’m at. Need help.

I would recommend bitcoin book and bitcointalk forum as starting points. The book is very technical, but has everything you need to know. After 2nd+ reading things will get much easier. Forum has huge amount of useful information, but keep an eye on outdated material. It is also good to know whats going on with current BIPs to have some vision about upcoming protocol changes, etc.


Use bitcoin-qt for website integration? I have recently downloaded Bitcoin-qt and all necessary blocks, and have made some transactions, too. Now I want to use this to integrate it with my website. Is it even possible? If yes, then how?

I am planning to make an online store. If i can only access bitcoin-qt in my site, that will do the trick. I will manage to use the balance as I want. Just give a hint of what way I have to do.

I think the best point to start with is: https://en.bitcoin.it/wiki/PHP_developer_intro
Nothing much to say, just read and follow the steps.


Lost Bitcoins purchased in 2011 I purchased some bitcoins in 2011 from Dialcoin  - I have an email I sent to them asking where the coins I purchased went (very naive at the time) - I've since sold the PC (which was also mining) to a friend (back in 2012)

Is there any way I can find the coins ?

I cannot remember the wallet I was using + had a piece of paper which I think I threw away a the time.

Please help.
David.

If I understand correctly, you not only do not know your private key anymore (and probably never knew), you also do not even know the BTC address where your Bitcoins are?

I'm afraid I have to say that under these circumstances it is as if you never had any Bitcoins. I lost some exactly this way as you describe and actually also had purchased them in 2011.

No chance. Best thing you can do is to forget about them and not to burden your mind with the loss.


Bitcoin-qt, OS X Mountain Lion, blockchains, and bootstrap.dat Edit:  Rewording this question to be more clear and concise.

Background Info:

Was running bitcoin-qt .0.8.1 on osx mountain lion.
experienced a kernel panic, likely from some conflict between mac ports and homebrew. Hardware was tested and does not seem to be the culprit.
upon next restart of bitcoin client I have a corrupted database and eventually the entire blockchain needs reloading.
only had a small amount of coins in wallet but was hoping to use them sooner than an entire blockchain download would take using the client (x days where x >= 2).

Things I tried

Restoring the relevant files in the data directory from the last
backup before the crash. Actually had one from that morning.  Did not
really work -- client would trying to verify the db and eventually
would crash.
Got the latest bootstrap.dat from torrent, and tried placing  in data
directory. This eventually sort-of worked after next two steps.
Eventually imported wallet.dat at blockchain.info as a stop-gap, but it turned up a few bitcents short. I think because I had sent something to a wallet address before this happened and it hadn't synced yet.  I'll figure that one out once I'm fully synced, and if I ended up losing $5-10 worth of btc into the ether somewhere, I'll get over it.
Fixed the probable cause of kernel panic and reinstalled/upgraded to
latest 0.8.3 client and retried the above steps.
Also had to pretty much nuke the data directory in order to get bootstrap working.  (renamed/moved actually just in case) Saved wallet.dat (encrypted) elsewhere.

At this point the bootstrap method seems to be working.  The client reports importing block from disk.  However, it soon becomes apparent that this method does not really make things any faster.  It seems to load the blockchain from my HDD at about the same rate it downloads from the network.  Also, latest update was apparently 13 weeks old, and those last 13 weeks make-up most of the payload...

So for now I've got my old wallet imported onto electrum, and bitcoin-qt is back home chugging away finishing the download so hopefully I can find that change when it's done and be done with it.

OK, so what are my question(s)?

Wy does it seem to take just as long for the client to import from the local HDD as it does from the p2p network?  If I were smart I would have put the bootstrap file on my SDD, but it appears that's not the case. But still, I'd assume it would be faster than from the cloud.  Any ideas? I don't remember if I have the 5200 or 7200RPM hdd; I probably just got a 52 since I was buying an SDD along with it.
Any blockchain-scalability plans in order for future releases of bitcoin-qt?  Evidently this is growing faster than they expected.
Anybody have a full working procedure for restoring data directory files when you have backups available?  Found a few ideas elsewhere on the net but nothing that worked.  My backup software keeps old versions of files so it's not too difficult to assemble a snapshot with the /chainstate and /block directory contents from some specific date.  But the client was barfing on this method.

Thanks, hope that is somewhat improved.

Bitcoin-qt verifies the entire blockchain the first time it starts, to be sure that all the transactions are properly signed, and all the blocks certify an appropriate amount of computation (proof-of-work).  This ensures, for instance, that nobody is feeding you a fraudulent bootstrap.dat.  Depending on the speed of your computer and network, this verification might be the bottleneck, instead of the download.

There is not really any way around this if you want total confidence in your copy of the blockchain.  The bitcoin-qt client generally is designed for greater security at the cost of performance.  There are other "thin" clients that are less paranoid, and are willing to trust the blockchain they get to a greater extent, but there is a security tradeoff.  Whether you think the tradeoff is acceptable is up to you; many people do.


What is the most recent pushpool version and where to get it? I found already the following pushpool versions:

https://github.com/jgarzik/pushpool
https://github.com/ArtForz/pushpool
https://github.com/alexhz/pushpool
https://github.com/CryptoManiac/pushpool

(can't post more than 2 links with my current reputation, so made a block)

All of them seem very old already.

I made a research on how to modify the difficulty in pushpool's server.json and found examples on how to set the following options rpc.target.bits and work.expire, but NONE of them seem to work for the mentioned versions.

So what's the newest pushpool version and where can I download it?

EDIT: Tried as described in the following post, but not working. Difficulty doesn't change and nothing is written into shares. MMCFE Not Reporting Stats from pushpool/wallet

Since you tagged your question with litecoin, I believe that you are looking to serve a litecoin pool. For my needs https://github.com/ArtForz/pushpool
did the trick. It added scrypt support and allows you to rewrite the target difficulty (just remove "rpc.target.rewrite": true and replace it with "rpc.target.bits": 18 in the config).


How do you generate a qr code for a new address and check for incoming payments from the command line? Which one do you recommend for this

Command line to generate QR-Code + address for requesting money
Command line to check if the above has been received

I don't want to install too many versions of Bitcoin wallets on my machine so I thought I'd come here asking for some guidance first
Using Ubuntu 16.04

Using Bitcoin Core, I would combine getnewaddress, qrencode, and listtransactions.
> bitcoin-cli getnewaddress ( "label" "address_type" )

Allows you to generate a new invoice address and label it to identify the current purchasing process. It returns a string with the newly generated address which you can then decorate according to the BIP21 URI scheme to allow operating systems to recognize it as a Bitcoin address, and output that the resulting string using a quick response code tool such as qrencode.
Finally, you would poll your wallet for new transactions using
> bitcoin-cli listtransactions ( "label" count skip include_watchonly )

which will give you recent transactions relevant to the wallet, or alternatively allows you to specifically filter by the label you previously attached in getnewaddress. The rpc descriptions I linked are for Bitcoin Core 0.21.0, but older docs are available through the same site.
Note that versions preceding Bitcoin Core 0.17.0 (released in October 2018) are past their End of Life date in their maintenance cycle. I would emphatically recommend using a newer version of Bitcoin than what may have shipped with Ubuntu 16.04.


Can I build a mining ASIC from parts I find online? I've noticed that there are all kinds of cards, blades, and other parts of ASIC mining rigs for sale on eBay. Is it possible I could buy some cards and blades and build my own high end mining ASIC without having to pay for something brand name or design my own (which we all know isn't going to happen)?.

Technically, sure, you can cobble together parts from bitcoin ASIC manufacturers and make your own farm.

Practically, you are better off going to one of the "something brand name" guys and getting a mining rig.  The bits and pieces that you see around on various auction sites are most likely out of date and will cost you more in electricity then you make (not to mention possibly faulty if they are selling them in bits).

Of course, depending on where you are, the chances are that even with the latest gear you won't actually turn a profit.

The mining industry is very cutthroat these days and profit margins are thin.  The rig turnover is also very high with miners replacing their rigs every 6-8 months in order to get the most efficient equipment.


How can a transaction have more than one recipient address? I see a lot of transactions which have more than one recipient address.

Examples:

Transaction 1
Transaction 2

Edit #1:
I just saw a tag call multi-sig-transactions. It is obviously what I am asking for.

I did not see in the clients before. How come that there are so many of them?

Edit #2:
After reading little bit about multi-sig-transactions I am not really sure that these transactions are these multi-sigs. This opinion is not based on real knowledge but just on such a great number of these transactions in every block.

Actually, most transactions you see will have two recipient addresses. One is for the actual transaction and the other one is change.

  When the output of a transaction is used as the input of another
  transaction, it must be spent in its entirety. Sometimes the coin
  value of the output is higher than what the user wishes to pay. In
  this case, the client generates a new Bitcoin address, and sends the
  difference back to this address. This is known as change.

But you can also add any number of recipients to a transaction so you'll find transactions with 20 or 50 receiving addresses too if you look around. In Bitcoin-Qt simply click "Add Recipient" on the "Send coins" tab.