Can anyone give an explaination of what exactly a Bitcoin is and where it derives its value from? I really just want to grasp how a bitcoin actually is something of value? and how a string of characters equate into something that is worth dollars?

Proof of work plus utility, and scarcity.

The Bitcoin mining process is what creates new coins in the Bitcoin economy. To add a new block to the network the miner must produce a hash below a specific target. The only way this can be done is through trial-and-error (bruteforce) so miners are constantly competing to produce as many of these hashes per second as possible so that they earn the newly created bitcoins.

This competition requires hardware and electricity, both which cost money. This is the Proof of Work (POW), the only way to create new blocks and thereby new bitcoins is by spending money on the mining process. This is also where the scarcity part comes in. Today, every block created produces 12.5 new bitcoins. Every 210,000 blocks (~ 4 years) this reward is cut in half thereby constricting the supply. We've already had two halving events so far. It started at 50 new bitcoin per block.

Lastly utility gives it value. Bitcoins are useful. They can be used to transfer value across the globe almost instantly, for very little cost, and without censorship. Whether it's used for international remittance or gambling doesn't matter - bitcoins have utility.

So it's not just random string of characters. What appears to be random strings actually represent and mean something. They can be validated by others that can prove that this string of characters represents the money and energy spent creating a valid block.


Is MtGox Pubnub API and Websocket API the same thing? On their wiki MtGox have pages for Pubnub API and Websocket API.
So when I connect to Websocket API - it just goes through Pubnub, or it's a different way to connect?

MtGox PubNub API and Websockets API

The two endpoints you are describing are indeed two separate endpoints which you will use under certain conditions depending on what you are seeking.  The Public stream feeds and more can be accessed by issuing a .subscribe() PubNub SDK instance method call from the PubNub Class. For now the MtGox WS API is in deprecation and recommended that you upgrade using a standard MIT open source PubNub SDK which you can find your language here: http://www.pubnub.com/developers/

For receiving data via PubNub Real-Time Network you can use an SDK like JavaScript to receive real-time trade events.

Mt.Gox Data Feed Stream:

<script src="https://cdn.pubnub.com/pubnub.min.js"></script>
<script>(function(){

// INITIALIZE PUBNUB
var pubnub = PUBNUB.init({
    subscribe_key : 'sub-c-50d56e1e-2fd9-11e3-a041-02ee2ddab7fe'
});

// MULTIPLEX SUBSCRIBE TO TICKER FEED AND ALSO TRADES FEED
pubnub.subscribe({
    backfill : true,
    channel  : [
        'd5f06780-30a8-4a48-a2f8-7ed181b4a13f', // TICKER
        'dbf1dee9-4f2e-4a08-8cb7-748919a71b21'  // TRADE (BUY/SELL)
    ],
    message  : function(message) {
        // FIRE EVENT WHEN DATA ARRIVES
        console.log( message.channel_name, message );
    }
});

})();</script>


How can i emulate two or more recipient address? https://webbtc.com/scripts/multisig

Above site lists lots of multisig recipient addresses having
2 or more addresses like below bitcoin mainnet transaction.

  getrawtransaction fe709089a2a2142b82f9f57745452eff0f5feb9d6e02a6ad87b8faf4750c8a16 true

  {

  "txid": "fe709089a2a2142b82f9f57745452eff0f5feb9d6e02a6ad87b8faf4750c8a16",

  ...
    "vin": [
      {
        ...
      },
      {
        ...
      }
    ],

  "vout": [
      {

  "value": 0.00010000,
  "n": 0,
  "scriptPubKey": {
  ...
    "type": "multisig",
    "addresses": [
      "1FE1A8QAF1d9WyLR67h4bZD5Q8gMAHF8Aq",
      "17mKFkUqi8Q1zLqRjjQZgHWpE4yboBFjbM"
    ]
  }
},
{
  "value": 0.00000000,
  "n": 1,
...
}

  ],
    ...
  }

addmultisigaddress offers multisig address composed of below.

  bitcoin-cli addmultisigaddress 2 '["2Mv4H342fBrP6aJWnSem3bstNGqmrsfJkWH", "2NA6BSeYvtaY6iRhx9ZRQdPdsAzHE6E7Kcz", "2N9sxVZHzJGCZGXLhEZ2hNQUXgWLxgHfjFQ"]'

  {

  "address": "2Mt69kBHVgAeyDcPSYtcuhDmwZGVcfgDBs6",

  "redeemScript":
  "5221036e92f34d7cef7dd069d3cc41ac4f7aa5d08964a97fad73a9c736d0f62e086d662103a5cafce0576b6af5b963c8208ebbdf6474af31b9b5cbfce0791e3c6d4f6e8cd021029bd48294dede37c6689597ff8f33c3ad7b53eb604a1208da8dd39312825d32d653ae"

  "scriptPubKey": "a9140940d70f73f5d7c3291aa5627b2c20ae46fd732387"

  }

I created multisig address("2Mt69kBHVgAeyDcPSYtcuhDmwZGVcfgDBs6") above, and sent money to the address using createrawtransaction.

The expected result "vout.scriptPubKey.addresses" tag was

  "addresses":

    [
          "2Mv4H342fBrP6aJWnSem3bstNGqmrsfJkWH",
          "2NA6BSeYvtaY6iRhx9ZRQdPdsAzHE6E7Kcz",
         "2N9sxVZHzJGCZGXLhEZ2hNQUXgWLxgHfjFQ",
     ],

but the result was

  "addresses": [
        "2Mt69kBHVgAeyDcPSYtcuhDmwZGVcfgDBs6"
     ],

fe709089a2a2142b82f9f57745452eff0f5feb9d6e02a6ad87b8faf4750c8a16 is not paying out to a P2SH multisig address. It is paying out to a bare multisig address.

With your commands, you are creating a multisig address wrapped inside a P2SH address. What you have is a HASH160(redeeemScript). What you want is just an output going to n <pub1> <pub2> .... m OP_CHECKMULTISIG.

Do note that bare multisigs are rarely used these days, and nodes may reject the transaction (although it is still valid if mined). You should be using a P2SH address.


Reduce difficulty on testnet-in-a-box? I'm doing some testing and often find myself needing to generate 6 blocks quickly to confirm some tx.  Each block takes a few minutes to generate on my macbook so this slows things down considerably.

Is there a way to adjust difficulty?  Note that this is not for testnet in general but for the private testnet in a box with just 2 nodes on my development machine.  Thanks!

Changing these 2 lines gets what you want.  Note that it's quick and dirty and will break non-testnet, so don't use this for anything but testnet:

diff --git a/src/main.cpp b/src/main.cpp
index a9311e2..b3496a1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -780,7 +780,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees)
 }

 static const int64 nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
-static const int64 nTargetSpacing = 10 * 60;
+static const int64 nTargetSpacing = 10;
 static const int64 nInterval = nTargetTimespan / nTargetSpacing;

 //
