How can I setup Bitcoin to be anonymous with Tor?

This is not a thorough schooling on Tor and only shows how to configure it to work together with Bitcoin Core.

Bitcoin Core includes Tor integration

When Tor is correctly setup on your system, Bitcoin Core automatically identifies Tor and creates an anonymous service. Little configuration is required to be 'off the grid' and, just a tiny bit more to be completely anonymous if that is important to you, with none of your Bitcoin traffic reaching out onto the public internet.

Using these steps you can be anonymous in only five minutes.

With the full privacy setup, transactions will of course still be broadcast but will only be broadcast actually onto the public internet by other Bitcoin nodes. With the standard 'off-the-grid' Tor setup, your Bitcoin traffic will be routed through the anonymous Tor network before reaching the public internet and other Bitcoin nodes on and off the Tor network to be effectively untraceable.

Setting Up Bitcoin Core and Tor

These instructions work on Fedora 23>29 and assume a default setup of Bitcoin Core v0.15.1 and Tor v0.2.7.1 or newer (and have been tested to work with Bitcoin Core v0.16.0 on Fedora 27 with Tor v0.3.1.9). Fedora is a modern operating system that will run on most standard modern hardware. The configuration is the same on Windows, but the instructions are different. There are some instructions for setting up Tor on Windows here.

Further instructions for other *nix based systems are available here. NOTE: You do not need to configure your Tor client as a relay or exit node for Tor to operate, so you can skip the step for 'Put the configuration file /etc/tor/torrc place:' in that guide. You will still need to use all of the following steps in this guide.

Setup Tor

Install the tor package:

sudo dnf install tor

Start the tor daemon and make sure it starts at boot:

sudo systemctl enable tor
sudo systemctl start tor

Figure out where your torrc file is (/etc/tor/torrc is one possibility).
Open the torrc file to edit:

xhost +local: ## skip if earlier than v29 only needed for Wayland
sudo gedit /etc/tor/torrc

or

sudo nano /etc/tor/torrc

Add these lines to your torrc (or ensure that they are uncommented):

ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1

You need to figure out what group tor is using. On Fedora 23 it is toranon. Run the following command:

ps -eo user,group,comm |egrep 'tor' |awk '{print "tor group: " $2}'

You need to figure out what user bitcoind or bitcoin-qt is running as. Run the following command while Bitcoin is running:

ps -eo user,group,comm |egrep 'bitcoind|bitcoin-qt' |awk '{print "Bitcoin user: " $1}'

Run the following command as root, which adds your Bitcoin user to the tor group. Replace TOR_GROUP and BITCOIN_USER with the actual information found above:

sudo usermod -a -G TOR_GROUP BITCOIN_USER

If you don't modify any other settings, Bitcoin Core will usually connect over the regular Internet, but will also allow connections to and from the hidden Tor service.

So that Bitcoin Core wil only connect via Tor (for standard 'off-the-grid' setup), add these lines to bitcoin.conf. In Bitcoin Core, go to Settings -> Options -> Open Configuration File. Bitcoin Core uses Tor stream isolation by default:

proxy=127.0.0.1:9050 #If you use Windows, this could possibly be 127.0.0.1:9150 in some cases.
listen=1
bind=127.0.0.1

(optional) If you like, you can add some onion service peer nodes to connect to. This will help especially if you do all of the following optional configurations. Add the following lines to your bitcoin.conf file. Bitcoin Core will only connect to a maximum of eight of these at any one time randomly, depending which ones are online:

#Add seed nodes
seednode=wxvp2d4rspn7tqyu.onion
seednode=bk5ejfe56xakvtkk.onion
seednode=bpdlwholl7rnkrkw.onion
seednode=hhiv5pnxenvbf4am.onion
seednode=4iuf2zac6aq3ndrb.onion
seednode=nkf5e6b7pl4jfd4a.onion
seednode=xqzfakpeuvrobvpj.onion
seednode=tsyvzsqwa2kkf6b2.onion

#And/or add some nodes
addnode=gyn2vguc35viks2b.onion
addnode=kvd44sw7skb5folw.onion
addnode=nkf5e6b7pl4jfd4a.onion
addnode=yu7sezmixhmyljn4.onion
addnode=3ffk7iumtx3cegbi.onion
addnode=3nmbbakinewlgdln.onion
addnode=4j77gihpokxu2kj4.onion
addnode=546esc6botbjfbxb.onion
addnode=5at7sq5nm76xijkd.onion
addnode=77mx2jsxaoyesz2p.onion
addnode=7g7j54btiaxhtsiy.onion
addnode=a6obdgzn67l7exu3.onion
addnode=ab64h7olpl7qpxci.onion
addnode=am2a4rahltfuxz6l.onion
addnode=azuxls4ihrr2mep7.onion
addnode=bitcoin7bi4op7wb.onion
addnode=bitcoinostk4e4re.onion
addnode=bk7yp6epnmcllq72.onion
addnode=bmutjfrj5btseddb.onion
addnode=ceeji4qpfs3ms3zc.onion
addnode=clexmzqio7yhdao4.onion
addnode=gb5ypqt63du3wfhn.onion
addnode=h2vlpudzphzqxutd.onion
addnode=n42h7r6oumcfsbrs.onion:4176
addnode=ncwk3lutemffcpc4.onion
addnode=okdzjarwekbshnof.onion
addnode=pjghcivzkoersesd.onion
addnode=rw7ocjltix26mefn.onion
addnode=uws7itep7o3yinxo.onion
addnode=vk3qjdehyy4dwcxw.onion
addnode=vqpye2k5rcqvj5mq.onion
addnode=wpi7rpvhnndl52ee.onion

If you additionally want Bitcoin Core to only connect out to Tor hidden services and not even to connect to IPv4/IPv6 nodes on the public internet via the Tor network proxy:

(optional) Also add this to bitcoin.conf for full anonymity (not particularly recommended)*:

onlynet=onion

*Note: Bitcoin Core will still query for peer addresses via DNS lookup if low on addresses. This also can be disabled using the next option. However, it is possible your node may not be able to find any other nodes to connect to.

*Note: Bitcoin Core v0.15.1 currently seems to make some outbound IPv4 connections at node startup even when onlynet=onion, none have been observed after initial startup. These connections should be made via your onion proxy, however, using the next option has been observed to prevent them.

(optional) (advanced) If you also want to disable DNS lookup to query for peer addresses then also add the following to bitcoin.conf (not particularly recommended) note: if you use this option your node may be unable to find peers until you add some good peers with the addnode= parameter.:

dnsseed=0
dns=0

Restart tor:

sudo systemctl stop tor
sudo systemctl start tor

Log out of your user, log back in (this is so that your new user group permissions are effective, I do not know what user you are running Bitcoin Core on).
Restart Bitcoin Core. Since Tor version 0.2.7.1 and newer the Bitcoin Core GUI version called bitcoin-qt automatically registers your Tor hidden service and makes it reachable on the onion network. For the command line version of Bitcoin Core, bitcoind, add the following parameter to your command line:

>bitcoind -listenonion

No port forwarding is necessary for everything to work with Tor including incoming connections via the Tor hidden service, you do not need to forward any ports for Bitcoin Core or Tor for this.

If you want your Bitcoin node still publicly reachable via the public internet for incoming connections you will still need to forward port 8333 for Bitcoin Core.

Checking everything is working

There are only two things to check that all is working. Checking peer info in the debug window of bitcoin-qt, you should see that connections to IPv4/IPv6 peers now have some extra connected 'via' info along with the peer address when you click on a peer. Onion addresses only route via Tor.

Checking the same thing via console or CLI for getnetworkinfo, you should see for each network type the proxy info and, checking with getpeerinfo you should see that the addrlocal info is a remote address for each peer. Onion peers do not have addrlocal and just have their onion service name for addr.

The second thing to check is that your onion service for inbound Tor connections is up and all configuration is in place. Have a look in your debug.log file, you should see a few entries after the most recent node restart that match the following:

2018-02-10 06:31:48 InitParameterInteraction: parameter interaction: -proxy set -> setting -upnp=0
2018-02-10 06:31:48 InitParameterInteraction: parameter interaction: -proxy set -> setting -discover=0
...
2018-02-10 06:32:13 Bound to 127.0.0.1:8333
...
2018-02-10 06:32:13 torcontrol thread start
2018-02-10 06:32:13 tor: Got service ID {onion}, advertising service {onion}.onion:8333
2018-02-10 06:32:13 AddLocal({onion}.onion:8333,4)

The advertising service information is your onion service address.

In the debug.log, connections to onion peers will only look like the following but still show up in the peers tab of the debug window on bitcoin-qt:

2018-02-10 06:34:07 receive version message: /Satoshi:0.15.1/: version 70015, blocks=508469, us=[::]:0, peer=7

It is not necessary to configure port forwarding on your modem/router for Tor to operate. If you are behind a restrictive firewall it may be necessary to configure outbound connections to allow Tor to connect out to other Tor nodes. Tor can be configured to only connect out using port 80/443 if that helps. See Appendix 1 - Monitoring Tor for nyx and access to full Tor configuration options.

It is difficult to be completely anonymous since the sender and the receiver know, however, you can obfuscate your transaction origin so that your data cannot be traced by IP address without breaching the Tor network. Do some research, onlynet=onion is more secure.

Additionally, there has been research[1][2] done on graphing the blockchain in an attempt to trace all BTC to their origin, potentially identifying source<-wallet<-purchase and depending on the combination of UTXOs potentially identifying wallet balances or wallet balance subsets. Data linkage is a privacy issue we may all be concerned about, this article discusses the use of bitcoin mixers, and this series of tweets.

Done! Enjoy being anonymous!

Appendix 1 - Monitoring Tor

You can monitor (and further tweak/break) Tor using nyx.

There are several installation methods available. On Fedora 27:

sudo dnf install nyx

To start nyx simply type nyx in the console and it will connect to Tor if it is running.

Footnotes

Once correctly configured, most synchronisation issues are to do with your hardware. See this answer for more information.

