I just lost 1.36275883 ($313), and I don't know how it happened or how to prevent it again I just opened my multi bit wallet, and the  1.36275883 that was in there is now gone. It loaded a brand new wallet, so I don't even have my old wallet with the old transactions or password. I know what my old address was. I checked it on blockchain.info, and sure enough, there is the transaction that emptied it out.

So I can kind of make peace with losing over $300. I'm mad about it. But what I really need to know is, what happened and how do I prevent it from happening again. Can someone help with this issue?

The two most likely scenarios are that you either had malware on your computer/phone that stole your private keys and was able to spend them on your behalf, Or you used easily guessable brain wallet seed. Brain wallets use easy to remember list of words or a phrase. The problem is that if it is not done correctly, then anybody can guess random phrases and check to see if they generate a bitcoin address that has any unspent amount. There are many individuals out on the net that are attempting to brute force brain wallets.

Depending on how much cost/hassle you are willing to put up with, there are many different ways to secure your Bitcoins. You can have an offline pc that you use to hold your coins in cold storage. Only keep daily spend amounts on your hot wallet (the coins on your phone or computer that you are going to use in daily transactions and can afford to lose). You can buy a dedicated device that handles all the security of your coins. These are called hardware wallets. A popular one is called Trezor. With a hardware wallet you are able to store your Bitcoins in a safe offline device. And when you need to spend them, you hook it up to your computer and use it to verify how much you want to spend and to were. The device keeps you secure even if your machine is infected with malware since it never lets the private keys leave the hardware wallet (you steal those you can spend your coins).

A low cost way to have cold storage is creating a paper wallet. A paper wallet is a print out of your private keys, commonly they also include a qr code version of your keys so you can quickly import it into a phone or computer wallet without having to type out the long keys. Just make sure you keep the paper in a safe place and you treat it like cash


Transaction input bigger than output Yesterday I made a transaction from my one btc address to another by using pybitcointools library for blockchain api. I made a mistake by making input value 10x times higher than output value.
So I have a quesiton: Is that input minus output value treated as fee now, or can I restore it back in some way ?

Here is link transaction history ( only 1 transaction ) where you can see what's going on : https://blockchain.info/address/1Fno6XBjLbEq53oTG6MWw1X1vA2hbyaLPh?format=json

and here is transaction's blockchain link:
https://blockchain.info/tx/d80feae624c18067044e1bca0917bdb0c42f81ff1e7b9b2febacfced1ed7f691

Yes, the difference between the input and the output is the transaction fee, and there's no way for you to get it back once it has been mined (except for building a fork that results in a stronger chain---not likely unless you have >50% of network hash rate).

In the future, I highly recommend experimenting on testnet (bitcoind -testnet) or using regtest mode.  That way you don't lose any wealth when you make a mistake.


How to know e-Wallet with xpub How can I know what's e-wallet name provide the wallet?

When I know xpub and xprv and mnemonic

When I get mnemonic (12 words) and get xpub I can get balance with blockchain API

But how can I know what wallet company provides this wallet?

How can I know what's e-wallet name provide the wallet (...) When I know xpub and xprv and mnemonic?

You cannot. A mnemonic seed phrase, xpub, and xprv does not explicitly contain information about which wallet software was used to create that wallet. Generally this is not any issue to the user though, as this information alone should be enough** to recover the wallet, using any software which follows similar standards.

** you may also need information about the derivation path used, and the address type, in case the original wallet did not follow one of the more well-used standards


Why do compiled binaries still require libdb, BerkeleyDB, and others? I compiled Bitcoin Core on one Raspberry Pi from source after installing all the necessary dependencies including all the libboost's and BerkeleyDB. That application runs fine, and bitcoind lives happily in /usr/local/bin

So I tried copying bitcoind and the other Bitcoin executables from that directory to a brand new Raspberry Pi running a brand new clean operating system, and the applications wouldn't run. I got errors until I installed libboost and BerkeleyDB and all the other dependencies on that second computer as well.

I thought the compiling process made a stand-alone executable program? Why did the compiled binary still require these shared libraries?

Like, executables are available to download from bitcoin.org that are truly stand-alone. How can I compile from source an executable as stand-alone as these?

The standard compile process does not static "include" dependencies in the executable file. It refers to the installed libdb, boost, etc.

This (dynamic linkes libraries) is an efficient concept. Otherwise each executable that uses – as example – boost would require to include the whole boost dependency in the binary.

The "official" Bitcoin-Core binaries offered through bitcoin.org are static compiled executables (they include everything). This is required to gain linux/distribution independence as well as to fully build the binaries deterministic (security/integrity).

You can build a static linked bitcoind yourself by following the "depends" build process:
https://github.com/bitcoin/bitcoin/tree/master/depends


Wallet design: What to do with dust amounts in change? I'm working on some quirks of a wallet I'm developing, and one of the issues is what to do with change amounts that are larger than dust ~600 satoshis, but less than a practical amount to be sent again with a fee. Should I return the near-dust amount as change, or just tack it on as additional mining fees?

For example, let's say a user spends an amount that after paying to an output and a sufficient fee leaves only 1,000 satoshis as change. Should I send those 1,000 satoshis as change even though 1,000 satoshis is too small to be spent again with a sufficient fee?

Even with fees as low as 10 satoshis per byte with one input and output (P2PKH) you'd need at least 2,000 satoshis for fees.

I'm thinking it might be better to just put the leftover towards additional mining fees if change amount is below a certain threshold, say 3,000 satoshis. An address with just 1,000 satoshis is mostly useless, and would just add to the growing UTXO set that would likely never be spent. Does this approach seem appropriate, or am I "robbing" users of their dust?

I've done some research on a related topic* and I'd say it depends on your assumptions what will happen with the value of Bitcoin, the fee rate, and the cost of creating transactions in the long run.

Under the assumption that the fee rate (in [sat/B]) will remain roughly the same level or increase, it saves the user money to add the change to the fee when the change is smaller than the cost of creating one output and spending one input:

change ≤ (bytesOutput + bytesInput) × feePerByte ⇒ add to fee

For P2PKH at 150 satoshis per byte this is for example

change ≤ 27,300 satoshis = (34 bytes + 148 bytes) × 150 satoshis per byte

You may also want to consider that adding the change to transaction fees causes transactions to confirm more quickly, take less blockspace, and reduce the UTXO set.

However, smaller amounts may become spendable in the future, if fee rates would drastically drop, or the cost of spending inputs would significantly decrease. The former could happen due to blocksize increases or introduction of a second layer payment system, while the latter could be brought about by new transaction formats, signature aggregation, or a lowering of the minRelayTxFee.

Alternatively, you can either try to directly match the amount you're trying to spend or just select a sufficiently large amount to create a useful change output. Thank you, Pieter, for the reminder.

* my Master thesis on Coin Selection [PDF with 943KB]


Difference between wallet,accounts and addresses I know this question has been asked several times, But it never made any sense reading each of them. Can Anyone really explain deeply by using technical language so that I could really understand pros and cons and everything ? Thank you.

Wallets
A wallet is an application that manages your keys and can create transactions. There are many open source and closed source wallet applications for different platforms (Desktop, Mobile, custom Hardware Wallets). Bitcoin-core has an implementation that runs on a full node. See Bitcoin Wiki - Wallet.

Accounts
An account can have different meanings depending on the wallet application you are using, but in bitcoin core it is a way to give a readable name to an address and keep track of your balance. In bitcoin core, an account can include multiple receiving addresses. See Bitcoin Wiki - Accounts explained. Note: See @Pieter Wuille's comment below that this will be deprecated from bitcoin-core.

Addresses
An address can be a form of your public key (or a script), to which people can send bitcoin, and which can only be spent by the corresponding private key (or by satisfying the script). There are many forms your address can take, because it can be derived from any valid script. A simple P2PKH (Pay to public key hash) address is the RIPEMD160(SHA256(public key)) encoded using Base58 checksum. A P2SH is a hash of a script. Basically, in order to spend coins sent to any address, one must satisfy the script that address represents, which usually includes providing the script (P2SH) that the address was hashed from, and any required signatures. See Bitcoin Wiki - Address


How do block explorers determine propagation through nodes/P2P protocol? On several Bitcoin blockchain explorers, I have seen unconfirmed transactions given a dedicated "propagation" value that tells a user how much of the Bitcoin network has become aware of this transaction.

For example, BlockCypher provides a "confidence" value for unconfirmed transactions:

This has always lead me to wonder how exactly they can calculate this? Do they personally have a large distributed network of nodes that are constantly kept track of? Surely this would be cost ineffective and less decentralized.

Their documentation states:

  By monitoring transaction propagation, the number of nodes that have received it, and how quickly they received it, we can calculate its probability to be the “winning” transaction at any given point in time, if a double-spend was attempted.

I have had quite a difficult time finding documentation on what exactly nodes can request from each-other directly. Can a node simply ask its peers if the transaction exists in their mempool with a getData request?

They don't, essentially, the numbers given for this sort of thing are generally meaningless.

Many of these services attempt to connect to a large portion of the listening network and gain insight into the chance of a transaction confirming, however this is not a measure of safety for transactions. A transaction having been announced by many nodes does not mean that it will not be double spent by a miner, as has happened many times in the past. For BlockCypher in particular, the confidence number does not use a Bitcoin Core node for validation, so will show very high confidence for transactions which are invalid, but have a seemingly high fee.

In the case linked with betcoin dice and ghash.io, they would have shown absolute confidence of confirmation, however the mining pool was simply including alternate transactions that did not spend to the service every time their bet was a negative. For a betting site with a 1% house edge, they only need to be able to do this more than 1% of the time for the attack to be financially profitable for them. This happened for a period of months with nobody noticing, no users stopping using the pool, or any other punitive measure. "Transaction confidence" or other tools only work in a non-adversarial environment, which Bitcoin is not.

  Can a node simply ask its peers if the transaction exists in their mempool with a getData request?