@@ -1784,7 +1784,7 @@ bool LoadBlockIndex(bool fAllowNew)
     if (fTestNet)
     {
         hashGenesisBlock = uint256("0x00000007199508e34a9ff81e6ec0c477a4cccff2a4767a8eee39c11db367b008");
-        bnProofOfWorkLimit = CBigNum(~uint256(0) >> 28);
+        bnProofOfWorkLimit = CBigNum(~uint256(0) >> 15);
         pchMessageStart[0] = 0xfa;
         pchMessageStart[1] = 0xbf;
         pchMessageStart[2] = 0xb5;

Here's some debug.log output with those changes.  I'm generating a block every 2 seconds or so.  If that's too fast, increase the ">> 15" accordingly.  Each increment there doubles the time between blocks.

03/05/12 07:21:54 Flushing wallet.dat
Flushed wallet.dat 132ms
askfor block 000000935f454d1641e5   0
sending getdata: block 000000935f454d1641e5
received block 000000935f454d1641e5
SetBestChain: new best=000000935f454d1641e5  height=23  work=559980566
ProcessBlock: ACCEPTED
askfor block 00000c4d375ce8f92166   0
sending getdata: block 00000c4d375ce8f92166
received block 00000c4d375ce8f92166
SetBestChain: new best=00000c4d375ce8f92166  height=24  work=561029143
ProcessBlock: ACCEPTED
askfor block 000007e863a6d86bfb1d   0
sending getdata: block 000007e863a6d86bfb1d
received block 000007e863a6d86bfb1d
SetBestChain: new best=000007e863a6d86bfb1d  height=25  work=562077720
ProcessBlock: ACCEPTED
03/05/12 07:21:59 Flushing wallet.dat


What are the problems with normal currency that may be solved by using Bitcoins? I've watched the video on weusecoins.com and read some of the FAQ, read information about wallets etc, but I still can't find any information about why we should use Bitcoins? What are the issues with normal currency?

I know that this is a very beginner question.

The only things I can find so far are:

It's not controlled by a government or company. But what further advantages of this are there?
Open source, but why should currencies be open source?
It has very good security, but don't banks spend billions on security as well?
BTCs are limited in number: Is this to prevent artificial inflation of currency?

Please note: This is not some kind of horrible troll question, I'm genuinely trying to learn about BTC.

Paper fiat currencies issued by Governments could work perfectly well, provided they used the money for the benefit of society.
IE, if they  had the discipline of the Bitcoin code, we wouldn't need Bitcoin, the trouble is, Govts become corrupted, they are tempted to fund projects they can't afford or otherwise should not get involved in (wars) by printing money.
Printing money is a phrase we see bandied around a great deal, but if Govts only printed new money to pay for their pet projects, it wouldn't be so bad, what compounds the issue is that they BORROW this extra money from Private international Bankers who simply conjure the money out of thin air.
Taxes against the People are required to pay back this totally unnecessary Borrowing.
For more on this goto youtube and search 'Bill Still' 'the secrets of OZ' 'fiat money' 'fractional reserve lending'
More money in circulation means the money you have earned is devalued through inflation. Yes, you may still have $1000 in the Bank, but it's purchasing power is being devalued, it is becoming worth less because of all the extra money  being printed (borrowed) and put into circulation.
Another problem with central control is the issue of Liberty, currently, as in the case of Julian Assange, the state can freeze your assets, switch off your access to banking.
This is potentially very sinister, do some research and you will see that totalitarian Govts often shut off access to money, food and water as a means of controlling large numbers of people.
Bitcoin addresses several of these important issues, firstly, it's a limited supply, whereas there is virtually unrestrained money printing going on, and there might even be new Gold and Silver deposits found, there will NEVER be more than 21 Million BTCs. These are divisible up to 8 Billion times so BTC has the potential to serve as a Global currency. There's no central control, Your Bitcoins cannot be blocked as they are sent person to person.
As people buy in, driving the price higher, instead of buying a meal for 1 BTC we will be using fractions of a BTC, a whole BTC becoming worth a considerable amount of money, this is called deflation, this is the opposite of what we have now with inflation devaluing our currency.

Pensions too could be transformed by this, simply work 20 to thirty years, buying BTC allowing them to deflate (increase in value) to a sizeable Nest egg, then retire when YOU want to.,
Currently, there's money pouring into Bitcoin, people say it's a speculative bubble that may eventually crash.
I believe though that Bitcoin is a Global asset, it is a peer to peer, anonymous version of Western Union, so if Bitcoin has no value then Western Union has no use to society either.
I think the thing that will determine bitcoin's ultimate success is if underneath the speculation, real industry and businesses can spring up using BTC.
For those early adopters who've gained, probably the best way to preserve those BTC Gains is to take 1% of your gains and help young BTC industries to flourish.


When will the last Bitcoin be mined? Estimates have been thrown around a lot recently as to the year in which the last Bitcoin will be mined- where are these estimates coming from? Could someone send me to the relevant code?

The estimate is 2140 based on the block reward halving frequency of four years. According to math and knowledge that there are 32 halving events, in 2136, the block reward will yield 0.00000168 BTC per day, which is 0.00000042 BTC per block. That's 42 satoshis.

It's arguable that there could be one additional halving, to a block reward of 0.00000021 BTC, but that would require a major protocol modification since the number of Bitcoin would then exceed 21 million. Additionally, to go past that, there'd have to be a protocol modification to extend divisibility past eight decimal places. It is far, far to early to worry about either of these, because we're more than a century away from this problem.


Why would we ever need 10k new addresses in average per day? Generally speaking, the address space of Bitcoin seems to be sufficiently large to make it unlikely that a hash collision will ever occur (see below).
Pacerier stated in a comment on Is it possible to brute force bitcoin address creation in order to steal money? that we'd "want Bitcoin to scale to [...] 10b people, each generating 10k different addresses a day, that's 100 trillion addresses created daily." He followed up with "10k may be a severe underestimation".

100 trillion is 10^14, so if we kept up that pace, we'd have used one address per satoshi after 21 days. I am confused as to what might be the reasons for users to need 10k addresses per day.

Please explain: Why does it seem likely that we will need such a large number of new addresses each day? In what scenario would each user in average need 10k new addresses per day?

Total number of satoshis:

At one address for each satoshi that could be ever in existence (2.1*10^15), with the giant address space of 2^160 possible addresses, the simple approximation of the Birthday paradoxon, which works well for probabilities less than or equal to 0.5...

... tells us that the chance of single hash collision occurring is still pretty small: 1.508*10^(-18).

Bitcoin transactions usually carry change, and to increase privacy and security, it is certainly no worse to generate a new address every time for receiving change than to reuse old addresses. Details maybe belong into their own question; however, it is well within the realm of reason to expect a future where most Bitcoin transactions include two new addresses (one for the person paid and one for the change back to the payer).

If we dream up a future where arbitrarily small micropayments can be handled by Bitcoin, then I would actually call the 5k transactions per user that could hence generate 10k new Bitcoin addresses a vast understatement of the potential. I'm thinking that rather than paying my mobile carrier for data roaming, I'd want to use micropayments to pay for routing of IP packets in adhoc wifi networks (ok, maybe not for each individual packet given the overhead---but I could, from a user's perspective, want that to happen for every 10 kb chunk of data or so). And I can envision much the same thing with my regular ISP, or even with most websites I frequent (and, come to think about it, maybe some of them should pay me).

The problem with this is that all these transactions end up in the blockchain, occupying a huge amount of disk space. That is why many suggest that micropayments ultimately belong off-blockchain, meaning some other solution should be found for them that does not place the burden on Bitcoin. In my example, it is easy to see why this is necessary: Even if only 100 nodes kept the entire blockchain, then my 10 kb chunk of transmission data would occupy much more than that in distributed blockchain storage just to finalize my payment for it. Obviously not just inefficient but truly unsustainable at scale.

Hence I would say that as far as Bitcoin's blockchain is concerned, we need not worry about seeing quite that many addresses added to it. But if whatever off-blockchain solutions we will adopt for micropayments in the future uses Bitcoins' address scheme as well, then we may well, outside the blockchain, envision such a massive use of Bitcoin addresses.


Is there a way to mine with many graphics cards without having a PC for each one (or two)? I have a serious stash of radeon cards, some great, some fairly crap. I figure with them all running it all adds up.

Problem is, running a PC for each card will get expensive, so is there any known rig or way to mine using a bunch of cards and NOT have them all plugged into a PC of their own?

I have found that the cheapest way to hold many cards is to put them in old motherboards.  I have been buying motherboards off Ebay for $45, getting a $5 processor, a $100 PSU and connecting 4 cards per rig.  I currently have 6 of these rigs running and they are great.  As for heating I have built custom cases for my cards so they don't overheat.  Using this method I've brought the cost to run each card down to about $50.  In other words, it will cost about $50 per card to put it into a computer if you build your own off Ebay.

Another option, which is definitely more expensive but probably the type of thing you were hoping to find is a PCI Express Switch.  These things exists and are how big companies can connect 20+ GPUs to a single computer, but they are prohibitively expensive in most cases.

Below is an example of my mining tower, if you would like more information on exactly what I buy and the economics behind it please don't hesitate to leave me a message.


Is there any rational economic reason to purchase XRP early? Deflation is a main economic reason to buy bitcoins earlier. However, is there any rational economic reason to purchase XRP early? As far as I know OpenCoin is not clear on distribution policy. The might be giving away billions of XRP at some point.

1) OpenCoin has been clear on how many XRP they are going to distribute, they have been secretive only about how they are going to do that. And that's fine, since otherwise people might try to game the system before their distribution starts.

2) You might buy a few XRP if you need them, or you can buy a lot of XRP if you want to speculate (i.e. you think their value will rise)


How public-key cryptography secures bitcoin transactions from 51% attacks and Mining Attacks I wanted to better understand how public-key cryptography avoids 51% attacks and mining attacks, also if this question is wrong please correct so that i can improve my research and provide me with right resources

Public key cryptography has nothing to do with 51% attacks. The only thing a miner can do with >50% hash power is double spend bitcoins for which he controls the private key or censor transactions by not including them in the blocks he creates. He cannot spend bitcoins for which he doesn't control the private keys.


MtGox money completely lost? Given the recent events and today's news about MtGox filing for bankruptcy, is my money on MtGox completely lost? and what are my options now?

It would depend on what the bankruptcy laws are in Japan and if the exchange has any assets or Bitcoins left.

Then it depends on how much the legal fees are involved it finding and converting all these into cash.

You should make sure you are included in the list of creditors or you will have no chance for a recovery of anything. And if you do recover, it will usually be pennies on the dollar.


How to buy bitcoin to my local harddrive? There are stories about people searchung dumps for their thrown away harddrives with bictoins with brazillions of money. I want to get such harddrive too :)
Is it possible nowadays? I.e. buy bitcois directly to my wallet, without any third party accounts?
I registered on CoinMarketCap and coinbase and looks like first site doesn't allow to buy bitcoins and another is maintaining it's own accounts with their security and 3rd party auth. But I don't want their accounts, I want my on my local selfcontained harddrive.
Is it possible?

I'd suggest you to:

Look into hosting your own bitcoin node.
Try using P2P non-custodial non-kyc exchange, you can find the list here.
You may want not to store your wallet on a hard drive. The suggested
solution is to own a hardware wallet


Passphrase header - Coinbase API When trying to access the Coinbase API I am getting a header required: passphrase error.

How do I create a passphrase?

On the GDAX website, it states you create your passphrase when you create an API key, however, I just created a new Coinbase API key and could not see any option to create a passphrase.

Thanks in advance

I've experienced the same problem. I can assume that you're creating API keys at https://coinbase.com/.

The passphrase is related to updates they made so far and you have to create API keys at https://pro.coinbase.com/


Trying to run the Main file of the wallet template from bitcoinj but JavaFX not found Trying to run the Main file of the wallet template from bitcoinj but JavaFX not found. When I run the main file of the wallettemplate I get multiple errors of javafx packages not found. When I try to run the entire thing I get an error missing a cucumber thing.

All the tutorials are outdated and I have only coded basic stuff.

Has anyone tried to use bitcoinj on intellij and java 10? Thank you.

Install the JavaFX SDK

Check this

https://docs.oracle.com/javafx/2/installation/jfxpub-installation.htm


Local balance query for Bitcoin address I would like to be able to query the balance of an address (not belonging to me). The data should come from a fully synced bitcoin full node inside the local LAN and I do not want to query any api services outside my LAN like blockchain or blockcypher. Of course, API calls inside my LAN would be fine and even preferred.

Which query technique could you recommend me? What's the minimum hardware requirement? I guess that would imply a large index of addresses, would I have to count with the same space as the blockchain data itself?

I know this question has been treated before, but most solutions posted there are not really up to date or not supported anymore. What's out there as currently supported solutions?

Thank you in advance

Edit:

So far, my research is that bitcoin-cli cannot reveal transactions based on an address, the txindex=1is only useful for using the RPC call getrawtransaction which doesn't allow searching for addresses.

On the other hand, I've installed btcd: it allows using btcctl searchrawtransactions address which at least prints out ALL transactions. That brings me closer, but still doesn't provide me the final balance. Would that have to calculated from the single transactions? If so, how?

The first problem is that Bitcoin does not use the addresses for working, so Bitcoin does not have the need to give the information for addresses.

So with your test have some problem, that is:

Bitcoin Core (bitcoind): not have the method for calculating the balance of the address because a wallet has more addresses and more private keys, for extract all addresses with the balance you can scanning the blockchain and store the information of the address.
btcd: Have the method for calculating the balance of the address but you don't have all addresses used inside the bitcoin blockchain, so for extract all address you can scan the blockchain.

