CoinJoin uses SIGHASH_ALL.

I initially found this confusing because I assumed the interface to CoinJoin a little less synchronized than it is. CoinJoin requires each participant to first specify a UTXO and a public key to pay out to.

Someone then constructs a partially complete transaction which makes use of those UTXOs and pays out to the public keys specified by the participants -- this transaction is "partially complete" because it doesn't yet have signatures which unencumber the UTXOs. Each participant then signs their input with SIGHASH_ALL, which prevents outputs from being manipulated after the fact.


There are tests for that.  The specifically broken pattern was a block containing a single transaction spending the same output, which originated from an earlier block, twice. Testing it without putting it in a block, or splitting up the double spend across multiple transactions weren't sufficient tests.


Yes, bitcoin is divisible to the 0.00000001 bitcoin, we call this small amount the "Satoshi" for example so even if you got less than 1 bitcoin you have a pretty wide margin on what amount you want to transfer it could be 200.0099 or 0.0005123 be careful of the fees though

For the transfer part I suggest you to use electrum

You will find more useful information about the transfer from cold to online wallet there: Can I spend/transfer bitcoins directly from cold storage?


Can I configure Bitcoin (Linux) with a custom wallet location?

The bitcoin startup argument -datadir=<dir> allows you to specify a data directory, including the wallet file.

That'll still require you to pass a custom argument I'm afraid. The config file is also in the data dir, hence there's a chicken-and-the-egg problem that makes it impossible to configure up ahead. Unless you're savvy enough to change the default constant in the source and recompile, which might be okay since you're already running Linux.


What factors can be looked at in order to come to a fundamental valuation of Bitcion?

Recognizing that Bitcoin has no INTRINSIC value, we look for its USE value, so to speak. The primary value of BItcoin is the reliable and indefeasible transfer of property title (money) between two users. Ever since the first use of the Nakamoto protocol in Jan 2009, there has been a proof-of-concept that has remained valid for almost five years and continues to function through extreme volume and market volatility.

This proven ability for reliable performance is the principal value of Bitcoin. Were it to be compromised, or made to fail massively, the value of a bitcoin would collapse, until it could be repaired, or perhaps to never recover.

Other subordinate values-in-use can be analyzed in like manner, but as long as this primary value is intact, the price of bitcoin will continue to rise as it will continue to be useful, and thus valued for its use.


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

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

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

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

Thanks for some detailed info.

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

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

I believe i explained the rest of the question below.

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

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

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

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

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

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

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

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


Here is good guide (read comments too)
https://www.howtoforge.com/tutorial/how-to-compile-and-install-bitcoin-core-on-debian-wheezy/

also you can use bdb 5.1 (./configure --with-incompatible-bdb) if you don't have a plan to move bitcoin data to/from other computer


What is the status of hierarchical deterministic wallets (BIP32)

I started implementing BIP32 for the reference client myself, but as there were more urgent matters to deal with, I have temporarily stopped working on it. I certainly plan to complete this, but I can't give any target date or version right now.