You can to some degree ask a node that you are connected to if it has a transaction in its mempool. Nodes implement logic called transaction trickling which intentionally batches and delays relay of transactions in an attempt to prevent privacy adverse behavior such as this. Note that most nodes in the network do not have listening sockets open, so you can not make outbound connections to them. Merchants and miners in particular will not have incoming connections to prevent against trivial denial of service attacks against them.


Is it possible to create a wallet service, which doesn't have all the blockchain downloaded? Is it possible to create a wallet service, which doesn't have all the blockchain downloaded? Like not running a full node itself?

Without any security trade-off vs. running validating nodes, there is no way to create a wallet-service without downloading and validating the blockchain.

If SPV node security trade-offs are acceptable, you may consider running the wallet service with these.

SPV nodes do not fully-validate the blockchain, and only download the longest header-chain. However, since they only validate POW in the header-chain, and do not index all transactions (only those related to the wallet service addresses), they need to obtain a proof that a tx of interest is confirmed via. another full-node peer. This proof can be delivered a merkle-proof, which represents a specific branch of the merlke-tree beginning with the txid of interest, of which the root is committed to each block header.

The security trade-off for SPV nodes is two-fold:

Privacy: Since the wallet service is interested in tx's pertaining to specific addresses, some information about addresses will necessarily leak to the queried full-nodes.
Potential for omission: Peers can always remain silent about specific confirmed transactions without the SPV client being able to prove this, potentially requiring cross-comparison heuristic across validating peers.
A SPV client does not validate any consensus rules, thereby not knowing whether the chain/branch it is following correctly validates according to the validation rule set the user supports.


Where is the best information about the contents of bitcoind 0.8.2? There seem to be a few interesting changes in this version, possibly affecting the protocol itself (de facto).

Where can I find the most relevant, concise yet detailed information about this version?

The 0.8.2 makes no changes to the protocol, to make that sure.

The official information on the change that everyone is talking about is this pull request on GitHub.

You can find some people trying to make conclusions about the effects of the change on BitcoinTalk and Reddit. Keep in mind that they are not official representatives of the developer team and that they often proclaim incorrect information.

The only correct statement is the one in the pull request. Probably there will be some release notes as well as soon as the update gets pushed.


From Exchange To Wallet I have some crypto on 2 exchanges and I cant work out if it will cost me any type of fee to transfer into a wallet. Specifically Coinbase to Coinbase Wallet and Binance to Trust Wallet.
Regards,
Marc

Withdrawals fees are individual per specific exchange and in many cases they don't relate to the current bitcoin feerate.
So you'd have to check your Coinbase and Binance exchange account, in the withdrawal section to see how much fees are they taking for withdrawal.


How can I get the Fee involved in a Bitcoin transaction using RPC client (bitcoin-cli)? I performed a bitcoin payment in the testnet, here is what I get when I execute bitcoin-cli gettransaction "11b8d5f89793e83e9e10b7ee51fa1b3445f6029f7d7efe4c82b3b261ec513a0e", as you can see the info doesn't include the fee charged in the transaction:

{
    "amount" : 0.20000000,
    "confirmations" : 2148,
    "blockhash" : "0000000086bd0907763b02e8bcd45b18d9320441b7ffe7c019e9c95795c35cd9",
    "blockindex" : 3,
    "blocktime" : 1439865905,
    "txid" : "11b8d5f89793e83e9e10b7ee51fa1b3445f6029f7d7efe4c82b3b261ec513a0e",
    "walletconflicts" : [
    ],
    "time" : 1439865606,
    "timereceived" : 1439865606,
    "details" : [
        {
            "account" : "",
            "address" : "mn2dMSfAX7s77ZD5jY3k8kjcuwtPLgu1Yi",
            "category" : "receive",
            "amount" : 0.20000000,
            "vout" : 1
        }
    ],
    "hex" : "..................."
}

But on blocktrail.com I can see the Fee for this same transaction:

Bitcoin transaction fees are implied by sum(vin) - sum(vout). The daemon doesn't display fee information on transactions you did not create because the value of the inputs isn't retained after they have been spent.

Block explorers show information that takes an additional set of indexes, it's not fair to compare the information shown by one and that returned by a very light weight full node. If you need more information like this on a regular basis you can use a middle layer like Bitpays Insight which will maintain a comprehensive index of this sort of information for you externally.


Are there any blockchain parsers which calculate virtual sizes of transactions? "The getrawtransaction RPC gets a hex-encoded serialized transaction or a JSON object describing the transaction."

https://chainquery.com/bitcoin-api/getrawtransaction

The output includes the vsize (virtual size) of the transaction. Are there any blockchain parsers show the vsize?

It is unclear, why someone has down voted, without leaving a comment...

When I look at the original bitcoin specs, I can see:" Added in Bitcoin Core 0.13.0 - The virtual transaction size. Differs from size for witness transactions". I tried to run through the page "https://bitcoin.org/en/release/v0.13.0", but there was no mentioning of virtual size. So it seems to be hidden in one of the many SegWit additions. On https://bitcoincore.org/en/segwit_wallet_dev/ I finally found this:

Transaction Fee Estimation

- Instead of transaction size, a new metric is defined, called “virtual size” (vsize)
- vsize of a transaction equals to 3 times of the size with original serialization, plus the size with new serialization, divide the result by 4 and round up to the next integer. For example, if a transaction is 200 bytes with new serialization, and becomes 99 bytes with marker, flag, and witness removed, the vsize is (99 * 3 + 200) / 4 = 125 with round up.
- vsize of a non-segwit transaction is simply its size
- Transaction fee should be estimated by comparing the vsize with other transactions, not the size.
- Developers should be careful not to make an off-by-4-times mistake in fee estimation.

Then I looked into

blockchain.info
block explorer.com
live.blockcypher.com
www.blockcypher.com
www.blocktrail.com

just to find out, they don't provide this value...


is it possible to deposit bitcoin into an address without making the address public? I thought one safe way to keep a bitcoin "cold" and safe is to not show its address ever to the public.
However, let's say if I create an address, so that means I create a pair of public and private key, and then the public key can go through some steps to become an "address".
Now, if I deposit 0.001 bitcoins from Coinbase or Coinbase Pro into my mobile wallet (or any wallet), isn't it true that the Ledger (the blockchain) has to have a record of
 Transfer of bitcoin from Address 123c6...e6.  to   987a1...39   Quantity: 0.001

So somehow, that new address has to be "public" because it is in the blockchain and anybody can see it?  So how would it be possible to have an address and be able to deposit some bitcoin into it without showing the address to the public?

I thought one safe way to keep a bitcoin "cold" and safe is to not show its address ever to the public.

Cold storage = Private keys offline

So somehow, that new address has to be "public" because it is in the blockchain and anybody can see it? So how would it be possible to have an address and be able to deposit some bitcoin into it without showing the address to the public?

Yes blockchain will have all transactions and UTXOs. It is possible to avoid being associated with the addresses on blockchain. So even if I see an address with 0.1 BTC unspent and some transaction, I don't know who owns it and who was involved in the transaction.


What happens when a Trezor is lost? Trezor is one of the leading implementation of a hardware wallet. Its first generation won't support multisig ... because the Bitcoin network itself doesn't have strong multisig support.

What happens if a Trezor is lost or stolen? Where are the private keys it guards backed up? Is a password required to release funds stored on it?

If I remember correctly, the Trezor uses deterministic wallets, as specified in BIP 0032.  That means that the device will give you a sentence that the wallet can be regenerated from, in case it's lost.


Is there a central repository that states a country's latest policy on bitcoin? The legal status of bitcoin changes from country to country, to include a wide range of policies from acceptance to outright banning it.

The best I found so far is Wikipedia. It is actually quite up to date.

https://en.wikipedia.org/wiki/Legality_of_bitcoin_by_country


Which Bitcoin exchanges allow anyone to fund your account by a bank transfer? I know MtGox doesn't allow for such transfers to prevent money laundering. Which exchanges allow for anyone to fund your account with a bank transfer (USD preferable).

In the U.S. there is the ACH bank network.

Coinbase is currently the only service allowing bitcoin purchases to be paid for with a transfer from a bank using the ACH network directly.

Mt. Gox and Camp BX use Dwolla which is an intermediary which allows funds to be drawn from a bank account through the ACH network.

I'm unaware of any exchanges whose policy is that it will accept a domestic or international bank wire without that coming from your own account.


What is the "confirmation" field in a block? What is the importance of the "confirmation" field in a block?

How many confirmations are required to accept a block in a blockchain?

Blocks in Bitcoin, as they exist in the blockchain, don't actually contain a confirmation field. When you query for a block in bitcoin-rpc or similar, additional information is added to the block based on your client's knowledge of the current state of the blockchain.

A pure block contains only five fields (some of which have sub-fields):

Magic number (to identify that the following info is a block)
Blocksize (how many bytes to read until the end of the block)
Block header (important for block ordering/verification)

Version (the "rules" that this block adheres to)
Previous Block Hash (a fingerprint of the block this block builds on)
Transaction Merkle Root (a fingerprint of all of the block transactions)
Timestamp (UNIX epoch)
"nBits" or a compact expression of the block's PoW target
Nonce (a number the block miner used to find a valid PoW solution)

Transaction count (number of transactions in block)
Transaction list

Back to your question, the "block confirmation" count of a block is simply how many other blocks build on top of that block. Take for example the following three-block-long blockchain:

The blue block (which starts the blockchain, so it's also called the genesis block) has three confirmations (it confirms itself, plus the two blocks that build on it further reinforce it as legitimate). The green block has two confirmations (it confirms itself, plus the one block that builds on it further reinforces it as legitimate). The orange block only confirms itself, giving it one confirmation.

If another block were added to the blockchain:

All of the blocks from the previous image (blue, green, orange) would receive one additional confirmation, since they've been further "buried" in the blockchain.

As soon as a block exists (so it confirms itself automatically, giving it one confirmation) it can be included into the blockchain. In the event of a network fork, however, this isn't always the case. The number of confirmations of a block indicates how difficult that block would be to overwrite.

In the length-4 blockchain shown immediately above, attempting to overwrite the red block would only require introducing a block which competes with red as a child of orange:

Note that introducing the black block into the blockchain wouldn't necessarily overwrite the red block. If miners choose to mine on top of the black block instead of the red block, making the blockchain [blue-green-orange-black-...] the "longest" (really "heaviest," see bottom of post) chain, then the black block will replace the red block. If miners instead choose to mine on top of the red block, making the blockchain [blue-green-orange-red-...] the longest chain, then the red block won't be replaced. To ensure (assuming network miners don't explicitly favor the red block for some reason, and mine on top of it even when it isn't the latest block in the blockchain) that the red block gets forked, an attacker would need to introduce two blocks which fork off of orange:

To fork the green block off of the network, however, an attacker would need to introduce at least three blocks which build an alternative blockchain off of the blue block:

And for a much higher chance of a successful attack, would need to introduce four blocks which build an alternative blockchain off of the blue block:

Note that this attack would have (possibly-intended) side-effect of also removing the orange and red blocks from the blockchain.

Earlier, I used the term "longer" when referring to competing blockchain forks. While in reality the chain with the longest length measured in blocks is almost always the best blockchain, it isn't necessarily. Rather than count the number of blocks on the blockchain, bitcoin nodes choose the blockchain which is the "heaviest" or has the highest cumulative difficulty. Bitcoin mining involves "brute-forcing" a solution to a problem by repeatedly performing double-SHA256 calculations on a potential block header (described briefly above) searching for a resultant hash with certain properties (which can be incorrectly but essentially summarized as "a lot of leading zeroes"). A higher difficulty means that, on average, miners will have to perform more work for each valid PoW solution. The "best" or "heaviest" chain is the chain which has the highest total difficulty (which is calculated by adding up the difficulty of each block).

To summarize, a block can be accepted to the blockchain as soon as it exists, and it has one confirmation by simply existing. However, blocks of arbitrary depth can be removed from the blockchain by a blockchain fork.


Scenario: disaster splits the Internet into dozens unconnected fragments Major US cities restore connectivity locally for a couple of days, but the internet islands are separated (or have very poor interconnectivity).  Two days later, connectivity is restored resulting in, say 50 separate blockchains full of transactions.  NYC leads the pack with 5% of all transactions and is the dominant chain.  How do we reconcile 95% of the transactions (from 49 chains, less than 5% each) ?  Would anyone in their right mind use bitcoin in times of trouble?

Most merchants accepting Bitcoin transactions require six confirmations, so if there is no connectivity then, of course, there would not be any confirmations.

So while continuous connectivity isn't required to use bitcoin in commerce, at least sporadic connectivity is.

For merchants who accept on 0/unconfirmed (e.g., retail), the rely on protection from the network to know of a race attack.  Without connectivity, that protection is gone and the merchant is vulnerable.  If the customer can be trusted, then a transaction on 0/unconfirmed can be accepted even without continuous connectivity.

For when extended outages occur, there wouldn't be multiple blockchains as there's no chance some isolated node (or region of connected nodes) would have the hashing capacity to make it to even one or two confirmations nonetheless six confirmations.  So there's no isolated forking issues to be concerned about.

Futher discussion on the suitability of bitcoin on an "disconnected island" occurs here:

http://bitcointalk.org/index.php?topic=106302.0


After being scammed, has anyone ever actually managed to recover their BTC? Like real world cash problems, we know that scams happen in the Bitcoin community at least as often if not more often for a variety of reasons (oversight, regulation, standards of security, street savvy, etc., or lack thereof).

Given little more than a receiving address and perhaps an email address (likely a one-time junk account) or stated location (may not be true), is there a recorded instance where someone who was scammed was able to recover their loss directly from the scammer?

This could be with police assistance or through communication among online services or people through taint analysis or chain tracking.

There have been many instances of coins being sent to the wrong address and then clues from the blockchain used to discover the recipient and thus recover the funds.  Goat's 400 BTC loss and subsequent recovery is the largest of these that I'm aware of.

There have been hints from the blockchain that have allegedly associated sockpuppet accounts to a repeat offending scammer.


Is there a way to give `bitcoin-cli` a different default conf directory instead of specifying it each time? I have changed the configuration directory for bitcoind.
However when I make a bitcion-cli request:
bitcoin-cli getblockcount

I get an error about RPC credentials using ~/.bitcoin/bitcoin/conf
So for me to actually run the command with the correct config and authnetication cookie I have to specify the configuration directory explicitly every time. Is there a way to make it implicit?
bitcoin-cli -conf=/media/btc/bitcoin/bitcoin.conf getblockcount
581510

In this case I would create an alias?
$ alias BCLI="bitcoin-cli -conf=/media/btc/bitcoin/bitcoin.conf"
$ BCLI getblockcount

On Windows you may use doskey.


Reg: Watch only Address I have been given " Watch only Address" by one of my friends.

To make the funds credited into my account or to use the BTC, what is way to get the private key?

Do we need to pay anything to blockchain.info for releasing? Is the from my friend who is hiding the private key?

I have been given " Watch only Address" by one of my friend

This is a scam often used by online con-men posing as your friend.

A watch only address lets you watch a bitcoin wallet owned by someone else. They can move their bitcoins away at any time. You cannot spend their bitcoins.

  Do we need to pay anything for the blockchain.info for releasing

No. If your "friend" claims to have earlier set up an online wallet for you and that the online service now need paying to release the private-key - your "friend" is lying to you in order to cheat you out of your money.

The Blockchain.info website has a link "Get a Free wallet". If your "friend" used that, they got a private-key for free. Note that this wallet belongs to them, not to you. That applies even if it appears to contain money that you gave to your "friend" or which they claimed to earned on your behalf by mining or trading.

blockchain.info's terms of services paragraph 10.2 says

  When you create a Wallet, the Services generate and store a cryptographic private and public key pair that you may use to send and receive any supported Virtual Currency

So there is no cost to obtaining the private key when you create a free wallet.

See these similar questions from other victims of scams:

How can I get a private key for this address
Unlocking a Private Key from watch status
Recovering the private key from a blockchain wallet address


Understanding signing messages with bitcoinjs-lib I'm trying to understand what a specific line of code does when signing a message using bitcoinjs-lib. Here's the code:

var bitcoin = require('bitcoinjs-lib')
var bitcoinMessage = require('bitcoinjs-message')

var keyPair = bitcoin.ECPair.makeRandom();
//private key
var privateKey = keyPair.toWIF();
// Address
var address = keyPair.getAddress();

console.log(privateKey);
console.log(address);

privateKey = keyPair.d.toBuffer(32)
var message = 'your message'
var messagePrefix = bitcoin.networks.bitcoin.messagePrefix

var signature = bitcoinMessage.sign(message, messagePrefix, privateKey, keyPair.compressed)
console.log(signature.toString('base64'))

The line I'm curious about is this one:

privateKey = keyPair.d.toBuffer(32)

What exactly is this code doing and why is it necessary?

Thanks,

Connor

That particular line of code asserts that the private key fits into a 32 byte-sized byte array properly with the necessary zero paddings. As the private key is simply some random Big Integer between 0 ~ 2^(256-1), javascript may encode that integer into different byte array sizes. For example, if the d value was simply 1, then it could easily fit into a 1 byte-sized byte array and you would not have the leading/trailing zeroes required depending on the endianess of your encoding of choice.


Using CLTV can I freeze some funds from a wallet, and make them available, in a single transaction? For my scenarios, I want freeze some funds from my wallet for some given time/block and then make that amount spendable in a single transaction.

As I understand so far, I can do it using 2 transactions with CheckLockTimeVerify (CLTV) op_code as follows:

Create a transaction with an output that has the CLTV op_code to freeze some funds from the input(s).
Then create another transaction which uses the above output as the input. The output of this transaction will transfer the funds back to my wallet. The nLockTime of this transaction will be set to the expire time of the previous transaction.

But is there a way to do the same as above in a single transaction? As in create a transaction whose output has CLTV op_code but is a pubkeyhash back to my wallet. This way the frozen coins become spendable without having to create another transaction?

When you lock coins in CLTV you still have to provide an address in the output. In that field, you can just include the address that your wallet controls. When you spend those coins, all you need to do is include the nlocktime which is higher than that specified when locking using the CLTV opcode. You need not do a second stage transaction to send the bitcoins to an address controlled by your wallet.


How to recover private key from 12-word passphrase? I'm wondering if there's anyone out there who knows how to retrieve your private key using your 12-word passphrase? Your advice is much appreciated

There is no one private key associated with the 12 word mnemonic that you posses. Consider the seed phrase to be like a keychain, that holds multiple keys. You would need to import the 12 word mnemonic you possess into a wallet software in order to generate the private keys. The wallet software will then scan the Bitcoin blockchain in order to see the funds that those keys control. A use of a hardware wallet is most recommended in order to ensure the privacy of these keys.

Care should however, to use the same derivation path for the keys that was used when you generated the addresses to receive the funds. This can be looked up based on what wallet software you used while generating the 12 word mnemonic. There are multiple derivation paths that wallets use. Some use BIP 44 while others use BIP 49 or even BIP 84.


How is the Bitcoin node network different from the IOTA network? I asked this question on IOTA's forum here:

Real incentives for running a full node?

One of the founders from IOTA Come-From-Beyond (Sergey Ivancheglo) responded with this comment:

  "However, given that IOTA collects no fees and does not reward node
  operators, what actual plausible incentives exist for running one?" --
  How are Bitcoin node operator rewarded? Answer my question and you'll
  probably get the answer to your own question.

I'm curious how someone knowledgeable about Bitcoin would respond to this question and comparison? Can this question about IOTA's network incentives and viability be answered by asking the same question about Bitcoin?

What are your thoughts about this?

As a bitcoin user, it is beneficial to run a full node because that allows you to independently validate the current state of the network yourself, without having to trust the actions or information of a third party. The user receives no monetary reward, but the ability to trustlessly interact with the bitcoin network is a very important feature, that is very core to any decentralized cryptocurrency network.

As an Iota user, you cannot attain the same level of trustless interaction. As I understand it, Iota employs a ‘coordinator node’ that basically has admin rights to the network, so you must trust that the coordinator will not act maliciously, or be otherwise compromised. You can run a node to check transactions yourself, but if the coordinator decides to freeze your coins, having a node will not help you.

So I wouldn’t agree with the comparison, or at least I would argue it is not a good line of reasoning. The level of trustless interaction that is enabled by running a bitcoin node is simply not possible to achieve in Iota due to the existence of the centralized coordinator position.


mining Blockchain Blocks What if a miner starts to generate a new block hash based on trans data,latest block hash , timestamp and nonce  , then in the middle of the work a new block has been added by another miner.
in this case will the block be invalid as it hold a previous hash value which is not the latest block ?

in this case will the block be invalid as it hold a previous hash value which is not the latest block?

Yes. The miner will construct a new block template, that builds off the newest valid block, and continue to mine on the new template.

If they continued to mine on the old block, they would likely end up wasting resources, as the rest of the network will have begun following the new, longer (more work) chain.


Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network? TWO questions on Neutrino::

1)  Could Neutrino technically as side-effect, incentivize centralization of the bitcoin network?  Or other formulation: ...hinder higher degree of decentralization?