There are more configuration options available, and additional ways you can support the Tor network. Please see the several pages available here for information.

Thanks to en.bitcoin.it for your excellent guide that got me started on this.

Additional information is available from the bitcoin project here.

For an even higher level of anonymity, it is possible to configure Tor as a DNS resolver and, configure your system network configuration to use Tor to resolve DNS queries.

*by default, Tor will participate in the Tor network.


How do the clients agree on the target to hash for?

By "difficulty" I mean the number that determines the minimum acceptable hash. Higher difficulties mean lower hash minimums and thus, on average, more hash attempts needed to produce a valid block. (Related terms are target and nBits).

Every 2,016 blocks there is a difficulty change block. Unless the block is a difficulty change block, the difficulty must be precisely the same as the previous block or the block is invalid.

On a difficulty change block, the difficulty must be precisely what the difficulty algorithm requires or the block is invalid. The algorithm takes into account the amount of time it took to generate the previous group of blocks and computes a new difficulty such that the block generation time will be, on average, once every ten minutes if the network hashing power stays the same.

If you want to see this in the source code, check out the GetNextWorkRequired function in the main.cpp file.


How best can I use Raspberry pi and ASIC?

Let's do the math. The average time to find a block, which is worth a reward of at least 25 BTCs (+fees) is the following:

avgtime = difficulty * 2^32 / hashrate

The current difficulty is 16,818,461,371. Assuming a hash rate of 2GH/s we get in hours:

avgtime = 16818461371 * 2^32 / (2*10^9) / 60 / 60

That's about 10032602 hours or 418025 days. To mine solo successfully, you need much, much more hashing power.


What was the most recent change to the official client that broke block validity?

The last changes I'm aware of that would cause a blockchain split were in August 2010, after the overflow bug; see, for example, https://github.com/bitcoin/bitcoin/commit/4bd188c4383d6e614e18f79dc337fbabe8464c82

I don't think there have been any changes to the block or transaction validity rules since, although it is very possible I'm forgetting something.


When does a miner exactly start to create a block?

A stale block (also often confusingly referred to as 'orphan block') occurs when two competing blocks were found and then another block builds on top of one of them.

See the following minimal example: the blocks B1 and B2 were discovered at the same time and then the discovery of block C clarifies that B2 is part of the chain with the most difficulty ("longest chain"). At this point B1 becomes obsolete, as it is not part of the best chain.

      B1
A ->
      B2 -> C

So, a miner would have received block A, then started to work on finding a successor to that. When B1 and B2 appeared, he would have received one of them first and started building on top of it, ignoring the other as not part of its best chain. When C appeared, the miners that were trying to build on top of B1 reorganize to B2 -> C and start building on C.

At no point would you process a stale block because once it is clear that the block is stale, it must already be part of an alternative chaintip that is not the longest chain. —  There is no reason for you to be interested in it anymore. Especially, there is no reason to start mining on top of a stale block, as you'd be wasting your mining power trying to extend a stale branch of the blockchain (unless you're trying some sort of majority or selfish mining attack).

Actual orphan blocks, i.e. blocks where you're missing the parent block, should not occur by accident on the network as the miner that discovered the last block would be interested in spreading the parent block in order to collect the reward. However, when the parent becomes known, it's not an orphan block anymore. ;)

On the other hand, if a block is not connected to the blockchain at all, it's simply going to be treated as an invalid block by all other network participants.


How can one read the value of a wallet from the blockchain?

Assuming you don't trust anyone, you need to read the entire blockchain history once to generate your own set of unspent transactions (UTXOs). You won't need then to read again the full history every time you want to see your balance. Unspent Transactions are enough to do so.

Your balance is the sum of the values of the unspent transactions your wallet has. Unspent means here that you didn't "spend" the previously received amounts on outgoing transactions.

Example:

Alice sends you 1 BTC. you now have an unspent transaction of 1 BTC. Your balance is the sum of unspent transactions, i.e. 1 BTC
Then Bob decides to send you 2 BTC. You have now two unspent transactions associated to your wallet, for a total balance of 3 BTC.
Let's assume now you want to send 1 BTC to Charlie. After checking that you have at least 1 unspent BTC (which is the case), your transaction would be processed and the amount that you spend would be removed from your "unspent" transaction. In that case, the transaction received from Alice would be now marked as spent and would be removed from your list of unspent transactions.
Your balance is still the sum of unspent transactions, i.e. 2 BTC (from Bob)


Is there a reason why MtGox is based in Japan?

Mtgox owner was already in japan and already had his company there when he decided to buy mtgox from historical owner Jed in 2011.

mtgox owner s blog : http://blog.magicaltux.net/
hosting company that existed years before he decided to buy mtgox : http://legal.tibanne.com/ , services on https://www.kalyhost.com/


Why were custom scripts made non-standard except if they're P2SH?

To answer your question exactly: why were they made non-standard? Because originally (after a few vulnerabilities in the Script logic in 2010), all scripts were made non-standard except a few whitelisted ones. Since then, more and more groups of scripts have been added to that category (including almost all P2SH scripts, with a few exceptions).
Why have bare scripts (non-P2SH,non-segwit) not been made non-standard except for P2PK, P2PKH, and multisig up to 3 keys?
UTXO bloat.
Yes, P2SH implies slightly more blockchain space usage. But not using P2SH for potentially long scripts means those scripts have to enter the UTXO set, where they burden full nodes until spent. With P2SH, only the script hash enters the UTXO set.
In addition, there just isn't much use for non-P2SH scripts as there are no standardized way of sending to them. The ones that are permitted are due to historical usage.


Will buy and sell offers from one trader be matched with each other?

On "real" exchanges Trading Against Yourself or Wash Trades are usually forbidden. Either by a real time check when you enter the second order or after the fact with fines by the oversight agency.

As Bitcoin Exchanges are not regulated, it's their choice to either block you from doing it or not (earning fees for the exchange).

The spread is pretty wide, so it will probably cost you quite a bit of money to do this on a meaningful scale.


When blocks become stale, transactions in them are returned to the pool.
Transactions in the pool are available for inclusion in a subsequent block on the winning fork.


Use LN node for registration/login and has a browser add-on/extension: https://lightningjoule.com/
LNURL can be used to make browser extension/add-on that allows you to transact, register/login etc. : https://github.com/fiatjaf/awesome-lnurl
Liquality atomic swaps tool has a browser extension : https://liquality.io/atomic-swap-wallet.html
Maybe other bitcoin projects and hardware wallets have their own browser extensions as well. You will have to check particular project for it and if it doesn't exist, it can always be created considering it's open source and people can contribute if they think something useful is missing.
Maybe there are other applications/wallets that have browser extensions although I don't consider using a browser extension secure for anything related to bitcoin. Standalone desktop/mobile apps should be considered more secure IMO.
You can also check below question which has an idea and few doubts/questions involved. Unfortunately no answers.
Can we use lnurl-auth to create a better password manager?


Why is my "spendable_msat" much lower than "msatoshi_to_us"?

You basically answered the question already yourself. Besides the 1% channel reserve you as the funder are responsible for paying onchain fees in case you need to force close the channel by spending the commitment transaction.

C Lightning (and lightning nodes in general) are rather overestimating onchain fees as they cannot rely on the fact that the fees that where taken when the commitment transaction was signed will work in the future if force closing of the channel takes place.

Look for example at this transaction in which my c Lightning node had a channel to test the lightning app (running lnd) and a cross implementation bug produced a forced channel close. You can see that I paid about 100 satoshis per byte in fees resulting in 18312 satoshis. This is the same ballpark number as the value which you describe here. (looking at the mempool this number sounds realistically to me)

Things you can do

Don't force close channels (fees will be much smaller with mutual closes, since the fee is more accurate and only one tx is needed)
Have bigger channels then the relative fee is not so high
Look at the code where fees are set. Propose better strategies in the c Lightning issue tracker or provide an api to set / read them. (as far as I remember there is currently no api for that)
You cannot even do too much as the fees being used are negotiated between you and your channel partner. If the channel partner starts out with a really high fee there is hardly anything you can do to defend against this.

Btw welcome to the rabbit hole of onchain fees with lightning. Doing this for a while now I realized it is one of the most subtle and present challenges that we are facing.


Bitcoin Core HD Wallet v0.13.2 missing confirmed incoming transaction

Bitcoin Core currently has no internal function to recover a complete wallet. If the key is unknown (not generated yet), Bitcoin-Core will not detect transaction from to to that key/address. Also, the keypool size does not matter at this point, funds sent to a keypool key/address are not detected at the moment.

For now (Bitcoin Core <= 0.14.0), if you restore a backup, make sure you generate plenty of addresses, loop through getnewaddress and ensure you generate 1000 (or more?) keys.

After you did this, restart Bitcoin Core (qt/d) with -rescan

Hopefully we can add some HD restore features for Core 0.15.


Cryptocurrency exchange needs more info than any bank or brokerage firm?

The requirements vary by exchange and are mostly as dictated by the regulating government. Bitcoin itself is decentralised, however, exchanges and businesses operate within government jurisdiction and must comply with any regulatory requirements. The requirements are usually country specific but mostly revolve around anti-money laundering requirements and whatever their standard requirements for investors are.


I believe 0x8000002C is 128 as an integer

... No, it isn't. First of all, it already is an integer, just represented in hexadecimal. In decimal it is 2147483692. How did you get 128?

  how does this equate to 44' however?

44' means that hardened keys should be used. The distinguisher for whether a key a given index is hardened is that the index is greater than 2^31, which is 2147483648. In hex, that is 0x80000000. That is what the apostrophe (') means.

The 44 comes from adding it to 2^31 to get the final hardened key index. In hex, 44 is 2C, so 0x80000000 + 0x2C = 0x8000002C.

  I also believe that the ' means that it is a "hardened key", is it hardened because 128 is between 0 and 2^32 - 1 ?

No, hardened means that the key index is between 2^31 and 2^32 - 1. Between 0 and 2^31 - 1 are unhardened keys.

  Which means that the only key that can derive it, is the private key?

Yes.