So If you want to calculate the "balance" of the address, you can scan the blockchain from the genesis block to the last block and save the address (contains inside the scriptPubKey) for calculating the balance with the simple sum.

if you use the bitcoin core you can get the information with the RPC commands, but you must manage "how to calculate the balance of the address" or you can use and parser for a scan the blk file (with the parser you can be faster in your analysis).

I want to add more information to the address of bitcoin.

The bitcoin wallet works with more addresses and more private keys, so in the more cases, the balance of the wallet is different from the balance of the address.


Bitcoin-Qt is shutting down my laptop I am running Bitcoin-Qt, and it is shutting down my laptop while trying to synchronize. I even tried on a different laptop with the same result of shutting itself down.

This situation happens while synchronizing, the CPU usage and the CPU temperature raises dramatically and the computer doesn't have any other option than shutting itself down before becoming permanently damaged. How can I fix this problem?

Here are some of the system details:

Samsung R730 laptop with

4 GB RAM
Intel Core i3 dual core processor
Arch Linux system

You can limit CPU (even per core) usage per process. Doing so would keep your CPU cycles low and wouldn't cause all that trouble to your computer.

The best way to do this is to set soft limits directly to your O/S, as described here.

A freeware that also works is: cpulimit, although I would strongly suggest you tune you real-time process management directly from your console, as described above.


How is the human end of the Bitcoin network secured? Being devil's advocate right now.

If you have a very strong cryptography, however, secure system's Point of Failure is always the human end. We spend hours trying to make Bitcoin secure at core level, but how secure is at the human level?

I expect big corporations and governments to secretly offer a huge sum of money to any of the developers of Core. I have nightmares about that.

How do we protect against bribery?

In an ideal world, we would want all programs to be auditable/verifiable(we can verify every execution path to be secure and correct). But that's far from reality, when you download a binary from a source(for example, Bitcoin Core), you have the following choices.

1) Trust the developers of the binary on their claim "binary works as intentded"