Why I am asking:  This article by Dorier pointed me to this thoughts. https://medium.com/@nicolasdorier/neutrino-is-dangerous-for-my-self-sovereignty-18fac5bcdc25

He basically says neutrino users are still not FULL NODES. Therefore doesnt make sense to switch from SPVs or webwallets to neutrino enabled wallets....

Could the technical knowledgable members here maybe do an explanation, why Dorier might come up with this thesis,  what technical arguments are speaking for it?  Or do you think its a baseless thesis?

2)  He basically says, why do we need neutrino, its essentially the same as SPV... Why is there technical advantages with Neutrino, what are its differentiators to SPV?

Thank you

Dorier is correct that Neutrino/SPV nodes are not full nodes, because they do not verify the entirety of the blockchain, leaving potential room for attack. However, the portrayal that Neutrino is no better than other SPV modes is not correct.

Neutrino is a form of SPV which improves greatly over other implementations in regards to privacy. All SPV modes inherently leak some hints about transactions you wish to receive because the information must be queried. Neutrino improves over previous SPV modes by limiting precision of information leaked to the blocks which contain the transactions they are concerned with. A full node does not leak any information because all blocks are archived and no querying needs to occur.

The trouble with SPV nodes is that they only verify that transactions have occurred using some SPV proofs, but they do not guarantee that you are on the correct, most proof-of-work chain. Any single deviation of the full validation rules could fork off onto a separate chain, where the full nodes would reject the chain which SPV users might follow.

To give a concrete example, the maximum block size is part of the validation rules. A full node will never accept a block which is over the allowed size. An SPV node may accept any sized block as truthful, because it doesn't know the block size and cannot measure it - it only receives the block header and it must trust the servers delivering the block header information to have properly validated the information.

The only way to counter this is to perform all of validation rules expected by a full node, which includes the block size, and therefore, requires you to receive all of the transactions in a block to measure its size.

Another validation not performed by current SPV modes is the rules regarding the coinbase transaction, which mints new coins. Deviation from this rule could lead to inflation of the supply of coins on the chain followed by an SPV node, who would be none the wiser.

The above do not mean that SPV nodes are inherently bad or must necessarily be avoided - but highlights that there is an attack surface which SPV nodes are vulnerable to, but which full nodes are immune to by design.

The concern that Dorier and others have, is that if it becomes commonplace to ditch running full nodes because of the expectation that a Neutrino node is good enough, then full nodes might begin dropping off the network and leaving fewer and fewer entities responsible for the validation of the full set of rules. If an overwhelming majority of nodes simply follow the rules of a few validators, then protection of the economic majority against inflation and block size expansion would be weakened compared to a network where a majority of people validate all of the rules.


bitcoin core wallet transactions syncing I'll explain the steps I want to figure out.
I have an empty bitcoin core wallet.

I backup the wallet and go offline.

Someone sends bitcoin to this wallet and I can see it in balance.

I restore my bitcoin core wallet to the initial point.

What will happen then?
I assume that I'll start over with the blockchain from scratch and what will happen is that initially the balance will be 0 (since my node is not yet aware of the transaction). So I'll need to synchronize up to the block where the transaction was included (this will take some time). At that time the balance will be updated.  After that the synchronization will continue until its up-to-date with the head.

Step 1. I backup the wallet and go offline.
Step 2. Someone send me a bitcoin to this wallet and i can see it(in balance).

When you're off the internet the wallet software will not know the transaction occurred until it is synced with other nodes on the network (P2P protocol). However, as long as the sender is online, the transaction will still be pushed into the mempool and eventually exist on the network (once included in a block) and you will be able to spend the output (so long that the transaction has been created properly).

Step 3 .Ill restore my bitcoin core wallet to the initial point..

If you've backed up your wallet file, you are essentially saving your private keys which is the only piece allowing you to spend TX outputs. If you reset your node or import your wallet into a computer that is not yet fully synced, the balance will remain 0 up until the block containing your transaction.

I assume that ill start over with the blockchain from scratch, And what will happen is that initially the balance will be 0 (since my node is not yet aware of the transaction). So ill need to synchronize up to the block where the transaction was included (this will take some time). At that time the balance will be updated. After that the synchronization will continue until it's up-to-date with the head.

Yep this is correct.


What is the most cost-effective way to distribute a Bitcoin into 1000 different addresses? If I have a wallet/address with 1BTC in it, how can I distribute it to 1000 different addresses (1k new addresses with 0.001BTC in each), paying the least amount of transaction fees?  Sending 1000 near-zero-fee transactions and hope that they all get through in an "acceptable" time is an option I guess, but are there any other options?

The best/cheaper way to split a single address into multiple is using batching transactions:

Batching explained in StackOverflow

This blog post from David Harding shows what are the saving possibilities when using batching to send your transfers and how it works:

Batching savings

Samourai Wallet supports batching if you don't want to use api's.


Bitcoin core does not have all unconfirmed transactions I am running bitcoinqt and checking for new transaction for payments I made using getrawmempool. Payments were made NOT from/to the mentioned bitcoinqt wallet address.

As I see some my unconfirmed transactions never come to getrawmempool.

Is it expected result or I am doing something wrong?

In general, mempools are not guaranteed to be the same node-to-node. The behavior of the reference client is that once mempools reach 300MB, the lowest fee tx's are thrown away.

It's possible your node has reached this limit (either because it's 300MB or because your default is much lower) or simply because you're connected to nodes that have the same limitation.


Do サトシ (Satoshi) or ナカモト (Nakamoto) mean anything in Japanese? Do サトシ (Satoshi) and ナカモト (Nakamoto) have any special meaning in Japanese?

For example, the last name "Smith" or "Miller" refers to a blacksmith or grain miller, respectively.

Without knowing the intended kanji, it's unclear exactly what meaning "Satoshi" and "Nakamoto" have, because there are sometimes many homophones in Japanese (including homophonous names). The Japanese Wikipedia article on Satoshi Nakamoto does not give kanji (and also treats it, typographically, as a Western name), suggesting that the exact intended meaning is unknown. But, we can make educated guesses.

For "Satoshi", there are over a dozen possibilities listed on a Japanese name site, but many of them relate to virtue, wisdom, intelligence, and other intellectual traits.

For "Nakamoto", it's much easier to provide a solid guess. 中本 is a common family name, roughly meaning "middle-origin". 仲本 might also be plausible, with this "naka" meaning "relation, relationship". And, even if "moto" were written as 元, this still roughly means "origin".


Bitcoin New Block Event Trigger I want to know when a new block is discovered, I am watching debug.log to see if it has changed, I know there is a new block if the line contains "UpdateTip: new best". Is there a better way to do this?

bitcoind offers a zmq hook which you can use to receive notifications on new blocks and transactions.


Loading private key (missing bitcoin) I exported the private key from a 0.7.2 because I could not how to upgrade the wallet.  I then imported it into 0.18.0 I was expecting to see a  balance and the transactions and nothing was found.  I also searched the blockchain through blockchain.com using the public address from the original wallet and again found nothing.  Would greatly appreciate advice

If you have bitcoins in any address, they should be there unless someone else got access to your wallet and stole them, in which case you should see in a block explorer the corresponding transaction.


If Lightning Network takes transactions off Blockchain, would that defeat the whole purpose of having a Blockchain ledger? Currently Bitcoin transactions can take around 45 minutes. If everyone in the world uses Bitcoin, computers would have to consume 1000 of terabytes per Hour.
The solution is the Lightning network,  which takes transactions Off the Blockchain and groups many transactions into one.
a) However would taking transactions off the blockchain temporarily, defeat the whole purpose of having ledger transaction?
b) Additionally, can Lightning Network know who owns how many bitcoins with multi transactions off the ledger?

Think of the blockchain as a court of law. A perfectly fair and incorruptible court which - if presented with a dispute - always rules justly.
However, like real-world courts, it has high operational costs. Those do not have enough judges and juries to adjudicate every dispute anyone could ever encounter. Thankfully, it doesn't need to. The fact that anyone who has been harmed has the ability to go to court on itself is a deterrent against crime. The primary benefit of the court is incentivizing people to behave honestly.
Lightning, in a way, is applying this principle to Bitcoin. The blockchain (court) has limited capacity, but there is really no need for it to adjudicate every transaction. Here is how it works at a very high level:

Two participants, Alice and Bob, create a "channel": it involves one or both of them putting up some money (on chain!) in a joint address that can only be spent from when they both agree, but with some extra tricks attached (see below).
Once that transaction is confirmed on chain, they can transact with each other by simply updating their idea of how much both of them own. Every time they do this, they hand the receiving party a proof, which will become useful later. This is instant, and very efficient, because it doesn't require telling the whole world.
Multiple such channels can be linked: Bob can connect to Carol as well, and now Alice can instantly pay Carol - by going through Bob as long as that side of the channels has sufficient funds. This is why Lightning is called a network. It is a network of channels.
If one party tries to renege on an update, the harmed party can take the proof they received earlier, and take it to chain. This proof allows them to receive the entire bond put up by the infringing party as reward, and punish the infringing party.
At some point, one or both users want to use the funds locked up in the channel for non-Lightning payments. To do so, they propose closing the channel, and most likely both just sign off and go their merry way. If one party refuses, the other can still take their money again by providing proof on-chain, though with a delay.