Submitted a raw tx that was already on the blockchain, to test it. I got 'missing inputs' instead of 'already exists'. Why?

Bitcoin Core has no idea which transactions already exist in the chain. It does not maintain a full index, because... it doesn't need to. In fact, when running in pruning mode, it doesn't even have the chain or its transactions at all.

The only thing it has is the set of unspent transaction outputs. Since you're trying to replay an existing transaction, all the inputs are already spent by its previous instance. As a result, the expected and correct response is that inputs are missing - i.e. your transaction is a double spend, and thus invalid.

I'd say that this is one of the advantages of the UTXO model: a replay and a double spend are one and the same, and there is no need to distinguish.


What database tables structure do bitcoin uses?

There simply is none. There's a key value store in LevelDB for the UTXO, and for miscellaneous things like the locations of block files on disk. Relational databses are far too slow for the task, and unnecessary given the type of information being stored.


The transaction taking the coins is very strange, the criminals have obviously got a strategy which requires the multiple denominations of UTXO's. It's not clear what this is but regardless the TXID showing funds being stolen is: de991dda2cd10a31bea1dd92c5e5466f916b060f5bd31fe0840b9fd08a0aa786
If you follow one of the outputs you can see via the following transactions that it moves to an address: 169ksrn7RgXFZmUVtvBFfbEKG5mmMxvQU7
TXID 1: fa53e39eb02809ea03986484325141d7e97c8a9b8c793974841b6850be43cd70
TXID 2: 177b996bdf4c2986faed0830a064242e553a8d914b0d7771561d5a017e2eca3e
This address resides in a wallet clustered under the following reference in walletexplorer.com:
https://www.walletexplorer.com/wallet/00011cbc1c9321ec
When you review the activity of this wallet there is a lot of receipts and only one daily transaction out of the cluster to an address attributed to Binance (for the several days at least). No other exchange or entity is mentioned as an output. Given this my thoughts would be this is a hot wallet associated with Binance. As such if you have any contacts at Binance I would getting in touch with them.


The bits value you have written is in decimal, in hex it is 0x181b7b74

We split this into the exponent and mantissa as shown in this answer: https://bitcoin.stackexchange.com/a/61951/51948

0x18 in decimal is 24, so we calculate the target to be:
0x1b7b74000000000000000000000000000000000000000000

Now as the target takes up 24 bytes, out of the total 32 bytes for a block hash, the remaining 8 bytes must be 0's in order for the hash to be less than the target  (as well as the rest of the number being less than, of course). Usually leading 0's are omitted for readibility, but 8 zero bytes is written as 16 zero characters in hexadecimal, which is why the hash must have at least 16 leading zeros - which it does.


Will expensive mining equipement have any worth in the future?

TL;DR. Bitcoin profitability is about choosing between buying BTC outright (Coinbase, or Bitstamp) or buying hardware ASIC miners and paying the ongoing electrical fees.

Edit:
To keep mining expenses low, you will need the cheapest form of electricity.  This usually means coal in most regions. "Clean coal" doesn't exist.

10 years from now is a long time, and you should expect additional transaction fees by then, plus many more (different) incentives to mine.

As of late summer 2013 the ASIC market is saturated in my opinion, and the difficulty spikes will continue to reach into 2014.  That means the value of BTC must appreciate for most people on the network to get an ROI.

Either one or more of these things will happen:

People will mine coins, pay a lot for electricity, for years to come just to get a ROI
Sell the machine at a loss, invest in Bitcoin
People who buy Bitcoin will cause the price to increase, thus making mining profitable
Mining companies will go out of business (or sell a different product) and whatever ASICs are made now will be the only ones in the game for a while.

Example

Assume that the network hashrate (competition) is so high that in order to make a profit, miner #1 has to mine for 2 years and also wait for the BTC to be valued over 900 USD. (Note: BTC hit $1000 per coin on 11-27-13)  After a lot of time and expense (not to mention heat, noise, and an angry wife) he cuts even.

Now assume that in the same time period, person 2 buys BTC at the current Mt Gox rate: $140.  (Two thousand dollars worth of coins).  The price of BTC only has to increase for him to make a profit.

So the question is

  Why are people buying mining machines when buying Bitcoin outright is lower risk and a better reward?

The answer is so they can ride the next mining wave... more on this in a second

The Good News

If you already purchased the miner, you should be fine if the market figures out that buying Bitcoins is "safer" than mining, and has a better chance at making a profit.

Once buying BTC becomes as popular as mining is today, then the price will increase.  If the price increases, demand for ASICs will increase as well.

Bitcoin is about riding the wave of either buying BTC outright or buying miners.  Each action perpetuates the other, so I'll bet the mining storm of 2013 will cause BTC to rise and everything will be alright in the end.


After all possible Bitcoins are created, won't transaction fees eventually consume all Bitcoins?

There are two objections I would raise:

Miners have expenses. You need to pay your power bill. You need to pay your employees. You need to pay for new ASICs when the old ones inevitably become obsolete. You need to pay off your initial investment in ASICs. All of these things cost money.
You might object that miners wouldn't be doing this unless revenue exceeded expenses. This is true, but it's also true of every other profession. Therefore, we should view 'miners will eventually have all the money' the same way we view 'dentists will eventually have all the money.'

In general, people don't acquire money for the sake of having money. It's usually in service of some other kind of goal, like financial security, providing for someone else, or buying food. Sitting on a hoard of money that you cannot spend accomplishes none of these goals.


A Bitcoin blockchain indexing and query service. Intended to be used with as a Bitcoin full node or in conjunction with a Bitcoin full node.

From the first line of the README. It’s an out of date wrapper on Bitcoin that’s 3 years old at this point and would be inadvisable to use for anything.


Why are transactions with no outputs not relayed by default?

The rule that at least one output is required is part of the original code, and changing it would mean a hard fork. There are many good changes that are possible with a hard fork, but none of them is considered worth the disruption that a hard fork would create. Changing the rules to permit no-output transactions would not even worth a soft fork, since, just as you said, this can be easily circumvented.


Wallets that trade all Cryptocurrencies?

Every currency is different, so it would be impossible to support every currency, and infeasible even to support many due to the sheer number of coins out there. The closest you can get is keeping the coins in an exchange wallet, which is not super safe long term, but at least convenient for quick trading between the types of coin.


Lightning Network: what if one broadcast an old transaction?

Apparently there is a time until which A can question the transaction because he will have proof for the later transaction that has happened. And B will lose all the money in the channel for broadcasting a previous transaction.


how to know if a webpage has mining code?

Typically when you browse to a website that is mining with your computer, you will notice that CPU usage increases dramatically. However, if the mining code is tuned to prevent noticeable CPU usage increases, it will be basically impossible to detect if a website is mining through your browser. The only way to know would be to examine each and every website's source code yourself.

However to avoid this problem, you can just prevent JavaScript from running at all. Using a plugin like NoScript, you can prevent JavaScript from executing when you visit any website which will thus prevent JavaScript miners from using your computer to mine cryptocurrencies. You can then enable JavaScript for specific websites and enable certain scripts for each website so that you know are not mining with your computer while still making websites that use JavaScript usable.


Sendrawtransaction error with locktime : 64: non-final txid

I just encountered the same problem and the solution is almost stupid. Since the hint is not found elsewhere, I'd add my two cents in case others stepped upon the same trap.