2) Verify the source yourself (It's open source for this reason) and build your software yourself.

All PR's to Bitcoin Core are visible to everyone, so everyone will be able to detect any harmful PR. An effective attack would involve bribing all people who actively watch the repository.

The best solution review the code yourself. If this attack really gives you nightmares, reviewing code yourself is the only way in which you don't have to trust anyone.

A more realistic solution is what happens today, you can rely upon hunderds of people who keep a watch on bitcoin repository to report if there are any backdoors in code.

EDIT: As pointed out by Peter Wuille, Bitcoin Core has a deterministic build process. You can repeat the build procedure for any release yourself, and verify that the resulting binary is identical to the release binary which you downloaded. This means that you don't necessarily have to trust just developers that the binary is created from publicly audited source code.


I found the answer. This 'unknown bytes' described in bip144


Does an SPV bloom filter get applied to full blockchain or just new transactions When an SPV client starts up with no state, connects to a full node and sets a bloom filter what messages will it receive?

Will it only get new transactions that match its filter or is there some way to also get the full node to supply all previous blocks that match the filter?

This question has the answer.

For the first question when an SPV client starts up and sets a bloom filter it will not receive any special messages from connected bitcoin nodes. The bloom filter will result in transaction broadcasts to the SPV being filtered.

In answer to the second question an SPV client must still request ALL block headers and send a getdata request for every block in order to determine whether it contains any relevant transactions. The purpose of the bloom filter is to restrict the number of transactions returned by the merkleblock response to the getdata request.

An SPV client that's relying on bitcoin peer nodes for transaction information will have a slow initial start up as it needs to request all the block headers.


Could bitcoins be used to filter spam? I would like filter spam in a way that people have to pay a very small amount of bitcoins to prioritize very good things or to kill very poor things, to make less casual environment and to encourage good filtering. Later best filterers could be rewarded with bitcoins. Is this possible or does this bloat the chain?

Using Bitcoins as a reward and micropayment system is possible. You wouldn't want to send a separate transaction for each micropayment (fee/transaction ratio would be quite big), but you can pay everyone down to a couple decimal places for each operation they make say, once a day.  Details of implementation would vary, depending on what you want to do exactly.


Are there any limitations to vanity addresses? I have noticed that many bitcoin addresses begin with numbers or uppercase characters. I realize that all addresses begin with the number one but can I generate an address with the second character being lowercase?  Is it significantly harder to generate an address with multiple lowercase letters at the beginning? Are there any other limitations in regards to generating vanity addresses?

Overall, you have to start with a "1" (unless you're doing alt-coins). Then the first letter is the only one that can be more tricky to generate (some letters from the end of the Base58 alphabet are harder). Also, generating an address with a lot of leading 1s is a lot harder than any other characters due to how addresses are constructed (leading 1s mean that you have a whole leading byte of 0x00 at the start of the address, or about 1 in 255 change in comparison to 1 in 58 chance for any other letter). After the leading 1s and the first letter, everything else is the same 1 in 58 chance of being any letter no matter what it is.

So all in all, you can generate any combination of letters and numbers in a Bitcoin address as long as it starts with "1", but some combinations are harder to generate. The same can't be said for other altcoins with a specific netbyte, since some starting patterns may be outside of their name space.


Transaction creation process is not non-interactive(Mimblewimble)? I have read Mimblewimble paper.

Certainly, Transaction merging process is non-interactive.
However, Transaction creation process seems to be not non-interactive.
To create transaction, a sender must interact a receiver because a sender shouldn't know all output's blinding factor(except change).
If a sender knows output's blinding factor, he can spend output.

Is my understanding of this correct?

It is possible to create MW transactions interactively, and if you're creating multisignature outputs I think this is actually necessary. But ordinary transactions can be created non-interactively (well, with half a round of interaction, as in Bitcoin where one party sends an address to another party who builds a transaction) in two ways:

Suppose the sender is trying to send 5BTC to the receiver.

The sender can create a transaction that doesn't balance unless a 5BTC output is added. Aside from this discrepancy the transaction is valid; she sends this to the recipient.
The recipient then adds a 5BTC output, adds another kernel to the transaction so that the blinding factors still add up, and the transaction is complete.
The sender acts as above, but sends the opening of the kernel. This is a bit dangerous because it gives the sender the ability to reverse the transaction long after the fact, but I'm unsure what sort of attack this would enable.

Note that both cases require a secure channel from the sender to the receiver because anyone who gets the incomplete transaction could add their own 5BTC output to it.

It's also possible to do this in reverse: the recipient sends the sender an incomplete transaction that needs a 5 BTC input to balance, and the same considerations apply.


Can exist bitcoin network with all nodes behind NAT? If I run bitcoin client for the first time its try to make TCP connection with saved list of IPs and port 8333 -other nodes. If this nodes are behind NAT with IP 192.168.0.XX and public IP from the NAT router with changed from NAT unknown port its appears that bitcoin network is down? Or bitcoin client will try to make UDP/TCP hole punching connection? If its mandatory for some miner to have public IP address?

Can exist bitcoin network with all nodes behind NAT?

Sure. Both the Bitcoin client and many SOHO routers support UPnP. Failing that, Bitcoin users could set up port forwarding.

  Or bitcoin client will try to make UDP/TCP hole punching connection?

No, it won't do that.

  If its mandatory for some miner to have public IP address?

Generally, mining pools will have a public IP address. There's no reason why you couldn't set up a mining pool server behind NAT and use port forwarding to make it public, but it would be a very strange way to set things up.


Can I mine Bitcoin from my Hosting server? I have dedicated server which I leased for 6 months (paid upfront for Good Deal) and I just sold my website after 4 months which doesn't include Hosting (just transferd domain name and website files)

Now, my Dedicated Server 2 x Quad Core Xeon L5630 Processor, (8 Core Total) free for next two months.

Can I do Bitcoin/Etherium mining, is it allowed and what tools can I use?
(though I Never mine Bitcoin before)

Since it is a dedicated server, I doubt that the company that you are leasing it from would care. But ultimately to answer that question, you need to take a look at the Terms & Conditions of the leasing company.

Assuming that you can and want to, there is no difference between a leased server and one sitting on your desk, the tools are all the same. (Ok that's simplifying it because obviously you need to connect to the leased server via VPN, etc., but the main point remains).

Since you are new to mining bitcoin, I would recommend getting it up and working on a PC that you have physical access to, even if it's not for serious mining, you would learn a lot about how it works. Once you have it working locally, then I would deal with getting it working on your leased server.

Have fun!


Where is blockchain located on Mac for Bitcoin-Qt? I attempted to use Bitcoin-Qt on my PC but it could not handle the Bitcoin blockchain. I therefore decided to give up and to delete the blockchain. Sadly, I cannot find where it is located.
I have looked up in ~/.bitcoin and ~/Library/Application Support/Bitcoin/ but to no avail. Where else could I find it?

Quoting https://en.bitcoin.it/wiki/Data_directory#Mac :

  Mac

  By default Bitcoin will put its data here:

    ~/Library/Application Support/Bitcoin/

You can access that folder by opening a new Finder window --> then by going to "Go" --> "Go to Folder..." (or pressing command + shift + G), and then pasting the above path into the window that appeared.


Post Pow hash verification I am unable to understand how a PoW(Proof of work ) activity takes extensive computation  but the corresponding hash message verification of the final result is quick and easy.
What process and flow takes place in the final hash verification ?
Any guidance .

The final hash verification is the same one done in mining. The difference it's that is done just once, while in mining it's done lots of times, until the miner finds a hash on the target difficult.

It's similar to checking a database of pictures of stores to tell if there's one that's a pizzeria. You look to hundreds, even thousands of random pictures, your eyes and brain working on what you see to tell what the picture is, until you find a pizzeria. Then you post it online and people see it and they say, 'yeah, it's a pizzeria'. They only had to look at a single picture to validate it.


Looking for whitepapers on pool-resistence mining I have seen several cryptocurrencies list the feature of decentralization of mining through ASIC-resistance and pool-resistance. However, I have not yet found any whitepapers which explain how the pool-resistance feature is implemented and what are the proofs that such feature actually accomplishes its stated purpose. I want to learn more about ASIC-resistance and pool-resistance by reading some indepth white papers.

ASIC resistance is a buzzword thrown around by scammers trying to sell you what is actually impossible as well as a bad thing. Pool resistance doesn't sound much better.

https://download.wpsoftware.net/bitcoin/asic-faq.pdf


A problem on difficulty equation When I read this book Master Bitcoin, I have a problem in understanding the "Difficulty" in Chapter 8.

There is a equation of difficulty:

New Difficulty = Old Difficulty * (Actual Time of Last 2016 Blocks / 20160 minutes)

I feel confused.
According to the formula, if Actual Time was longer than 20160 minutes, the New Difficulty would be bigger than Old Difficulty, and then Actual Time would be longer and longer.

It looks very strange. For me the equation should be:

New Difficulty = Old Difficulty * (20160 minutes / Actual Time of Last 2016 Blocks)

However, I found this fomula is consistent with that in bitcoin code.

unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)
{
    if (params.fPowNoRetargeting)
        return pindexLast->nBits;

    // Limit adjustment step
    int64_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
    if (nActualTimespan < params.nPowTargetTimespan/4)
        nActualTimespan = params.nPowTargetTimespan/4;
    if (nActualTimespan > params.nPowTargetTimespan*4)
        nActualTimespan = params.nPowTargetTimespan*4;

    // Retarget
    const arith_uint256 bnPowLimit = UintToArith256(params.powLimit);
    arith_uint256 bnNew;
    bnNew.SetCompact(pindexLast->nBits);
    bnNew *= nActualTimespan;
    bnNew /= params.nPowTargetTimespan;

    if (bnNew > bnPowLimit)
        bnNew = bnPowLimit;

    return bnNew.GetCompact();
}

Then I found this answer.
This is what I understand, but why it is different from the equation of the book and the code.

update

I think this was just an ambiguous expression.
The better expression should be:

New Difficulty Target = Old Difficulty Target * (Actual Time of Last 2016 Blocks / 20160 minutes)

The code you're citing does not actually deal with difficulty. It deals with targets. The target is the maximum 256-bit value than the block hash is allowed to have.

The difficulty is defined as 2^208 * 65535 / target.

As for the book, that looks wrong indeed.


What are test_bitcoin.exe and test_bitcoin-qt.exe? These two binaries appeared in Bitcoin Core a few versions ago, but I don't remember ever seeing an explanation of what they are and what you would use them for.

These executables are used to run Bitcoin's unit tests, so that developers can verify that various parts of the code work as designed.  They are not needed by end users.

From the file src/test/README.md:

  The sources in this directory are unit test cases.  Boost includes a
  unit testing framework, and since bitcoin already uses boost, it makes
  sense to simply use this framework rather than require developers to
  configure some other framework (we want as few impediments to creating
  unit tests as possible).

  The build system is setup to compile an executable called
  "test_bitcoin" that runs all of the unit tests.  The main source file
  is called test_bitcoin.cpp, which simply includes other files that
  contain the actual unit tests (outside of a couple required
  preprocessor directives).  The pattern is to create one test file for
  each class or source file for which you want to create unit tests.
  The file naming convention is "_tests.cpp" and such
  files should wrap their tests in a test suite called
  "_tests".  For an examples of this pattern, examine
  uint160_tests.cpp and uint256_tests.cpp.

  For further reading, I found the following website to be helpful in
  explaining how the boost unit test framework works:
  http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/.


Bitcoin exchange language coding I am looking at coding a Bitcoin trading exchange,  Would PHP be sufficient for an order matching engine?  The server would be load balanced with running MySQL.

Yes, I have built exchanges with PHP and MySQL. I would also recommend Redis for caching.


Why is Bisq suddenly acting up and refusing to let me withdraw my coins? Bisq: v1.2.7 (latest).
I've used it (with this same account) numerous times in the past without problems, in the exact same way.

Now, after I have completed a trade, and try to withdraw the coins to my "external" wallet (local Bitcoin Core on the same computer), it just goes:

  Warning

  The fees for that transaction exceed the available funds or the
  resulting output value is below the min. dust value:

  Missing 0.115 BTC

  [CLOSE]

I can't choose to ignore it, in spite of it being a "warning" and not an "error". It just lets me close the GUI box and nothing else. I have no idea what it's even talking about. That "missing" amount is the entire, exact amount I have in Bisq...

What is going on?!

I have no idea what it's even talking about.

When you make a transaction on the Bitcoin blockchain you normally need to include a mining fee to reward the miners for including your transaction into a block they mine which gets added to the blockchain.

When you construct your transaction, the software you are using (whatever Bisq provides) may select a fee automatically or may allow you to specify a fee. If your transaction is for the whole balance of your Bisq account, the mining fee must be deducted first.

For example, if you have 100 balance available and the appropriate mining fee is 1, you can only transfer 99 to your "external" wallet.

The message is a little imprecise, it might mean you tried to transfer 0.001 with a fee of 200 (clearly a terrible mistake). It might mean you tried to transfer 0.000000000001 with a fee of 99.999999999 where the first amount is smaller than the smallest amount economically possible in Bitcoin. See dust. It might mean you tried to transfer 100 with a fee of 1. It might mean your balance is a lot lower than you think it is.

(note: the amounts above are random illustrative placeholder amounts and are not realistic)

It is also possible, on some exchanges, for some or all of your balance to be tied up in trading orders that are not yet fulfilled.

If this happened to me, I would contact Bisq's customer support.


How can I transfer all funds to new keys? My wallet.dat (bitcoin-3.4) has maybe been left on a work machine, leaving it accessible to the admins there.

I would like to transfer all my current funds to a new wallet. How do I do this and how can I make sure that:

I still will be able to receive on the old keys (in case someone sends something there)
Not all my funds are transferred to the same key, making me more traceable.

Easiest way I can think of:

Use up all of the addresses in the keypool by requesting 100 new addresses. If you're comfortable in the command-line on Mac or Linux:

for i in {1..100}; do bitcoind getnewaddress; done

Then perform a bunch of sends-to-self using MORE freshly-generated addresses. Again, if you're comfortable on the command line and had (say) 10 bitcoins in your wallet you wanted to send in 10 different transactions over the course of an hour you might do:

for i in {1..10}; do bitcoind sendtoaddress $(bitcoind getnewaddress) 1; sleep 360; done

This wallet will still get coins sent to the old addresses, although if somebody at work DID have a copy they could also spend coins that came in to the old addresses.  There's not much you can do about that.


Is there any service/api for deriving HD wallet addresses from a master public key? I need this for a tool i'm writing that generates a transaction history report.   think:  accounting, auditing, etc.   The tool does not and should not have access to the private keys.

Ideally, the API would:

not require creating a wallet first.  I only need it to derive keys.
return only addresses that have been used (received funds), up to the gap defined in bip44.

Alternatively, are there any command-line tools that can do this?

I ended up writing my own command-line tool to perform wallet discovery and print out a report.

It supports single xpub derivation as well as multisig m-of-n wallets, specifically CoPay wallets.

It determines if each address has been used or not by querying blockchain.info or also toshi or insight servers (the latter two can be run locally.)

Anyone interested can check it out at:
https://github.com/dan-da/hd-wallet-addrs

I plan to add a web frontend soon.  Update: Web frontend is here.

Also, blockonomics is pretty good and very fast.  They don't seem to support CoPay/multisig yet though.


Installing Electrum on a cold wallet linux usb I don't usually use linux but I'm looking to start using it more, if I can just figure out how to do anything. . .

I'm using Ubuntu on a usb, I've downloaded Electrum (from the site since I couldn't download python-pip or electrum through the terminal). So in the terminal I'm in the Electrum folder and trying to install electrum, but the message Unable to locate package electrum. I think I need to enable the component called 'universe' but I've had no luck with the answers as depicted here

If you can offer any advice as to how or why I couldn't originally install pip, or why electrum won't work now I could really use the help. I need to make this wallet, and I've been trying for a very long stupid time trying to, and I have btc idly sitting by that need to go into a wallet. Sorry for such a basic question, but I'm running out of time with this.

For now you can use AppImage file from electrum.org website. Download AppImage to your Ubuntu USB, then:

$ chmod +x electrum-3.3.8-x86_64.AppImage
$ ./electrum-3.3.8-x86_64.AppImage


Bitcoin Transaction Speed If a transaction takes anywhere from around 10 minutes to hours to get written to a block and put on the chain, how is it possible to have things like bitcoin vending machines? In those cases, the transaction would have to be near instantaneous to make it practical.

Payment channels are a way to prevent double spending in such cases. As per the Wiki

  A Micropayment Channel or Payment Channel is class of techniques designed to allow users to make multiple Bitcoin transactions without commiting all of the transactions to the Bitcoin block chain.[1] In a typical payment channel, only two transactions are added to the block chain but an unlimited or nearly unlimted number of payments can be made between the participants.

A possible way for implementing vending machines would involve creating payment channels beforehand with the vending machine company.

Infact, for the vending machine case, an unidirectional channel would suffice. Refer to Wiki for details. Bi-directional payment channels using hashlocks are the key to Lightning network which is used to facilitate off-chain transactions at real-time.


Bitcoin payment sent and confirmed in blockchain but still not yet received by the account I made payments for this account number 1D3HZXK8So3n6LahCGWpkAxbQ3P6br1gSs worth 10$ for quick verification procedure of my account.  But its almost been 24hrs now, it still says payment has not yet received,  What should i do now so that i can proceed with my transaction also.  . .
Heres the Txid of my payment
3f624c15d2479ac6aa696b7357fcb650bf29d442f1a980a65488da3bd9501a48

Hope you can help me with this.  .  Thank you

You sent $10 to an exchange, instructing them to send BTC 0.0016 to an address.
If you look up your transaction 3f624c15d2479ac6aa696b7357fcb650bf29d442f1a980a65488da3bd9501a48 in any "blockchain explorer", for example here,  you'll see this transaction had 2 inputs and 20 outputs. I guess this was an exchange from whom you purchased $10 of BTC and asked them to send it to 1D3HZXK8So3n6LahCGWpkAxbQ3P6br1gSs, the exchange probably combined your transfer with other people's to save transaction costs.
One of those output addresses was the "account" you mentioned.  1D3HZXK8So3n6LahCGWpkAxbQ3P6br1gSs. It received ~$10 in this transaction. Note that this is a Bitcoin address not an account number.
But you don't own that address.
However the $10 of BTC sent to this address is now marked as spent. Three hours after your transaction, it was moved to address 19d1iU8XvYAdPVbCKHExD8hNqbC7T7NwW5 along with 22 other inputs.
The earliest transaction for your address was April this year. From what you write I suspect you did not have control over this address that long.
It could be that addresses 1D3HZXK8So3n6LahCGWpkAxbQ3P6br1gSs and 19d1iU8XvYAdPVbCKHExD8hNqbC7T7NwW5 are both owned by some business (not by you) who swept the $10 and other small amounts into a different address for privacy or other reasons.
Scam?
You mention "account" and "earnings" and seem confused. These are strong indications that you are the victim of a scam.
It is safer to hold Bitcoin in a standalone wallet, not in a hosted wallet run by a website. Many websites are fraudulent, especially any that promise high earnings (or any earnings at all). It is important to take care to investigate any website before sending money to one. Do you know the names of the people who own the business? Do you know when they first registered the domain name used by their website? Do you know where their business is based? Can you check any of this independently from them?
A scammer may show you a web page that makes it look like your $10 has grown to $20. They might encourage you to invest more. If you ask about withdrawing money they might tell you about a withdrawal minimum amount you didn't know about before, they might say you need to send a withdrawal fee or some other fees. They might try to trick you with watch-only wallets or other deceits.
Business relationship
The business running the website you opened an account with might be legitimate. We can't help you much with your relationship with them. A legitimate business will have a support telephone number or other way of contacting them and resolving your problem.
What to do
I suggest you forget about your $10, at least for the next few weeks. Spend some time learning how Bitcoin works, why it is high risk, why it is very hard to earn any money with Bitcoin investments in October 2018, how various scamsters operate, how to choose a wallet, how to backup a wallet and private-keys, how to test recovery from your backup actually works, how to make sure someone you love gets your Bitcoins if you are run over by a bus tomorrow (20-30% of all Bitcoins are lost forever).
No private-keys, no Bitcoin
This is a common saying. It means, you own no Bitcoins if you don't know your private key and don't know for absolute certain that no-one else knows your private-key (e.g. by having known your wallet's old password at any time in the past).


Bitfloor's "average price" for buys When you buy bitcoins with USD or other currency on Bitfloor, it quotes you an "average price" per bitcoin and says the "actual price may vary" once the order is completed.

The "average price" stated changes periodically, but it always lags the present actual market price on Bitfloor.

Question 1: when I hit the BUY button, what price do I get?  The "average price" or the current market price on Bitfloor?

Question 2: how does bitfloor calculate this "average price"?

The average price is calculated by taking into account the current market conditions (i.e. other buyers/sellers) against the amount you wish to buy/sell. Given that the market is always changing, your actual average price may vary. When you finally place a market order, the system will execute against the best available prices at the time.

If you would like to have more control over the pricing and order execution, use limit orders. These may not execute immediately (depending on how you price them and their size) but you will be able to control those factors.


Is there a way to prove ownership of a transaction? Is it possible to prove that you are the sender in a transaction?
Prove this to 3rd-parties, not only the receiver.

You cannot "own" a transaction. But you can own the private keys for one or more of the addresses from the inputs of the transaction.

A (regular) transaction must be signed with the private keys of the addresses of all the inputs. So if you own one of the addresses, the transaction could not have been verified without you, which may count as "ownership" if you want to call it that way.

Proving that you own an address can be done by signing a message using the private key of that address. Most wallets provide signing functionality. Just agree on a message, something like "I, [name with which the other party knows you], am the owner of address [address from the input]." After signing, you can send the message and the signature to the other party and he will be able to verify your ownership of the private key.


recover wallet in electrum from hex mpk I´m trying to recover a wallet from which the Master Private Key (mpk) in hex format and the number of used addresses is known.

Till now I could manage to convert the hex mpk to the wif format and import this to electrum. But here to history seems to be totally lost.

Is there any way to recover the full wallet and history (not neccessary with electrum)?

The problem is based on the generating method I used from the the Bitwasp library.

$key = PrivateKeyFactory::fromHex($hex, true);
$wif = $key->toWif();

Will return a WIF assuming the hex key was compressed. Restoring the history while importin in electrum failed.

$key = PrivateKeyFactory::fromHex($hex, false);
$wif = $key->toWif();

Will return a WIF from an uncompressed hex key an electrum was able to restore the history of the address.


If everyone decided to switch to Bitcoin tomorrow, how much would a Bitcoin be worth? Hypothetically, if everyone decided to trade in all their money and get Bitcoins for them tomorrow then how much would a single Bitcoin be worth?

My dodgy calculation makes it out to be $3,750,000 per BTC since there is apparently $60 trillion worth of fiat money and there are almost 16 million Bitcoins in circulation however I'm sure the calculation isn't that easy :p

What complicates your calculation is the liquidity aspect.
Although there is about 16 million mined bitcoins, the number of bitcoins available for trade is far less than that.

What is interesting to observe is that the fact there is a ~7bn market on bitcoin right now doesn't necessarily mean the sum of the money spent by the bitcoin holders is even near 7bn. Some people bought if for pennies, some for a couple dollars, some mined it. It just means that the holders of bitcoins are not willing to give them away for the price being offered by buyers right now.

The price is determined by supply and demand market forces, and the supply would respond to the increase in price. I maybe would sell one of mine if the price reached $100k per unit.

Other factor is that fiat money may be created out of thin air, so it has sort of an infinite supply. If an unrestricted government decides to purchase bitcoin, this would strongly push the price up.

In the end of the day, what you can try to grasp is what would be the minimum price it would reach, but estimating the actual price would depend on far too many variables.

Note that non-Bitcoin currencies have the same or extremely similar price mechanism. Dollars, specifically, can lose all their value if people stopped liking them. In a way, cryptocurrency is a huge threat to "free floating" currencies like the US Dollar.


How to secure a blockchain based on PoW against 51% attack? I couldn't find a satisfying answer to this 51% attack issue, so for a new blockchain with only 300 mined blocks, from my understanding the attacker has to rebuild all the blocks from scratch, is that true, if yes then what if the blockchain has 100k or 300k blocks? is there a way to prevent or penalize a miner if he mines too fast? does having honest miners would solve the issue? what about multiple Full nodesI need practical solutions

I couldn't find a satisfying answer to this 51% attack issue, so for a new blockchain with only 300 mined blocks

I am not sure about "blockchains" but below is the best answer I have read about 51% attacks related to Bitcoin by Greg Maxwell:
I think questions like this are ultimately the result of a fundamental lack of understanding about what Bitcoin is doing.
The problem Bitcoin is attempting to solve is getting everyone everywhere to agree on the same stable history of transactions.  This is necessary because in order to prevent users from printing money from nothing the system must have a rule that you can't spend a given coin more than once-- like I have a dollar then pay both alice and bob that dollar, creating a dollar out of nothing.
The intuitive way to prevent that excessive spending is to decide that first transaction that spends a coin is valid and any additional spends are invalid.   However,  in a truly decentralized system "first" is actually logically meaningless!   As an inescapable result of relativity the order which different parties will perceive events depends on their relative positions, no matter how good or fast your communication system is.
So any system that needs to prevent duplication has to have a way to artificially assign "firstness".  Centralized systems like ripple, eos, iota, blockstream liquid, etc. just have a single party (or a virtual single party) use its idea of whatever came first and everyone else just has to accept its decision.
A decentralized system like Bitcoin uses a public election.  But you can't just have a vote of 'people' in a decentralized system because that would require a centralized party to authorize people to vote.  Instead, Bitcoin uses a vote of computing power because it's possible to verify computing power without the help of any centralized third party.
If we didn't have the constraint that this system needed to work online, then you could imagine an alternative where consensus could be determined by people presenting large amounts of some rare element. ... but you can't prove you control osmium online, it appears that computing power is the only thing that can work for this purpose online.
When people talk about "51%" all they're really talking about is people rigging that election, so that they can override what everyone previously thought was the accepted order of transactions with a new order that changes some of their payments from one party to another.
With this understanding maybe you can see that the concern doesn't even depend on a single person having too much of the hash-power.  The attack would work just as well if there were 100 people each with an equal amount and a majority of them colluded to dishonestly override the result.
Also, any mechanism that would let you prevent one party (much less a secret collusion) from having too much authority would almost certainly let you just replace mining entirely. The only known way to do that is to introduce centralization and if you're willing to do that it's trivial, if you're not it appears impossible.  People have cooked up 1001 complicated schemes that claim to do it without introducing centralization, but careful analysis finds again and again that these fixes centralize the system but just hide the centralization.
I think people obsess far too much about "51%"-- it has some kind of attractive mystery to it that distracts people.  If you're worried that someone might reorder history using a high hash-power collusion-- just wait longer before you consider your transactions final.
A far bigger risk to Bitcoin is that the public using it won't understand, won't care, and won't protect the decentralization properties that make it valuable over centralized alternatives in the first place. ... a risk we can see playing out constantly in the billion dollar market caps of totally centralized systems.  The ability demonstrated by system with fake decentralization to arbitrarily change the rules out from under users is far more concerning than the risk that an expensive attack could allow some theft in the case of over-eagerly finalized transactions.
Source: https://www.reddit.com/r/Bitcoin/comments/ddddfl/question_on_the_vulnerability_of_bitcoin/f2g9e7b


Specific explanation of "timeout" configuration option in Bitcoin According to Running Bitcoin - Bitcoin Wiki, timeout is described as following:

Specify connection timeout in milliseconds

To my understanding it would mean that if a response was expected, if not received in the specific time-range the client would drop connection.

A follow question is, would a node with a 15 second timeout hurt the coin network with a fast block-time of e.g. 45 seconds?

The -timeout flag sets the amount of time to wait during an attempt to connect to a node. It defaults to 5000 ms. This is the connection to other peers on the network for syncing the blockchain, receiving and sending new transactions to the mempool, etc.

  A follow question is, would a node with a 15 second timeout hurt the
  coin network with a fast block-time of e.g. 45 seconds?

Faster blocktimes mean that the network has less time to 1 - propagate transactions and 2 - validate them before the next block. This is definitely something to take into account when thinking about block times. A slower node (both in terms of network latency for syncing and cpu power for validation) may not be able to confirm new blocks fast enough, but the bigger problem is if a majority of the nodes are slow compared to the block time.


Recovering Bitcoin / Litcoin wallet with partial PyWallet recovery My wallet disappeared over a year ago with 200+ LTC in it, possibly due to me running CCleaner for Mac over my machine (which looks for and deletes .dat files as part of its sweep as far as i can tell). I have made several attempts to locate my wallet including using Photorec and dumping the existing wallet.dat, but to no avail. I am going for one last chance attempt to recover it before giving up and moving on.

I am attempting to use pywallet to recover the wallet from my machine by issuing the following,

sudo ./pywallet.py --datadir=/Users/patrickquinn/Library/Application\ Support/Litecoin/ --recover --recov_size 121.3Gio --recov_device /dev/disk0 --recov_outputdir /Users/patrickquinn/Desktop/Looking --otherversion=48

which returned

Read 121.3 Go in 58.5 minutes

Found 0 possible wallets
Found 0 possible encrypted keys
Found 1640 possible unencrypted keys

and left two files, recovered_wallet_1388812907.dat and pywallet_partial_recovery_1388812907.dat in the specified 'Looking' directory.

Can these unencrypted keys be recovered or am I snookered?

The file recovered_wallet_NNN.dat should be a standard Litecoin wallet file containing those (possible) private keys that pywallet found.  Install litecoin-qt if you haven't already, back up your existing wallet.dat if any, and copy recovered_wallet_NNN.dat in its place.  Then run litecoin-qt -rescan (this may take a long time to start up as it rescans the entire block chain).

If the data found by pywallet included your old private keys, litecoin-qt will have access to them and will show you your balance.  You can then send your coins to a new address or whatever you like.

It's also entirely possible that the data found by pywallet looks like private keys but is actually something else.  They will still work as private keys (since a private key can be any 256-bit integer) but they will correspond to addresses that don't contain any coins.  In that case, litecoin-qt will show you a zero balance, and you are out of luck.

The file pywallet_partial_recovery_NNN.dat appears to be used by pywallet to save its progress in case you abort the recovery process.  Since in your case it finished correctly, you don't need this file for anything.


Is there a central repository of bitcoin conferences? I currently use CoinDesk to remain abreast on events and conferences. Any other websites I should utilize?

It depends on what exactly you are looking for. If you want to publish academic research, the most well known conferences are:

Conference on Computer and Communications Security (CCS)
USENIX Security (USENIX Security)
IEEE Symposium on Security and Privacy (S&P)
Financial Cryptography and Data Security (FC)
Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT)
Network and Distributed System Security Symposium (NDSS)

Note that if you are not academically interested, those might not be for you.


How does the price of 1 BTC compare to other commodities? I'm looking for a chart of Bitcoin's price and market cap to other commodities like silver, gold, etc.

Does such a chart exist?

Why is this useful? Because I want to see how the USD compares to similar non-Fiat, limited quantity resources.  This should show how Bitcoin is undervalued, or would give us insight into the trade volumes.

If it doesn't exist, I'll create it myself for the benefit of the community. Where can I get historic gold & silver pricing in USD?

http://pricedingold.com/charts/BTC-2010.pdf This is a comparision chart for btc vs. miligrams of gold i guess you could reverse it against history of silver or some other commodities. You can get the complete article here http://pricedingold.com/bitcoin/


Bitcoins lose their value over time.. or do they? If the total number of bitcoins is increasing all the time, then does that mean that the value of my bircoins are decreasing all the time?

Or am i just so used to thinking along the lines of the system of money creation used by the banks?

IF the value of bitcoins is solely dependent on the value that people are willing to place on them, then their value is only as valuable as the current perceived value?

Seems contradictory, or is it?

Wait a minute..  did i just ask a question, or answer one?

In total there will be only 21 milions of Bitcoins floating around the world. That means that the more people are interested in it, the higher value of 1 Bitcoin. Also it is worth mentioning that this will happen in more than a 100 years! Currently only 12 milions were produced and the growth will continue slowly for years. Interest in Bitcoin is much faster than it's production so no - it will not loose any value because it is more bitcoins. It will only loose value if people loose their faith and stop accepting it as a currency which is not the case at this moment :)


How do I unlock, decrypt, Bitcoin wallet? I'm new to Bitcoins and I downloaded the new beta version with the encrypted wallet.  I encrypted my wallet but I have no idea on how to decrypt it.  It is locked.  How can I unlock/decrypt my wallet?

Moreover, I added a few new addresses for payments but I would like to delete some of them.  It won't allow me to delete them, however.  How can I delete addresses I never used and no longer need?

Close Bitcoin
Find your wallet.dat
Rename to wallet.old
Start Bitcoin
Copy the address from the new empty wallet
Close Bitcoin
Rename (new) wallet.dat to wallet.new
Rename wallet.old to wallet.dat
Start Bitcoin
Send all your Bitcoins to the copied address from new wallet
Enter your password
Close Bitcoin
Rename wallet.dat to wallet.old
Rename wallet.new to wallet.dat
Start Bitcoin
Your new wallet should now be unencrypted and all old addresses gone.

This solves both your problems.


Error initializing block database. Do you want to rebuild the block database now? I'm trying to set up a test network consisting of 3 nodes, each with different bitcoin.conf. I've constructed the directory and the .conf-files similar to what is the state of the art in qa/pull-tester/.
Within the terminal inside the node-A-directory I commanded: ...

bitcoind -conf="/home/me/.bitcoin/regtest/testnetwork/A/bitcoin.conf"

...and got back this error:

'Error initializing block database. Do you want to rebuild the block database now?'

My bitcoin.conf has following content:

regtest=1
rpcuser=rt //adopted from .conf-files in qa/pull-tester/
rpcpassword=rt //adopted from .conf-files in qa/pull-tester/
port=11111 //arbitrary free port
rpcport=21111 //arbitrary free port

Could someone please help with my intended network setup or at least say what I'm doing wrong?

PS: I'm going to paste my logfile in a comment below.

As the question is already answered in the comments and there anothere question arouse about how to send API commands independently to the server from each node.

As Nick ODell gave a correct hint, in fact you need to prefix each API command like "getbalance" with "bitcoin-cli -conf="!

Thanks to Nick ODell!


Why does the threshold apply to the MUST_SIGNAL phase in revised BIP 8 (lot=true)? Why doesn't it enforce 100 percent signaling? BIP 8 states that:

During the MUST_SIGNAL phase, if (2016 - threshold) blocks in the
retarget period have already failed to signal, any further blocks that
fail to signal are invalid.

Why doesn't it enforce 100 percent signaling during the MUST_SIGNAL phase rather than merely the threshold?

nickler answered this on IRC.

In a mixed network, the rules can become active, but in two separate chains because lot=true nodes will reject blocks from the lot=false chain which doesn't require 100% signaling.

The MUST_SIGNAL phase (when lot=true) overlaps with the last two weeks (2016 blocks) of the STARTED phase (when lot=false). In the case that the threshold of miners signaling is met (but not 100 percent of miners signaling) during these two weeks you don't want to create a chain split between lot=true and lot=false nodes for no reason. If MUST_SIGNAL enforced 100 percent signaling and there wasn't 100 percent signaling during this period you would get a chain split between lot=true and lot=false nodes.


Setting up a miner with Eligius In the last few hours I am getting 100% connection rejections from Eligius. I am using a Mac and the Asteroid miner GUI. I also have MacMiner setup. both are not failing after about a month of successfully working.  But that is not the point of the question.

My question is trying to understand the pool URL, here is what Eligius provides:
Stratum Host: stratum.mining.eligius.st Port: 3334 | Getwork Host: getwork.mining.eligius.st Port: 8337 GBT Host: gbt.mining.eligius.st Port: 9337

I have been using "http://gbt.mining.eligius.st:9337"

Question 1: Why is the scheme missing, that is "http://", etc. It needs to be entered as part of the pool URL, what if any scheme should be entered?

Also is there some reason the scheme is not provided? Or it just a lazy web developer?

Question 2:
Please direct me to some information about the host types: Stratum, Getwork and GBT.

In the last few hours I am getting 100% connection rejections from
  Eligius. I am using a Mac and the Asteroid miner GUI. I also have
  MacMiner setup. both are not failing after about a month of
  successfully working. But that is not the point of the question.

Check your ISP, check luke's threads on btctalk and on eligius or their IRC chan #Eligius on freenode. They can give you the best help with support. A stackexchange unfortunately is not a support page for a website.

  My question is trying to understand the pool URL, here is what Eligius
  provides: Stratum Host: stratum.mining.eligius.st Port: 3334 | Getwork
  Host: getwork.mining.eligius.st Port: 8337 GBT Host:
  gbt.mining.eligius.st Port: 9337

  I have been using "http://gbt.mining.eligius.st:9337"

Thanks for some detailed info.

  Question 1: Why is the scheme missing, that is "http://", etc. It
  needs to be entered as part of the pool URL, what if any scheme should
  be entered?

stratum+tcp://stratum.mining.eligius.st:3334

I believe i explained the rest of the question below.

  Also is there some reason the scheme is not provided? Or it just a
  lazy web developer?

It's assumed that in bitcoin mining you have an idea of what a stratum's protocol is and the requirements/settings for it. Plus some newer miner programs auto detect stratum/gbt then fall back to getwork if there is not a template available. I wouldn't call it a lazy web developer. Just one who is more technical and not the best with making n00b friendly how to's.

  Question 2: Please direct me to some information about the host types:
  Stratum, Getwork and GBT.
  Let me give a light explanation of each along with some links

Getwork was the original bitcoin mining protocol. It is still around, but not used very much except by some pools for legacy support (mostly asicminer blades/cubes). Getwork uses the standard rpc connect commands to get new work. Since a third party miner does not have the block chain, it has to ask for a new piece of work to hash.
https://en.bitcoin.it/wiki/Getwork

Stratum mining is an overlay protocol that allows thin clients as well as a method of sending templates via the stratum protocol.
https://en.bitcoin.it/wiki/Stratum

GBT (getblocktemplate)
This is simply allowing you to get the entire template of a block. A template is the entire list of transactions needed to hash out the block. This is usually updated every minute. This allows ASIC miners not to have issues with as many rejected shares and stale shares (like they would with GetWork)
https://en.bitcoin.it/wiki/Getblocktemplate

Source: Me. (I'm an alt-chain pool op and a longtime bitcoiner)

As always
Any errors/questions/comments feel free to let me know in a positive manner.


How can transaction fees be explained in a simple way? I am reading the book Mastering Bitcoins 2nd Edition by O'Reilly, and it says:

Alice buys a coffee from Bob's Cafe for $1.50, or 0.015 Bitcoin

So Alice pays 0.015 Bitcoin, and Bob gets 0.015 Bitcoin, but there is a transaction fee, paid to the miner.
There are some questions:

Does Alice pay more or does Bob get less?  (the fee has to come from somebody)
The way to calculate the fee seems to be a whole essay. Typically, what kind of percentage can the fee be, if it is a $1.5 coffee, or if somebody sends another person US$1 million dollar worth of Bitcoin, or if it is exchanging Bitcoin for US$1 million? But one person mentioned that it is voluntary (even the link above said the spender "may" include a fee, suggesting they can choose not to), but who would want to pay a fee if they don't have to? I can understand if they send over US$1 million and the fee is $13, then they probably don't mind and "want" to include a fee.
The miner gets the fee -- is that the miner who originally did the mining of the coin, or is it that somehow, the fee (or transaction) gets encrypted and a new miner has to mine it.  It is described as: all the miners compete to find the next new Bitcoin, but there is also Proof of Work (to get a fraction of Bitcoin), but there is no mentioning of the miner getting a transaction fee. How does it factor into the flow or procedure?

Does Alice pay more or does Bob get less? (the fee has to come from somebody)

Alice pays more.
It works like this: Alice submits a transaction with inputs adding up to, for example, 0.016 BTC. This transaction  includes outputs totaling 0.015 BTC to Bob. The difference, in this example 0.001 BTC, would be the transaction fee in this case.

The way to calculate the fee

The fee of Bitcoin transactions is calculated on the size of the transaction, not the value being transacted. For each byte of your transaction, you are bidding a certain number of satoshi, known as the "fee rate" -- so for example, if you chose a 100 sat/byte fee rate, and your transaction is 600 bytes, then your transaction fee would be 600*100=60000 sat (0.0006 BTC).
You are bidding for space in a block. Because only a certain amount of transactions can go into each block, most miners will select the transactions with the highest satoshi per byte fee rate, because it is more profitable for them to collect these fees.
Technically you could choose a 0 sat/byte fee rate, making your transaction free of fees, but nowadays miners will probably not include your transaction in a block because they'd be losing money (and nodes will probably not propagate it), so your transaction will never confirm. However, it's still a valid transaction, and indeed, earlier in Bitcoin's history when transaction volume was much lower and block space wasn't so competitive, most transactions included 0 fees.

I can understand if they send over US$1 million and the fee is $13, then they probably don't mind and "want" to include a fee.

The price of the transaction is completely irrelevant to the fees. Since it's by the size of your transaction... if your $10 USD transaction is very complicated and results in a large transaction, you may end up paying a hilariously large fee to have it confirmed. By contrast, if your $1M transaction is very simple and the transaction is very small, then the fees for that transaction will be low, despite it being a high value transaction.

The miner gets the fee -- is that the miner who originally did the mining of the coin, or is it that somehow, the fee (or transaction) gets encrypted and a new miner has to mine it. It is described as: all the miners compete to find the next new Bitcoin, but there is also Proof of Work (to get a fraction of Bitcoin), but there is no mentioning of the miner getting a transaction fee. How does it factor into the flow or procedure?

The miner who mines the block that first includes your transaction gets your transaction fee. Let's say your transaction was included in block #123. The miner who mined block #123 receives your transaction fee.


How does bitcoind choose its data directory? Sorry, noob question I am new to anything linux related. I managed to set up bitcoin core just fine on my raspberry pi 4 and I have an external HDD that I want to use as my data directory for the 250 GB or so of blocks (this is not my main storage that I boot from).

Problem is, I have absolutely no idea how the bitcoind program decides on its data directory. I have run 3 or 4 times and I have 3 or 4 different data directories, none of which are on the HDD. How do I tell it where to store the data? Also, where do I put the bitcoin.conf file because it can never seem to find it. I have most of the blockchain pre-installed on my HDD from my windows pc and so I would ideally use that same directory but if thats not possible thats fine, I at least want it on my HDD though. I have followed several guides and nothing has worked for me so far. I appreciate your time for any respones!

Unless explicitly told otherwise, the datadir is always placed in /home/$USER/.bitcoin, there is no logic for automatically using any location other than this. The configuration file is always in the data directory as bitcoin.conf.


Is the news story about the missing hard drive containing £4 million GBP of Bitcoins technically feasable? I'll admit to being a complete newbie to Bitcoins.

The whole thing has up until now passed me by, until my interest was peaked by this news story about a gentleman in the UK who supposedly threw away a hard drive containing £4 million GBP of Bitcoins, and is now apparently searching through his local landfill.

I'm a little skeptical to say the least, and have a few questions:

Is this technically feasable? I have seen comments about the place suggesting that one individual wouldn't have had access to the computing power needed to mine this many bitcoins in 2009
Is there any way to verify this guys story? Surely there is a record somewhere of which bitcoins are registered to who
Doesn't Bitcoin have a 'Forgot my password' feature or something similar? Surely something like this exists, or there is some administrative body who could be contacted in this scenario.

Thanks

Yes - it's feasible.

Bitcoins are released at a constant rate determined by the protocol. At the time, 50 Bitcoins were being generated for every block(this is now 25); and blocks are supposed to be found every 10 minutes. Miners compete amongst each other for this prize.

In 2009, you could mine using your computer's CPU and you were only competing with very few other people. There weren't large mining pools and dedicated hardware, so it was easy for anyone to run the client and mine hundreds or thousands of Bitcoins. It was so easy that you wouldn't think that losing your wallet was a big deal.

Maybe, but it'd be a lot of work.

All transactions - including mined Bitcoins - are recorded in a publicly accessible global ledger. Many people download the entire transaction history on their own computer, and there are tools for working with it. It might be possible with some detective work to try to track down what address they were likely stored in using the clues given, but it's not easy.

Nope - if you lose your wallet those Bitcoins are lost forever.

That's terrible for the person who owned them, but it doesn't impair the rest of the Bitcoin economy. It makes the value of the remaining Bitcoins go up to compensate.

There are already exchanges that will hold your wallet for you if you're worried about things like this. They're more secure than holding them on your personal computer, and in the future it's possible some of them might offer insurance or other guarantees in case they lose your money.

It's a design feature that there's no administrative body who can restore your Bitcoins. You would have to trust this administrative organization not to abuse their power. The developers of the original Bitcoin client have no more power than anyone else using Bitcoin.


Why do people apparently "look up Bitcoin addresses on websites"? I often hear things such as:

Remember, if you look up an address on Blockchain.info or something, they will have a record of your IP address being interested in that address and thus associate it with you.

Sure. I follow that logic. But what I don't understand is why they would do that in the first place. Why use some "website" when the whole point is that Bitcoin is decentralized and you have your own wallet/client/node that you can look at?
And what is their "objective" with inspecting some address that they have just used? Why not look in Bitcoin Core (or whatever they use) to simply see if it's in memory pool or has confirmations or whatever it is they are trying to look up?

@Prince M's answer is great, I have just a couple things to add:
Wallet software will generally only show you transactions relevant to the wallet, so if you ever want to explore transactions beyond your own, you might want to use a block explorer to do so.
If you are running a full node, then you can look up transactions using bitcoin-cli, but a full node does not index the blockchain according to addresses, and so the intuitive way to explore transactions that most block explorer services provide does not really exist when using software like bitcoin-core. Likewise 'address balances' are not explicitly retrievable from a full node, though there do exist some open-source self-hosted blockchain explorers that you can run on top of a node, that will compute and display such things for you. But in any case, simply running a full node does not lay open the blockchain for you in a human-digestible format, getting to that point requires additional work and software.
On another note, some wallets don't have very informative user interfaces. For example, I've seen wallets which do not display the fee-rate your transaction includes, and so if you're waiting for confirmation, just looking at your wallet will not provide any information about where in the mempool your transaction resides. Looking up the transaction using a block explorer may be helpful to the user in this case.
Of course, this can be tragic, as using such an online block explorer service can be detrimental to your privacy. For this reason, I would recommend using a block explorer that offers a .onion domain, so that you can view it over the tor network, to help preserve your privacy.


Script to periodically update assumevalid block in bitcoin core configuration, good idea? On my server my full node Bitcoin Core 0.15.1 can take several minutes, on starting, to "validate blocks".  And during that time it's thrashing the disk, slowing down everything else.

So I discovered the assumevalid command line/configuration parameter which takes a block hash and tells Core to "assume valid" that block and all ancestors.  Apparently it's updated when Bitcoin Core releases - and as a result it can be weeks or even months old.

So I created a little script to RPC to my full node and do GetBlockCount to get the current height, then I subtract 400 and use GetBlockHash to get the hash for a block about 3 days back.  Then I rewrite bitcoin.conf with that value as the parameter of assumevalid.

So sure enough Bitcoin Core seems to start faster after doing that.

Is it a good idea?  Or more specifically, what could go wrong?

So sure enough Bitcoin Core seems to start faster after doing that.
Is it a good idea? Or more specifically, what could go wrong?

It must be the placebo effect that you are experiencing because assumevalid has no effect on this when the default values for the consistency checks are used (changed with parameters -checklevel and -checkblocks)
There isn't anything that could go wrong, but it also isn't actually doing anything. There are two reasons for this: the default depth to check for is 6 blocks and the default check level is 3 which means that the part that uses assumevalid is not even run.
Now if you increased the check depth to be more than 400 blocks and the check level to be 4, then yes, you should see a difference. But with the default parameters, it won't make a different.
Setting assumevalid is really only useful for the initial sync and for when you are catching up from being a few weeks behind. But that all happens once the software has fully started, not during the initialization phase which you are asking about.


Can I set up cgminer to mine in different pools, by a defined ratio? I'm mining in different pools, one is main and I would like to dedicate 80% off the time spent mining on it, but I'm also mining in another and would like to dedicate 20% on that. I know you can set up the config as following:

"pools" : [
    {
        "url" : "http://pool1",
        "user" : "user1",
        "pass" : "123"
    },
    {
        "url" : "http://pool2",
        "user" : "user2",
        "pass" : "123"
    }
]

But is there a way you could define a 80/20 // 70/30 mining setup between the pools so that it mines the first pool for 19 hours, then the second pool for 5 hours (or days)

You can run cgminer --help to see the options or you can just research them online. A good example is this website: https://github.com/pshep/cgminer

I've never done it but I think you can add a rotate option:
--rotate <arg>      Change multipool strategy from failover to regularly rotate at N minutes (default: 0)

80% / 20% would be roughly 19 hours / 5 hours or 1140 minutes / 300 minutes

Now, with the --rotate <arg> you will rotate the pools regularly, so it's easy to set it to 50/50on two pools, 33/33/33 on three pools etc.

I think you could achieve an 80/20 split by using a scheduled start and stop times.

--sched-start <arg> Set a time of day in HH:MM to start mining (a once off without a stop time)
--sched-stop <arg>  Set a time of day in HH:MM to stop mining (will quit without a start time)

Say, you start mining at 00:01, you set the rotate setting to 19 hours (1140 minutes), at 7 PM the pools will switch, set a stop time for 23:59 and 2 minutes later the miner should start mining using the first pool again. The only problem could be if after the miner stops, it could start mining still on the second pool, in which case you should start at midnigh, only use the --rotate 1140 and always restart cgminer at midnight manually or maybe using a shell script (or bat if on Windows).


How to create a transaction input from tx id of UTXO? I'm in the midst of working this github --> https://github.com/karask/python-bitcoin-utils/blob/master/examples/spend_p2sh_transaction.py
Sorry as I'm not that good in this. I would like to ask the following:

Where can I create this "transaction input from tx id of UTXO"?  This is for Bitcoin UTXO.

I mean is it using bitcoin node? vscode? python in Gitpods? I just want to know where I can run this and able to provide me the TXID along with the Transaction value in it. Like for example snapshot below:

Care to guide me? Please.. Thank you in advance.

TxInput is a class used in this example to define the input used for creating a transaction.
You can download and install Atom Editor.
Install script package to run python code in atom.
Download and Install Python.
Install bitcoin-utils library: $ pip install bitcoin-utils


Where are my bitcoins - unconfirmed transactions Using Bitcoin Core wallet, I sent coins to an address of mine outside of the wallet. All three transactions sit as unconfirmed though show in blockchain.

https://blockchain.info/address/1HYK6Key5EUwAyaxh6SniXKEjSMsPAgY94

they are the bottom three transactions. Not sure why they are showing as "spent" - I did send about 0.65btc to this wallet after which I then spent.

So in short - the bottom three transactions are showing as unconfirmed on BitcoinCore, the btc is not in the account they were sent to. Where are they?

Further info - the bottom 2 of the 3 transactions were sent almost a week ago though didn't show up in blockchain until I reinstalled the wallet app. However, BTW is still nowhere to be found. Fees - bottom two were sent minimum, top of the 3 was sent as recommended and all are showing as "0/unconfirmed" in the wallet app

The transaction d3f86df12c12801ca97244a773287226fd1e833e7151b1ab3a90bff930351e50 has a zero fee, so I doubt it will be confirmed anytime soon. Do you know how to double spend it and specify a higher fee?

The other two transactions also have a very low transaction fee but that would still be OK. The problem is that they are spending from the zero fee transaction. Therefore they cannot become confirmed before the parent with zero fee is confirmed.

You say that you sent those transaction a week ago, but Blockchain shows that it received them yesterday. Maybe they were dropped from the mempool after some days last week and now your wallet did just rebroadcast them. What wallet do you use?


How to recover Bitcoin sent to example address on Bitcoin.org info page Please,

I am very new and accidentally loaded funds into a sample wallet on the Bitcoin.org information site instead of my personal wallet.

This happened October 11, 2018.

Would you please help me.

Candace

Your coins are gone.  Sorry.

As KappaDev found, the transaction was confirmed, so it cannot be reversed.  The only way those coins can possibly be accessed now is by whoever generated that address, if they still have the private key.  It could have been someone working on the web page at bitcoin.org, or it could have been someone from coinspace who provided the image.  (I wasn't able to find any image on bitcoin.org with that address in it.)

However, you can see here that several other people sent coins to that address, as far back as 2016.  None of them have ever been spent.  So it's likely that whoever generated the address no longer has the private key, or never saved it in the first place, or at any rate has no intention of using it.  And even if they did, you would have no way to force them to give the coins back to you.


Is it possible to create bitcoind regtest network on Ubuntu (which itself is on Virtualbox)? I am getting into Bitcoin development and it seems that bitcoin regtest mode is perfect for testing our applications.

I am trying to create a network, following Fred Tingey's answer but, unfortunately, it's not working.

I need suggestions, what information can I provide?
I am trying to use docker, but I have to first create 64-bit Ubuntu machine.
Thanks

It appears that Fred Tingey's answer was mostly correct, but contained incorrect port numbers in the samples he provided. If someone were to copy and paste it all it would not have worked correctly.

I've modified his answer, it is awaiting peer review.

The use of Ubuntu, Docker and VirtualBox shouldn't affect your ability to configure regtest.

You may have problems connecting from the host to the guest, if you do I suggest perhaps asking questions on superuser or ubuntu exchanges instead.

Hope that helps!

=== Here's the edited version:

In order to run multiple nodes in regtest mode on a single machine you will need to sandbox each node.

In this example I have three nodes, they are named Alice, Bob and Cory. Since Bitcoin is a Peer/Mesh network, my goal is to connect each nodes so that changes made to Cory are ultimately visible to Bob (without necessarily requiring a direct connection between the two.)

Step 1: Create folders for each node.

These folders will contain our data and configs for each node. The names are not important, they can be renamed later, so you can name them "Alice", "Bob" and "Cory" for now. Remember where you create them, you will need their paths for Step 3 below.

Step 2: In each folder, create a bitcoin.conf file

In the config files Alice will be configured to connect to Cory, and Bob will be configured to connect to Alice. In addition to configuring outbound connections, this is also where we specify regtest=1 and server=1 settings.

bitcoin.conf for Alice

regtest=1
server=1
 # Alice connects to Cory
connect=localhost:18333

bitcoin.con for Bob

regtest=1
server=1
 # Bob connects to Alice
connect=localhost:18444

bitcoin.conf for Cory

regtest=1
server=1
 # Cory connects to nobody

Step 3: Start each node.

Note each node must have a different port number since only one node can bind to a port number at any time.

Alice on port 18444
Bob on port 18555
Cory on port 18333

You can choose your own port numbers of course, just be careful not to use a port number that is already in use by something else.

The command-line options will tell bitcoin what port number to use, where to store data, and where to find its config file:

Cory:

"C:\Program Files\Bitcoin\bitcoin-qt.exe" -conf="C:\Cory\bitcoin.conf" -datadir="C:\Cory" -port=18333 -rpcport=8333

Bob:

"C:\Program Files\Bitcoin\bitcoin-qt.exe" -conf="C:\Bob\bitcoin.conf" -datadir="C:\Bob" -port=18555 -rpcport=8555

Alice:

"C:\Program Files\Bitcoin\bitcoin-qt.exe" -conf="C:\Alice\bitcoin.conf" -datadir="C:\Alice" -port=18444 -rpcport=8444

This will launch three instances of the Bitcoin Client, and the folders for each node will begin to initialize with regtest data.

Step 4: Testing

You can use the Help->Debug Window->Console option to interactively execute commands on any of the nodes. For example, you can mine 101 blocks with the following bitcoin console command:

setgenerate true 101

You should (after a few seconds) then have been awarded coins.

These mining activities result in coinbase transactions - and only the last one of 50 BTC is available to spend. Now you can send some BTC to one of the other nodes.  After a bit more mining such a transaction will be confirmed.

You can also use the console commands getpeerinfo and getinfo to check the network is set up correctly.  One of them (Core wit port=18333) should have 'sync=true' in its peerinfo output, and all nodes should have the same "block height" regardless of which node is used for mining.


Which miners support generating their own midstate? Currently I was testing RPCMiner on my Mac running a custom pool, and it appears to crash because I can't generate a proper midstate value. Which miners support generating their own midstate (as per an extension of the protocol)?

You can see which miners support what features here:

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

"midstate" is the feature you are looking for in this case.


Is a 51% attack really expensive? In order to perform a 51% attack someone has to concentrate huge amounts of computing power. Obviously this would be very expensive. But in return the attacker obtains the block reward and mining fees for every block mined during the attack window. Supposed mining is profitable, shouldn't this revenue compensate for the expenses?

They only get that profit as long as they operate their 51% fairly by the rules. Which is still kind of okay for bitcoin. As soon as they start playing tricks, they risk losing more and more blocks as orphaned. For example to double spend they need to precalculate a block but keep it secret. For the time that it's secret they run the risk that someone else will find another block instead.
Remember to get 51% of tomorrows network, the new player would have to more than double todays network speed (and keep up with the growth). So that means buying 102% of the current network speed.
Doing that halves the profits for everyone, including themselves. So even if mining is profitable for people now, the crooks will have to factor in a halving of the profits as well.


Is there a way to reindex from disk but not start from blk0000.dat? While my Bitcoin-Qt was synchronizing, I ran into the following error:

It first loaded full blocks from blk00000.dat to blk00217.dat file (with file size about 131 MB per file). Then Bitcoin-Qt indexed everything from rev00000.dat to rev00214 (with file size about 17 MB per file), but skipped rev00215 and rev00216, and just created rev00217.

Now Bitcoin-Qt is stuck synchronizing with network but doesn't load more block. The block number is constant.

I ran Bitcoin-Qt for 9 more days. I want to keep all index data completed (to blk00214) and continue reindex from right before where the error occurred (blk00215), rather than restarting from the beginning. Is there a way to reindex from a certain point?

Please help!

Unfortunately, I don't believe the -reindex option has the ability to be that smart.

If I were you, I would:

Shutdown Bitcoin-Qt
Start Bitcoin-QT with the -reindex flag

Reindexing doesn't take very long usually (maybe a few hours). 9 days is a long time to wait, it would probably be better to just start with a clean reindex. This won't delete the blkxxxxx.dat files, so you won't have to download all that data again at least.


What is replace-by-fee? https://bitcointalk.org/index.php?topic=199947.0

Can anyone explain what replace-by-fee means?

This thread explains it.

It's a method that allows replacing an already transmitted transaction by transmitting another transaction with a higher fee. This only works on transactions before they are signed by miners (0-confirmations).