So yes, Lightning does indeed result in transactions "not happening on chain". But it's not like they're moved elsewhere - they're just replaced with privately settling between the participants, but still using the chain to go back to whenever a party cheats.


Reading a bitcoin chart Can someone please give me a basic intro to the following chart?

What do those bars mean?
What does that yellow line mean?
What do the green and red bits mean?

The blue bars indicate the transaction volume in that period, this is how many bitcoins have been traded. Use the blue numbers at the left axis to see how many bitcoins were traded.

The yellow line is the average weighted price in that period. Use the yellow numbers on the right to see what the price is.

The green and red parts show the fluctuations (high & low) around the average price. It shows that at 16h00 there was a trade at a price above 1000 (USD I guess). However this could be a single trade of 0.001 BTC for 1 dollar... You cannot derive this from the chart.


Buy bitcoins using google checkout I want to buy a small amount of bitcoins using google checkout. Any service provider ?

Thanks

Not really.

Buying Bitcoin Through Google Checkout:

  Unsurprisingly, [neither] Apple nor Google will ever allow for digital currencies to be exchanged through their systems as a part of their TOS.

btcnow.net used to, but apparently Google put the kibosh on that some time ago.

fireduck asked in the Google Checkout/Wallet forums, but never really received an answer.

HOWEVER

Bitcoin Keys does digital delivery of private keys tied to accounts which have been loaded with the desired amount of BTC.

In my ~30 minutes of research on this, it's the only site I could find that does it in any way.

I have not personally used any of these sites, so I cannot vouch for them.


What resources are required for bitcoin mining? What resources do I need to mine for bitcoins?

Do I need a computer and computer software?

Do I need a license to mine for bitcoins?

I'm not sure it's worth the bother any more - there's no point at all mining bitcoin with a computer, or even a bunch of graphics cards. It's now done by dedicated mining machines like an Antminer S9 - mining farms have thousands, maybe even tens of thousands of these things in warehouses plugging away at getttibg hashes. You could buy one, join a pool of other people who also have them, and get paid a share of the pools winnings if one member finds a block, based on how much computing power you represent to the pool..

.. but then there's the question of whether your pool will ever find a block, as the only way your machine will return on its investment is if it does, and it's not a sure thing. And maybe the antminer s11 will come along and be 50 TH and the same price as your s9.. and then it makes it a whole lot harder as mining farms get 4x more processing power.. they're much more likely to find a block than you are..

Hmm, so.. look into it some more. The conclusion I came to is that it's just not worth mining bitcoin any more. Maybe some altcoins, but work out how they're best mined and mine them with the best value method

Side pondering: If only satoshi nakamoto had made the work-done something like protein folding, cancer cure calcs, something useful (instead of trying to find a number smaller than another number) all that electricity burnt on this huge distributed computing effort would have had some great benefits


How can my private key be revealed if I use the same nonce while generating the signature? I know it is well understood that it is not a good practice to use the same nonce while generating the signatures, but I am not getting the math right.

Assume I have some UTXOs that are controlled by my private key Q. Say I have spent two of the UTXOs using nonce 'N' to generate my signature. Now the (R,S) components of the signature are public and the transactions are public so everyone has access to them.

S1 = N^(-1)*[hash(m1) + Q*R] mod p

S2 = N^(-1)*[hash(m2) + Q*R] mod p

S1 - S2 = N^(-1)*[hash(m1) - hash(m2)] mod p

Even though we know S1, S2, m1 and m2, isn't solving for N^(-1), and hence N, becomes equivalent to finding the solution to the discrete logarithm?

Let me rewrite your question in a different notation, where all lowercase values are integers and uppercase values are points.

The group generator is G (a known constant).
The private key is q, its corresponding public key is Q = qG.
The nonce is n, its corresponding point is R = nG.
The X coordinate of R is r.
The hash function is h(x).
A signature is (r,s), where s is computed as n-1(h(m) + qr).
A signature is valid iff r = x(s-1(h(m)G + rQ)) (where x() stands for "The X coordinate of point ...")

Now for the two signatures it holds that:

s1 = n-1(h(m1) + qr)
s2 = n-1(h(m2) + qr)
s1 - s2 = n-1(h(m1) - h(m2))
n = (s1 - s2)-1(h(m1) - h(m2))

As s1 and s2 are just integers, (s1 - s2)-1 can be trivially computed using a modular inverse; there are no elliptic curve points involved here (over which this problem would be hard).

Once you know n, you can find q by rewriting the first equation:

ns1 = h(m1) + qr
ns1 - h(m1) = qr
q = r-1(ns1 - h(m1))

Substituting this in the earlier equations gives you:

q = (r (s1 - s2))-1(m1s2 - m2s1)


which cryptocurrency using Slasher algorithm for Proof of Stake mining process? Ethash algorithm for PoW mining process on my own cryptocurrency. I need to use Slasher algorithm instead of Ethash algorithm for Proof of Stake process.

My question is Which cryptocurrency using Slasher algorithm for Proof of Stake mining process?.
This answer is more helpful for my further process.

etherieum, use the slasher
you can see here:
https://blog.ethereum.org/2014/01/15/slasher-a-punitive-proof-of-stake-algorithm/


Help With Gitian-Builder - Failed to load "rcfile" I' having hard time building the Bitcoin using gitian-builder. I'm getting closer but i'm stuck at this error and I dont know what it really means or why is it even there. I'm using the gitian-build.sh.. I posted a screen shot...

It says Failed to Load rcfile... How do I fix this issue?

Thanks!

]2

This question is a bit old now but the solution(s) are still valid. I have found that the most difficult part of getting gitian builder working is the setup of LXC. Apparently it is still valid to use the KVM method but I have never done this and from what I understand, KVM is the old method. Be sure to carefully read over the entire build instructions at https://github.com/bitcoin-core/docs/blob/master/gitian-building.md and any pages it links to for a full understanding of how this all can be done.

Assuming that you have LXC setup correctly, there are also a  couple problems with your build cmd. Here is what you were using:

sudo ./gitian-build.sh --build achow101

and if using the gitian-build.sh script, you should be using this syntax instead:

./gitian-build.sh --detach-sign --no-commit -b achow101 0.17.1

Root access is not required or desired for the build procedure so remove the sudo keyword.
achow101 is the github username you wish to create sigs for. if you aren't planning to upload or do anything with your sigs then it doesn't matter what you enter here as long as it has a value.
0.17.1 is the version tag that you would like to build. You can use gitian-builder to build wallets for older versions of bitcoin so you need to specify which version you want. 0.17.1 happens to be the most current bitcoin wallet tag version as of this writing. You can find the tag versions here: https://github.com/bitcoin/bitcoin/tags. You must always be sure to omit the v prefix since for some silly reason the script wants to automatically add the prefix itself, so if you tried to run ./gitian-build.sh --detach-sign --no-commit -b achow101 v0.17.1 it would error out on trying to download the tag vv0.17.1.

The other big thing to note here is that the gitian-build.sh bash script was replaced by a python script gitian-build.py right around the same time that you posted this question. Therefore, if you are using one of the newer builds of bitcoin core with the new python script you will have to change the build cmd ever so slightly:

./gitian-build.py --detach-sign --no-commit -b achow101 0.17.1

Final note: I don't have a proper list of error msgs, but in my experience there are 2-3 errors that you can intermittently get during gitian building that will stop the build process even when everything is correct. This can be very frustrating when you are trying to learn to build wallets and I have not yet found the reason for this. The workaround is easy, just run the exact same cmd again and 99% of the time it works fine the 2nd time even though it gave an error before.


How is BIP 158 wallet rescanning supposed to work with xpub keys? A light client implementing BIP158 downloads filters and checks its addresses against that filter. If one matches, it downloads the block.
Now, let's say we have an HD wallet (BIP32), and/or an xpub key. How would we decide whether to download the block, based on the filter? Do we have to iterate over all possible derivations/addresses (potentially thousands) for each filter? Is there a more efficient solution?

No, you essentially have to do exactly that: test the block filter for each address that might have gotten used by your wallet. That might not be quite as bad as you seem to think, though.
Deterministic wallet backups usually come with a master secret and the derivation path. If you have both these pieces of information, only one derivation path needs to be searched.
Then, your wallet would usually generate a number of addresses in advance as a form of lookahead. The size of this buffer is often referred to as the gap limit. If any of the wallet's addresses appear in a transaction during the rescan, the buffer is refilled with additional new addresses before continuing to scan from that point on. The underlying assumptions are that addresses are generally used in the order they are generated, and that personal use of a wallet does not generate a lot of unused addresses. Therefore, light client wallets often employ a fairly small gap limit by default.
Some wallet backups additionally store the creation date of the wallet, which allows a rescan to ignore prior blocks than the corresponding blockheight.


How to run Bitcoin Core both main and testnet on the same machine? How to run Bitcoin Core both main and testnet on the same machine?
I want to be able to communicate with both block-chains via RPC.

Do I need to run 2 instances on bitcoind / bitcoin-qt.exe for that?

Do I need to run 2 instances on bitcoind / bitcoin-qt.exe for that?

Yes. If bitcoin-qt is already running and on mainnet then open up a command shell and type:

>bitcoin-qt -testnet

This will launch a second bitcoin-qt on testnet using the default -datadir= and -conf= options.

The -testnet option uses the folder {default bitcoin datadir path}/testnet3/ and the default bitcoin.conf file by default. If you wish for your testnet instance to have different options to your mainnet instance then add the -conf={file} option after -testnet on the command line.

This works much the same for bitcoind.


Does a 2009 node sync the whole bitcoin blockchain So does a 2009 node sync the whole bitcoin blockchain and does the temporary split of 2013 have any impact on that?