It turns out that, besides the usual reasons related to time (e.g., time lock hasn't expired, the sequence number is not properly set etc.), trying to spend an unconfirmed UTXO also causes non-final error. I didn't dig into the source code to see why this happens, but the misleading error message cost me a good afternoon.

Why would you ever attempt to spend unconfirmed outputs? Well, when you're busy testing things out and are gradually losing ur patience...


Which nVersion bit is the "hard fork bit?"

Bit 31 is sometimes referred to as the hard fork bit.

BIP34 put a constraint on version numbers to be 2 or higher. As the block version is a 32-bit signed integer, setting its highest bit results in a negative number, which would violate BIP34.

As a result, any usage of that bit results in a backward incompatible change to the rules - a hard fork - that is obvious to all participants in the system.


Check how much money there is in my Bitcoin address/wallet

You can use Blockchain.info.

Just paste the address you want to check into the Search inputbox and the website will show you all the transactions where that address was involved, as well as the balance.


How can i check bulk BTC address balance?

Easiest way would be to simple import the addresses into Electrum.  It's an SPV (light-weight) wallet with no need for blockchain downloads.

Go to Bitcoin.org and select "choose wallet"
Click Electrum from the list and follow the installation instructions.
When you start Electrum choose to start a new wallet (default, hit next)
Choose "Import Bitcoin Address" then hit next
Hit the folder icon in the bottom of the import window and import the file containing the thousands of addresses.

Since you are only dealing with public addresses you don't need to worry.  To future readers... always be cautious of downloading wallet SW.  It is a primary target for those looking to defraud you.  There are some browser plug-ins that can help and some good common sense.  Just be cautious.


How can I temporarily move my value to something other than bitcoin without providing identifiaction?

http://campbx.com is another exchange; I believe no customer verification is required until you want to move USD in or out.  If you just want to sell bitcoins and plan to buy them back later, I don't think ID would be needed.


Decentralized escrow functionality built into Bitcoin?

I don't think it's possible in principle. The escrow service is one that is inherently authorized to make a decision as to who ultimately gets the funds. In a decentralized escrow service, who or what would make that decision?

If I place some coins in escrow as part of a transaction to you, something must decide whether those funds ultimately go to me or you. Obviously, that decision can't be made by me or you.

I have heard proposals where the coins are "burned" (lost forever) if both parties don't agree on who should ultimately get them. I think that's a pretty useless service as it allows one party to blackmail the other. "Release the coins to me and I'll give half of them back to you. Otherwise, they're lost forever."


"Creative solution" would be to forget about his wallet and to join Large Bitcoin Collider project, he might "recover" another lost wallet one day.

Also, if he had 1000 BTC or more in his wallet, some hypnosis-guru might help him to remember his password.


Can receiving money make a transaction fail?

No.

The addresses in Bitcoin only signify ownership. You don't need to spend all money from an address or any such thing. The atomic units of Bitcoin transactions are Unspent Transaction Outputs (UTXO).

UTXO are uniquely identified by the txid of the transaction that created them, and their position in said transation's output list.

E.g. if the transaction id of transaction1 were tx01 the 49.99mBTC output to Alice would be tx01-00 and the 50mBTC output to Bob would be tx01-01 (computer scientists start counting at 0).

To spend a UTXO, you'd reference them by this identifier, i.e. "I want to spend tx01-00". Then you need to provide a signature that corresponds to the address that tx01-00 was assigned to, and you get to reassign the balance that tx01-00 represents. Afterwards, tx01-00 is invalidated.

So, in your example transaction1 spends UTXO that are unrelated to transaction2, so transaction2 has no bearing whatsoever on transaction1.


Passing a JSON argument to bitcoind in Windows command prompt

The important part is that strings should be enclosed in triple double-quotation marks. For example:

bitcoind sendmany "" {"""1ELvnrA6PhUyDBS6iR25K1Xx4xXL6VMfJX""":0.001,"""1NX3R5Le4c1y9E316NPMze7aEmCXjpCY58""":0.001}


What's the difference between a Bitcoin Wallet and a Bitcoin Exchange?

A bitcoin (or any crypto) wallet is simply a set of public/private keys. If you own the keys, you own any coins that those keys can access.

An exchange is very similar to a stock exchange. You exchange one asset for another. Exchanges come in many forms, such as decentralized (etherdelta), wallet-less (Shapeshift, Changelly), and the more traditional ones such as Bitfinex and Binance.

The first two kinds don't offer a wallet service. Coins are sent directly from a wallet you control to the exchange, and whatever you bought is sent directly to your wallet. These exchanges effectively offer no custodial service. It's like going shopping at a store. You take out cash from your wallet, give it to the store, and collect your goods and leave.

These exchanges, while around, are harder to use for the average user, and considerably slower due to the transactions needed to move crypto in and out. This results in less than ideal pricing and liquidity.

The regular exchanges solve this by offering both a wallet service and an exchange service. You can deposit coins and leave them in the exchange's custody, and then trade the amount you deposited instantly, without needing to make a transaction. Coins you buy are similarly credited to you on the exchange's platform, but are not truly in your control until you withdraw them to your own wallet. This is more akin to shopping at Amazon - You pay them, and you're told "Hey, you've paid me, and this item now belongs to you". But until the item is actually shipped to your own house (and thus put under your control), there is still a possibility that Amazon could default on that promise.

By using exchanges that act as wallets, you definitely run the risk that the exchange is fraudulent or can get hacked, or your account can be compromised. The general advice is that one only keeps funds they are actively trading on an exchange. If you plan on just buying a coin and keeping it for weeks/months/years, it is recommended you buy it and withdraw to a paper or hardware wallet.

For smaller amounts of money, you can also use programs such as Electrum to create a wallet that you control, and withdraw your coins to that.


Use bitcoin blockchain as a way to send messages to another address purposely setting a 0 fee or a very low fee?

This is possible, but there is always a chance your tx will confirm.

As a drawback, the blockchain is public, so the entire world will be able to view your message, assuming they know what to look for. You can encrypt and fragment your message, but using the blockchain to transmit it seems inefficient compared to other available options.

What is the advantage to using the blockchain, as opposed to another channel of communication?


Bitcoins sent to address i cannot access, funds are unused Pls Help me get them back

If you are able to see in the blockchain transactions that your amount remained sent to the correct address - then I would contact the support centre with  whaleclub.co.

If you can verify in the blockchain that your btw was sent the correct address, then it sounds like an issue on the receiving end?

Not sure if this helps.


Bitcoin wallet - why do i need it for cold storage?

You can indeed do this. It has multiple environmental factors though which make this a bad idea.

Paper is easily damaged and very degradable.
You could make a mistake. If you do intend to do this maybe its best to quadruple check it.
Lack of extra security - unless you have it locked away in a safety deposit back in the city undergrounds, someone who knows it is there could steal it. Data drives give you extra level of security with wallet encryption.

There are probably other reasons but these are the main three, if you do decide to just do this there are a few techniques you could use to improve these factors..

Try laminating it, will give the paper exponentially longer lifepan.

Miss out a character that only you will remember, replacing a single character of a private key is easy if you know where it goes but hard if your not you, obviously just don't forget it!


From a legel perspective, are Bitcoins "created" by a miner or the Bitcoin Protocol?

The new FinCEN regulations are quite clear that the term "create" includes currencies that people "obtain by their own computing or manufacturing effort".

A final type of convertible virtual currency activity involves a de-centralized convertible virtual currency (1) that has no central repository and no single administrator, and (2) that persons may obtain by their own computing or manufacturing effort.
A person that creates units of this convertible virtual currency and uses it to purchase real or virtual goods and services is a user of the convertible virtual currency and not subject to regulation as a money transmitter. By contrast, a person that creates units of convertible virtual currency and sells those units to another person for real currency or its equivalent is engaged in transmission to another location and is a money transmitter.
In addition, a person is an exchanger and a money transmitter if the person accepts such de-centralized convertible virtual currency from one person and transmits it to another person as part of the acceptance and transfer of currency, funds, or other value that substitutes for currency.

And, if by some chance you still think it's ambiguous and perhaps "mining" and "creating" aren't the same thing, it then says this:

How a person engages in "obtaining" a virtual currency may be described using any number of other terms, such as "earning," "harvesting," "mining," "creating," "auto-generating," "manufacturing," or "purchasing," depending on the details of the specific virtual currency model involved. For purposes of this guidance, the label applied to a particular process of obtaining a virtual currency is not material to the legal characterization under the BSA of the process or of the person engaging in the process.


An output is the spending part of a transaction, that establishes ownership of the funds. UTXO is an unspent transaction output. UTXO to your address are counted toward your balance. When you want to send Bitcoin, a UTXO is needed as an input to the transaction.

It is likely that if your node is syncing from scratch it doesnt know about the UTXO related to your address, yet. If it hasn't processed the block that contains the UTXO, it might not know about it, so it doesn't know you have a balance.  If you use the Bitcoin core wallet, there is a wallet database that stores that data.


Failed to import Bech32 SegWit addresses using importmulti Bitcoin-Core 0.16.0rc3

As noted in the Bitcoin Core 0.16 release notes, importmulti does not support SegWit addresses yet. This will be fixed in an upcoming release.


How miners validate each transaction?

Miners do not validate transactions. The nodes validate transactions, see Node Operation under Bitcoin Mining. The miners get a block template from the node, which includes the block header that they will try to hash until the hash value is less than the target. See Bitcoin Hashing Algorithm.

Nodes will make sure that the transactions are valid by checking the following:

The outputs signatures satisfy the input locking script. (The spender has access to spend the funds).
The output values are less than the inputs.
The values and the format is valid.

  There is a locking to each transaction? and sender also attach his
  digital signature to that transaction?

Yes, transaction outputs have a locking script that the next spender must be able to satisfy with a digital signature. See the verification section in Transaction.

  What I understand is they check locking and digital signature. but
  locking contains receiver address. Then how digital signature of a
  sender will work with locking (which contains receiver address)?

"A Bitcoin address is only a hash, so the sender can't provide a full public key in scriptPubKey. When redeeming coins that have been sent to a Bitcoin address, the recipient provides both the signature and the public key. The script verifies that the provided public key does hash to the hash in scriptPubKey, and then it also checks the signature against the public key," see Transaction Verification.


What's the safest way to buy bitcoins in India?

There are several legit companies where you can buy and sell Bitcoin officially in India such as Zebpay, Unocoin, Coinsecure,and Btcxindia.

I have personally used Unocoin and Zebpay, both are good.


Problems decrypting my bitcoin-wallet on android

If you didn't see the error message bad decrypt, and if the garbage you saw had the string org.bitcoin.production, then the decryption worked.  In recent versions of Bitcoin Wallet, as explained in the README, the wallet backup is no longer encrypted plain text but a custom protobuf format.

You can write the decrypted wallet to a file using the -out option to openssl, which is probably more useful than dumping it on the screen.  However, if you want to read it or extract the keys manually, you'll probably need special tools, which I am not sure if anyone has written.  See also Is there a known way to export my wallet private key from the "Bitcoin Android" app (com.bitcoinandroid)?, though it may or may not be current.

If you did see the message bad decrypt then you got the password wrong.  Try other variants.

The intended way to use the encrypted backup file is simply to copy it back onto your phone and restore it into the Bitcoin Wallet app with the "Safety:Restore Wallet" option.  You don't need to manually decrypt it with openssl unless you are trying to do something fancy.


As pointed out in similar questions backups are tricky with lightning. In the case of lightning each payment channel is a 2 of 2 multisig wallet. One of the keys is in your possession and it differs for each channel but in generally is derived from your master key.

The masterkey in c Lightning is 32 byte and stored in binary in ./lightning/hsm_secret

Unluckily it is not sufficient to backup your masterkey. Every channel has a so called state and an old state of the channel will yield problems (potentially a forceful close of the channel partner and them being able to claim your funds.)

So here is what should happen :
If you turn off your node and make a backup of your lightning dir you will be able to restore that backup on this or a different machine and after turning on your lightning node everything should work as before.

If however you change channel state before restori g your backup your channel partner and you will most likely see a mismatch and fail the channel which means they publish their latest state. If you are lucky it is your partner and you can claim your outputs. If not it is your node and your partner will probably throw in their penalty tx to claim all coins of the channel due to the channel breach.

Generally under the hood after restart of a lightning node all peers are being connected again. If that does not work (because the other node might be offline) there will be inactive channels.


Script evaluated without error but finished with a false/empty top stack element

The SHA256 of 1 is 4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a

$ printf "01" | xxd -r -p | openssl sha256
(stdin)= 4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a
$ printf "31" | xxd -r -p | openssl sha256
(stdin)= 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b

You were probably trying to do the SHA256 of the ascii character "1" which has a byte value of 0x31 or 41 in decimal.


Meaning of "fungibility" in "Zerocash (Zcash)"?

With money, privacy implies fungibility. If all transactions that take place using a particular currency is public, then people will know whether some money that someone is sending them was part of an illegal transaction in the past. This means that they can choose to not accept the money because of its link to illegal activities. This violates fungibility as not all units of the currency are treated the same way. Thus one unit of the currency cannot be replaced by another unit and necessarily have the same value.

If everything were private, then it is impossible to know whether some money was involved in illegal currencies. In this case, the vendor would have to choose to either not accept the currency entirely, or always accept the currency. They cannot pick and choose which particular units they accept. This makes it fungible as all units of the currency must be treated identically. Thus one unit of the currency can be replaced with another unit and still have the same value.

For currencies like Bitcoin, all transaction history is public. Thus Bitcoin is less fungible than zcash or monero where some or all transactions are private. We have seen this before with Bitcoin: some people will pay a premium in order to get newly generated coins which are provably clean. In other cases, some vendors have refused to honor deposits of coins that have come from large thefts. More private currencies such as zcash or monero do not have these problems as their private transactions hide history so vendors do not know whether the coins they receive are clean or dirty.

Note that while zcash and monero may be more fungible, they still have their own issues; there's a tradeoff. Furthermore, zcash isn't really more fungible than Bitcoin as no one actually uses their stealth addresses. So most transactions are public, and the ones that are hidden using stealth addresses are very obvious and special (i.e. probably up to no good) since it is not commonly used.


I sent out a payment over a day ago and it's still not confirmed

The fees you included are quite low indeed.

According to Bitcoinfees, and Bitcoinexchangerate the current recommended fee/byte is around 160-168 Satoshis, implying a median transaction fee (around 226-byte transaction) of about 40K Satoshi. In your case, you are paying around 50 Satoshi/byte, 116K Satoshi per transaction. The sources differ in how many blocks will take for a transaction with this fee ratio to be published, from 6 blocks to way more than a day.

What can you do? You can either wait until both transactions get confirmed. Wait until them get pruned from the nodes mempool and resubmit them with a higher fee, or create a new transaction spending from the last one using a CPFP approach.

Child pays for parent (CPFP)

Basically what you do is to create a new transaction spending from one that is already unconfirmed, and add a high fee to that new transaction. By doing so, you incentivize a miner to include that last transaction in the blockchain, having to include the previous one also.


Some observations: the priv key matches with the first compressed address (mkhn3...). It fits to the pubkey in hex, see below.
The way keys are derived is described here - see also the picture.
http://www.righto.com/2014/02/bitcoins-hard-way-using-raw-bitcoin.html

Once you have the pubkey in hex, there are 8 following steps to come to the final bitcoin address:

1 - Public ECDSA Key
2 - SHA-256 hash of 1
3 - RIPEMD-160 Hash of 2
4 - Adding network bytes to 3
5 - SHA-256 hash of 4
6 - SHA-256 hash of 5
7 - First four bytes of 6
8 - Adding 7 at the end of 4
9 - Base58 encoding of 8

The first uncompressed pubkey (which fits to the privkey):

  042d7331345e0da6ab1125eb39488a542a9923f31c585c20114d211a9f6bc9f3bf55d1d843cb7cf1d36b32d1cb00d2f140ef028e726a19a766f6ca7cef7b956583

would convert into this bitcoin address:

myfp2YcyYjksxmdfA74yEuBmaUgt9xWCot

and your second uncompressed pubkey

  040b4a4274222d7239d33c17ce39d753eee97103773b7e5a89e62f0ef0121032d7331345e0da6ab1125eb39488a542a9923f31c585c20114d211a9f6bc9f3b

would convert to this bitcoin address:

mmKUwoRgd9YdvRYYXGyumjduRMTAPCnkMz

I am not sure which tools you used to create your keys, it looks like you have somewhere a gap between using compressed and uncompressed keys.
A very good reference is in the online book from Andreas ("Mastering Bitcoin, 2nd edition"), which is also online readable (see chapter 4...).


Error: connect ECONNREFUSED 127.0.0.1:8332

I hadn't started bitcored service ..that's why this error occurs
when I started, the error had gone

i followed these steps that given here

Anyway thanks**


When will Litecoin be fully mined compared to Bitcoin? And at what years will each halving occur?

Litecoin block reward halves every 840,000 blocks, which is roughly every 4 years (block time of 2.5 minutes). The first halving to 25 LTC per block happened on 25 August 2015, and the next is predicted for August 2019, when the reward will halve to 12.5 LTC per block. So because litecoin halves as often as bitcoin, it'll be completely mined only a couple of years after bitcoin is

2015-08 -- 25.0 LTC

2019-08 -- 12.5

2023-08 -- 6.25

2027-08 -- 3.12

2031-08 -- 1.56

2035-08 -- 0.78

.... and every 4 years.


What is the most important parts of the video card in Bitcoin mining?

SHA256 does not require much, but if you intend to use it for scrypt mining too, it's said that memory is most important, i.e. speed and size.


How do I fix GUI Miner stuck at connecting?

you're using api2.bitcoincz.com:8332 but that's not listed on the pool's site:

Run your own GPU/FPGA/ASIC miner with the worker credentials you gave earlier, and connect it to following URL:

http://api.bitcoin.cz:8332
(Main pool URL)

or
stratum.bitcoin.cz:3333
(If you have Stratum-compatible miner)


Electrum Litecoin keeps synchronizing. What should I do?

Backup the wallet file
Delete the electrum data directory
Restart electrum-ltc

Since I don't know your OS...

Linux Data directory: $HOME/.electrum-ltc
Windows Data Directory: \Users\YourUserName\AppData\Roaming\Local\Electrum-LTC

or something very similar to those.


Does a node validates a transaction that comes with a block if it's already in its mempool?

The most expensive part of checking a transaction, ECDSA validation, is cached.


Many!

If you look at the BOLTs ( lightning RFC) you will find many situations in which nodes must fail a channel (meaning a force close) if something happens in an unexpected way while communicating with a channel partner. This could be even as easy as an unresponsive channel partner while settling an htlc in which case you have to settle the htlc onchain. But there are many more conditions in which the protocol asks to fail the channel.


What is the practical link between the hashing power in the bitcoin network and its security?

Several books claim that as the hashing/computing power increases, the bitcoin network is securer. How can a non-techie sees that from a practical standpoint?

Bitcoin has the world's largest/most-energy efficient hashing infrastructure when considered as a whole.
Otherwise, someone would fire up some new miners, make most of the new blocks, don't accept transactions, and then turn off the hashrate to cause transactions to be unconfirmed for long.
But if your hashrate is high, this won't happen.
If the whole miner network were consisting of two computers and some smartphones, NSA or Google would be able to do what I just described above with their computing power.


Security risks with running bitcoin core, and how to protect yourself

How do I protect my machine from attack?

The most important thing is to download Bitcoin Core from the correct destination. You can download it from bitcoincore.org or the source code can be found on the Bitcoin Core GitHub repo. If you download it from a malicious party's destination you could have serious problems. Luke Dashjr has a blog post on the extra precautions you could follow to make sure you are installing the correct software but this may be a challenge for you if you aren't technical.

Do I install specific security software?

No there is no specific security software to install. Depending on your operating system some may recommend an antivirus software but that is general security hygiene not specific to Bitcoin.

As I understand it, my IP address will be visible to see.

Yes your IP address will be visible to peers that you connect to unless you use Tor. (Tor is recommended if privacy is especially important to you.) However, if you choose to use a clearnet node and you don't want your IP address to show up on sites like bitnodes.io you can run a non-listening node by disabling listening. You do this by configuring with the -listen=0 flag or putting listen=0 in your config file. This way you can't be contacted by nodes you aren't directly connected to. The downside to this is that you aren't helping the network as much and you will typically have fewer connections.


"Failed to subscribe" - poclbm over SSL - Ubuntu

After looking at the (quite old) source code of poclbm, there is a commented line that creates the SSL connection. Not sure it is the reason but I guess it doesn't support HTTPS in its last version.
I changed to DiabloMiner (I had to add my self-signed certificate using the InstallCert.java tool)

I can now mine over HTTPS. Next step is a pool...


What is the significance of Bitcoin Pizza Day, and when is it celebrated?

Bitcoin Pizza Day is celebrated on May 22nd. On this day in 2010, a BitcoinTalk member bought pizza in exchange for 10,000 BTC. This represents more or less the first known transaction using bitcoins for actual goods.

The original post: Laszlo announcing his purchase in 2010

The significance has been growing especially now, because... of how much that 10,000 BTC would be worth today.


Yes the BTC Robot is a scam. I bought 10 bitcoins when the price was $140 a coin. I used the robot and it brought my bitcoin number down to 2.774 as it made more losing trades than winning trades. I turned it off when I realized what was happening. Despite of this I didn't lose money as the bitcoin price kept rising. If I had simply held my coins and not traded with this stupid robot I would now have almost $10,000 in my account instead of the $2200 that I now have.

When you read the testimonials you can see that if they would have done the math they would have seen what I did and realized how they were tricked, but because they still have more in their account than they initially invested they think the robot is working in their favor.


Seeing this a year late, but if this is still a question then -

Hashgraph isn't exactly a voting based algorithm. It does "virtual voting" through "gossip about gossip" i.e. nodes not just gossip that there is a new transaction, but also gossip about when they heard it, who told them/how they heard it (literally gossiping about the gossip!)
This way every node has the COMPLETE knowledge of the network. If node A knows everything that node B knows, A can also find out what B will vote (WITHOUT B actually voting!)

Also, hashgraph never says that 51% attack can't occur. Through Byzantine Fault Tolerance even a  34% attack can occur (if more than 1/3rd of the nodes are malicious).
Hashgraph just says that DDoS or DoS (Denial of Service) attacks can't occur because there are no leaders.

Refer to the Hashgraph whitepaper or the scientific paper on its consensus algorithm: https://docs.hedera.com/docs/hashgraph-overview or https://www.hedera.com/whitepaper


Is there a limit to how long a wallet can be offline?

Any unspent bitcoins against addresses in your old wallet should be retrievable.

The client won't show transactions that haven't been downloaded to your copy of the blockchain yet. There should be an icon in the lower right corner of the Bitcoin-QT client that indicates progress on downloading the blockchain. It can take a few hours (there's around 2.5GB to download, and it downloads them slower than you'd expect because the client verifies the blocks as it goes).


Looking through the rippled API documentation it would seem that there is no import private key call - https://developers.ripple.com/rippled-api.html

However other ripple clients can do this task.  I know of the https://toastwallet.com/ as a stand alone Ripple wallet but it seems some people have had issues importing private keys.

https://gatehub.net/ is another alternative for a desktop ripple client and in here you can import the private keys and import addresses into your wallet.

Your private key is your account. You can access your account from any wallet that is a portal to the xrp ledger.

Gatehub will easily let you restore your private key. People have issuings restoring with toast cause the toast backup requirement.


Because orderbook based exchanges are not exactly trivial to implement with all necessary security what you are asking is unlikely to happen in business-wise. Even with the best software developers of the world you could not achieve what you wish within a week or so.

If you have plenty of money to invest and you want hiqh quality, long-term, results for your project, what you should expect

Lead development time of 2-3 months with 2-3 person team with the following components

Orderbook (open source Buttercoin engine available)
User account management
Deposit and withdrawal

A way to get fiat currency in and out from your exchange (you probably should have a special deal with a bank)
If you are using western world senior software developers, expect cost between 25 k - 100 kUSD

Also I recommend not to use PHP or ASP.NET programming frameworks, pick Ruby, Python or JavaScript instead. PHP systems have historical record of being prone to hacks and that's something you do not want with financial systems like Bitcoin; using PHP would greatly diminish the trustability of your service. Bitcoin users have become aware of shady services and they most likely want to see that the service you deliver can be trusted before they put in their money into it.

Based on how you set the question it seems that you do not have much experience with software development, so my suggestion is that you hire a project manager who would do the planning for you.


How do I find the wallet that Bitcoin was sent to?

If you know the public address that it came from, you can check the block explorer for the most recent transaction.


Less circuitous way to get network fee in raw transaction

If the inputs to the transaction are known to the Bitcoin Core wallet, then you can use the fundrawtransaction command to skip fee estimation and input selection. The process then becomes:

createrawtransaction with only the outputs you want (i.e. no change, only the recipients).
fundrawtransaction
signrawtransaction
sendrawtransaction

If you are not using Bitcoin Core's wallet, you can use effective values.

Presumably you know the amounts in the inputs before you actual create the transaction. So you can then calculate how large the inputs will be, calculate how much in fees that will cost based on the output of estimatesmartfee, and subtract that fee amount from the actual value of the input. This is your effective value.

When you create the outputs, you calculate the total size of the non-input data and calculate the fees for those data. Now you have how much total value your inputs must cover. You can then select coins that way.

So the process is:

estimatesmartfee
For each potential input, calculate the fee for that input and compute the effective value.
For each output (including change if you assume that there will be change) and for the extra fixed size transaction overhead, calculate the non-input fees.
Add the non-input fees to the amount you want to send, this is the amount that your inputs will need to cover the total cost.
Choose the inputs you want to spend based upon their effective values.
createrawtransaction, signrawtransaction, sendrawtransaction.

The size of inputs in vbytes are as follows:

P2PKH: 148 vbytes

P2WPKH: 37 vbytes

P2SH-P2WPKH: 60 vbytes

For P2SH and P2WSH inputs, it depends on the script that you are using. Most people though will be using P2PKH, P2WPKH, or P2SH-P2WPKH.


When state->fShouldBan is set, the network thread will disconnect the node, and cleanup memory. As a result, the state object disappears entirely. Because of that, there is no need to ever unset fShouldBan.

What does happen is that when the actual ban happens (not just the setting of the fShouldBan field), it is added to the ban table (which is IP based). Entries in this table have an expiration time. The default expiration time for newly banned nodes is controlled by the -bantime option and defaults to 24 hours in the future.


electrum wallet listaddress without change addresses

There's command specific help with electrum help <commandname>. If you run that for listaddresses you will see that the --receiving switch does what you want. So electrum listaddresses --receiving.


How are mining pools authenticated to clients?

The mining pools do not authenticate themselves to the miners in any special way beyond what is used in their communication protocol. If the pool takes calls on a non-encrypted socket, the communication can be intercepted and changed - a normal man-in-the-middle attack. If a pool uses a SSH certificate, that is something that can't be mimicked by an attacker and would make such an attack impossible. The mining protocol itself does not add any extra security.

The person running the mining operation can always tell that something is fishy if they pay close attention to their miners' productivity and downtime, but that is not part of the protocol.


How to claim BTG from an Electrum wallet?

Try this: Claiming my BTG from my BTC private key
Worked for me

To know where your BTG are use this explorer: https://bitinfocharts.com/bitcoin%20gold/


If the seller, or their payment processor, saved the private key for that address, then they have access  to the coins, and would be able to refund them or accept them as your payment. (If you ever see that your transaction has been spent, you will know that this was the case). But only they can claim the coins; you have no way to get them back yourself, and if they don't want to give them back or credit them as payment, your only recourse is probably to sue them in court.

If the seller or processor discarded the private key when the timeout expired, then the coins are permanently lost to everyone.

Either way, you will have to get in touch with the seller to learn anything further.


Is it correct to say that continuous transactions are on different blocks most of the time?

Each bitcoin node keeps an index of 'unspent transaction outputs' (the "UTXO set"), which is updated with each new block received. At the genesis of the network, the UTXO set was empty. With each block after the genesis block, the UTXO set was slowly populated, as each new block would contain some number of transactions (that create/destroy UTXOs).
Each bitcoin transaction specifies some number of inputs (other than the coinbase transaction in each block, which is a special transaction that has no inputs), and these inputs must be valid, existing UTXOs in the UTXO set. These UTXOs are 'consumed' entirely as inputs, and thus deleted from the UTXO set that the node keeps track of.
Each bitcoin transaction also specifies some number of newly created outputs, which are added to the UTXO set.
So when checking to see if a transaction is valid, the node will check to ensure that all inputs to the transaction are valid, currently existing UTXOs. Under the hood, each input is specified by the transaction ID, and the outputs index, and it is this data that the node uses to lookup the UTXO, as one step towards determining the validity of said transaction.


How much ASIC power has been, or is being, shipped in 2013?

Let's analyze ButterflyLabs alone.

From the Butterfly Labs Wait list, here are the current numbers, along with the number of chips:

Orders Tracked: 325

Unit             Number tracked     Chips/unit     Chips tracked
Jalapeno SC      216                  1              216
Mini Single SC    41                  7              287
Single SC        348                 14             4872
Mini Rig SC       25                334             8350
------------------------------------------------------------------
Total                                              13725

Thus, our average chips per order is 13725/325 = 42.2 chips/order from what we know.  Next, let's look at the number of orders and assume that average stays consistent.  Let's say there were 18,500 ASIC orders under the first ordering system (Order numbers 1500-20000), and are currently 12,000 in the second order system (Order numbers 100014000-100026000).  That brings the total orders to be filled to 30,500.  Multiply that by our average number of chips per order and we have 1,287,100 4.5GHz chips on order.  Thus, if these numbers hold true (and I really hope they are VERY high), we are looking at 5.8 Million GH/s added to the network from Butterfly Labs alone once they fill the orders to this point.  This is about 100 times the current global hash rate of 50000GH/s.

Also note that this is based off a lot of assumptions, and they haven't shipped their first unit yet, so who really knows.  When I contacted them in February, they said orders placed then would be fulfilled in May-June, but they also said they were shipping the first units by the end of February and they haven't shipped those yet.

UPDATE (4/22/2013):

The last order I see posted is 100036087, on April 8, up from 100026000 on March 22 (2 months ago to the day!), so we have an increase in order numbers of about 5,000 per month at the moment.  Also, they just shipped their first developer units, and they had to up the case sizes to accomodate the extra power modules.  Thus my best guess is that BFL will begin shipping to customers late May/early June.

Speaking of order numbers, I had assumed above that they increased every time an order was actually made.  However, According to Sgt Spike on the wait list forum about BFL order numbers,

"It generates an order number every time someone goes to checkout, whether they actually
 pay for it or not."

Which, if true, means that the above numbers are a definite worst-case scenario (unless of course there are a bunch of missing orders from the list for 100 mini-rigs or something crazy like that, which is very doubtful).  Thus, multiply the above numbers by the percentage you think that people actually followed through to a purchase after proceeding to checkout to get a better estimate.

Also, it looks like the earlier orders were much more heavily weighted than the later orders, where the info is also much more sparse, so the estimate still may be high even after you figure the correct buy percentage in.

Last, note that going forward the mini-rig is out of stock and they have upped the price and they have lowered the hash rates available from 60GH/s and 30GH/s to 50GH/s and 25GH/s respectively, so going forward the GH/order will probably be much less on average.  Even before they did that.  Thus, that should lower the expected addition to the global hash rate as well going forward.

With the above considered, I'd say a reasonable upper limit is about 2 Million GH/s added, which assumes about half the people that go to checkout actually place an order and the average order is slightly smaller than the average of the orders submitted.


How can I install a bitcoin wallet on Kali Linux?

This is the official guide to building Bitcoin on Linux:

https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md


would 10 x 2TH/s machines give me the possibility to mine solo

Tim S. had a good answer about this earlier today.

Since your overall hash rate is going to be around 20 TH/s, you would be OK doing your own solo mining. But with solo mining, your rewards will be a lot more inconsistent than if you mined in a pool.


How do I reduce the size of the block chain data on my machine?

For portable devices there are variants of the Bitcoin client often dubbed "selfish clients" in that they do not download any portion of the block chain other than what pertains to their own specific addresses and transactions. To my knowledge, none of these variants has been fully developed into a desktop client, but it is likely that such projects are underway. Unless your system is literally lacking the hardware to accommodate these files, however, it is recommended that you use a non-selfish client version. The lightweight versions are called "selfish" for a reason - by only holding block chain data which pertains to your own transactions, you cannot pass anything but that data to other nodes and as such your client is of minimal (if any) use to the network.


Armory synchronization takes forever. How can I speed it up or retrieve my coins?

You can extract the private keys and import them in a lite wallet like Electrum.

You need to run Armory as expert, go to the Wallet's properties dialog and click on the backup center on the right side column


What is the incentive for including transactions in a block?

Three reasons:

Leaving the block empty doesn't save any time. They still hash however many times a second they hash.
Transaction fees make up a significant fraction of the mining reward today. Such a miner would be foolish.
Miners have invested in expensive hardware that is valuable only if bitcoins remain valuable. If too many miners mine empty blocks, confirmation times will go up and the usefulness of the network will be diminshed.


What % of the network will mine multi-sig transactions where n > 3?

For plain multisigs, as far as I know only Eligius will mine transactions with n>3 as they're non-standard (so not relayed).

That being said, multisig is now usually done using pay-to-script-hash. In this case, the only limit you're facing is the maximum length of the scriptSig which is 1650 bytes. If you do the math, you can go up to n=15 safely in that space.

TL;DR Up to n=15 in a P2SH, stick to 3 otherwise.


Why are all testnet transactions currently unconfirmed and all faucets empty?

Last time I checked there were about 10x as many transactions in mempool as fit in a block. This means it can take easily about 3 hours for a particular transaction to confirm, on average. Strangely, increasing the miner fee does not seem to help the situation.

Unfortunately, the only faucet that ever worked for me (https://testnet.manu.backend.hamburg/faucet) is now down for maintenance, but there is no indication that it is "empty".


Exactly the duplicate of copay does not work in iphone5 ios10
and Copay does not go past splash page ios

Don't worry, it has been reported: https://github.com/bitpay/copay/issues/8382

It's not only you, other people seem to have the same problem.

Just wait until they release a fix for it.


How to get history trades of last 10 days from Bittrex using Bittrex API?

I have tried to do the same, and as far as I know it is not possible. The best solution may be to start today, and in 10 days you will have 10 days worth of trades :)


That input spends a pay-to-pubkey output. The output it spends from contains the public key, so it is not in the input.


How does Ripple ensure that transactions take place

How do individuals set who they 'trust'

Not sure what this means; each individual decides on his own who to trust. For example, I already (in a general sense) trust Bitstamp if I have USD or BTC deposits with them. Ripple just allows you to make this trust explicit in an open ledger. The meaning of this trust is, if I specify a trust level of $100, that the system will allow me to hold up to $100 of Bitstamp IOUs.

  How does the system respond if a user goes bankrupt

The system doesn't respond at all, as it merely keeps track of the IOU amounts - it does not, and cannot, enforce these claims. If one is willing to hold the IOU, it's probably because they believe it represents a claim that's enforceable in a court of law.

  What happens in the situation where there is no line between the sender and the receiver of money

Where there is no trust line, a transfer is not possible at all. If finding a trust path is difficult, one option is for them to offer liquidity in XRP - the only Ripple asset without counterparty risk. Then anyone who, on his own end, has path access to XRP will be able to send funds - the XRP acts as the 'trustless' bridge or vehicle currency.

Note that this is the role played by bitcoin in many situations today; for example bitcoin is used as a vehicle currency in various remittance models, and is able to offer advantages precisely because of its low trust requirements.

In the end, XRP and BTC will compete for liquidity; whoever has the higher liquidity will have the lower costs.


How do BTC payments work at real-world shops?

Depends on their infrastructure. If they use an intermediary (like bitpay or something) it will be instantaneus, since bitpay is the one that takes the risk for double spends and accepts payment fast.
In case they have their own infrastructure, it may depend on what they do, if they accept one confirmation for the payment it may not take much otherwise it may take longer. I don't think any of those shops do that by themselfs, most probably the will have an "acquirer" for bitcoins.


You can use the invalidateblock RPC commands to create blockchain forks.

invalidateblock hash tells a node to consider hash invalid, so just generate a bunch of blocks, invalidate one somewhere down the chain on one of the regtest nodes, and have that node generate a bunch more to create a fork.

See qa/rpc-tests/mempool_resurrect_test.py in the Bitcoin Core tree for a python example.


Why it is not possible for a payee to verify double-spends of the coin?

As a participant in the peer to peer network, it is impossible for you to know that the state and timing you are seeing are consistent with what other people are seeing. You can't ask other participants in the network what they are seeing directly as they can lie, withhold information, or the request can be tampered with on its way across the network. The block chain and proof of work mining system are designed to ensure that in all probability, nodes in the network have consistent ordering and atomicity. Absent this, it would be very feasible for nodes to see a different state and make different decisions about validity.


There's a conversation on cryptography@metzdowd.org shortly after the release of the Bitcoin paper that touches on this tangentially:
James A. Donald - Sun, 02 Nov 2008

For transferable proof of work tokens to have value, they must have
monetary value.  To have monetary value, they must be transferred within
a very large network - for example a file trading network akin to
bittorrent.
To detect and reject a double spending event in a timely manner, one
must have most past transactions of the coins in the transaction, which,
naively implemented, requires each peer to have most past
transactions, or most past transactions that occurred recently. [...]

Satoshi Nakamoto - Sun, 02 Nov 2008

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

From the word choice used here, a datacenter of machines using a single server to construct blocks is intended. However, many different parties using the same pool server is not contemplated.
Of course, that doesn't mean that pooled mining is wrong - just that it wasn't anticipated.


P2Poolis a good way to do that. It can be hard to set up but is the best way to do it.


Bitcoin client communication time constraints

Bitcoin client decides that the other client is not responding when it receives report from operation system that the connection is dead.

Bitcoin relies on OS implementation of TCP to send and receive messages. For example, by default, when connection was already established and Round Trip Time is known, Windows will try to resend data segment five times doubling wait time after each resend before reporting connection as dead. So the total wait time is: "Round Trip Time" * 2^(5-1) .

P.S. Timeouts are different for each type of message, e.g. total connection initiation timeout equals to 6 seconds .
TCP/IP Configuration Parameters


Is there a list of bitcoin block explorers?

This may be a good place to start?

https://en.bitcoin.it/wiki/Category:Block_chain_browsers


How does one submit a transaction to the network using the blockchain.info API?

To broadcast Bitcoin transaction using blockchain.info you have to send a post request to https://blockchain.info/pushtx with tx=yourRawTransaction.

I would suggest you run your own node because you may face some rate limit.


Shares mostly rejected mining with an FPGA

Give me the make of the FPGA and the name of FPGA binary you are using.

It could well be that you are over-clocking the FPGA too far, due to the way that many of these cores are designed, there is a race condition, where the  "success" flag, gets out of sync with the "nonce".

Basically the FPGA flags the "hit", but by the time it gets to copying the "nonce", it has changed......
and so fails.


Which is the actual block header hash that has to be less than the target value?

Both.

SHA256 produces an array of 32 bytes as output. Bitcoin treats those 32 bytes as a 256-bit LSB integer (least significant bit first). It is this integer that is compared to the target.

However, as humans are used to seeing numbers formatted in MSB order (most significant bit first), that too is what happens in Bitcoin. The formatting with the zeroes up front is not the output of the hash function. It is the output of the hash function, interpreted as an LSB-encoded integer, and then formatted in hexadecimal in MSB order.


Is Google Authenticator really useful on blockchain.info?

Two-factor authentication is generally useful in that it adds a different layer of security to your account. In addition to your password (which is something you know) two-factor authentication adds a key generated from a specific device (which is something you have.)

In my experience one can never be too cautious about their financies, especially when they are being hosted on a machine connected to the internet. If it were just the security vulnerabilities you knew you knew about (e.g., the strength of your passphrase) that would be one thing. Usually it is the security issues you do not know about that justify extra layers (like two-factor authentication).


You can just copy your wallet.dat from your local wallet directory. If using windows it will be in %appdata%/Bitcoin. After reformatting download a fresh copy of Bitcoin Core and replace the wallet.dat with the one you saved prior to reformatting.

There's also the method of using the backupwallet and importwallet commands. https://bitcoin.org/en/developer-reference#backupwallet


How to create descriptor watch-only wallet with bitcoin-cli in Bitcoin Core 0.21?

First create a descriptor wallet with createwallet:
bitcoin-cli -named createwallet wallet_name=mywallet descriptors=true

This will make a descriptor wallet named mywallet.
Then import a descriptor into that wallet using `importdescriptors:
bitcoin-cli -rpcwallet=mywallet importdescriptors '[{"desc": "wpkh([00000000/84h/0h/0h]xpub6DP....xyz/0/*)#checksum", "range": [0, 1000], "timestamp": "now", "internal": false, "watchonly": true, "active": true}]

This will import the descriptor with an initial keypool of 1000. Any new bech32 addresses you request (with getnewaddress or from the GUI) will come from this descriptor.


In the case of a criminal investigation, how does one knows which exchange or wallet service a bitcoin address belongs to?

There is no guaranteed way to check.

In most investigations, it is a combination of tracing the money to known addresses (most exchanges and companies consolidate funds into a handful of hot and cold wallets), and exchanges volunteering/sharing information when served with warrants.


Why bother checking both public key and signature in P2PKH transactions?

1) The addresses would obsolete after one use.

2) If someone does a Sybil attack, s/he can prevent the transactions from relaying (which may also happen now), but also s/he can make a fake transaction from that address and relay it, as the attacker knows what the preimage is.

3) Even without a Sybil attack, someone could take advantage from eventual orphaned blocks and grab the money from all transactions in them, by making a fake transaction for each one.


If I generate the transaction on B and send it to bitcoin network will it show up on the bitcoin-qt transaction history on computer A?

Yes, when you make transactions, your transactions are broadcast to other nodes, and then the entire network. Your node will surely have the transaction in memory pool / blockchain, as long as your Bitcoin Core is fully synced. But it'll only appear on the history tab if at least one of the inputs of the transaction was held in a private key that computer A has.

  If question one is true, just by looking on computer A can I know which computer generated the tx?

There's no way understand if you're using Bitcoin Qt (I don't know if there's a full node client that does that) - it doesn't log if it created the transaction, or it received the transaction from a node.

You can use web clients, for example GreenAddress. They log when you logged in with your IP address and time. Then you can try to find which computer it is by inspecting its IP address and date and time.


Your hardware is useless for mining. You'd spend more money on power than you could ever make back mining on a rig that isn't built for mining.


When a trade offer in Ripple incurs transit fees, who pays them?

Transfer fees are charged whenever accounts with one set have a balance moved between other accounts. For payments, the sender always pays no matter which balances are adjusted, for trades the account 'sending/giving' pays.

So if there is a trade of USD/Bitstamp for BTC/DividendRippler between two accounts (it doesn't matter which entered the initial trade offer or if it is a BUY or SELL order) then the account that gives USD pays the 0.2% Bitstamp transfer fee and the account that gives BTC pays the 0.15% DividendRippler transfer fee.

Another example, if the trade was for USD/Bitstamp and XRP then the account giving XRP would pay no fee and the account giving USD would pay Bitstamp's 0.2% fee.

The fee is not pre-calculated into the trade offer but calculated when trades are executed. It's even possible for the issuing account to change their transfer rate/fee¹ between when the offer is posted and when it's executed, in which case the rate in effect at the time the offer is executed is the one that applies.

¹ Presumably gateways change their transfer rate rarely and according to their published policies. E.g. some gateways have promised a maximum they'll never exceed and promised to give 30 days notice before any increase. Ripple doesn't enforce any such policies however.

See also some related Ripple forum posts (that basically say the same thing):

Re: Transaction fee on the BTC/XRP in built-in Exchange?
Re: Transaction fee on the BTC/XRP in built-in Exchange?

[Edit] Small correction:
Although the overall exchange rate/price isn't adjusted to affect the transfer rate, the shown amount of the offer (the funded portion) may be adjusted as the transfer rate changes. [Ignore the rest of this if you're not interested in the details of "partially funded" offers.]

I just noticed an example of this on a trade offer that is internally represented as "taker gets 10 GBP/Bitstamp; taker pays 2940 XRP". Normally this would display on the GBP/XRP order book as an ASK with "Ask Price 294 XRP", "Size 10 GBP". If the account making the offer had at least 10.02 GBP (10 * the transfer rate of 1.002) this is what would be shown. (Since to fill the offer the offer taker would get 10 GBP but the offer maker would have to give up 10.02 GBP to cover the transfer fee).

However, the account making the offer has a balance of exactly 10 GBP/Bitstamp so due to the transfer rate this offer is considered not fully funded. Internally the offer also has fields "taker gets funded 9.980039920159681 GBP; taker pays funded 2934.131736 XRP". So this shows up in the GBP/XRP order book as an ASK with "Ask Price 294", "Size 9.980039 GBP". Note that the ask price hasn't changed, just the total amount. Someone taking 5 GBP of the offer (for 1470 XRP) would get exactly 5 GBP but the offer maker would give 5.01 GBP to cover the transfer fee. Since the offer maker only has 10 GBP the fee has to come out of that leaving only ~9.98 GBP funded.

If the transfer rate were to change the funded portion should also change. If the account were to get another 0.02 GBP (or more) the offer would be considered fully funded. If the account spends GBP and where to make their balance exactly 5.01 GBP the funded portion should change to show 5 GBP.


Would Bitcoin-Qt ever use an imported private key's public key as a future change address?

No, only new addresses are used for change.


Can I still claim the pre-fork BCC with a current balance of 0 from Bitcoin Core wallet?

What you did after the fork on the bitcoin blockchain has no effect on the BCC chain at all. All that matters is what you had at the time of the fork. You can follow the regular BCC claiming instructions.


What is the difference between a wallet and paired keys?

Yes. The cloud you're referring to is actually the block chain. A bitcoin wallet has various different meanings, such as web-wallet, brain wallet, or various others, but in my opinion the best representation of a wallet is actually a file, commonly a wallet.dat file. Then you use a bitcoin client to open this wallet file.

Inside this file there's various key pairs that you can use to make bitcoins transactions. No balance information is kept in this file otherwise it would be extremely large in size.

The important part is that a bitcoin wallet's format is not standardized. This means that each bitcoin client implements its own wallet file format. You can't import Bitcoin-QT's wallet file in Multibit for example.

But again, a wallet can be represented in a variety of different ways: as files, on the web managed by third parties, as a piece of paper, etc.


Including transactions in a block - rules and time / technical aspect

There are no real rules, per se, just various optimizations.

ASICs are fast. They can burn through the entire 2^32 possible nonces for a given block in seconds, which requires miners to use the extra nonce field in the coinbase transaction to generate a new block header (since altering the coinbase transaction changes the merkle root) and try again.

This process can be done in parallel - a miner can prepare the N+1 block header by changing the extra nonce in the coinbase transaction while they are checking the Nth block header's 2^32 nonce values.

Similarly, transaction selection can also be done in parallel - a new block template can be created while a miner is operating on the previous one, and the new template's block header can simply be used when the miner swaps out the previous one after exhausting the nonce space (unless they find a valid block, in which case the template must be updated again).

This is what most mining pools do - the block template generate is done in parallel by the mining pool, and they continuously pass updated block templates to all of their miners. This allows them to quickly include high fee transactions in potential blocks while still ensuring that they are looking for a solution at all times.


Can I download the blockchain blocks from torrent and paste them?

Yes you can download the blockchain from other sources then paste it inside the your main bitcoin folder.
You will need two folders:
- blocks
- chainstate
Then open bitcoin-qt for synchronization.


After searching about this, i found out that each full node maintains a database with the set of unspent transaction outputs (UTXOs) in the memory. So When a new transaction is added, its UTXOs get updated accordingly (source). Also, a full node keeps track of all transactions that ever happened (source) and offer this:

Filtering transactions and blocks on behalf of lightweight nodes so that lightweight nodes do not need to download every transaction ever made on the network in order to find their own transactions.
Serving historical full blocks to nodes that have been offline for a while.
Transmitting new transactions from users to miners.
Broadcasting new blocks from miners to other nodes.

The RPC used for this call getrawtransaction that takes as an argument a TxID which is hashing twice the transaction data and gives you back the transaction you are searching for.


Do all consensus algorithms aim to solve the Byzantine generals problem?

To answer your question, no.

BFT-class consensus algorithms seek to solve the Byzantine Generals Problem.

Other consensus algorithms, generally the Nakamato-style consensus algorithms) including PoW (Proof-of-Work, used by Bitcoin) and PoET (Proof of Elapsed Time, used by Sawtooth) do not seek to solve BFT.


Step by step example to redeem a P2SH output required

The issue is, scriptsig contains the actual redeemScript instead of the serialized script as a push.  The second error, the redeemscript contains an extraneous  0x00 value that should not be there as this is a simple CHECKSIG.


Is the entire blockchain kept in memory?

The original Bitcoin code base definitely didn't support this.
Currently it's possible to effectively keep the entire UTXO set in memory in Bitcoin Core if you set the database cache large enough (over 6 GB, last I checked). The blockchain itself is always stored on disk.


The blockchain and your wallet file are stored in the Bitcoin Core data directory. This directory is different from the install directory where all of the binaries are. When you start Bitcoin Core, go to Help > Debug Window and see what folder it is using as its datadir. Make sure that that is what you expect it to be; if you have changed the datadir (by choosing a different one when you first started the client), then make sure that that is what Bitcoin Core is using. Otherwise it will use the default datadir of C:\Users\<your username>\AppData\Roaming\Bitcoin.


Why is Bisq suddenly acting up and refusing to let me withdraw my coins?

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

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

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

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

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

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

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

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


How to let a peer connect to a peer's peer?

The basic problem you need to solve is this: B knows about other nodes on the network, and needs to inform A of this.  So, your coin's protocol will have to include some way for this to happen.

In Bitcoin, node A would send a getaddr message to B, and  B would respond with an addr message, listing other nodes it knows about (in this case, C).  Then A can try to connect directly to these nodes.  See https://en.bitcoin.it/wiki/Protocol_documentation for more information about these messages.  If you started with the Bitcoin source for your altcoin, then you should investigate why this isn't happening.

A seed node is a special case of this, to handle the situation where a brand-new client doesn't yet know about any other nodes on the network.  Someone promises to operate a node that should stay working reliably and be available at a specific IP address or DNS name (a so-called DNS seed).  This address or DNS name can then be hard-coded in the client source code, so that new clients will try that node first.  See What is a DNS seed node vs a Seed Node?. Using the getaddr/addr protocol, the seed node can then inform the client of other nodes.  Once the client connects to some of those nodes, it can find out about additional nodes, and so on until the client reaches whatever connection limit it has configured.

In some cases the seed node might be configured to only respond to getaddr requests and not to any other type of request, so that it does not get overloaded with relaying blocks, transactions, etc, and stays available for its main job of helping clients find each other.


Is bitcoin node and bitcoin client the same thing?

The Bitcoin system runs on a peer-to-peer network.
Each device participating on this network is called a "node" (of the network).
This node is actually a device running a Bitcoin client program.
Technically speaking node and client coincide. However they are different concepts in my opinion. One refers to the role of being part of the network, while the other refers to having a Bitcoin client program running.

Bitcoin-Core is a client program; namely, the reference implementation.
Bitcoind is just the "daemon" of Bitcoin-Core, that is the client core, running in the background, and can be controlled by bitcoin-cli (the command-line interface) via RPC.


Unable to install Bitcoin Core on my MacOS High Sierra

Dammit, what was happening I don't know as a bit new to this MacOS thing. But, rather than double clicking on that stupid drive icon of "Bitcoin-Core" in desktop... I clicked on the drive icon from left-hand side pan from "Devices" section on Finder window & it opened without any error. It's working fine now. Problem fixes guys. What a waste of time. -.-