As far as I know from Alan Reiner (Armory's developer), he plans to switch to BIP32 as soon as the reference client implements them as well.


Yes.

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


What is A matching transaction in the pool validation?

In order for a transaction to be valid all of the outputs it spends must also be valid as well. Before accepting a transaction into the memory pool or accepting it into it's local block chain, one of the checks is to ensure all of it's parents are available to be spent.

If an unconfirmed transaction sent via the network is received and it's parent outputs do not exist, it is ignored or placed in a holding pool to wait and see if it's parent outputs might become available in the future.
If a block contains a transaction for which the outputs it is spending do not exist or are invalid, then the entire block is invalid and it is discarded. Any node sending you an invalid block like this is wasting your node's time and is banned as a result.


What is the memory every node allocates locally for the Bitcoin blockchain?

Not all mining machines need to store the whole blockchain, as a miner you would normally have one or a few nodes which do that, and then just send a block template to all the actual mining machines (ASICs) to mine without caring about the blockchain.

All non-pruned full nodes store the entire blockchain. It's possible to run in pruned mode which means older blocks are pruned and only the newest ones are kept, so you need less space, but this means those nodes can't serve old blocks to new full nodes trying to sync


How to lower difficulty on blockchain?

  The problem now is, sometimes some user create pools and use rented mining rigs to mine on my coin. But after a while they stop and my blockchain stucks at a certain block.

You could include in your expected difficulty calculation a factor of time, where say, for example, every 10 minutes since expected next block time (supposing you have a ten minute average block time) the expected difficulty is lowered by a factor, say divided by 2.

The problem with this method is that it may allow cheating unless you also carefully control network time. If it is not carefully managed then a cheat could submit a block with a future time and a lower difficulty.


Where does the money I get from mining bitcoin come from?

The Bitcoin is generated according to the protocol for the Proof of Work you provide to the network. The reward is comprised of a block reward and transaction fees from bitcoin transactions included in the block.
No. Mined coins are new to circulation and not taken from anyone else. Transaction fees are not stolen. The sender of each transaction decides how much of a transaction fee to pay the miner. Higher fees are more likely to result in a fast confirmation time.
Do not fear of getting robbed when making transactions. Instead fear getting robbed by those you trust to hold bitcoin on your behalf. Learn how to secure your own bitcoin and keep your private key safe and secure.
Bitcoin is a public ledger recorded on a blockchain. Each address is controlled by a private key. When you send Bitcoin from one address to another the only person that can spend it is the owner of the private key of the address you are sending the bitcoin to. Miner cannot intercept your bitcoin and steal it. They only verify the transaction took place, record it on top of the blockchain for the world to see.
Legality of Bitcoin mining may vary by jurisdiction but is happening all over the world. So far there appear to be a more laws aimed at regulating exchanges than miners.

Here are a few simple and more technical references as you requested:

https://www.youtube.com/watch?v=GmOzih6I1zs

https://www.youtube.com/watch?v=l9jOJk30eQs

https://bitcoin.org/en/developer-guide#term-proof-of-work

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


How to reduce disk-space requirements of Bitcoin Core wallet?

You can use a prune option to specify the amount of disk space you would like Bitcoin Core to use. This option allows you to keep only the latest block information instead of storing all the data.

find your configuration file bitcoin.conf (here you can find the list of possible locations depending on your operating system);
set prune parameter to the desired target size in MiB (for example, prune=2048);
restart the wallet.


OS X 10.7 - Where is Bitcoin data stored?

Bitcoin data on Mac OS X located in ~/Library/Application Support/Bitcoin/ . Just copy the whole folder to the new HDD to use your old wallet and downloaded blockchain with the new copy of Bitcoin client.


Do you have wallet enabled? generate is a wallet RPC now since it needs to get an address from the wallet. If wallets are disabled, then generate will not work. If you want to mine without wallets being enabled, use generatetoaddress.


How to make bitcoins from other cryptocurrencies?

The only way to convert them is by trading one for the other, or by going through a third currency.

Meaning:

Find a person or exchange platform that trades exactly the currency pair you want e.g. LTC/BTC or BLK/BTC.
Trade LTC -> USD -> BTC

Some exchanges trade a number of different altcoins, so they would lend themselves to do what you want. I have no experience trading anything but Bitcoin, but I've seen that for example HitBTC trades LTC/BTC, and BTER trades BLK/BTC.

I have used neither exchange and therefore cannot recommend them, just giving them as examples.


How can I find a Bitcoin private key that I saved in a text file?

If you're programming savvy you could write a small program that searches for the regular expression of a Bitcoin private key. Bitcoin private keys have a very specific format:

They are 51 keys long, start with a '5' and the second letter is either 'H', 'J', or 'K' and use base58 for the remaining 49 letters which excludes the characters 0IOl.

It seems to me that the following regular expression should work to find an uncompressed private key:
5[HJK][1-9A-HJ-NP-Za-km-z]{49} (inspiration: Stackoverflow).

Later, another format was introduced for compressed keys, which has 52 base58 characters, and starts with a 'K' or 'L'. For that format, you should be able to use the following regular expression:

[KL][1-9A-HJ-NP-Za-km-z]{51}

Note that regular expressions can use slightly varying syntax, so you might need to adapt the expression to the programming language or tool that you use. You can generate a few private keys, e.g. with bitaddress.org for testing material. You should probably be more effective if you include word boundary \b symbols before and after the expression.

If you're on a Unix system, these grep commands would find uncompressed and compressed private keys recursively from the directory you're calling from:

grep -r '\b5[HJK][1-9A-HJ-NP-Za-km-z]\{49\}\b' *
grep -r '\b[KL][1-9A-HJ-NP-Za-km-z]\{51\}\b' *

Or search for both of them with this combined pattern:

grep -r '\b[5KL][1-9A-HJ-NP-Za-km-z]\{50,51\}\b' *

To use grep on Windows, you could perhaps find a solution here: What are good grep tools for Windows?


The hash mentioned is already confirmed on blockchain. It is already credited to receiver.  You can see it here
So, it must be issue with your local node syncing.


Would first-seen prevent a double spend attack?

First of all, what is the goal? The Bitcoin consensus rules already completely eliminate the possibility of an "double spend" within any individual version of history ("chain"). The concern is about individual wallets accepting a transaction as a fullfilled payment, before it is certain that that transaction will end up in the winning chain. So when we speak about problematic "double spends", the term is confusing - no coin is actually spent twice - instead, it is the confusing name we give to "being convinced you were paid while in reality you aren't".
And there is an easy solution for this: waiting until the transaction is sufficiently confirmed before treating it as accepted. This approach is suggested in the Bitcoin whitepaper, together with an analysis that shows how risk of reorganization falls with increasing confirmations, assuming no attacker with a majority of the hashrate exists.
So the whole concern is about being able to accept transactions before they gather sufficient confirmations. And the answer is simply: if you want to be sure, you simply cannot. This is a fundamental problem: global consensus among untrusted participants is hard, and in Bitcoin's case, which relies on economic incentives to see that concensus emerge, you need proof-of-work to build up any guarantee, and that takes time - multiple blocks' worth of time.
If you're thinking of a rule where nodes reject blocks that contain transactions that they believe are fraudulent/doublespends, you're just introducing a recipe for the network to fork. We need a way to make all nodes agree on what transactions are valid, and if we had any other way of doing so without using slow and costly proof-of-work, we would.

It takes approx. 8 seconds for a transaction to propagate through the entire Bitcoin network. If we got rid of the concept of replace-by-fee and replaced it (no pun intended) with first-seen approach wouldn't this significantly reduce the likelihood of a double spend?

That's how things worked before the introduced of opt-in RBF (BIP 125), and still how it does work for transactions that don't signal RBF. However, its promises are widely understood to be an illusion: there were (and are) known ways to construct transactions that propagate slower than others through the network. All an attacker needs to do is create a slow-to-propagate transaction that pays you and broadcast it "close" to you in the network, while broadcasting a fast-to-propagate transaction that pays himself and publish it in many other places on the network at the same time. Most miners will see the second one first, and that transaction will have a higher chance of winning.
And if you look at incentives, you don't even need that. Miners have an incentive to accept the highest-fee transaction, regardless of when they see it. Even if the network doesn't relay it, nothing prevents an attacker from sending a higher-free transaction directly to a miner. They'd be stupid to reject it. Bitcoin software initially (and still, for non-BIP125 transactions) was written to reject such replacements, but as profit margins for miners shrink and the industry becomes more competitive, it seems very unlikely to me that miners will not eventually just accept whatever maximizes their income.

Even if an attacker is running another wallet on the other end of the planet and broadcasts an identical transaction right near the winning mining node, such a double spend transaction would still reach the merchant within < 16 seconds.

That's assuming that the network provides a reasonable guarantee at relaying conflicts. It doesn't. Nodes only relay the transactions they themselves accept. Relaying conflicting transactions so the rest of the network can learn about conflicts has many problems:

It doesn't necessarily work. If the attacker hands the conflicting transaction directly to a miner, they may not have any incentive to reveal it to the rest of the world before it is mined.
Done naively, it is a trivial DoS attack: an attacker simply creating a myriad of conflicting transactions would result in the network relaying all of them, at no cost to the attacker except the fee of the one variant that eventually gets mined.
Done less naively, with precautions in place to prevent said DoS attack (e.g. through rate limiting that kicks in at some point), it becomes trivial to bypass: first produce enough transactions to trigger the rate-limit, and only then perform the attack now the network has decided they've had enough of your conflicts.
It helps the attacker. If the conflicting transaction pays more, the network relaying it will make it easier for economically rational miners to pick it up.

In fact, there is barely any guarantee that even honest transactions propagate well in adverserial setting. It is even less the case for conflicts.

Would a merchant be able to simply listen out for a double spend transaction and conclude with a reasonable high confidence level that it is very likelihood for a double spend to happen in this case?

It is certainly possible to use heuristics to try to analyze the probability of conflicts, and for sufficiently low-value transactions, it may be fine to treat the occasional risk of a reversed transaction as a cost of doing business. But remember that past performance is not a promise of future success. Just because nobody attacks you doesn't mean it isn't trivial to do so; it may just be that it wasn't ever worthwhile to try.
TL;DR: if you want to be sure about a payment, wait for confirmations


Private credit card/debit card exchanges?

If you operate below the radar that practice can thrive.  For instance, if you were to accept a friend's credit card swipe using your Square dongle for the sale of your bitcoins, you'ld probably be in violation of the merchant agreement.

If the charges are from friends and family and only made occasionally Square will probably never know nor care what the reason was for the purchases.  But start doing regular "card not present" tranasactions for larger transaction amounts (e.g., $100 or more) and that's probably when you'll end up getting asked for more details on your business activity.

Do know that you expose yourself to the risk of a chargeback should a payment dispute occur.


Identifying wallet file among soup of recovered .dat files


Create a wallet from the HD recovery phrase

No, bitcoin-core does not support bip39 mnemonic phrases.


How can a website detect when bitcoins have been deposited?

If you're going to be running bitcoind, what you're looking for is the walletnotify configuration setting in bitcoin.conf.

If you enable walletnotify, you run an app like curl to post the data to a web page.  The data that you'll receive is the transaction id of an incoming transaction for an address in your wallet.  From that you can use bitcoind's json-rpc commands to get the address that received the transaction as well as other transaction details like the amount.

Walletnotify will execute twice.  It will execute the first time that a transaction appears, and then will get called again when a block is published that includes the transaction. You can use either or both of these notifications depending on your needs.

This is the curl command that I use in walletnofify.  You should make any changes for your own environment.

curl -X POST -H "Content-Type:application/json" -d '{"transactionId":"%s"}' http://127.0.0.1:81/api/v1/transactions


This is not possible.
The Bitcoin protocol (currently) has no affordances to control what a recipient can do with coins they receive.


Please explain WalletExplorer.com layout of data

You may try c-hound.ai for a more intuitive interpretation of wallet data. It goes a bit further compared to most common wallet explorers, by highlighting inter-address relationships, token balance, and more. I hope my suggestion will come handy for you.


use msi afterburner, set your gpu fans to 80% and TDP 70% then play around with core clock and memory clock, maybe +100/+450 is a good place to start

this will give you better cooling, lower power costs and better hash rates


double spend the mempool to outbid an attacker

Many nodes today will not replace any transaction in their mempool with another transaction that spends the same inputs, making it difficult for spenders to adjust their previously-sent transactions to deal with unexpected confirmation delays or to perform other useful replacements.

First paragraph of 'Abstract' section in BIP 125
Maybe if the transaction had RBF enabled it would be helpful or if the transaction had a change address in outputs to try CPFP
Hackers are expected to use high fee rate, no RBF, no change address  etc. although it's not the case in lot of incidents that I have observed.


How can transaction fees be explained in a simple way?

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

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

The way to calculate the fee

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

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

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

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

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


Extract private keys from Bitcoin Wallet

Use pywallet to extract the private keys and copy the output to blockchain.info's Import Backup page.

To use pywallet, you open a command prompt/terminal window at the folder where you saved it and type ./pywallet --dumpwallet --password="Whatever your passphrase is". NOTE: this will output everything in plain text, so if you do this on a public computer or with somebody looking over your shoulder, some of your bitcoins may be stolen.


What does the curve used in Bitcoin, secp256k1, look like?

I'm afraid you won't like the answer.

These curves - including the secp256k1 curve, y2 = x3 + 7` - 'look' nice when evaluated in typical number fields (integers, reals, ...), but secp256k1 is defined over the field Z2256-232-977, which means the X and Y coordinates are 256-bit integers modulo a large number. Curves using such coordinates do not have nice continuity properties.

I've tried to plot this curve over a similar but much smaller field, Z28+1. Coordinates extend from -128 to 128.

Note that even though it may not make sense geometrically anymore, it still has all properties you need. A line (which means, a group of points with equation ay + bx + c = 0) that 'intersects' 2 points of the curve, will intersect a third. Tangent again has no geometric interpretation anymore, but you can still compute a local linear approximation for the curve equation in a given point, which will have the property of intersecting the curve in a second point.

To show you what you'd get if this were over the real numbers, here is a plot of the same curve equation for that case. Once with coordinates -128 through 128, once with -8 through 8.


Exactly two RPC calls can't be called when Bitcoin-Qt is running:

encryptwallet
stop

stop isn't yet implemented because there is work to be done to get the GUI and all of bitcoin's internal threads to shutdown in the right order (get the order wrong and we get crashes during shutdown).

encryptwallet isn't yet implemented because stop isn't yet implemented, and properly encrypting the wallet means re-writing wallet.dat and then shutting down cleanly so any database files are cleaned up properly (and any unencrypted private keys don't get left on the disk).

I'm not sure what you mean by "not available in any client" -- as far as I know, the original "Satoshi" client is the only one that supports the JSON-RPC interface at all.


How to fork an Altcoin Which has 0 Reward Block to continue mining after the LAST POW BLOCK

I don't know ,if you created the coin ,it will be very easy for u to extend the pos margin block area(those pow blocks:>)You not only need to differ the blocks when CreateNewBlock by nBestBlockHeight but also need to do some modifies in "getblock" message blocktype checking.
That's all i got ; If this helps please tip me some reputations guys,this new "50 reputation" for comments nearly silent me  .


Is there any party who is archiving all transactions that have been broadcast?

Anybody that has downloaded the blockchain has a log of all transactions. Blockchain.info should have it. In the future only accept confirmed transactions


Do UTXO's ever get consolidated to avoid complexitity?

When you pay someone using a number of utxo's to fund your payment, the output being created is a new single utxo with the total amount of all those input (minus change and fees).  Effectively, you are consolidating utxo's as inputs to fund your payment.

UTXO consolidation and breakage happens all the time by normal payments and doesn't usually require special intervention or handling by the user making the payment.


How do Javascript-based wallets generate random numbers and is this cryptographically secure?

Most modern browsers provide a native crypto api accessible through the window.crypto object.

https://developer.mozilla.org/en-US/docs/DOM/window.crypto

It is also possible to seed random values using mouse movements and key presses.


This particular error message on bc.i means that the transaction is invalid due to OP_EQUALVERIFY operation failed

scriptSig is:

493046022100e484f5550ced311af2efb111237a54d0d93e68ac03ed5d084c669ae69afc36c902210087e69ce39c91936a4ec6fd66fb3b98d920a5ce4c3660a5519f9aa802787b09bb01
41047920bd57b7b0dbf7ac242879ee1f1c4b87cbe30a1c31baa4d111850865042415d84f0a433174b3b17f41e280bfef85ff885dd8a1f25bf0823cfd77ec81bfc080

So the public key is:

047920bd57b7b0dbf7ac242879ee1f1c4b87cbe30a1c31baa4d111850865042415d84f0a433174b3b17f41e280bfef85ff885dd8a1f25bf0823cfd77ec81bfc080

This is uncompressed public key and its address is 1Lj3WeRAmyN98jyiWE6AtnMKfzUzrPUL9z

But 1a67415e9f892c31cdaec29f6bf7e8e7ffd5a7cdca52fc565ad345313f85b222:0 sends bitcoins to the another address: 1LCrg6DSqbcK5vh7XRAGEQA4jBpNigjwyV

Are you sure that you use uncompressed public key instead of compressed one?


How to spend an UTXO P2SH pay-to-script-hash

How to spend the output depends on the redeemscript. You have to provide a scriptSig that makes the script evaluate to True. More info on the wiki

If there are no signatures involved you can try to repeat the scriptSig that was revealed, although I doubt that would work as there are bots that do that automatically.


The scantxoutset RPC in 0.17+ will do what you want, although unless you batch query several addresses at once it may be a bit slower than what you were asking for.


Well, as far as I know, the most famous BTC wallet was and will always be Bitcoin Core Wallet

Then the rest of the most famous ones are as listed below:

MultiBit (Now MultiBit HD)
Electrum
Blockchain.info
Armory
Bitcoin Knots

There are other wallets as well whose info you can get from the official site by clicking here


You are using bitcoin CORE with the default folder in appdata?

so the location of the entire data folder (including the complete blockchain, and wallet.dat (where your private keys are) is in:

%userprofile%\AppData\Roaming\Bitcoin

copy and paste all that in a folder inside the USB drive.

specially care with wallet.dat, save it into TWO different drives, not one!, never do CUT and paste, do always copy and paste, and don't drag n drop either it's dangerous specially with touchpads hehe, if you don't have two usb hard drives for the entire blockchain, do a full backup in your USB drive, and then save in a flash drive only the wallet.dat.

it is one thing to have to download the entire blockchain because your USB hard drive died, and another is loosing all your bitcoins so, wallet.dat , TWO copies (remember, copies means that the file is in your computer AND on the devices) the more the better.

RESTORE: (my way, maybe there are other options, this is how i did it, multiple times! when defender screwed my blockchain data folder)

install bitcoin core (ideally the same version!, but it could be older, it works)

RUN IT
once it says sincronizing, close it.
(this is so the wallet will create the data folders)

now go to:
%userprofile%\AppData\Roaming\Bitcoin

and delete everything inside, and replace it with your copy from your USB drive backup


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

$ su - bitcoin

$ bitcoin-cli stop

Bitcoin server stopping

then install the last version

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

$ cd bitcoin

$ git checkout v0.18.0

then compile it

$ ./autogen.sh

$ ./configure

$ make -j $(nproc)

Now you can start it

$ bitcoind --version

Bitcoin Core Daemon version v0.18.0

$ bitcoind -daemon

Bitcoin server starting


The problem is with your script. If you want to push 201, you should use 02C900 rather than 04C9000000. The argument to OP_CHECKLOCKTIMEVERIFY is a number, not a byte array, so you must use the shortest encoding possible for it.


How to get the number of the confirmed transactions from Bitcoin QT Rpc

You can use the RPC command "getrawtransaction" to receive a JSON response with information for that transaction including a "confirmations" field if that transaction has been included in a block (if there are 0 confirmations the confirmations field will not be there). You should note though that if you are looking for transactions that are not actually a part of your wallet (from or to an address you don't have the private keys for) bitcoin-qt by default won't keep track of these transactions and will have to be run with the "txindex=1" flag set to keep a full transaction index.


bitcoin-cli JSON-serialized error output

bitcoin-cli does not currently support dumping the raw JSON-RPC response. The relevant section of the Bitcoin Core code is here https://github.com/bitcoin/bitcoin/blob/2753285be72dd051cf2987ca5c80d0b149914020/src/bitcoin-cli.cpp#L455 .


Why pose limit on update ratio of network difficulty

Imagine we have a system with no restrictions on the period or rate of decrease. Every block the period is updated looking back 6 blocks and adjusting the difficulty to suit, this is a modification people have made to Bitcoin forks in the past in the belief that there is no harm in doing so.

In this system, to attack a single user all we need to do is partition their node (the exact method is irrelevant, but it is possible) from the rest of the network so they can no longer see new blocks being mined. With the right timing, we might only need to solve a single block on our newly created side of the network and the user/s there will adjust their difficulty dramatically lower to compensate. With no limits, the user will happily accept order of magnitude hashrate decreases without any concern.

We now have to spend next to no effort making very low difficulty blocks on this fork. This allows us to do things like coercing the users into accepting payments with false low-difficulty confirmations, once they re-join the network they will find the confirmations will disappear and they will have been irreparably defrauded. This process would take a very short time and there's no way a user would notice the attack in time to not be stolen from.


Is my understanding correct please?

The only nit above is the total amount of data is increased a little - so little that it can be ignored.

  Does it mean that for old-fashioned Nodes who don’t look at Witness side-chain, they can only verify transactions up to the SegWit implementation, and will have to reject new blocks because they won't find a valid signature within the new blocks?

Wrong. SegWit outputs look like AnyoneCanSpend outputs to legacy nodes (AnyoneCanSpend = P2SH address that can be spent without a signature - you just have to know the script to spend it.) While new nodes understand the "Witness Program" and verify witness signatures, legacy nodes think it's just a usual AnyoneCanSpend script. Hence, they accept transactions that spend Witness addresses.


It just contains an apparently random collection of functions used by the program. It also declares some global structures such as the main lock, the transaction pool, orphan block tracking, and so on. It contains high-level block and transaction functions. Ironically, it does not contain the actual main function -- that's in init.cpp.


Should you be able to insure Bitcoin the way banks insure bank accounts?

It is covered by a cyber-insurance policy, the kind taken out by businesses that need to provide proof of security audits, etc. in order to get the insurance. NAIC lists things that would be covered (http://www.naic.org/cipr_topics/topic_cyber_risk.htm), which includes;
"Theft of valuable digital assets, including customer lists, business trade secrets and other similar electronic business assets." These policies are not typically offered to individuals.

The problem, and the reason why this is true, is that these policies are very expensive, relative to cost, and there is a adverse selection problem in insurance (https://en.wikipedia.org/wiki/Adverse_selection), as well as moral hazard (https://en.wikipedia.org/wiki/Moral_hazard) - so insurers won't ever fully cover these small risks that they can't observe or protect against, because they will end up losing money on them.


It is quite simple, you pay the miner a fee as part of your transaction to encourage the miners to include that transaction in a block. Block space is limited so larger transactions in size rather than value have to pay more fee.


It's not exactly true.  Bitcoin didn't exist ten years ago.  The initial version was released in January 2009.

But it is true that early in its history, Bitcoin could be bought very cheaply, and I am sure there was a time when you could have bought 20 XBT for one dollar.  (There was a famous transaction in May 2010 when two pizzas were exchanged for 10,000 XBT.)  And it's true that 20 XBT today could be sold for over $20,000.

You should not interpret this as any sort of indication that investing in Bitcoin today, or in any other cryptocurrency, is likely to provide the same sort of returns.


Why is Ethereum total network hashrate still increasing if there are no GPUS to buy?

People who already owned GPU before Ethereum became popular are joining mining now.
People with piles of money (companies mostly) buy GPUs directly from manufacturer or big seller (that's why GPU's don't reach retail markets mostly)


Can the Block Erupter be used for anything besides coin mining?

They'll be useless.

But the name pretty much says it all: Application Specific Integrated Circuit.

That's why FPGA's (field-programmable gate array) were such a huge success. You'd have a circuit that you could program! While much slower the possibilities are practically endless.


Sequence of Mining and Collecting Transactions

There's a 'mempool' of unconfirmed transactions maintained uniquely by every node, ordered by fee-rate. Miners select a template based on these transactions that is most profitable for them. If they solve a block, or someone else solves a block, those confirmed transactions contained in the newly seen block are stubbed out of the mempool and a new template is formed from what's left.


Account Addresses after moving wallet.dat to new computer

For this transaction it's 12mjN8ZX8nLNLw9KqTEWoR32J1hsKptEh5 that is the change address.

When you transfer from core it creates a new change address to recieve the balance.

If you do listtransactions you can see them all. listreceivedbyaccount may also be helpful.

Something that is helpful to keep in mind when looking at transactions is there there is no from address, something that sites like blockchain.info show and can be confusing.


Is buying and selling bitcoin in large volumes possible, or wise?

It is possible. You can go to Mtgox if you like, but of course you can make an offer in BITCOIN-OTC, "outside the market". If someone agrees your offer, this trade would't impact on Mtgox and similar markets.

It may be wise. You only need to be careful with people you agree to trade, using the "trust database" to see people's reputation, so you decrease the probability of getting ripped.


Accepting Bitcoin for Services Rendered with Legal Verbiage on Set Coin Price

If you want to go all in on cryptocurrency, you can make an agreement stating the payment method as BTC or ETH and then the amount. The value of these currencies may vary with time and hence no one really signs such an agreement, yet.

The best you can do is sign an agreement stating the USD value of your services payable in equivalent Bitcoin or Ethereum considering the conversion rate at the time of payment (excluding the transaction fee!) for every payment processed.


You customers can exhange any currency to Bitcoin and pay via Bitcoin with no fees.
So, you need to support traditional payment methods and Bitcoin as well, as a new way of payment over Internet. It's the future of payment.

Some day, you will kick-off VISA and Paypal from your website ;)


Build an online wallet service with Bitcoind, can it scale? If not, what can be done?

I hate to be this guy but if you're struggling with this chances are that you'll struggle to secure the private keys. Those private keys are the keys to your empire in a way you don't even want to think about.

Think very seriously about outsourcing this to a company with insurance for it. Or get insurance yourself. The outsourcing also takes the performance hassle away from you.

If you don't, please don't forget to make (really) cold wallets. Just place that cash elsewhere.

Perhaps more directly, there's several bitcoin daemons out there. You could make your own, too, with something like bitcoinJ. I met the guys behind btcd ("BitcoinD in Go") https://github.com/conformal/btcd at Bitcoin2014, their lead coder made a good impression.

I'm afraid there's no shelved answer for this question yet. Perhaps the best advice is "Do it, once you run into trouble you're successful already. Time enough to solve it later.".


multiple deposits using the same address for investment

yeah it seems like your correct, just make sure to be in control of your private key.


How is the previous transaction found efficiently?

Bitcoin clients maintain a list of the current unspent outputs in a hash table.


Your transaction can be seen here: https://blockchain.info/tx/ea36f903db582e5b87c3618208cae2b28957521b8567f5d7934fc8b47a663bd8

One of the inputs is address 1BPAcceeSNiNEHeeR1wEQDspvcq17jM142. It has an additional unconfirmed transaction at 671454f599c947cc01bf69defe68a6e59e869352006fb8b86df17dd51bc1d1fd. One of that transaction's inputs is 1KhqWzuRSB4cLsAnTtKjf8TGtY7HsNAdM4, which has an additional unconfirmed transaction at 8b780e2d3197ebdaf74688333fefc0fa83a11ff24f687423899354455881c14c. And here is the problem:

Your later transactions cannot complete until their inputs are confirmed. Your only option is to wait at this point.


Why does the Bitcoin pool reject my Antminer D3 shares?

You cannot mine Bitcoin with D3.
You can only mine Dash with a D3.


How would Bitcoin usage be affected within a country that severed its Internet connection?

A government that shuts down its Internet to civilians is a government in crisis

The economic cost of shutting down all government regulated Internet connections within a developed country is enornmous. It is extremely unlikely that a first or second world government would take this step simply to block Bitcoin transactions. It may be that if Bitcoin rises to become an ISO recognised currency traded by governments the decision is made in order to somehow preserve sovereign wealth in the native currency that is now under threat from Bitcoin, but that is a long way off from today and would ultimately prove futile. It would also show very poor financial planning on behalf of the nation since they can simply continue their mandate that all taxes and fines must be paid in legal tender forcing a conversion out of Bitcoin to their native currency.

The question of how Bitcoin could respond to such a switch off is similar to how the Internet itself would route around the problem. There are a multitude of ways that ad hoc networks can be established. Bitcoin has been shown to be at least as resilient as the Internet in terms of the myriad of ways that transactions can be made to reach an Internet connected node. For example, Bitcoin transactions have been transmitted over HAM radio, NFC and Bluetooth. There are many alternative digital networks that can serve as backup routes to the wider Internet.

Even in the total absence of electricity, the Bitcoin network can survive through physical bitcoins. So long as trust is maintained in the security seal protecting the private key it is only necessary to conduct occasional verification checks that the amount displayed on the token represents the amount accessed by the key. Simplified pricing schemes (to allow accurate change) would enable invisible private key based trading. An occasional radio broadcast to co-ordinate the current bitcoin value against other currencies in use would be sufficient to allow merchants to price their goods accordingly.

Remember that in times of trouble people will seek to use whatever they can to get by. If bitcoins are perceived by most as being the best way to conduct trade as, say, the dollar enters hyperinflation, then they will use them. If something else provides a more stable medium that is more appropriate to their circumstances they will use that. However, Bitcoin is by far the most flexible form of money ever invented so it seems likely that it will survive better than others.


How much escrow/ Multi-signature transactions are done?

Blockchain doesn't currently offer that and the only way to construct a transaction like that is to build it manually.  So as a result both the sender and each recipient must have l33t skills.

This capability will come, it is just that since that was introduced, scalability had to take priority over new features for most Bitcoin development.

They happen but rarely.  Here's an example of Bitcoin address used recently (March 5, 2013) in an escrow transaction:

,- http://blockchain.info/address/13MH4zmU4UT4Ct6BhoRFGjigC8gN9a9FNn


How do I retrieve the funds on my Core wallet when I can't synchronize the blockchain?

You'll want to use bitcoin-cli to dump the priv key and import it into a lightweight wallet. Here's the command to do this in bitcoin core:

$ bitcoin-cli dumpprivkey <address that contains your coins>

This should dump out the WIF format private key.

You can import this private key into something like Mycelium which will then have access to your funds. Typically, the wallet will sweep the funds from the address containing your coins to an address controlled by Mycelium. In any case, you'll have full access to your funds after you do this, though at the cost of some miner fees (about 10 cents)


Redeem bitcoins of non-standard transactions made with eligius

Yes, if you pay bitcoins to a non-standard pubkey script, you can spend them in a later signature script using Eligius.  But there are some conditions:

The pubkey script must be spendable.  For example, a pubkey script starting with OP_RETURN can never be spent.  It's up to you to craft your non-standard script to make it spendable.
Eligius will only mine valid transactions.  For example, you can't have a data push of more than 520 bytes in either the pubkey or signature script.
The IsStandard() checks check more than just op codes---they also require minimum network fees (to avoid "dust" spam) and correct transaction version numbers.  Eligius still includes these parts of the IsStandard() checks.
Eligius has its own minimum fee for non-standard transactions: 0.00004096 BTC per 512 bytes according to their FAQ.

If you're going to send custom transactions, I highly recommend that you test them on Testnet first.  (Testnet allows non-standard transactions.)

Note also that Bitcoin Core 0.10 will likely relax the IsStandard() rules for P2SH, making it possible to use pretty much any script you want as long as you wrap it inside P2SH.  (That won't help you now, but it's a good thing to consider when developing your script.)


Would it be possible to convert low-end ASICs designed for mining Bitcoin into Litecoin mining rigs?

Nope, ASIC implies a physically designed chip only meant for doing 1 thing. And bitcoin ASICs are only capable of SHA hashing while litecoin demands scrypt hashing.


how does solving hashes and building blockchain help the human race?

The comparison and contrast between Banks and Bitcoin is a pretty good one.

Banking computers sit around adding and subtracting numbers to keep track of people's money:

Who made their car payment?
Who received a paycheck?
Who is spending more money than they have, and what are the consequences?

Is any of this useful to the human race?

At the end of the day, no one has any more food or lives a longer life because of a banker's math.  But we all know this is important basic element of infrastructure to keep society running smoothly.

Bitcoin miners do the same thing, they keep detailed accounting of people's money.  They don't directly feed anyone, but providing an accounting and a means to exchange money is important to the functioning of society.

Mining makes tradeoffs that are different from banks.
On one hand, they use a lot more electricity than banks, but on the other hand, they break the reliance and necessary trust that banks are acting responsibly.

This is especially important when we saw during the 2008 Financial crisis that banks were not trustworthy.  They intentionally made bad loans, took huge risks, and damaged the economy to enrich themselves.

Because of bankers actions then, bad things did happen to society.  Rates of bankruptcy increased, and that is not an abstract financial situation.  Financial stressors are closely correlated with increased rates of suicide, divorce, alcoholism, spouse and child abuse, etc.   These bankers literally ruined lives with their irresponsible decisions to enrich themselves.

Bitcoin (probably) won't ever do that.
Is that good for society?  Is it worth the increased electricity and computing costs?  Maybe or maybe not. No one is entirely sure.  But it is certainly a worthwhile experiment to investigate.


In which cases could I find funds locked in a failed route?

The funds in the respective HTLC's get stuck for a time-out period if the payment_pre-image doesn't propagate back along the route to your originating channel. There is no guarantee beforehand that this propagation will be successful. That is why HTLC(sent)'s are always signed together with a respective time-out transaction, with a signed input that spends this HTLC output in such a failure scenario.

Testing with smaller amounts as you propose ensure that only smaller amounts are captured in the HTLC outputs of the commitment transactions in your channel, so only a smaller amount would be "stuck" (this HTLC output is spendable later by the respective time-out transaction during a channel close). So until the time-out period is over, you have the remaining channel capacity to transact with.


What is a block index in blockchain.info?

I think that this value is an internal unique index in bc.i database.

It is not possible to use txid as an index because of 2x2 duplicate transactions in blockchain

https://blockchain.info/tx/d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599
https://blockchain.info/tx/e3bf3d07d4b0375638d5f1db5255fe07ba2c4cb067cd81b84ee974b6585fb468

occurred in the early stage of bitcoin

see BIP-30 https://github.com/bitcoin/bips/blob/master/bip-0030.mediawiki

UPD: ok, you are asking about block index, but my answer is for tx index. May be using straight autoincrement int64 value for database is better than int256


You need to issue a getdata on the last entry in the returned invs. This is used as trigger that you have processed the response, and the remainer will be sent automatically.

Note that since version 0.10, Bitcoin Core does no longer use the getdata/inv/getdata/block cycle to synchronize, but getheaders/headers (for synchronizing headers). Actual blocks are then fetched asynchronously from different peers after the headers are discovered.


How can I recover private key as coins were sent a random generated address on wallet?

If the address is not part of any of the wallets that you have control over than you cannot recover the private keys. Because in that case, you're basically asking the same as asking to recover the private key to anybody's bitcoin address. I'm sure you know the answer to that question.

If the address is part of one of the addresses of your wallet at bitWallet, you can just spend from your wallet as usual. If you meant to ask how to do that, please update your question to reflect that.


Automatically buying bitcoins from SEPA deposit

There is a website called  Bitcoin Magnet that does exactly what you require. Check them out, they have good reviews. They convert a bank transfer containing your reference code into bitcoin (using Bitstamp) and send it automatically to your desired bitcoin address. You can therefore set up a standing order to buy on a regular basis. UK only.


Is there actual economic value in trading crypto currency?

Yes, there is.

People who trade currencies (or commodities, for that matter) broadly belong to two groups - those who actually need to convert one thing to another; and those who hope to buy low and sell high for profit.

In Bitcoin's case, typical examples of the first group are an individual who receives his salary in USD, and converts the USD for BTC to use it; and a business which receives payment in Bitcoin, and converts to USD to pay its suppliers. In both cases, economic value is created by enjoying Bitcoin's advantages; and in both cases, trading BTC/USD was needed to allow activity that would be impossible or less efficient without trading.

The second group is simply people who trade BTC/USD for profit, and often come out with the same currency with which they went in. To be successful, they need to buy low and sell high - and if they manage to do that, they are actually providing a service to the first group. Since buying drives the price up and selling drives the price down, buying low and selling high keeps the price stable at some midrange. This makes the price more stable, and reduces slippage costs, thus making the usage of the currency more efficient. So they are also creating economic value by making it easier to use the currency for commerce.

This is true even over long periods of time. A Hodler who buys a bitcoin for $1, and only sells decades later when the price is $1M, is helping the economy by giving the currency a push when it is nascent and underappreciated, and only realizing her gains once Bitcoin has reached its potential.

Of course, a dumb or unlucky trader can buy high and sell low; in this case, he is actually adding volatility to the price, and creating economic harm. But he will also take a loss himself if he does that. As long as the trader is making a profit, she is creating economic value.


The 17 GB of data in your blocks folder is the blockchain. This is the public ledger of all transactions in the Bitcoin network, from day one. A full node needs all this data to check each new block that arrives from the network. As time goes on, the size of the blockchain will only increase.

There exist other clients such as MultiBit which do not require the full blockchain download. These are called SPV or Simplified Payment Verification clients.


What is the cheapest Cash-to-Bitcoin Service?

In the U.S., the least expensive method is a Dwolla transfer to an exchange that accepts Dwolla (Mt. Gox, and Camp BX).  Dwolla charges $0.25 per transaction when the amount transferred is over $10.

Quite simply, depositing cash at a bank or 7-11, Walmart, CVS is going to be the fastest and easiest way.

One method that was the least expensive, depositing cash at an exchange's bank, is currently unavailable as the exchange that offered that (BitFloor) has suspended that method, temporarily apparently.

BitMe offers this but they don't have much liquidity yet (on the sell side) so that might not work.

If you are looking to deposit $500 or more, then Bitcoins Direct will accept that cash:

http://bitcointalk.org/index.php?topic=87094.0 (Deposit cash at Bank of America, Wells Fargo or PNC, minimum $500)

All other cash deposit options:

http://www.BitInstant.com (Deposit at major banks, 7-11, Walmart, CVS, Moneygram, etc.,)
http://www.BitMe.com (Deposit cash at Chase)
http://www.BitFloor.com (Deposit cash at Chase or Wells Fargo)
http://www.bitinnovate.com (Deposit cash at a bank in Australia & New Zealand)
http://www.CAVirtEx.com (Deposit cash at several banks)
http://www.Spendbitcoins.com (Deposit cash at a bank in Australia)
http://BitcoinNordic.com (Purchase CashU or UKash in dozens of countries)
http://www.BTC-E.com (Deposit cash (USD) at bank locations in Russia)
http://www.BitNZ.om (Deposit cash (NZD) at back locations in New Zealand)
http://www.BitInstant.com (In Brazil using Boleto or Banco Recomendito, or in Russia, using Qiwi or Cyberplat.)
http://www.bitXoin.com (Deposit cash over the teller at Major Australian Bank Branches)

Alternatives:

If you are in the U.S., there is one vendor that apparently is offering to sell via credit card.

https://www.quickbitcoins.net

The fees aren't trivial but you can use a credit card to purchase by using VirWoX where you can buy SLL using your credit card, then trade SLL for BTC:

http://www.VirWoX.com

There possibly are other options that will work for you as well:

http://en.bitcoin.it/wiki/Buying_bitcoins

Last of all there is #bitcoin-otc where you can connect with sellers via IRC:

http://bitcoin-otc.com/


Why is reusing bitcoin private keys frowned upon?

Each private key is tied to an address.  A private key is used to generate a corresponding public key, and that public key is used to generate an address.  Due to Bitcoin's support of both compressed and uncompressed public key formats, each private key can actually generate two different addresses (however, you should really view these as the same address, since they are just different encodings of the same keypair).

Private key reuse is the same thing as address reuse, and thus comes with all the privacy implications that go along with address reuse.  Someone watching the blockchain will be able to associate your addresses with other addresses, and then be able to use 3rd party data sources to gain insights into how you obtain and spend your money.

The other issue is the potential for future cryptographic vulnerabilities.  When you spend money from an address, you are publicly revealing the public key part of the keypair.  This public key can easily be converted into either its compressed or uncompressed form (depending on which it is), and the other address it generates can now be associated as well.  It also opens up the possibility that someone can attempt to derive the private key from the public key.  While there are no known attacks on the secp256k1 elliptic curve cipher that Bitcoin uses, addresses still provide a level of protection even if a vulnerability is found.  Addresses are generated from cryptographic hashes of the public key (with some checksumming added to prevent typos when spending), and therefore it's impossible to obtain even the public key of the keypair from an address.  Once you spend from that address, and reveal the public key, you no longer care if someone cracks that key.  You won't be using it again.

There is also the case of simplicity.  Addresses are very easy to generate, and we are in no danger of "running out".  I would argue that a system that reuses addresses may find itself being more complicated than a system that simply generates and stores a new one when needed.  Deterministic wallets have made this even more simple, where a single seed value can be used to restore an entire wallet worth of private keys.


Bitcoin doesn't have a "real worth".  It is not backed by any sort of resource.  Bitcoin is considered valuable for the same reason gold is valuable; it is difficult to acquire, there is a limited quantity of it, and people are willing to pay a relatively high sum for it.  If everyone decided they no longer wanted to participate in bitcoin and sold all of their coins, bitcoin would no longer be worth anything (assuming no one else wanted to buy into it).


Does Bitcoin Core leak private information during synchronization without Tor?

Nope, don't worry. The nodes you have connected only know that your IP address has downloaded the blockchain, but the transactions you'll make in the future won't contain information specific about it.

The main threat to your privacy are contact points between the blockchain and real life (when you make a purchase and pay with Bitcoin, when you buy at an exchange that know who you are, when you publish an address in a forum...) because that puts your name next to an address someone could eventually follow.

When you make a transaction without Tor you could also compromise your privacy, but it is a long shot because nodes don't store the IP addresses that sent the transactions (and there is nothing in the blockchain either). There is still a chance because someone could modify a node to record the IP addresses and, if you connected to that node, it would record your IP address and your Bitcoin address together. By making that rogue nodes highly available they would increase the chance that you connected to them. There was at least one case of a company doing this in the past that has been discovered, but they said it was something like and experiment.

If you want to learn more about Bitcoin and privacy you can start at:

www.bitcoinisnotanonymous.com


How do mining pools figure out the hashing speed of the connected miners?

Since pools only receive successfully calculated shares they must approximate your actual hashrate based on the number of shares submitted.

Assuming we're talking about difficulty 1 shares, you should be able to approximate hashrate via H = S * 2^32 / T where H = hashrate, S = shares submitted and T = time in seconds. Your estimate will be more accurate for larger values of T.

It takes approximately 2^32 hashes to find a share and each share has a 1/D (D = difficulty) chance of correctly solving the block. From that, with some simple math, you should be able to calculate almost every important thing about mining.


You will not be able create unconfirmed chain for 300 transactions. Bitcoin core default limit is 25 transactions. In case you modify this parameter on your local node, network will not accept tx chain longer then 25 tx.  You have to rebroadcast transactions again after your first batch (25) confirmed.


Syncing node to usb 3.0 drive taking ages

Increasing the database cache should help a lot to reduce disk I/O. For example dbcache=400 (100 MB is the default).


He has a PGP public key which he can use to sign things.


Do I need to backup a wallet every time I generate a new address?

When you generate new accounts inside a wallet you will only have to make a back-up once. The backup key gives armory the possibility to create a indefinite series of addresses for your wallet.

Please note that by default, Armory only generates 100 addresses. This means that when you use more than 100 and you lose your wallet, after you restore the back-up, the client will at first only see the first 100 addresses. You will have to specifically tell Armory to look for more addresses.

This does not count for addresses you imported in a wallet! If you import private keys to a wallet, you will have to back-up them separately! The easy back-up process only works for addresses generated by Armory.


As mentioned, I don't believe HD Wallets are relevant to this problem. Even with simple wallets combining inputs from multiple addresses proves that a single person owned all the addresses included. I'm not sure if this would meet your specific privacy needs, but it is at least a straightforward way of avoiding that problem:

Assume you have 4 addresses, A, B, C, and D. You want to send a transaction that requires funds from all 4 without proving that they were owned by the same person. You could generate a 4th address E and over the course of several days combine all the address values at a new address.

While the blockchain would show that the funds in E came from A-D, there wouldn't be any proof that A-D were owned by the same person, as they were never in a single transaction together, and it is feasible that 4 different people all transferred value to E, instead of the same person transferring value to E.

It seems feasible to write a client that follows that policy of never combining inputs from multiple addresses in a single transaction, which would at least allow plausible deniability. The user would be able to manage timeframes depending on their needs, so that the combination could occur over the period of an hour or a year, depending how soon they need the transaction. You could also add some intermediary steps to split things up a bit more and pass through a few extra addresses to make it slightly harder to follow.

Since it is a public ledger it really isn't a very anonymous system, and achieving anonymity is difficult without a mixer, but the biggest compromise to anonymity is connecting multiple addresses in a single input, so simply avoiding doing that will be helpful, but at the expense of convenience.


The Altcoin blockchain network itself needs to accept AuxPOW. Peers on the network which don't have a node which understands AuxPOW (so, all of the peers on any network) will reject your merge-mined blocks.

Effectively, you'll be creating your own private fork of the Altcoin blockchain which allows AuxPOW diverging from the original blockchain at the first AuxPOW block, and you'll be the only miner. The developer(s) need to implement AuxPOW, and the community needs to adopt the update. AuxPOW solutions aren't valid on a blockchain network which doesn't acknowledge AuxPOW.


How to get legacy address and private key from Segwit P2SH address?

You have the private key so you can just derive the address from there. Get the corresponding public key, hash it with SHA256 and then that result with RIPEMD160. Then perform Base58Check Encoding on it.


What are pros and cons of txindex option?

If you're using Bitcoin Core just for your own personal use, you probably don't need the -txindex=1 option. But, if you're using Bitcoin core for development or blockchain analysis of some sort, you will need to set -txindex=1 to be able to get transactions data for any transaction in the blockchain.

The tradeoff is just that keeping an index is slightly slower, but allows you to do things like:

bitcoin-cli getrawtransaction aec2729f5e46750b310b6feadcf853098aa86df74f93322a701c29cd68b22568

(where aec2729f5e46750b310b6feadcf853098aa86df74f93322a701c29cd68b22568 is the ID of a transaction that does not affect your wallet at all).

Also, if you have been running your client for a while but haven't had txindex=1 set, then it might take a few hours to build the index. If you want to rebuild, launch with the -reindex option.


You can use their web-wallet here: https://wallet.rise.vision/


Is there a user-friendly tool for creating and signing raw transactions?

Electrum has a gui form for just that. Also I think brainwallet.org has a web form that works offline and runs off github source directly so you can verify privacy concerns.

Edit: also see:
http://bitcointalk.org/index.php?topic=40264.msg851062#msg851062

As referenced in Transaction signature generation


Is Blockchain safe to store personal information?

Usually hashes are what's stored in the blockchain, not the data itself. It's safe to store hashes because it's extremely difficult to reconstruct a message given its hash (the so-called pre-image attack).


Banning Bitcoin through packet filtering

The Bitcoin network operates over TCP sockets between nodes. This has several consequences.

Blocking URL's or domain names is not possible.
By default, Bitcoin uses port 8333. It's possible for a school/uni to block this port. For an ISP, however, this is not possible, other applications might use port 8333 as well. Also keep in mind that it is very easy to change the port your Bitcoin client is using.
All Bitcoin packets start with the same "magic byte". This means that it might be possible to inspect all TCP packets looking for this magic byte. However, this might break many other internet functionalities, so I doubt if this type of blocking would ever be performed.

Important to note is that this two ways of blocking can easily be dodged by using an encrypted connection, f.e. with a VPN.

So basically, it is really infeasible for any party to block Bitcoin traffic because all possible blocking methods can easily be avoided. This holds for most P2P technologies, look at BitTorrent f.e.


First of all, a wallet.dat file does not contain a single public key; it contains multiple keypairs. You can use PyWallet as Meni says, but if it's too technical for you, you can install the wallet but don't have to download all the blocks. Your public keys will show up under "Receive coins" (even if the blockchain is not downloaded), and you can copy each of them into Blockchain.info to check the balance of each address. Adding them all up will give you your total balance.


how to get private key of old receiving address in blockchain.info. I have passphrase!

Unocioin

Did you mean Unocoin.com?

As far as I can tell, Unocoin operates custodial wallets (via BitGo and Blockchain.info APIs), meaning that only they have access to the private keys. If this is true and you've transferred bitcoin into your Unocoin wallet, then the only way to retrieve it is to log into your Unocoin.com account (or contact their technical support for assistance).

You could also try sending a message to bitcointalk user dashingriddler who apparently is a Unocoin employee.


Private Key leakage due to reusing same address, how to prevent?

No, reusing address won't succeed in private key leakage (assuming quantum resistance).

Yeah, reusing has two meanings - if you use static address it may succeed in lack of privacy. Imagining the situation when you share single address with police department for some contract work, and also you use the same address in your darknet market store (hypothetically).
But reusing is also related to spending from an address, during which you share your public key (it's needed to be shared publicly to confirm transaction signature).

Use BIP44 scheme, don't share one address to more than one person. Use invoices (btcpay server) rather than static addresses. If you want to be even more private, use P2E or Paynym's protocol.

As in example in point 1, once is enough in some case

Address reusal is a problem in utxo-based blockchains. Ethereum, being account-based is much less affected by it, as the privacy on this front is non-existent by default in account-based model blockchains. With bitcoin, utxo model is at least preventing users from obvious mistakes.


Is the bitdigger chrome extension fraud?

I just want to know is it fraud or legit?

I have never used it. But: It's not profitable. Big mining pools use ASICs to mine bitcoins. In the past, people used GPU. But mining in your browser means mining with CPU which is completly unprofitable as you will probably never be the first one with a hash of 20 zeros but you'll waste energy.

  Is it possible mining via Javascript?

Yes. There is Coinhive. They offer a script you can implement in your website. And if a user with activated Javascript visits this site, the mining starts. But it's not bitcoin what is mined. It's Monero because it's much more profitable.


How to getreceivedbyaddress() with the python-bitcoinlib?

It's probably not in there right now; look at the code in bitcoin/rpc.py and add it! Basically you just need to follow the same pattern as other RPC calls. When you're done send me a pull-req on github.


Hash that defines previous block in Blockchain vs mathematical solution

Yes, it is. That is the hash of the block header, so it is used as an identifier for that block, and is used to reference it in the next block in the same way that a hash of a transaction (txid) is used to refer to that transaction.


the default extension is now ldb https://groups.google.com/forum/#!topic/leveldb/u9izbG-pDis

Which library are you using to read leveldb? I suggest you use plyvel. It will be able to read chainstate


What is the main difference between "light/thin client" and "client" in sense of "functionality" and "capability"?

Usually the distinction is made between full nodes and lightweight nodes.

A full node independently validates all transactions. It guarantees that not transactions or blockchain will be accepted which spend funds without authorization (theft), create money out of thin air (inflation), or violate various other rules that exist for a smooth continued operation of the system. Full nodes guarantee this for every transaction, not just your own. Full nodes need to download the entire chain (otherwise they can't validate history), but do not necessarily need to store it on disk (see pruning).

A lightweight node, or SPV node, does not validate anything except proof of work. This means they rely on the majority of the network's hashrate to be honest.

In functionality there is little difference. The difference is in the trust model. Lightweight clients trust the network, while full nodes audit the network themselves.


If a bitcoin wallet service provider terminates a users account, what happens to the funds?

This is why people say "Not your keys, not your bitcoin. Your keys, your bitcoin". The online marketplace owner owns the private key of the address that your friend used to fund his account. The owner of the marketplace can always say he lost the private key of your friends' account, but if he wants, he can prove ownership by signing a message with the private key (he has nothing to gain though).

Your friend should provide a new address to the owner of this marketplace and ask him to send the bitcoin that he had to that address, otherwise, yes, he is probably stealing.


How does one send and receive Mastercoins?

To send or receive MSC, you only need a Bitcoin wallet when you have control over the private keys. so web wallets don't count


What is a Key pair? & relationship with adresses?

Generally, it's one address per keypair.  This is even true in deterministic wallets where you generate multiple keypairs based on a single seed.  Remember that there are still multiple keypairs in this scenario.  A private key is generated randomly (or deterministically from a seed), and then a public key is derived from it.  After that, an address is derived from the public key.

However, it's not quite that simple.  There are two different representations of elliptic curve public keys that bitcoin supports, meaning that you can generate two different address from the same private key...both of which can be claimed with that private key.  Wallets generally only use a single public key format (usually compressed), so within a wallet, there's one private key to one public key to one address.

Also, there are different types of addresses (pay-to-public-key-hash, pay-to-script-hash, mainnet, testnet, etc...), which each could use the same public key to generate different addresses based on their corresponding prefix.  This is why pay-to-public-key-hash addresses begin with '1' and pay-to-script-hash addresses begin with '3'.  To my knowledge, no wallets will generate two types of addresses from the same public key.  That would be similar to re-using addresses, and is generally considered to be a bad practice.


I posted this answer on BitcoinTalk but will copy it here for those who don't want to chase links. The following is a direct paste from that link:

If you can, installing sage and using that rather than Python will make your life much easier. There is an example notebook on bitcoin.ninja which does some ECDSA stuff on Bitcoin's curve.

To directly answer your question, we can get x from y in basically the same way you got y from x. To see this, let's walk through why your method works.

We have from our curve equation that Y = y^2 = x^3 + 7. You can compute Y easily from x, then you're solving Y = y^2 for y. By Fermat's Little Theorem we can write 1 = y^(p - 1) = Y^(p - 1)/2. Write Q = (p - 1)/2; then we have Y^Q = 1, so Y^(Q + 1) = Y = y^2, so Y^((Q + 1)/2) = y. As it turns out, (Q + 1)/2 = (p + 1)/4, which is why you were able to solve for y by using an exponent of (p + 1)/4. Notice that this depends crucially on p being 3 mod 4; otherwise (p + 1)/4 would not be an integer and we wouldn't be able to compute this. Fortunately our choice of p satisfies this.

OK! So let's do the analogous thing for x. Let's write X = x^3 = y^2 - 7. X can be computed from y easily, so we need to solve X = x^3. Write Q = (p - 1)/3; then X^Q = x^(p - 1) = 1, so X^(Q + 1) = Q = x^3, so X^((Q + 1)/3) = x. As it turns out, (Q + 1)/3 = (p + 2)/9. This time we depend crucially on p being 7 mod 9, in order that this is an integer. Luckily it is! So there you go.

TL;DR use (p + 2)/9 in place of (p + 1)/4.

Oh, and to get the other two cube roots you multiply by a nontrivial cube root of 1. (Similar to you multiplying by -1 in your original code.) One such cube root is 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee.

Here is Python code analogous to yours. It takes one of your output y values and returns the input x value as x2.

## Input
y = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8

## Field parameters
# Field modulus
p = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
# Cube root of 1
beta = 0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee

## Actual code
xcubed = (y*y - 7) % p
print "xcubed = 0x%x" % xcubed

x = pow(xcubed, (p + 2) / 9, p)
print "x1 = 0x%x" % x
print "x2 = 0x%x" % (x * beta % p)
print "x3 = 0x%x" % (x * beta * beta % p)

Its output is

xcubed = 0x4866d6a5ab41ab2c6bcc57ccd3735da5f16f80a548e5e20a44e4e9b8118c26eb
x1 = 0xc994b69768832bcbff5e9ab39ae8d1d3763bbf1e531bed98fe51de5ee84f50fb
x2 = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
x3 = 0xbcace2e99da01887ab0102b696902325872844067f15e98da7bba04400b88fcb


That is how most exchanges work, with an order book containing bids (buy) and asks (sell) orders. The trading engine of the exchange will match orders as quickly as possible, though in cases of a crash or excessive volume exchanges have been known to suffer a severe amount of trade lag (e.g. mtgox), resulting in orders not being filled at the last price when submitting an order.

Here's an example of how an exchange works:

You have 1 XBT you would like to sell for $1000, so you go to an exchange, deposit your coin and place a sell order of 1 XBT @ $1000. If there are bids over $1000, your order will fill at the price of that bid. E.g. If there is an order to buy 1 XBT @ $1050, you will receive $1050 less exchange and withdraw fees.

If there are no buy orders above $1000, the exchange will put your order in the orderbook and wait until it fills or is cancelled (or expires, in some cases on some exchanges). In this example, if someone were to later place a bid to buy 1 XBT @ $1050, they will pay $1000 for your order (providing there are no orders trying to sell XBT for less already on the book).

If you are trying to sell in an easier manner, I would recommend using Coinbase, which works very nicely within the US.


but it didn't tell me from which address the transaction was sent from

Indeed, there is no 'from address' in a bitcoin transaction. (More info)

  Am I correct, that when sending a bitcoin transaction, all of the amount from a specific address gets placed in the input, a part of it(the part which I specify) gets sent to the address I wish to send, and the rest gets transfered to a newly created address on the same wallet, from which the send operation was initiated?

Correct, inputs are spent all at once, there's no way to partially spend it, so you have to send some change back to yourself. The sendtoaddress manages that all for you.

  How is Blockchain.Info able to retrieve information from any kind of Bitcoin Transaction, while I, using a full Bitcoin Node, can only find transactions which was either initiated by the node, or which has a receiving address which is in the nodes wallet?

That's a lot of data that bitcoin core doesn't usually need or use, so it's not usually indexed or accessible by bitcoin core. It's possible to use the -txindex configuration option to index all transactions including those not related to your wallet. But blockchain.info and similar block explorers probably run their own databases of information rather than querying it from a bitcoin node every time, allowing them to do more complicated searches in the data.


It can be something like this,

req.fee = Transaction.REFERENCE_DEFAULT_MIN_TX_FEE;

REFERENCE_DEFAULT_MIN_TX_FEE refers to the minimum fee required to relay a transaction in a block which is set to 1000 Satoshis as of now.

One must remember that the transaction fee is like an incentive brought forward by the Bitcoin user to make sure that a particular transaction will get included into a block which is generated in future(and soon enough). Hence, an appropriate value of fees must be included with a transaction. Check FeesPerKB for this too.


How can a block regarded as confirmed in bitcoin?

Let's say if A has 1 btc, and A sent 1 btc to B as transaction T1 and also sent 1 btc to C as transaction T2. It is possible that these 2 transactions are written into 2 different branches.

Yes. That's possible.

But there is still no double-spend because only 1 branch will be the accepted one in the future.

Assume that there are more miners. If miners 3, 4, 5 and 6 start mining on the second branch, it grows faster.
After 2 hours, branch1 has 1200 blocks, but branch2 has maybe 1209 blocks.
The chain/branch with the most block is the relevant chain. So miner 1 does not even want to mine on his branch anymore because he knows that the others will ignore this blocks 1201, 1202, 1203.
So miner 1 also switches to branch2 because otherwise, the only wastes electricity.


Why doesn't directory.io list addresses starting with 3?

Directory.io is a joke (see FAQ), or rather an illustration of just how vast the Bitcoin address space is.

It just shows standard P2PKH addresses, which don't include addresses starting with 3.


What is Valgrind? When should I use it for debugging Bitcoin Core over using gdb, lldb, pdb etc?

If you watched Fabian's presentation (or read the transcript) you'll have seen that he said you can use Valgrind for memory leak checks and that it can be used similarly to lldb.
valgrind --leak-check=yes src/bitcoind -regtest

There is a section in Fabian's doc on debugging Bitcoin with instructions on how to install Valgrind on MacOS and run it.
Install Valgrind:
brew install --HEAD https://raw.githubusercontent.com/sowson/valgrind/master/valgrind.rb

Run bitcoind with Valgrind:
sudo valgrind src/bitcoind -regtest

Valgrind has also been added as flag to the functional tests in Core in PR #17633 so you can run:
test/functional/test_runner.py --valgrind

The --valgrind flag is documented as a Valgrind memory error detector and that you should expect at least a ~10x slowdown with Valgrind 3.14 or later required.
In that PR practicalswift states:

Regular functional testing under Valgrind would have caught many of the uninitialized reads we've seen historically.

Another great resource is a Bitcoin Core PR review club session (hosted by Jon Atack) on running the unit tests under Valgrind. In the notes for that session it describes:

Valgrind is a debugging and profiling tool suite to make programs faster and more correct. Its most popular tool, Memcheck, can detect memory-related errors common in C and C++ programs that can lead to crashes and unpredictable behavior. Here is a tutorial. Memcheck is not perfect: typical slowdown is 3-10x, memory usage is 2x, it can produce false positives (there are mechanisms for suppressing these; see the valgrind.supp file in Bitcoin Core), and it doesn’t currently detect out-of-range reads or writes to arrays allocated statically or on the stack.


How do many public keys correspond to one private key?

The answer is in Hierarchical Deterministic (HD) wallets. These create a tree-like repeatable sequence of key pairs (private and public) from a master private key.
Each public key is associated with one private key.
See BIP-32
Standard ways of spending Bitcoin involve reference to an output of a previous transaction and hence to a previously used public key. It typically needs the corresponding private key to be used to generate a number that will satisfy the spending script.


Portability of Bitcoin Wallets: What If The Power Or Network Is Out?

If my wallet (private key) is stored on a small USB stick, can I purchase anything using bitcoin if there is no power/network near me?

By this, I’m assuming you mean you have no connection to the network. There is infrastructure built to relay transactions through SMS and satellite services, but let’s pretend you don’t have access to those either.

In that case, you could trade your USB stick for whatever goods/services you’re trying to purchase, but your counterparty will be taking on significant risks:

If there is no way to connect to the network and check the balance on the address you claim to have the private key for, the counterparty will have to believe that the appropriate amount of funds are indeed held at your address
Your counterparty will have to trust that you do not have a backup of your private keys, otherwise you could make the trade, and then use the backup of your keys to spend the coins back to yourself, before the counterparty can sweep the address.

You may be interested to look up OpenDime, it is a product that allows you to give someone a private key that is provably not backed up.


After being scammed, has anyone ever actually managed to recover their BTC?

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.


I would recommend reading 'Mastering Bitcoin: Unlocking Digital Cryptocurrencies', by Andreas M. Antonopoulos.  This book answers all of the questions that you posed, and more, in a very understandable way.


Why would someone be willing to sell BitCoins at substantially below market price?

Some possible reasons

He's an idiot/uninformed
He's willing to sell low because he wants to promote adoption
He's got a very low Net Asset Value (very early adopter)
He wants to unload a lot of coins quickly
He is trying to avoid records/taxes on this transfer
He's not willing to wait for the traditional fiat system (time preference)
He only has a high fee method of withdrawing fiat, so it is not actually a loss for him
He's got stolen/tainted coins
He's going to steal your cash

There is no official system in place to assign taint, but if they are from a highly publicized theft and not mixed before they are sold to you there may eventually be people in suits knocking on your door wanting to sieze them or asking awkward questions.

In 7 of these 9 reasons there is no real problem for the buyer, but if you want to avoid stolen coins or getting mugged you should ask some questions, get a copy of his ID, and do the deal in a public place with witnesses.


How to distinguish watch-only addresses from spendable addresses when deleting addresses

It depends on which wallet you are using, if you are using the Bitcoin core wallet for example, you can see the amounts separated, the watch-only amount will be one, and the spendable amount will be another one.
You can also use the command listunspent into your console to know which addresses contain the spendable amounts.


Which crypto-currency has the most even distribution of wealth?

It's possible to track how many coins are owned by a given address, but there's no way (at least, no easy way) to associate an address with its actual owner; it's not possible to know for sure how wealth is distributed.


How would SPV proofs be verified when moving assets back in 2-way pegged sidechains?

Your question is spot on and poses the main problem of sidechain interfacing: How to prove to some chain (call it the "mainchain") that an event (such as a deposit) took place on a remote chain (call it the "sidechain").

As far as I'm aware there is as of yet no precise specific of how this works, but there are several approaches that can be taken. The approach usually taken here is to allow for a set of "functionaries" or "fishermen" to observe the transaction on the sidechain, wait for it to become confirmed there, and then vouch for the fact that it took place by signing off a statement (a "certificate") which attests to the fact that the transaction in the sidechain really took place. This can work well if there are some honesty assumptions about the functionaries, e.g., that the majority of them is honest. In that case, in practice, the withdrawal can really be a multisig check. This approach would work with the existing bitcoin implementation. This approach is very compatible with sidechains whose consensus is permissioned/byzantine, e.g. Plasma, Polkadot, Elements.

If you don't want to remain within the realm of bitcoin, there are more elegant solutions with different trust assumptions that can be realized. If you dislike the threat model of a centralized group of functionaries (or a "federation" thereof) and you want to go completely trustless, you need to produce a proof of a remote event in a decentralized manner. This proof will need to have the form of a simple string which attests to the fact that something happened on the remote chain, even if the local miners do not connect to that remote chain and do not know how its consensus works.

If the sidechain has Proof-of-Work consensus, then these proofs make a claim which attests to the fact that sufficient proof-of-work took place to bury a transaction on the remote chain. As they prove that proof-of-work took place, they are "Proofs of Proof-of-Work" (PoPoWs). The verification of such proofs is not a trivial manner and bitcoin does not have an opcode to do this currently, nor is there any support being planned. Hence, such schemata would be possible when the mainchain is a Turing-complete blockchain or supports a PoPoW opcode (unlikely).

On the other hand, the sidechain has to support the generation of these proofs too. This can be built-in to the chain, like ERGO, WebDollar, or Nimiq. A blockchain without PoPoW support can add it without soft forking and without miner approval by conducting an appropriate velvet fork.

Finally, these PoPoWs have to be produced by sidechains maintainers in a "one-shot" attempt that generates a simple string and they should not require interaction, i.e., they should be Non-Interactive Proofs of Proof-of-Work (NIPoPoWs). Given these ingredients, you can do it in a completely trustless manner.

All of the above constructions pre-suppose that the sidechain and mainchain survive securely independently. For example, the sidechain needs to have honest majority computation power if it's PoW-based.

To summarize, bitcoin does not currently have a way to do what you're asking in a trustless manner, but there are federated / cothority ways to do it. If you're willing to work on new systems, you can do it in a decentralized manner.

Disclaimer: I am one of the co-authors of the Non-Interactive Proofs of Proof-of-Work paper.


Problem of crashing command on "lightningd/lightningd --network=testnet --log-level=debug"

The issue seems to be contained in the error message.

Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/home/lightning/.bitcoin/bitcoin.conf)

So, set rpcuser and rpcpassword appropriately in ~/.bitcoin/bitcoin.conf.


I'm trying to hash transactions together to find the Merkle Root!

There are multiple things that you have done wrong.

First, you hashed just the coinbase part of the coinbase transaction. You are supposed to hash the entire coinbase transaction.

Second, you have hashed the transaction ids of the transactions, not the transactions themselves. Hashing the transaction themselves will result in the txid (ignoring segwit). So instead of hashing the txids again, you just take those as the first hash in the merkle tree and combine them and hash the combination for the second level of hashes.

Third, you reversed the hash hexadecimal representation. You should not be reversing those hashes. However, if you start with the txids instead of the transactions themselves, you need to byteswap the twids first. Byteswapping is different from reversing the hex of the string as two hex characters represent one byte. It is easier to do this when the hex has already been decoded into a byte string.

For combining hashes, you just concatenate them. For the last transaction, if it is by itself, you copy its hash and concatenate the copy to the original. It is just the txid concatenated to itself.


Can an SHA256 hash be used as an ECDSA private key?

While the question isn't an exact duplicate, the answer essentially is, so I'm going to quote this answer by Pieter Wuille:

  As is normal when doing Elliptic Curve encryption, a private key is
  simply a random number. In the case of secp256k1, the elliptic curve
  used by Bitcoin, it has to be a number between 1 and
  115792089210356248762697446949407573529996955224135760342422259061068512044368
  (or in hexadecimal, between 1 and
  FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551.

  This private key is converted to a public key by performing an EC
  point multiplication with the curve's base point. The result is an
  (x,y) coordinate pair, which constitutes the public key.

  Finally, RIPEMD160(SHA256(pubkey)), where pubkey is a serialization of
  those coordinates, is computed, and encoded in base58, together with a
  checksum. This becomes the address.

So the short answer is yes, as long as the resulting hash is less than or equal to FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551 any SHA256 hash is an acceptable privkey.

As for a canonical method of mapping a passphrase to a privkey, I don't believe there is one - after all, this functionality isn't built into the Satoshi client (at least not yet) so there cannot, by definition, be a canonical method. The closest thing I can think of would be the mini private key format used by Casascius physical bitcoins, which could easily be used with a passphrase instead. Indeed Casascius' Bitcoin Address Utility is often the app of choice for those wishing to make "mental wallets" from memorized passphrases rather than random inputs.


Does getting shares when mining mean that I have earned a reward?

You probably have gained no Ethereum as of yet because even if your shares were accepted by the pool it doesn't mean they were accepted by the network. When your pool mines it's next block the percentage of your shares of the total network will be the percentage of the block reward you get.


Miners are incentivized to always mine at the longest valid chain tip. If there were incentives to not mine on the longest known chain, then we would expect the network to be unable to maintain consensus on the blockchain's state. And without that, it would be impossible to build a reliable financial system.

So it isn't about 'miners conceding a shorter chain', its just that miners will always all be mining at the chain tip. Currently, the majority of the block reward is constant (the newly minted coins), so a miner should not really care if they mine block X or block X+1: their reward will be ~the same in either case. As such, a miner is incentivized to just mine at the chain tip, because the chance of finding a valid block at either height is equivalent, but the potential reward for finding one at the chain tip (thus extending the longest chain) is much larger. Finding a block at a height that has already been found will likely mean the miner gets no reward, since that block will be rejected by the network as not being a part of the longest chain.

All of the above concerns situations in which there is not a fork due to a change in consensus code, just the regular competition between miners. If you mean to ask about forks caused by changes in consensus code, you'll need to be a little more specific, as the nature of the code change will affect the game theory. But in general: Bitcoin works because miners are incentivized to mine at the chain tip. Without this incentive, the system would likely not achieve the stability required to give any sort of reliability guarantee.


What will cause BTC/USD to shift substantially?

Major hacks or attacks on key exchanges or Bitcoin services can cause Bitcoin's price to fall quite dramatically.

Increase in popularity will slowly make the price rise. Another speculation bubble can cause the price to go up quickly.

Major investments made to Bitcoin can greatly increase the price.

All of those quick changes don't appear too likely at the moment. However, it is possible that the decrease in block reward that should happen roughly around the end of the year can double the price of Bitcoin, or make a lot of smaller miners drop out of the system.


Can bitcoins be split up into greater than a billion parts?

The Bitcoin protocol doesn't allow you to easily have denominations lower than a satoshi (10^-8 bitcoins). But once there is a need and widespread agreement, it can be modified to allow it.

Destroyed bitcoins however will not have any significance as a factor contributing to this need.


How can I track bitcoin transaction(I am receiving) programatically?

You can run Bitcoin Core with the walletnotify feature, which will execute a script of your choice every time you receive a payment.

See How do I use walletnotify?

There are also lots of third-party service providers which have APIs to notify you of incoming payments.


Wasn't 0-conf more secure than Visa, before blocks got full and RBF was added?

No. A zero-confirmation transaction is not useful for anything. Satoshi used PoW specifically, because he was trying to answer how to trust a transaction(double-spending problem).

Secondly, transaction replacement was introduced by Satoshi in the first release of the Bitcoin software, but was later removed due to denial-of-service problems.


The presale is available for venezuelan citizens for the moment only paíd in euros, dollars , btc and eth