In theory it can as the explicit consensus rules have not changed. However in practice, it will not be able to sync without some special modifications.

First of all, the network version is so old that no modern node software will accept connections from it. Furthermore, the format of the network messages has changed since the first release so that it now contains a checksum of the message. The first version of the Bitcoin client did not have a checksum for messages. This difference in the network protocol will result in messages that do not make sense to either node in a connection.

In addition to the network message change, the original Bitcoin client will be unable to find nodes to connect to. It was only able to connect solely through using IRC node discovery which has since been disabled and removed. So you will need to specially construct the peers.dat file so that it will be able to find a peer to connect to.

Lastly, the original Bitcoin client will be unable to sync past the 2013 fork unless the number of BDB locks is increased. Using the default settings, it will run out of locks when it reaches around that time and thus fail to sync.

If you can to avoid all of these issues (e.g. by using a special node software specifically to sync off of) and increase the number of BDB locks, then the original Bitcoin client should be able to sync the current blockchain, albeit very slowly and possibly never be able to sync to the tip. Towards the current tip of the blockchain, it will probably take longer to validate a block than it takes for a new block to be found.

Several months ago I modified a version of Bitcoin Core to be compatible with Bitcoin 0.1.0 and to then try to sync it. The code for that is here. I stopped that experiment after a few days when it was able to only sync ~25,000 blocks.


Do you need to run own server when using a full node wallet? Hi can you help out pls:

1) There are some full node wallets like Bitcoin Core or Wasabi. What other full node wallet apps are available to select from for bitcoin?

2) I have read about people using ledger+electrum+electrum server  to run a full node. Is it mandatory to have an own server when using a full node wallet like the ones mentioned in 1)?

3) If there is no need for an own server: What pros/cons are there in terms of wallet security, using own electrum server  vs.  not having own server?

Thanks

What other full node wallet apps are available to select from for bitcoin?

See https://bitcoin.org/en/choose-your-wallet for a reasonable list

  Is it mandatory to have an own server when using a full node wallet

Not really. Some wallets have an API that allows other software to interact with the wallet but the wallets are generally usable directly for straightforward use.

  What pros/cons are there in terms of wallet security

Security is a complicated subject. On the one hand you want to keep things simple to minimise the exposed attack surface. On the other hand you may want to support coin mixing or other strategies to improve privacy. Unless you have some specific security requirements, the general advice is to keep the private keys under your exclusive control on a computer that is well protected. Use a hardware wallet for larger amounts or infrequently accessed Bitcoin.


Is the new Google Compute Engine suitable (and affordable) for running a bitcoind instance? Google just recently (at Google I/O 2012) announced their new cloud product, the Google Compute Engine. I don't really understand what it is exactly but I heard it's basically some sort of VPS service.

So I was wondering if it would be suitable for running a Bitcoin client for a web application. I don't know what resources are required for running such, either do I know what prices you get when doing so in Amazons platform. Google says Compute Engine's pricing gives you the same computation power for half the price of competitive products, but I cannot really compare.

Did anyone made this consideration as well? Did anyone take a closer look at this?

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

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


Can ASICS Merge-Mine? Can ASICS in general, and specifically any of the models coming out soon merge-mine other cryptocurrencies?

Yes. The ASICs themselves only perform the SHA256 calculations, they do not deal with anything protocol related and as such can merged-mine exactly the same as existing GPU and FPGA implementations. In other words, merged mining is part of the protocol, ASICs just do the math.

The standard rules of merged mining still apply, of course. The alternate currency must also be based on the same type of SHA256-based proof of work as Bitcoin and has to have implemented merged mining in their own protocol.


What does the Lightning Network UX look like? I think understand the basics of how Lightning Network works. But what I'm failing to understand is how users will use this in a practical, day to day basis.

Say I want to pay for my Starbucks coffee in store.

I know that in theory, I'll make a deposit into a multi-sig wallet with Starbucks on the main chain. However, this will take at least 10 minutes to be confirmed, and you would have to do it with every party you wanted to transact with for the first time.

So ideally, wouldn't there be some sort of single, intermediary service or protocol that I could enter this multi-sig wallet with instead? And Starbucks would use this service as well, and we wouldn't need that whole dance?

However, this will take at least 10 minutes to be confirmed, and you would have to do it with every party you wanted to transact with for the first time.

Not necessarily. The way that some of the LN clients currently work is that they will automatically establish several channels with other nodes for you when you first start the client. So when you want to pay for something at a merchant that you do not have a channel with, you can simply route your payment through one of your open payment channels. There is no need to create a new channel with each individual person you wish to transact with; that's the whole point of being able to route payments.

  So ideally, wouldn't there be some sort of single, intermediary service or protocol that I could enter this multi-sig wallet with instead?

Ideally, no. That would mean that there is centralization. What would actually happen is that both you and Starbucks have open payment channels with other people, and you simply route your payment through another person.


**SOLVED** Failed to verify this transaction? I came across this P2SH multisig transactions 255942b1... on the testnet chain that I failed to verify.

I just couldn't find any matching signatures and public keys in the list provided and there seems to be an empty public key(OP_0 in the pub key script) given in the redeem script.

The scripts I found was

sig script:
OP_0
3046022100a6ad0304388a4df35b444cb96ffee0b393700a6a8612f1e35cc3dc131314f893022100bcc8b2849b04dee59dcedc4fb21a96dda3fd067a381522f37a2b6813c4e1581d01
30450220371b8ee29370e0d23f547163e3c238a40fe279e8edb2b838811cfca7bf5778e0022100f7e81c88ff7ea1c8da2666cae90c6a3c73a6817070c657068c678254fdb0b3f501
520021039039f617d4bd3751bc0550d38e138e7ddd2042f2b137050c872e1be8df4d6aae2103a2b5af230018a36044a0638916829ed8cf6bf745a608fe6dd22ea266a7408e7e53ae

pub key script:
HASH160 bcce3f7e690e5f3bbd1ed6db54dc7317659fa87c EQUAL

redeem script:
2 OP_0
039039F617D4BD3751BC0550D38E138E7DDD2042F2B137050C872E1BE8DF4D6AAE
03A2B5AF230018A36044A0638916829ED8CF6BF745A608FE6DD22EA266A7408E7E
3 OP_CHECKMULTISIG

signature msg:
54481C2DE6433EA934EB5F46B7E5D1A60FDC584873FC0210991C692058E26D4E

And my rebuilt tx for signing(same for both public keys) is

# version
01000000

01

# input 0
46CEA01182F6B49A49BA06C7BA4C7A95F66B0E5B5FD32B29E7BA2F1DF952E6B8 01000000

49

# sig script(now pkscript)
524C0021 039039F6 17D4BD37 51BC0550
D38E138E 7DDD2042 F2B13705 0C872E1B
E8DF4D6A AE2103A2 B5AF2300 18A36044
A0638916 829ED8CF 6BF745A6 08FE6DD2
2EA266A7 408E7E53 AE

FFFFFFFF

02

# output 0
E07CD50400000000
19
76A914ED99B585A4C7B1578A08C599BF7E87351FE3E78E88AC

# output 1
0C57060000000000
17
A914BCCE3F7E690E5F3BBD1ED6DB54DC7317659FA87C87

00000000
01000000

Could anyone please help me check this transaction? Thanks!

I mistakenly added an OP_PUSHDATA(0x4c) before the second byte of the redeem script and got a wrong hash. The problem is solved...


Handwritten paperwallet or hardwarewallet to store Bitcoins? Most people I talk to are convinced that a hardware wallet is the safest place to hold your Bitcoins. But I'm not so sure if it's not safer if I create offline on a non compromised fresh system the keys and write it down on a paper (two copies at two safe places). Of course somebody could steal the keys. But looking on hardware wallets, I see those risks:

Seed words have to be written down - subject to theft
If I or anybody else wants to use the stick in 10 or 15 years the firmware will be outdated, the solution might be hacked or I could run into the problem not finding a safe computer with USB port or accepting the stick. This remembers me when I want to get the films from the 20 years old cameras.
The stick itself plus seed is more difficult to hide than a seed/key alone. If a criminal finds the stick he could force me to hand out the seed.
If not open source I need to trust the manufacturer. E.g. the selection of keys could be not random. If the manufacturer selects just out of fix selection of 10 Mio private keys I wouldn't realise but he could take over all Bitcoin credits from the clients after a few years.

What do you think, what's the best hodl strategy to store the coins safe?

True.
There is a standard algorithm for generating the keys from the seed words (BIP 39 / BIP 32).  Most hardware wallets follow this algorithm (check before you buy).  So even if the hardware device has failed or cannot be used, you can still use your written seed words with any other software or hardware device that implements the standard algorithm to recover your keys and spend your coins.
True.
True.  But if you are paranoid, you could generate your own seed words with some more trusted software, import them into your wallet, and check with some other software that the hardware wallet is correctly generating the keys from them.  That would guarantee that the keys are secure, though of course it wouldn't rule out the possibility that the hardware wallet is secretly sending them back to the manufacturer or another attacker.


How do you merge mine rootstock with bitcoin on an Antminer? I hear that you can merge mine rootstock coins with existing bitcoin mining hardware by doing merge mining. Is there a tutorial on how to do this? Or is there a pool one can just join?

The easiest way is to join a pool that merge mines what you want, in this case Rootstock.

If you want to run your own pool, make sure the pool software supports the type of merged mining you want to do. Then set it up as described in to the documentation.

Rootstock is not live yet, but many pools are testing it, so you should have several pools to choose from.


How to make bitcoin-qt respect -prune? I'm using Bitcoin Core 0.18.0-rc2 (64-bit) on Qt 5.9.7.

How can I make it respect -prune=550?

This is the minimum prune number, and should be approximately 550 MB.

Yet, my client is downloading tens of gigabytes worth of data, with no end in sight.

In "Options" it is stated:

"Options set in this dialog are overridden by the command line or in the configuration file: -prune=550"

Hence, it seems like the program is able to recognize the command line argument. It simply doesn't respect it as far as downloading and pruning the blockchain goes.

What can I do differently to fix this problem?

prune allows you to set the size of blockchain data stored, not downloaded. Therefore prune does not affect bandwidth usage.


Does it hurt the network to reuse addresses? There is already a question that ask why you shouldn't reuse addresses, but it's about whether or not it's a bad idea for the person who would do the reusing. I understand there are several reasons you'd want to avoid reusing (e.g., fear that ECDSA isn't secure, privacy and anonymity concerns, difficulty of tracking senders, etc.); as far as I can tell, it's still sometimes worth it on an individual level to reuse an address.

However, the Bitcoin Wiki says in multiple places (here and here) that reusing an address degrades the security of the whole network; I also think I've seen this claim elsewhere but can't track down the source anymore. I don't understand how this could degrade the security of the network, and if it does, what's to prevent an attacker from repeatedly doing this before an attack if it would help?

Reusing an address is a security issue if you have a weak random number generator, as was an issue with the Android Bitcoin Wallet. I should note this was android's fault for using a bad generator and was fixed quickly by the app developer, though some people lost coins because they had signed multiple messages (i.e. transactions) with the same address and the number generator used the same random number for more than one transaction, for more info you can see this: http://gigaom.com/2013/08/12/why-bitcoin-users-using-android-wallet-apps-need-to-upgrade/

If you'd like to know more about why using the same random number in two messages is bad, you can read about ECDSA (ecliptic curve digital signature algorithm) here: https://en.bitcoin.it/wiki/Protocol_specification#Signatures

Also if you are concerned with the people you transfer bitcoins with knowing how much money you have and when you're sending money, and possibly to whom, you should consider keeping your addresses and transactions separate. This involves choosing which inputs you use to send transactions, using a system like armory allows you to do this.


What are the maximum useful memory limits for a Bitcoind full node? In contrast to this question about running Bitcoind in a low-memory environment, I have an opposite use-case.
I want to run a bitcoind full node (no wallet) on a Linux server with lots of memory but not particularly fast disks. What are the maximum useful memory constraints (dbcache=, maxmempool= and total amount of page cache) that you can give to bitcoind to maximize its performance? That is, at which point does giving more memory to bitcoind start yielding diminished returns?

After a point, there's no reason to increase memory usage further.

dbcache is useful up until the point where you have the entire UTXO in memory (4GB+ in 2021), and then increasing it further does not a lot other than increasing the time to shutdown the node safely (up to many minutes on a slow disk)

maxmempool will increase performance by allowing more transactions (and their validity) to be ready for their inclusion in a block, but only up to the point where you are including all of the possible transactions that miners are likely to include.

blockreconstructionextratxn will allow the node to store more transactions which are not in the mempool, but are still valid. This increases the efficiency of compact block transmission as sometimes transactions will be evicted from your mempool but may be in other people's. This setting notably is in number of transactions, not megabytes.

maxorphantx increases transaction relay efficiency by keeping copies of transactions which could not be connected to a parent (and therefor can't be validated!), but might become valid in the future by the arrival of their parent. This setting is also in number of transactions, not megabytes.

These are about as far as you can go just by tweaking the settings in bitcoin.conf.

A "hot rod", "no cost considered" Bitcoin Core node would look a bit different.
The entire UTXO would be stored in a ramdisk (to prevent a cold dbcache ever occurring), with the obvious cost that unexpected shutdowns would result in a complete loss of synchronization state. As many cores as possible would be in use, the node would make connections to other nodes owned by the operator for maximum efficiency, and those nodes would be tuned to have as many high quality peers as possible.
You can go a long way towards making extremely performant nodes with not an unreasonable financial outlay if there's a reason to do so, it's just a matter of optimizing the right parameters and limiting bottlenecks that are normally caused by the network being optimized for stability and correctness.


How to move bitcoins to own wallet from other wallet I am new to bitcoin community and I have a website where I want to collect payments through bitcoin or altcoins.

For now I want to know that can I shift my bitcoins from one wallet to another
wallet without paying any fee if yes how can I do this with my limited knowledge
of bitcoin network.

Here is the example of my situation :-

I have generated a bitcoin address for myself called MainWallet
now I have generated two bitcoin addresses for my customers to collect payments for example we can say CustomerWallet1 and CustomerWallet2 now if my customer pay for their respective orders  let say I got 1 BTC on both customer wallets can I shift this 1 BTC to my MainWallet from both of my customer wallets without paying any miner/transaction fee.

If yes how can I do this manually on my windows PC.

Please note : I have private key for all address which I have generated here.

Thanks

For transferring bitcoin between wallets, you can import the private keys for the relevant addresses into the wallet in which you desire to have the bitcoin.

If you mean between addresses, then you will have create and broadcast a transaction with an appropriate fee.


0 fee transactions - possible that they never confirm? I've made a Bitcoin tipping service for reddit: https://news.bitcoin.com/bitcoin-tipping-reddit-minitip/

Currently users pay a flat 0.1 mBTC miner's fee to tip others since it's done entirely on-chain (which is a big deterrence from using the service). I had a thought though.

What if I made tips from user-to-user pay 0 transaction fees and make them available for withdrawal even at 0 confirmations?

The way the service works is that a user deposits say 5000 bits (5 mBTC) to a custodial address. This deposit appears in their balance after 1 confirmation.

So my thinking is, now that the amount in the balance is confirmed, the custodial account can send portions of that balance as tips to recipients who need not fear double-spends since the tips are not being sent directly from the sender's account.

The only issue I can see is that tips never get confirmed due to 0 fees, so I wanted to clarify. Is it possible that the transaction is never confirmed if the fee is 0?

Thanks

Yes. It is possible that a transaction is never confirmed, even if it does pay a fee. Transactions that pay more fee take precedence, and after a while your old unconfirmed transaction will drop out of the mempool.

Edit: This answer originally stated that older transactions get prioritized, but that behavior is no longer active on the network.


Is anyone actually spending bitcoins? I see lots of people talking about buying bitcoins, mining bitcoins, but no one spending.
Maybe I am getting it wrong, but unless I can get paid with bitcoins, this seems to be pointless in my perspective.

I know how to get paid in bitcoins, but that's not what I am asking, so, as a freelancer sysadmin and developer, where can I get paid in bitcoins? How can I find clients willing to pay me with bitcoins?

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

There's enough places to spend your coins and there are job boards where you can advertise your services. Bitcointalk is also a good place check out.


How does one use Bitcoin OTC? I've heard of Bitcoin OTC and P2P exchanges, but never used one.

How does one start?
What does the ranking/rating system mean?
How are exchanges done / reported?
Why can't I see any user rating when I view the orderbook?
Is it a for profit website?
Are there fees?

As the founder of bitcoin-otc, I think I'll be able to help you out here. :)

OTC uses gpg (the free software implementation of the PGP protocol) for authentication. So your first step is to register on OTC with your gpg key. The OTC wiki contains detailed instructions on this page: http://wiki.bitcoin-otc.com/wiki/GPG_authentication

The rating system is a web of trust links between users. There is more documentation on the rating system here: http://wiki.bitcoin-otc.com/wiki/OTC_Rating_System . I suggest that you pay particular attention to the 'relying on the rating' section.

Trades happen p2p - the OTC system is only an order aggregator as far as trading is concerned. Once orders are placed (which is not even a requirement, you can just hang out on the IRC channel and set up trades without ever using the order book), it is up to the individuals to talk to each other and set up the trade details.

From the order book view, you can see a person's ratings by clicking on his/her username.

The bitcoin-otc system is not a for-profit entity, nor a profitable one. There are no fees charged by the system for users to register and place orders. All order execution happens directly between people, the otc system does not intermediate either side of the transaction.

Overall, there is plenty of documentation on the OTC website and wiki; I invite you to give it a read for further details. A good starting point would be the main user guide page: http://wiki.bitcoin-otc.com/wiki/Using_bitcoin-otc


Bitcoin Block Size - What are the rules? What is the maximum size a block can be?
Is there a minimum size?
Can you have a block with 0 transactions included?

The current maximum block size is 1MB (but it could be increased in the future with a protocol change), there is no minimum size per se, but the block needs to have all its components to be valid (check Protocol Specification). Each block needs to have at least one transaction - one paying the miner the reward for mining the block.


Why does a bigger block size infer miner centralisation? I've read that one of the detriments to increasing bitcoins block size is that it will create a more centralised mining community. How is this so?

Because a key aspect to understand is that transferring a block over the network globally is not completely instant. The bigger the block is, the longer the block propagation statistically takes.

However if you are propagating the block to part of the network that is close, like transferring the block to yourself (which of course means that you won't need to transfer the block at all), the latency disappears. If you find a valid block, this means that you have a slight mining advantage to mine with the new block as the last valid block, while other parts of the network is still mining on the old block as the last valid block, during the time the new block you just mined is propagated to the rest of the network. The larger the new block you just mined, the longer time you have to mine on the new block while other parts of the network are still mining on the old block as the last valid block.

In an industry where even the slightest percentage wise of advantage leads to being able to outcompete your opponents, longer block propagation times should theoretically mean to higher concentration of big parties on the network.


Callbacks using blockchain.info's API I'm trying to accept bitcoin payments on my website using blockchain.info's API. However, I'm confused with their callback.

I've read through their callback, but how would I know if the transaction was successful or not ?

The callback lets you know the payment has been recieved. The confirmations are also included in the callback

  When a payment is received blockchain.info will notify the callback
  URL passed using the create method. The parameters will be supplied in
  a http GET request. The callback url is limited to 255 characters in
  length.

  Parameters

  value The value of the payment received in satoshi. Divide by    100000000 to get the value in BTC.
  input_address The bitcoin address that received the transaction.
  confirmations The number of confirmations of this transaction.
  {Custom Parameters} Any parameters included in the callback URL will be passed back to the callback URL in the notification.
  transaction_hash The transaction hash.
  input_transaction_hash The original paying in hash before forwarding.
  destination_address The destination bitcoin address. Check this matches your address.

  A double spend occurs when a malicious user spends the same BTC twice.
  A payment that initial appears successful could be reversed at a later
  date. This is counteracted by waiting for the transaction to be
  included in the blockchain and reaching a number of confirmations. 6
  confirmations is generally considered safe for high value
  transactions.

  Validate the transaction confirmations in the callback script by
  checking $_GET['confirmations'] parameter. It is recommended you
  acknowledge the transaction at zero confirmations but only trust the
  transaction after one confirmation. For example, if purchasing a
  product, we would show the order as successful at zero confirmations,
  but only ship the product when 6 or more confirmations are reached.
  See the PHP demo callback.php for an example.

sourced from: https://blockchain.info/api/api_receive


What is the recomended sequence for signalling RBF? What is the recommended nSequence for signalling RBF transactions?

BIP125 says:

  A transaction is considered to have opted in to allowing replacement of itself if any of its inputs have an nSequence number less than (0xffffffff - 1).

What is the recommended policy - is it better to send smaller or higher nSequence?

Also, does the sequence number need to increase with newer "versions" of the transaction with higher fees, as was the original semantics of nSequence, or not?

Bitcoin Core itself uses nSequence=0, but only in the RBF tests, AFAIK.

The only other relevance of the nSequence field is as relative locktime (in version 2 transactions); see BIP 68.

If you do use relative locktime, they will determine the value of nSequence.

If you don't use that feature, any nSequence lower than 0xfffffffe will do.

In BIP125, there is no need for strictly increasing nSequence versions. instead, the highest fee wins.


Can you give me an example of a wallet address Bitcoin wallet address can anyone show me example

Yes.

Bitcoin:1GVY5eZvtc5bA6EFEGnpqJeHUC5YaV5dsb

Some Bitcoin addresses start with a 3. It is pretty much a 3 or a 1.

Before making transactions, always ensure that you are sending to and from a correct Bitcoin BTC address. There are other similarly named altcoins which have different symbols (not BTC) and those transactions do not work and Bitcoins will be lost. Sometimes the altcoin addresses even appear to be the same as a Bitcoin address. You really have to make sure both parties are dealing in proper Bitcoin BTC.


Flaw in Bitcoin protocol regarding incentives to share transactions Once the 50BTC per block rewards have halved many times and the transaction fees start to become the primary reward for miners, it sound like there is incentive for miners to not pass on transactions as they would eventually get the transaction fee when they next solve a block. I just read about this in Slashdot -

This slashdot article:
http://science.slashdot.org/story/11/11/15/0456206/researchers-locate-flaw-in-bitcoin-protocol

Refers to another article, being:
http://coderrr.wordpress.com/2011/11/13/simplified-summary-of-microsoft-researchs-bitcoin-paper-on-incentivizing-transaction-propagation/
and a research paper produced by Microsoft (who would've thought they're interested in Bitcoins!?):
http://research.microsoft.com/pubs/156072/bitcoin.pdf

An obvious solution to the described problem is to reward nodes for sharing transactions, but this (as I understand it) leads to a "Sybil attack" where the attacker tries to gain an increased share of the rewards by sharing the transaction amongst other nodes controlled by the attacker.

The rest of the research paper seems to have a proposed solution, but it's beyond my understanding!

Is this really a problem with the existing Bitcoin protocol? If yes, does the research paper have a genuine workable solution? Is it possible to describe that solution in laymen's terms?

This is a non-issue.  The Microsoft paper did not appear in a peer-reviewed venue (journal or conference).

There are (at least) two parts to the bitcoin network: the peer-to-peer transaction broadcasting network and the miners.  Only the miners have a disincentive to propagate transactions.  The overwhelming majority of the nodes on the internet running bitcoind are not mining or else are doing trivial amounts of CPU-mining because their admin forgot to use the -gen=0 flag.

If so-called "CPU-friendly" cryptocurrencies like "Tenberix" achieve their goals (which is doubtful) they may be vulnerable to this problem since they are intended to avoid the sort of specialized-miner situation that bitcoin embraces.


Can an unconfirmed transaction that only Blockchain.info shows be manually re-broadcast? Blockchain.info shows a transaction that was created by Blockchain.info/wallet but for whatever reason the transaction didn't confirm right away and appears to not be getting re-broadcast (perhaps because the transaction is more than a day old now).

Is there a way to recreate the transaction (reconstruct as an identical copy, resulting in the same transaction hash) using just the data shown from the blockchain.info website (the Input scripts and Output scripts from the transaction's view on the site) to construct a raw transaction that I can manually re-broadcast using http://Blockchain.info/pushtx or http://brainwallet.org/#tx ?

Old question, but answer might be helpful for someone.

To get a raw transaction append:

?format=hex

to the transaction URL.

For example:

https://blockchain.info/tx/1b087a7aebdd06740bd4ffefba076562b582a97f02cedf2cd32f53f7eb0b3c8c?format=hex


Is it possible to combine PoW with PoS by taking turns? I have read about cryptocurrencies and am very excited by many. I have read that one of the worries and constant debates is Proof of Work vs Proof of State with respect to securing the validity of the blockchain, especially within Ethereum.

I wondered why we would not just combine the two. For example, the first block validated by PoW, second block by PoS, third by PoW, etc. As each block depends on the previous a 51% attack would be a lot more difficult and power consumption significantly reduced.

Is there an obvious problem with doing that?

Yes. The problem with this approach is that all PoW nodes will be idle half of the time, and all PoS nodes will be idle half of the time. This isn't a huge problem. You could mine a different coin during the time that your PoW miner was idle; PoS nodes being idle half the time is not a big issue.

Your proposal does have a security advantage that I don't think you've pointed out. Specifically, in order to conduct a 51% attack, you need to be able to produce both PoW and PoS. You can have 51% of each, or you can compensate for a smaller amount of PoW or PoS by having more of the other.

For a 51% attack, ordinary PoW requires:

  W = Your PoW capacity, where 0.5 means you control half of the hashpower
  W > 0.5

For a 51% attack, ordinary PoS requires:

  S = Your PoS capacity, where 0.5 means you control half of the coins actively participating in PoS
  S > 0.5

For a 51% attack on this scheme, you'd need:

  1/((1/S + 1/W)/2) > 0.5


Significance of average block generation rate I am stuck in this thought for a while regarding the block generation rate. My concern is, when a payer waits for 10 minutes to confirm that her transaction is included in a block, it suggests that a new block is generated in 10 minutes, because her transaction is brand new and the block includes it. So, how does a miner do that in just 10 minutes? Isn't it supposed to be hard? The miner can then become a millionaire in months.

Does the block generation rate imply that, once a miner starts computing the proof-of-work(POW) she succeeds in getting the nonce after 10 minutes? Or is it the case that miners are computing POW at their own pace(probably for a long enough time) and 1 new block pops up every 10 minutes. If the 2nd scenario is true, how does it justify the waiting time?

Thank you.

The block difficulty is adjusted every 2016 blocks so that, on average, it takes 10 minutes for miners to generate a new block. It would take any individual miner much longer than 10 minutes to compute the proof-of-work, but all miners together should be able to compute the proof-of-work in roughly 10 minutes.


blockchain.info wallet doesn't show transactions made through api I've been accepting orders on my website for several months using blockchain.info api. Everything worked smoothly until few days ago. At the moment I have two transactions made through api, both seem to get through, but I can't see them in my main wallet. Sent an email to customer support, no answer yet.

https://blockchain.info/address/19USdV4ENhRkcRbmjL2gZWBUPJqhc7xyuW

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

How is it working? How do I get those funds in my main wallet? Am I doing something wrong?

Actually, I recently had the problem with the gap limit. I changed the gap limit to 50 (default is 20) and then made a small payment from my main wallet back to myself to make the gap=0. And after that, these two transactions appeared.

Please advice. Appreciate your assistance.

The problem

When you make requests from the Receive V2 API, we create new addresses for you sequentially, ensuring that you don’t give two users the same address. If you request several addresses on behalf of your users without any of them making a payment, this will leave empty gaps between addresses with funds. This is fine unless this consecutive empty address gap reaches 21 addresses or more.

Most wallet software will only look ahead 20 addresses from the highest index address it can see (due to the BIP 44 standard we are following). Let’s say you get paid to the first address, address 1 — the wallet will look ahead 2-21 addresses to see if there are any additional funds or transaction history in those addresses. If it doesn’t find anything, it will stop looking. So, if you get paid to address 22, the wallet software will not see the funds because it stopped at 21. However, if you get paid to address 2, the wallet software will look ahead addresses 3-22, see the funds that were sent to the address 22, and then look an additional 20 ahead (addresses 23 – 43).

How to know if you’re affected

You can call the checkgap API via the following endpoint:

https://api.blockchain.info/v2/receive/checkgap?xpub={xpub}&key={apikey}

You’ll get a JSON response that looks like:

{ “gap”: 1 }

This gap value represents the difference between the index of the most recent address paid to, and the most recently-requested address. If that value is 20 or greater, funds paid to any further addresses created will be hard to access until earlier addresses receive funds.


How can I create an eWallet in PHP? My experience with PHP is not the best, but it's good enough to learn and expand. I wish to create a Bitcoin eWallet for my website where it automatically creates a Bitcoin wallet for users. This wallet will also do other stuff, such as generate a new Bitcoin wallet every 24 hours or so.

I read through the running bitcoin but didn't understand much of it. I know many websites such as Blackmarket Reloaded have what I need but my website is no way related to drugs or that stuff, I'm just using their eWallet and escrow as an example of what I need.

I checked out many websites that provide APIs like this (such as StrongCoin) but all their APIs and files are too old or deleted.

How can I go to making this come true? Any steps?

1 - If you don't want to use third party systems, you will need a server to host bitcoind.

2 - Install Bitcoin-QT. In your data directory, create bitcoin.conf with the following attributes (you will need more if you are trying to connect to bitcoind from outside of localhost):

server=1
rpcuser=username
rpcpassword=password

3 - Use the Bitcoin API to access any data you need. You will most likely need to use accounts in order to ensure proper money handling.

If you need further assistance, feel free to ask here, or contact me for more direct help at a reasonable price ;).