Does full node store all valid forks and "alternative" blocks from blockchain history?

Do nodes store all the branches from entire blockchain history?

They will store all branches that they know of so long as the block headers of each branch are fully valid.

The way that Bitcoin Core nodes (and all node software based upon Bitcoin Core) work is that they will ask for an receive a block header before asking for the actual block itself. Using the headers, the node builds a headers chain. So if a block header is valid (i.e. it has a valid proof of work and connects to known previous block headers), it will be stored and added to the chainstate. In this way, a node can know of and keep track of all branches of the blockchain without having the block itself.

Even if a headers chain does not have the most work, it will still be kept around forever and kept track of. Although blocks for that headers chain will not be requested, if any peers have that chain as their actual blockchain and the headers are completely valid, it will still be known to a peer and kept track of.

If a headers chain suddenly begins having invalid block headers, the chain of valid headers will still be kept and tracked; the invalid headers extending that won't be.


Accidentally spent unconfirmed funds, when will they clear?

The fee is too small. So, it will take many hours to be confirmed.

Don't worry, the second transaction will be confirmed after the confirmation of the first one.
It will take many hours, but they will be confirmed.


Most clients on the network have a transaction pool in their memory. The same basically applies to miners: they just dump the top 500KB (or some other value) transactions into a block, sorted by transaction fee (descending, of course). When there aren't many transactions, maybe because of a series of block in a short amount of time, it will be confirmed anyway.

But to answer your actual question: yes, transactions (sort of) expire. When you send a transaction, it sends a tx frame to all connected peers. These peers store the transaction in their memory pools and tell all their connections that they have a new transaction. When those connections don't have it yet, they ask for it, and that's how a transaction spreads over the network.

At some point every node in the network will have the transaction in their memory pool, and at that point it will no longer be sent over the network. Now when a user restarts their client, the memory pool is wiped, and the transaction is deleted from that computer. (Plus a few other ways to delete transactions from the pool)

Because of that it's very unlikely for the transaction to be gone from the entire network, but in case it does happen: the reference client will automatically re-send the transaction every x hours(/minutes?) when it's still not confirmed.

Oh, and I forgot the most important part: transactions on Bitcoin (tx frames in the protocol) don't have a 'time' field, which means that transaction expiration can't be a feature of Bitcoin.

To summarize: yes, the transaction can expire, but that is really unlikely.


How are transaction fees claimed from a technical point of view?

A typical transaction has one or more inputs and one or more outputs. Since there is no amount specified for inputs, the rule is that ALL of the inputs is always transferred. Any discrepancy between the value contained in the inputs and the total value of the outputs is lost forever.

This is not correct. The difference between the input amount and the output amount is exactly what we call fee. It is not lost.

  It would seem the only way to do this would be to add new output to the transaction and new script to send the value to the output. So in other words the miner would change the transaction from the form submitted by the original poster, to a new form including the fee transmittal.

That is not possible. Miners cannot modify transactions.

Instead, there is simply a rule that the coinbase transaction (the first transaction in each block, created by the miner) is allowed to have outputs whose summed amount is up to the subsidy value (currently 25 BTC, soon 12.5 BTC) plus the sum of all the fees of the other transactions in the block.


How can one remain relatively anonymous while using Bitcoin?

Don't publicly disclose any address in your wallet, or associate any address with your true identity.
Use currency exchanges to break the 'money trail' of bitcoin addresses associated with you.*
Use anonymizing services such as TOR when conducting business.
Break up your transactions between online and offline (person to person) transactions.
Buy bitcoins for cash.
Mine bitcoins yourself either directly (solo), or with pools such as Eligius that do not require registration.

*If you transfer bitcoins into a large currency exchange or other large private repository of bitcoins, then pay bitcoin back out to a new address that is not associated with you it is difficult (without a warrant) to track the bitcoins.


What is the 6a[...] hash in OP_RETURN transactions?

6A is the hex representation of OP_RETURN:  https://en.bitcoin.it/wiki/Script

That is not a hash at all, but rather the raw encumbrance script.  You are looking at the code that actually contains the OP_RETURN.  You can decode these scripts here:  https://chainquery.com/bitcoin-api/decodescript


Tracking payments sent to scammers, and what they do with the money

There was a project that seems to no longer be active called BlockViewer.

The problem, of course, is Bitcoin's pseudonymous nature.  Beginning with the first transfer the trail can be essentially be blurred and the coins re-enter circulation through legitimate transactions with innocent parties.  Just like what happens when scammers use cash as well.


GetAddr not returning connected node addresses

What worked for me was sending a ping message. Also, the addr message didn't come directly. I had to keep listening on the same port for at least a second.

You can use the dns seeds as a starting point, however a large portion of nodes might still only give you their own address. If anyone knows why I'm curious to hear, but I think every client just has its own way of dealing with these messages.

Version ->
<- Version, Verack
Verack ->
Ping ->
GetAddr ->
<- Pong, Ping, ManyMoreThings
<- Addr


Why is my P2SH sigScript field prepended with 0x00?

OP_CHECKMULTISIG contains a bug which consumes one extra element from the stack. Due to this, an additional OP_FALSE (0x00) is pushed for multisig scripts to make the script evaluation valid.


If you don't want to read the whole list, and just want to choose a Bitcoin Cash wallet...
(SPV = Simplified Payment Verification, does not depend on a server so it's a more decentralized.)
Sorted by various things
For PC/MAC

Electron Cash (a.k.a Electrum for Bitcoin Cash)

For Android

CoPay (SPV)

BTC.com

UnitWallet (SPV)

For iOS

CoPay (SPV)

Bitcoin.com (SPV) (updated rarely)

BTC.com

*CoPay uses a different address format. Not to be confused, please read this
Major Full Nodes

Bitcoin Unlimited Cash Edition

One of the most used cash full node wallet softwares. It has XThin support that saves bandwith while downloading new blocks and uses Parallel Validation to validate blocks faster and safer.
Website: www.bitcoinunlimited.info
Download Cash Release: www.bitcoinunlimited.info/download

Bitcoin ABC

First Bitcoin Cash full node wallet software. The most popular Bitcoin Cash node as it's the first.
Website: bitcoinabc.org
Download: download.bitcoinabc.org

Bitcoin XT

First Bitcoin scaling software - first version released in 8/2015. It supports XThin, and it supports XThin's alternative Compact Blocks too - making it (theoretically) faster and bandwidth-cheaper while downloading new blocks than other clients. It's the least used Bitcoin Cash full node, for no reason.
Website: bitcoinxt.software
Download: https://github.com/bitcoinxt/bitcoinxt/releases/latest
If you want to run one of the full-nodes but don't want to store the blockchain (140 GB)
You can use pruning, by pruning you can choose how much space allocate to these full node softwares. It supports both Bitcoin and Bitcoin Cash.
Other Major/Semi Major Wallets

Electron Cash (lightweight wallet)

The only major talented lightweight wallet - doesn't store the entire blockchain on your computer. It's a changed version of Electrum, one of the most used Bitcoin wallets.
Website & Download: electroncash.org
WARNING: There are fake Electron Cash wallets that steal your money. It is safe if and only if you're downloading it from www.electroncash.org!

BTC.com Wallet (online wallet - mobile)

The most used online wallet Bitcoin Cash & one of the best mobile Bitcoin Cash wallets
Use it here: bcc-wallet.btc.com
Google Play: https://play.google.com/store/apps/details?id=com.blocktrail.mywallet
App Store: https://itunes.apple.com/us/app/btc-com-bitcoin-wallet/id1019614423

Blockchain.info (online - mobile)

One of the major online wallets (most used?) that completely supports Bitcoin Cash. https://cointelegraph.com/news/blockchaininfo-releases-full-bitcoin-cash-support-users-receive-coins
Note: that for anyone opening a new wallet or for anyone who didn't have BTC before 1st August in their wallet, you cannot use it for storing BCH. https://support.blockchain.com/hc/en-us/articles/115005180866-Can-I-use-bitcoin-cash-BCH-in-a-new-or-existing-wallet-

Coinbase (online - mobile)*

One of the major online wallets. They are going to add option to withdraw all of your Bitcoin Cash on 1 January 2018.
Announcement: https://support.coinbase.com/customer/portal/articles/2853600-bitcoin-cash---frequently-asked-questions

Bread [former name: Breadwallet] (mobile)

Breadwallet is the safest iOS Bitcoin wallet with Bitcoin Cash one-time-withdrawal support. It doesn't use a server, instead it connects to three peers, making it more decentralized. There is a rumour that they are going to add an option to switch to Bitcoin Cash and use it like the normal Bitcoin wallet. [noref]
Announcement: https://breadwallet.com/blog/breadwallet-plan-bitcoin-cash-bch/

CoPay - BitPay (mobile - lightweight - Chrome extension - desktop)

Bitcoin Cash full support has been released, but it uses a new address format.
Announcement: https://blog.bitpay.com/bitcoin-cash-wallet/

 Coinomi (mobile)

Coinomi is one of the most known Bitcoin Cash wallets (actually it supports over 70 cryptocurrencies), however it may not be a good idea to have more than 50$, as it went closed source last year. Their developers say on its website that the private keys don't leave your device.
Android: https://play.google.com/store/apps/details?id=com.coinomi.wallet
iOS: Coming in future

Armory

One of the good Bitcoin software. Allows you to withdraw BCC (BCH, Bcash on Armory). You should read instructions below.
If further hard forks happen on BCC, its developers won't update Armory to be compatible with it. (Source)
Instructions: https://bitcointalk.org/index.php?topic=2070058.0

Mycelium

Actually Mycelium can't do anything about your Bitcoin Cash, but you can use BTC.com's tool to claim it
https://blog.btc.com/how-to-recover-your-trapped-bitcoin-cash-from-other-wallets-24b929543f26
Or you can claim it using Coinomi
https://steemit.com/btc/@libert/step-by-step-guide-on-claiming-bitcoincash-from-mycellium-wallet-201783t112141477z

Bitcoin.com wallet (mobile - desktop - Chrome extension)

A good option as a wallet. It's changed version of CoPay that fully supports Bitcoin Cash and runs on Windows, Mac, Linux, iOS, Android.
Download: www.bitcoin.com/choose-your-wallet/bitcoin-com-wallet

Jaxx (mobile, Chrome extension)

Jaxx has full Bitcoin Cash support (Android and Chrome extension).
Announcement: https://www.reddit.com/r/btc/comments/7bu6yo/jaxxio_now_supports_bitcoin_cash/

TSBW (online)

It's an open source wallet that can be used without opening an account. The easiest software to use with paper wallets.
WARNING: Developer accused of stealing funds. More info 1 More info 2
Bitcoin Cash: https://tsbw.io/bcc/

BitcoinCashTribe (online)

Works similar to TSBW.
Website: https://bitcoincashtribe.com/index.php

BitPie & Bither

They have full Bitcoin Cash support.
BitPie announcement: http://docs.bitpie.com/en/latest/bitpiebcc/index.html
Bither announcement: http://docs.bitpie.com/en/latest/bitherbcc/index.html

Exodus (lightweight)

One of the popular wallets that support Bitcoin Cash 100%.
Announcement: https://redd.it/766ojz
Download: https://www.exodus.io/releases/

Xapo (mobile)

You can withdraw all of your BCH at once before December 14th, or convert your BCH to BTC by one-click.
Announcement: https://blog.xapo.com/time-to-convert-your-bitcoin-cash-bch/

BitGo (online - Chrome extension)

BitGo supports Bitcoin Cash.
Announcement: https://blog.bitgo.com/bch-availability-c252727ea1be

StrongCoin (online)

StrongCoin supports Bitcoin Cash.
Announcement: https://strongcoin.com/blog/bitcoin_cash_is_now_supported_in_strongcoin_wallet

Parity Bitcoin (full node + lightweight)

Parity Bitcoin is a high performance wallet that can be run as a full node or a lightweight client. (Warning: Don't be confused with Parity! Parity Bitcoin is the Bitcoin/Bitcoin Cash version of Parity Ethereum client.)
Announcement: https://blog.parity.io/parity-bitcoin-is-now-supporting-segwit-segwit2x-and-bitcoin-cash/

Bitcore (full node)*

The 5.0 version which is coming soon, supports Bitcoin Cash if pointed to a Bitcoin Cash node. Doesn't have a user interface, not the best choice for a user. Useful APIs. (This is not a wallet for users! This is for developers!)
Announcement: https://news.bitcoin.com/now-bitcore-nodes-can-switch-to-any-bitcoin-implementation-even-forks/

Bitcoin Cash wallet (by Chris Pacia)

Changed version of OpenBazaar's SPVWallet for Bitcoin Cash. It has both GUI and command line support.
Downloads (Windows & Linux): https://github.com/cpacia/BitcoinCash-Wallet/releases/latest

Bitcoin Cash wallet (by HashEngineering) (Android)

Changed version of Andreas Schildbach's Bitcoin Wallet for Bitcoin Cash.
Announcement: https://www.reddit.com/r/btc/comments/72xost/beta_for_bitcoin_cash_wallet_for_android_recover/

StashWallet

A new HD Android wallet that fully supports Bitcoin Cash.
Website: https://stashcrypto.com

Freewallet (mobile)

A Bitcoin Cash Android wallet. WARNING: READ THIS
Website: https://freewallet.org
Google Play: https://play.google.com/store/apps/details?id=bcc.org.freewallet.app

 UnitWallet (mobile)

One of the Bitcoin-Cash-only wallets, fork of bread[wallet].
Website: https://www.unitwallet.co
Google Play: https://play.google.com/store/apps/details?id=com.unitwallet
Hardware Wallets

bitWallet (iOS)

A new Bitcoin wallet with Bitcoin Cash and a few altcoins support. It's good to keep in mind that it's not open source.
Website: http://www.sollico.com/bitwallet/
Download: https://itunes.apple.com/us/app/bitwallet/id777634714

Trezor

One of the major hardware wallets. Allows you to claim your Bitcoin Cash (They call it Bcash) if it's updated to latest firmware (1.5.1+). Fully supports Bitcoin Cash.
Trezor Guide: https://blog.trezor.io/claim-bcash-bitcoin-cash-bch-bcc-trezor-wallet-f0a810d5864a

KeepKey

One of the major hardware wallets + fully functioning Bitcoin Cash wallet.
https://coingeek.com/keepkey-wallets-now-support-bitcoin-cash/

Ledger

One of the major hardware wallets. Supports Bitcoin Cash if you update your firmware to latest version.
Guide: http://support.ledgerwallet.com/knowledge_base/topics/bitcoin-cash

Digital Bitbox

Its firmware supports Bitcoin Cash, but the desktop client doesn't. You can claim your Bitcoin Cash by sending all of them to your Bitcoin Cash wallet.
Cannot be used as a Bitcoin Cash hardware wallet.
Guide: https://digitalbitbox.com/bitcoincash

Paper Wallet

The safest Bitcoin/Bitcoin Cash hardware wallet. You can claim your Bitcoin Cash by importing to a Bitcoin Cash software.
You can create a paper wallet on cashaddress.org or bitaddress.org or bitcoin.com
All Bitcoin paper wallets are compatible to Bitcoin Cash as they both use the same private keys/addresses.

TODO: Add description:

https://mobi.me

https://www.wmtransfer.com/

https://bitcoin-india.org/

https://www.melis.io/

https://www.coin.space/

The wallets that don't support Bitcoin Cash aren't on the list.
List is sorted by various things.
*: Description will be updated.


This mixing service seems solid overall.

You could improve it in several ways:

Don't shapeshift your mixed BTC into Zcash. Shapeshift uses "transparent addresses" - which means the Zcash transaction is exactly as transparent as a regular bitcoin transaction. This is because Zcash requires upwards of 8GB of ram and approximately a minute of processing time to generate the private transaction - which Shapeshift is obviously unwilling to commit to for every transaction.
Why mix your bitcoin received via xmr.to before mixing it with joinmarket? One additional mix (using joinmarket) should be enough to obfuscate xmr.to's snooping should they attempt to track the Bitcoin that was exchanged for your Monero  (although there are questions about the long-term viability of bitcoin mixers in general).

You could also argue that the initial mix before you hit shapeshift is unnecessary  if you do not care that Shapeshift knows how you obtained the Bitcoin that you are trading them for Monero.

Best of luck with your school project!


How do I check if an address belongs to my wallet using bitcoinJ?

you could check thepubkey hash in the transaction outputs

this code for exemple check if an adresse belonging to your wallet is in the output

    Address to= null;
        boolean tome= false;
        //from = tx.getInputs().get(0).getFromAddress();
        to=tx.getOutputs().get(0).getScriptPubKey().getToAddress(Constants.NETWORK_PARAMETERS);
tome= w.isPubKeyHashMine(from.getHash160());
        return tome;


Bitcoin Core's installer will also setup a shortcut for testnet. Testnet is a different blockchain and network specifically for testing. This is normal and expected behavior, but there is no reason for you to be using testnet. You should stop Bitcoin Core and just use the normal launcher.


Why is a softfork unable to divide the network?

I was wondering why a soft fork cannot in principle divide the Bitcoin network as a hard fork can.

A soft fork absolutely can divide the Bitcoin network, in principle, if you don't specify any other assumptions.

However, the relevant point that distinguishes soft and hard forks is that the network will always converge as long as a majority of the hashrate enforces the new rules.

The reason for this is that even when old miners would produce a block that violates the soft fork's rules, the new miners will not work on top of it. They will ignore such a block, and start working on a competing branch instead. As they have the majority, this competing branch will at some point overtake the old miners' branch. The backward compatibility of the softfork means that old miners at that point will switch over to the new branch, abandoning their own, as the new branch is longer and is valid to them. Through this, the fork is resolved, and the whole network ends up working on one chain again.

As you can see above, the remaining old miners will cause increased (temporary) forks in the chain. In order to avoid having these interfere with the security properties of the network, recent soft forks in Bitcoin have employed thresholds of 95% (measured in one way or another) of miner signalling - leaving at most 5% that may produce forks.


Is there a way to generate new addresses for someone else's wallet?

Bob can provide Alice with an extended public key (xpub). This will allow Alice to generate as many addresses as required, all of which will be accessible to Bob via the corresponding extended private key (xpriv), which only he has access to.

There are many tools and libraries around that support address derivation from xpubs, such as BitcoinJS-lib.

As far as I know, blockchain.info is the only explorer with xpub support, and that also only applies to p2pkh addresses. Here's an example: https://blockchain.info/xpub/xpub6CUGRUonZSQ4TWtTMmzXdrXDtypWKiKrhko4egpiMZbpiaQL2jkwSB1icqYh2cfDfVxdx4df189oLKnC5fSwqPfgyP3hooxujYzAu3fDVmz


How would these parameters affect mining and the size and content of the mempool?

Q1: If a mining pool were to set blocksonly=1 in their bitcoin.conf, would all blocks created be "empty blocks" (only the coinbase transaction)?

Yes. The mempool would be empty so the miner would not have any transactions available to add to a block except for their own coinbase transaction.

  Q2: If a mining pool were to set mempoolminfee very high, would all blocks created be "empty blocks" (only the coinbase transaction) or possibly only a few transactions?

Yes.

  Q3: I can't seem to find the syntax to put mempoolminfee in bitcoin.conf. Any help appreciated.

The option to set is actually minrelaytxfee. This is because a node will only add to its mempool something it will relay, so the minimum relay fee is what controls the minimum feerate to be added to the mempool. Note that this is a feerate, not an absolute transactionfee.

The documentation for this option is:

  -minrelaytxfee=<amt>
   Fees (in BTC/kB) smaller than this are considered zero fee for relaying,
   mining and transaction creation (default: 0.00001)


How can you send a transaction directly to the memory pool?

There is no such thing as "the bitcoin memory pool". Every node has its own memory pool; it is not shared across all nodes in the network. A node can certainly add a transaction to its own mempool without validating it, but you cannot force other nodes to add a transaction to its mempool without validation. In fact, you can't force a node to add a transaction to its mempool, nor can you force a node to accept anything.


How does a proof of work limit of `~uint256(0) >> 20` translate into a difficulty of `1 / 2^12`?

To use the terminology on Litecoin's wiki, ~uint256(0) >> 20 is the target, and 1 / 2^12 is (approximately) the difficulty. You can see that by running the following in Python (or anything that can handle calculations on large numbers).

target = 0x00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff # or 2**236-1
diff = 0xFFFF * 2**208 / target
print(diff) # 0.00024413689970970154
print(1/2**12) # 0.000244140625

I believe the 1 / 2^20 figure you calculated is the probability that each hash will succeed, which is not the same as (although related to) the difficulty.


Here is a great video in which they asked: given 1 address I know belonging to someone, how many other addresses can I associate with that particular wallet. It turned out to be about 75%.

The method detailed in the video uses a few assumptions about how wallets work.

Multi-input heuristic: All inputs in a transaction belong to the same wallet.
Shadow change heuristic: Change public keys have never been seen before on the blockchain.
Consumer change heuristic: Transactions from consumer wallets have 2 or less outputs.
Optimal change heuristic: Wallets do not spend unnecessary outputs. This means that a transaction with say 2 inputs of 0.5 each and 2 outputs of 0.6 and 0.4, the 0.4 is assumed to be the change address belonging to the same wallet. This is because if the intended payment is 0.4, the wallet would have chosen a single 0.5 input.


This appears to be a function to calculate the average number of hashes needed to generate a particular block. (This is different from difficulty.)

I think this function is correct. To explain why, imagine that Bitcoin used 4 bit hashes instead of 256 bit hashes. This would make the range of possible values 0 to 15.

If the target were 15, that would mean that any hash would be valid. Therefore, it should take 1 hash on average to find a valid proof of work:

= (maximum possible hash + 1) / (target + 1)
= (15 + 1) / (15 + 1)
= 1

If the target were 7, that would mean that half of the hashes would be valid. Therefore, it should take 2 hashes on average to find a valid proof of work:

= (maximum possible hash + 1) / (target + 1)
= (15 + 1) / (7 + 1)
= 2

Remember, a proof of work is valid if it is less than or equal to the target. See also CheckProofOfWork().

I can't tell if this is used anywhere. This function appears to have been removed in the latest version.


Can a hard fork effectively double the value held in bitcoin?

I'm not an economist, but…

No, that's very unlikely.
Starting from your assumption that the network splits into two persisting blockchains*:

The number of active participants of each network is reduced. This reduces the utility of the network. → Negative effect on the value.
The amount of transactions that can be sent increases. This improves the utility of the network. → Positive effect on the value.
The shortterm security of both chains is reduced as hash power is spread to two chains. → Negative effect on the value.
The longterm security of both networks is reduced, as one or both of them become more likely to cease existing. → Negative effect on the value.
Unforeseeable reactions of various invested parties. → Unknown effects.

Shortterm:
I'm fairly confident that a project fork would throw the community into turmoil. Some developers might leave, some companies may be bankrupted, lots of users would lose money. The community would have to reorganize, work on governance, work out new goals, and rebuild teams. Blocks will slow down due to hash power splitting to two chains. The underdog may use this opportunity to completely redefine themselves, thus bringing their project back into the game. Development would slow down significantly for a while. I would expect each chain to have a lower value than the original chain, most likely the sum of both would fall well below the original chain's value.

Longterm:
I'm convinced that cryptocurrencies benefit so strongly from the network effect, that only a small number of them will be able to coexist, i.e. both blockchains would be competing for the same market share. Either they diversify to an extent where they appeal to vastly different userbases, or balance will at some point tilt, causing one side to take the lion's share. Even if the projects significantly diverge, one should end up much more widespread than the other. Should this schism have a clear victor quick enough, the winner, now improved in comparison to the original blockchain, could attract the bulk of the community, and rally. If they split without a clear majority and the schism drags on, it might become so ugly that both bleed support and go extinct.

*It's not clear that two chains would persist after a hardfork. The game theory seems to work out in a way that one chain would very quickly be abolished.


Mining is not won by the miner with the "strongest ability to solve the block". Mining is a random progress-free process. Each block candidate independently has a tiny chance to be a valid block.
Each miner is working on a separate, non-overlapping block candidate set. Block candidates assign the block reward to their author with an output in the Coinbase transactions and therefore each miner has their own transaction set differing to that of other miners. As everyone is working on a separate set of work, and every piece of work has an tiny chance of winning (independently of what else was tried!), mining is a Poisson process, rather than a linear stack of work that needs to be powered through. Therefore, the miner with the most hashing power has the greatest chance to win the block, but only probabilistically so.
Think of mining as buying a lottery ticket for each block candidate hashed. Only a fraction of the tickets in the pot are winning tickets, but somebody might draw a winner on their second try, while another has bought fifty losing tickets already. However, when you buy more tickets more quickly, your chance of winning is higher.
For a better overview what mining is, you can have a look at "What exactly is mining?".


Standard multi-signature transaction BitcoinCore

Bitcoin Core will be default only treat M-of-N multisignature outputs as "yours" (contributing to your balance) if you own private keys to all N public keys. This is to prevent showing something as a balance which could be spent from under you.

If you instead of using a raw multisig output use P2SH the same rule applies, but in that case you're able to use importaddress to mark the outputs as yours regardless of whether you have access to the keys.

Once the outputs are treated as yours, you can use signrawtransaction to fully or partially sign for them.


Can coin wallets create their own network/blockchain?

Mining solves two problems: double spending and initial distribution of funds.
Double Spending
You need some way of addressing double-spending; otherwise people can just copy money over and over. Besides Bitcoin's system, there are two secure, distributed ways of addressing double-spending: Ripple's solution and Proof of Stake with broadcast checkpoints.
Ripple's solution is to have a handful of semi-trusted nodes called validators, which are picked by humans. They come to a consensus, and then they all sign the consensus. A client will refuse to trust the state of the network unless all of its validators have signed off on it.
Proof of Stake is a system where nodes generate blocks like normal, but instead of trying to repeatedly hash them, they use their funds as proof that they're a real node. You also need to have checkpoints regularly broadcast by a central node, because otherwise the system is susceptible to an attack where someone rewrites the entire history at once.
This is the harder of the two problems.
Initial Distribution of Funds
You also need some way to issue funds in the first place. There's a bunch of ways that you can issue initial funds: per email address, per IP address, per phone number, et cetera. The problem with this there's generally no way of implementing them in a distributed fashion.
For example, suppose you make a rule saying that a person must prove that they own a Twitter account, and then they get 100 coins. But when other nodes are checking this, half of them get a response saying that the account doesn't exist. (This has happened a couple of times in the past with Twitter.)
A good compromise solution is to have a key held by the developer that has the power to mint X coins every Y hours. Then, have a central server that issues coins according to whatever policy you want.


3rd party "contractor" when buying bitcoins?

You're right that bitcoin/blockchain doesn't solve fiat problems. In your scenario swap out BTC for another fiat like GBP, you have the same problem.

It's the same problem if I buy something with BTC or fiat, you have to trust the other person will send the item or have someone else offer some form of guarantee like eBay does.

So if it's high value you might enlist someone beforehand as an escrow.

Otherwise, Alice would need to sue Bob for breach of contract after Bob doesn't hold up his side of the bargain.


Do I have to pay taxes on a Bitcoin investment when I'm withdrawing it to my US bank account before I actually received the money?

You are definitely being scammed - you should write off the $500 as an expensive lesson and never deal with these people again.
No legitimate company operates in such a way. $200 on a $18500 profit is also not what you would pay under any real tax structure, and even if you had to pay it, it would be paid alongside your regular taxes.
Even if the company had to deduct it and file it separately, they could do so by deducting it from the "profits".
If they had a way to turn $500 into $19000, they wouldn't need $500 from you to do so - they'd already be amongst the richest people in the world.


What is it that makes BIP149 safer to activate than BIP148?

BIP 149 is different in that it does not enforce orphaning of blocks that don't signal readiness for SegWit. Instead just the supporters enforce the rules on any blocks that contain SegWit data and allow regular blocks to be mixed into the chain. Thus, miners that don't change anything will build on the SegWit chain.

To split the network, miners would need to deliberate fork the chain, either by continuously rejecting every SegWit block and outpacing the BIP149 chain, or by mining a block with an invalid SegWit transaction that legacy nodes accept and SegWit nodes reject and building on top of that.


How to confirm my node is on the network?

Can someone tell me why my node is not appearing on the live map?

It is likely due to the software that they are running and it does not necessarily see your node. You don't have to be on the map in order to be online. You don't have to be listed on any website in order to be online. That you are not on the map should not concern you as it does not matter. It's just a fancy graphic and does not actually mean much.

You can check if you are connected to the network by using the getconnectioncount or getnetworkinfo commands. Those will tell you how many connections to other nodes that you have, and if it is more than 0, then you are connected to the Bitcoin network.


What are the limits of m and n in m-of-n multisig addresses?

We need to distinguish the limitations for validity and standardness. The first is determined by the consensus rules (which cannot change without a hard fork). The second ones are determined by local relay and mining policies implemented in the reference client, and can change from version to version.

In addition, we need to distinguish raw multisig (a simple OP_CHECKMULTISIG based script), and P2SH multisig (where the OP_CHECKMULTISIG script is only revealed upon spending).

Finally, because scripts include public keys, their sizes depend on their lengths. Both compressed (33 bytes) and uncompressed (65 bytes) keys exist, depending on which version of a wallet was used to generate them.

Raw multisig

Every m-of-n combination is valid (up to n=20), but standardness rules only allow up to n=3.

This limitation is enforced when sending (i.e., sending to a 2-of-4 multisig will not be considered standard).

P2SH multisig

validity rules require that the P2SH redeem script is at most 520 bytes. As the redeem script is [m pubkey1 pubkey2 ... n OP_CHECKMULTISIG], it follows that the length of all public keys together plus the number of public keys must not be over 517.

For compressed public keys, this means up to n=15
For uncompressed ones, up to n=7.

For standardness, it depends on the version. Up to v0.9.*, the reference client required the total spending script to be at most 500 bytes.

For compressed keys, this means m*73 + n*34 <= 496 (up to 1-of-12, 2-of-10, 3-of-8 or 4-of-6).
For uncompressed keys, this means m*73 + n*66 <= 496 (up to 1-of-6, 2-of-5, 3-of-4).

In 0.10, these standardness rules will likely be relaxed, allowing to go up to the validity limits (15-of-15 for compressed keys, 7-of-7 for uncompressed keys).

Also, for P2SH, standardness and validity restrictions are only applied when spending (as the spending script is only revealed at that time). This may mean that sending your coins to a P2SH script may make them irrecoverably lost (especially when violating a validity rule).


The Coin.valueOf(long) static constructor takes Satoshis as an input. You can use one of the toString/toFriendlyString/toPlainString methods to derive a human readable value string.


Classifying Miners based on their Location

Is there any way to classify the bitcoin miners based on their geographical locations?

According to this answer it's not possible to check IP address of miners: https://bitcoin.stackexchange.com/a/66269
Even if it is possible with a workaround, they can use Tor, VPN, other proxy etc.
Non-KYC mining pools exist so miners do not share their real identity and location with pools. Even if they share such information, it can be faked and not necessary they have all the ASICs at one location.
Lot of journalists and researchers use other information and assumptions to speculate miners location. Example: https://coinshares.com/assets/resources/Research/bitcoin-mining-network-december-2019.pdf


bitcoin compile (.undefined reference to **')

It looks like you're having linker errors, possibly due to the way you're installing and configuring the BerkeleyDB. It would help to post the output of the ./configure command. Bitcoin-core recommends installing it using the Bitcoin PPA:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

Then you don't have to run ./configure with the LDFLAGS andCPPFLAGS for BerkeleyDB.

I would recommend following the UNIX build instructions in the repository. First download the source code for the release you want from the repository releases.

$ tar xvzf v0.17.0.tar.gz && cd v0.17.0

Then follow the instructions in the link above.


How do these OpenSSL commands create a Bitcoin private/key from a ECDSA keypair

Bitcoin uses ECDSA so ECDSA keypairs are Bitcoin keypairs as well.

echo "Generating private key"
openssl ecparam -genkey -name secp256k1 -rand /dev/urandom -out $PRIVATE_KEY

This generates the private key in the pem format that openssl uses.

echo "Generating public key"
openssl ec -in $PRIVATE_KEY -pubout -out $PUBLIC_KEY

This generates the public key from the provided private key (which we just generated) and writes it to a file in the pem format.

echo "Generating BitCoin private key"
openssl ec -in $PRIVATE_KEY -outform DER|tail -c +8|head -c 32|xxd -p -c 32 > $BITCOIN_PRIVATE_KEY

This takes the private key in the pem format, converts it to the DER format, and extracts from that format the 32 bytes for the private key and writes those as a hex string to a file.

echo "Generating BitCoin public key"
openssl ec -in $PRIVATE_KEY -pubout -outform DER|tail -c 65|xxd -p -c 65 > $BITCOIN_PUBLIC_KEY

This takes the public key in the pem format, converts it to the DER format, and extracts from that format the 65 bytes for the public key and writes those as a hex string to a file.


Sending Bitcoin to Bitcoin Cash address. Restore without private key

Try tell him to import the bitcoIN cash wallet private key into a regular bitcoIN wallet. If the person does not have the private key nor it not working then the fund will permanently loose

If your using the provider then contact them and they should able to recover it for you


You can't use jsonRPC to do this, because jsonRPC commands like gettransaction only work for wallet addresses you have in your wallet.  They don't work for arbitrary addresses.

Sites like blockchain.info basically read the physical blockchain files, not using jsonRPC.  You could do something similar.  I've heard that bitcoinj may do what you want, but I've never used that library.  You also want to check into Bitcore from BitPay.


Where can I find a Windows binary of MultiCoin?

I have been doing windows builds of multicoin-exp, but have not heard of anyone using them so don't keep it up to date unless I get a request usually.

http://www.wuala.com/jbw9/pub/Bitcoin/multicoin/MultiCoin-exp/src/bitcoin.exe/ is actually mutlicoin, however I am pretty sure this version only works with the config file that would have been compatible with .62 and needs to be updated for .63 now that we have passed block 19200.  I can update it if anyone wants it to be.


how to setup an ardor childchain bundler via the command line on a ubuntu server?

You can use any script which invokes the startBundler API but note that you will need to submit the passphrase to the node in order to start a bundler so you need to somehow protect the data in this script.


Calculating "total received" and balance by an address

As the other answer has noted, balances don't technically exist for a specific address. This is because there may be many outputs that are addressed to an address you own, but you can only spend these outputs discretely (I.e. You can say deduct x from my account, you can only say deduct this output amount which was previously awarded to this address).

We can define a pseudo-notion of a balance, though, let's call it the address' unlock-able value (UV), because the owner of the private key for that address can unlock some # of coins by knowing the private key for that address.

Now, to calculate the UV balance, total received, and total sent of an address, you follow this pseudo-algorithm:

Address a;
Uv = 0;
Received = 0;
Sent = 0;
For each (output in blockchain):
    If (output is unlock-able by owner of address a):
        Received += output.amount;
        If (output has been spent):
            Sent += output.amount;
        Else:
            Uv += output.amount;

At the end of all the outputs in the blockchain, the Uv amount will have a value that is similar in concept to a balance. But here we can also see why this is a very tricky notion:

How do you know if an output is unlock-able by owner of address? Sometimes only the key holder themselves can know.
What if an output can be unlocked by, say, 1 of a set of 3 keys? Do you credit the balances of all three keys, or none?

I suspect the way blockchain.info does this is by basically running the above pseudo algorithm (although much more optimized and using a database), but only considering outputs in the Pay-to-Pubkey-Hash format.

Alright, through contacting the blockchain.info support team and some testing I've found that the problem was the API link given in the question is both paginated and rate limited. The following PHP code produces the same values that blockchain.info shows on their site, assuming you don't run into rate limiting problems.

<?php

// Method: POST, PUT, GET etc
// Data: array("param" => "value") ==> index.php?param=value

function CallAPI($method, $url, $data = false)
{
    $curl = curl_init();

    switch ($method)
    {
        case "POST":
            curl_setopt($curl, CURLOPT_POST, 1);

            if ($data)
                curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
            break;
        case "PUT":
            curl_setopt($curl, CURLOPT_PUT, 1);
            break;
        default:
            if ($data)
                $url = sprintf("%s?%s", $url, http_build_query($data));
    }

    // Optional Authentication:
    curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    // curl_setopt($curl, CURLOPT_USERPWD, "username:password");

    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec($curl);

    curl_close($curl);

    return $result;
}

$address = "1EZK42jGEJVniyBn1wXrUx92wzyUkYB8kJ";
$offset=0;
$txs = array();

while (true)
{
    $val = json_decode(CallAPI("GET", "https://blockchain.info/address/$address?format=json&limit=10&offset=$offset"), true);
    if (count($val["txs"]) == 0)
        break;
    else
        $txs = array_merge($txs, $val["txs"]);

    $offset += 10;
}

$uv       = 0;
$received = 0;
$sent     = 0;
$nrefs    = 0;

foreach ($txs as $tx)
{
    $ininputs = false;
    $totalin = 0;
    foreach ($tx["inputs"] as $input)
    {
        if ($input["prev_out"]["addr"] == $address)
        {
            $ininputs = true;
            $nrefs += 1;
            $totalin += $input["prev_out"]["value"];
        }
    }

    $inoutputs = false;
    $totalout = 0;
    foreach ($tx["out"] as $output)
    {
        if ($output["addr"] == $address)
        {
            $inoutputs = true;
            $nrefs += 1;
            $totalout += $output["value"];
        }
    }

    $uv       += ($totalout - $totalin);

    // $received += $totalout;
    // $sent     += $totalin;

    if ($ininputs && $inoutputs && $totalout >= $totalin)
    {
        $received += $totalout - $totalin;
    }
    else if ($ininputs && $inoutputs && $totalout < $totalin)
    {
        $sent += $totalin - $totalout;
    }
    else if ($inoutputs)
    {
        $received += $totalout;
    }
    else if ($ininputs)
    {
        $sent += $totalin;
    }
}
echo "\n";

echo "nrefs    : " . $nrefs . "\n";
echo "uv       : " . $uv . "\n";
echo "received : " . $received . "\n";
echo "sent     : " . $sent . "\n";


bitcoind not booting, tons of output in debug.log file

Turns out that $ bitcoind is just downloading the blockchain, the docs here: https://bitcoin.org/en/full-node seem to be incorrect. :\


In the linked article the author describes in quite some detail the failure of asic-resistance. (Thank you @Jannes for finding it.)

  ASIC Resistance

  We’ve been pessimistic on ASIC resistance for a long time, and our journey into the hardware world solidly confirmed our position. Hardware is extremely flexible. General purpose computational devices like CPUs, GPUs, and even DRAM all make substantial compromises to their true potential in order to be useful for general computation. For basic hardware development, most algorithms can see substantial optimization just by taking away all of that generality and focusing on one specific thing.

  The vast majority of ASIC-resistant algorithms were designed by software engineers making assumptions about the limitations of custom hardware. These assumptions tend to be incorrect.

  https://blog.sia.tech/the-state-of-cryptocurrency-mining-538004a37f9b

It seems, on the basis that the article is both articulate sufficiently and, correct, that there is no actual hope for asic-resistance in any currency of potential future value.


Do banks exchange bitcoins to traditional currencies

This is something that has not arrived yet (to my knowledge), but will probably emerge in the future.

We're getting close, e.g. the German Fidor Bank has a partnership with Bitcoin.de that let's you quickly transfer money to said market place, as well as having a partnership with Ripple; Ripple has signed up a large number of banks as customers, if current news reports are accurate; finally, multiple banks and the NYSE are investors in Coinbase.

There are numerous other such relationships of which almost certainly one will eventually come to fruition in this regard.


If my service only accepts Bitcoin, will there be a lot of missed customers who only have non-Bitcoin crypto currencies?

It takes few seconds for exchanging altcoin to bitcoin or fiat to bitcoin if someone is really interested in paying for something and only holds altcoins.


How used the getrawtransaction for fin the tx blockchain

When you start bitcoind just pass the -txindex flag in order to have it create the transaction index to be able to get any transaction by id:

bitcoind -txindex

In the console, you can get any raw transaction by its transaction id (hash):

bitcoin-cli getrawtransaction
15f7c2c57cce37d9b8927f957840ec9367bb504780347e497c758ee022b2a143

...


Find Windows PC (friends, work, family)

Install fresh bitcoin-qt for Windows and run it once and then quit
Open folder: %UserProfile%\AppData\Roaming\Bitcoin\ and replace wallet.dat file from Your Mac (overwrite)
Open bitcoin-qt again and if it start OK generate private key: Help > Debug window > Console > dumpprivkey your_wallet_address


Did you:

Change your client software?
Change your operating system?
Install Updates eg. Java/Qt/...?
Swap ISP?
Checked blockchain.info (for transactions on your wallet?)

My first assumption would be that you got hacked (if your wallet.dat was in it's predefined environment) and that the one controlling has added as password or you have encountered a bug somewhere which has not been reported and fixed.

If you could add your litcoin address(es) I can do some investigation.

Thank you.

Best regards,

Nico


Changing prune size in working bitcoin daemon

The prune value merely sets the limit of how much block data is kept.

If you increase the value and restart, no block data will be deleted for a while. New blocks will be received and validated and stored, and old ones won't be deleted until the new prune value is reached again.

If you decrease the value and restart, the oldest blocks will be deleted at startup.

You cannot go from pruned to nonpruned. That requires starting over.


How to get bitcoin wallet name from bitcoin address

Welcome to Bitcoin.SE!

I have had a quick look at the website you referenced specifically, however, it suggests most of the information that they have is because people have 'claimed' their address and provided the details.

If you have a look at this example, that represents just about all that is publicly obtainable when someone makes a transaction + the public keys. And, website information, names and, labels is not sourced from the blockchain.


How to extract raw 64 byte EC signature from an ASN1/DER encoded signature (which ranges from 70 - 72 bytes)

You are on the right track. R and S data bytes typically encode 256-bit values (32 bytes). However, integers in DER are signed, which means that if their highest bit is set, they are interpreted as negative. For that reason, if the R or S value being encoded has their first byte >= 0x80, it would mean a negative number, and hence a null byte is appended taking the length to 33 bytes. So to encode the signature to 64 bytes, just take the last 32 bytes each of the R and S values.


When will there be no 'mineable' bitcoins left?

Bitcoin will hit its maximum of 21,000,000 coins in approximately the year 2140.

After that, there will be no "reward" for mining, and the only incentive will be transaction fees.   Transaction fees will continue to be set by the market (as they are now), depending on how much people are willing to pay.

No one can say with certainty what the fees will be at that time.


Is it sufficient to backup the private keys of my android Dogecoin Wallet?

The private keys are the critical thing and are in the wallet backup.  They're what is needed to transfer coins. If they become public (i.e. stolen), whoever has them can transfer your coins to themselves. If you lose/forget your private keys, you can't make transfers, the coins are worthless to you, effectively lost.

You can create multiple addresses for bookkeeping. For example you can create an address for client X and an address for client Y, your wallet will show how much each address has received.  Also, creating a new address for every transaction can somewhat anonymize the transactions.


How to charge a fee to process Bitcoin payments in a mobile point of sale app?

Firstly Bitpay and Bitcoin are not the same thing.

BitPay is the Paypal equivalent of the Bitcoin world. You may be able to have a percentage of the transaction for yourself, but you will have to work out the business logic. Can't help you there.

Regarding fees on the Bitcoin network, please note that it is designed to be anti-fee, so if you do add fees you must bring something else to the table, but it sounds like you are setting yourself up as an intermediary between the merchant and Bitpay so I don't know exactly what that might be.

Bitcoin is anti-fee because even it's own transaction fees are subject to minimum payment amounts otherwise the fee is zero.

The Bitcoin Transaction fees themselves are not calculated on the amounts but are a function of the number and size of the inputs and outputs, the size of the transaction in kb and whether or not the person has decided to pay a fixed fee or not.

That being said your merchants will not be happy if you apply a fixed fee to their transactions especially if the transaction amount is less than the fixed fee you want.


rpc error: code = Unknown desc = dial tcp 103.102.44.207:9735: connect: connection refused

You need to connect to a node which has:

RPC enabled
username and password are known
client IPs are whitelisted using rpcallowip
the router has its port forwarding enabled.

Usually, public nodes don't share their RPC parameters, because that'd be very insecure. My advice is, run your own node. Otherwise, you could use the experimental neutrino client.


it is most likely this bug, fixed now:
https://github.com/spesmilo/electrum/commit/059d381ba8cfed0b4c00cb9b4ec1ff13293de74c


Check out http://brainwallet.org/ for an example.

A bitcoin private key is just a 256-bit number. Any algorithm that can convert arbitrary text to a number of that size ought to do.

A rather simple algorithm would be to consider your string as a base 63 number (a-z, A-Z, 0-9 and spaces) and write in binary, take the number modulo 2256, and write in hex.

Or, you take the base 63-to-binary number, raise it to the power ten, bit shift left 20 times, multiply by 8, add 4, bit shift right 50 times, take modulo 2256, convert to hex, and you have a private key.

Or whatever. Try to make it so that the number generated before you calculate it modulo 2256 is much larger than 2256. Otherwise, many of your generated addresses will just be a bunch of zeroes followed by a relatively short hex string.


Lightning network: how are "only X can broadcast" transactions implemented?

Because the commitment transactions spend from a 2-of-2 output, the transaction cannot be broadcast unless both parties signed the transaction. So what LN does is it gives the other party an unsigned version of the transaction and that other party returns you that unsigned transaction with their signature. Because the other party only has the transaction with one signature, it is invalid and thus they cannot broadcast it. However you have that transaction with one signature, and you can then sign it with your own private keys and produce the full transaction with both signatures. Because you are the only person with that transaction, only you can broadcast it.


How is it possible, that nobody can track anyone on the bitcoin network?

I was studying, no one can track a person on the bitcoin network. Is that true?

Users can be tracked IF they don't follow the best practices. Although lot of on-chain analysis and investigation works on assumptions.
How?

Every transaction on-chain has lot of information associated with it including address, amount, type of transaction etc.
Not every user runs their own full node with tor
Some users share information related to transactions on social media

Best practices:

Use non-kyc non-custodial exchanges
Use full node with tor
Do not share information about transactions on social media
Use coinjoin, payjoin etc.
Do not reuse addresses


Multicoin can be used to trade Namecoin although the functions for registering names and such cannot be used.

There is a current bounty of 750NMC to produce a web UI for the client to run within a local machine. It can be found on the http://dot-bit.org wiki site.


What is the mechanism of determining the transactions of a new block

All nodes (not just mining ones) maintain something called a mempool, a collection of all of the validated transactions they have seen on the network which have not made it into blocks so far. A miner is free to take all of them that will fit, a subset which satisfy their own requirements, or none of these transactions and assemble them into a candidate block. The block they assemble is invalid until they find proof of work that satisfies the current difficulty, if they find the correct nonce for that block it becomes valid and they can broadcast it to the network. If someone else finds a block before they do, the candidate block is discarded and a new one assembled to work against.


The network does not obtain your private key.  That is why it is called "private", and this is the whole reason that digital signatures are secure

When someone pays coins to you, the transaction includes your address, which is a hash of a public key.  Public keys and private keys come in matched pairs, and to spend the transaction, you create a new transaction that is digitally signed using the corresponding private key.  The signature incorporates your public key, and anyone on the network can verify that it is valid.  A valid signature cannot be created without access to the private key, but the private key is not part of the signature and cannot be recovered from it.

If future transactions are paid to your address, you're still the only one who can spend them, so long as you keep your private key secure.


What Happened 12/30/17 Last Recieved Transaction into Bitcoin Core Wallet

I have found a different receiving address within my wallet that is not mine.

If it is in your wallet then by definition it is yours (unless you added it as a watch-only address which I doubt in this case).

It could be a change address, automatically generated by your wallet to receive change from another transaction you sent. Without more info it is hard to say though.

The -whitelistforcerelay=1 parameter is nothing to worry about, that only relates to the relay of blocks between peers and is nothing to do with your transactions or wallet.


Can we assume that the ordering of vout matches n index in json rpc

Yes, that's how inputs reference outputs as well.


They had a minimal confirmation count of a single block. This meant that someone could create a bad transaction and confirm it him/herself, that would trick the MyBitcoin software into thinking the transaction was certain (as it has a confirmation). The attacker then transacted Bitcoins away from the MyBitcoin service. When one or two[1] truly legitimate blocks had been created truth would catch the lie, but the Bitcoins were already out of MyBitcoin's reach.

[1] the longest blockchain is considered the valid one. As long as most generation happens on a legitimate chain that chain will become the longest without fail. That means that someone can fake a single block when he's lucky, but a second block building upon that block would be significantly more difficult, as he's now racing with the legitimate blockchain. Assuming the attacker doesn't manage to outrace the legitimate chain his chain will still be one of the longest if the legitimate chain has only a single extra block.

The minimal confirmations used in bitvau.lt is 3. Some services are using even more. It is effectively a security vs. usability tradeoff. The difference in computing power required for generating 3 blocks in a burst is quite significant and would most likely be noticed. If it is not burst-computed it could be would be quite expensive.

Their stoy? They had this error, it got exploited and they decided to give those that claimed it their coins back. In the end a lot of coins were stolen.


Which crypto currencies have their own stack exchange site?

Stack Exchange Sites for Cryptocurrencies:

Bitcoin
https://bitcoin.stackexchange.com/

Ethereum
https://ethereum.stackexchange.com/

Monero
https://monero.stackexchange.com/

Other Proposals:

NEO-Blockchain
http://area51.stackexchange.com/proposals/110921/neo-blockchain

Augur
http://area51.stackexchange.com/proposals/106367/augur

Factom
http://area51.stackexchange.com/proposals/114019/factom

Sia
http://area51.stackexchange.com/proposals/114211/sia

Golem
http://area51.stackexchange.com/proposals/109578/golem

These are the present list to the best of my knowledge.


Are blocks stored in blkxxxxx.dat files per line?

Simple answer: no.
The files are not text files and therefore don't have lines.


What prevented NXT from being distributed the same way bitcoins are?

If every block subsidizes the forger with extra coins (in addition to the fees) then bigger accounts become even bigger by following the compound interest curve. In a currency with selfish forgers most of the coins would be absorbed by very few accounts that would lead to centralization of the currency.

This was predicted (https://nxtforum.org/alternate-cryptocurrencies/dgex-assists-in-launch-of-a-new-crypto-fimk/msg58485/#msg58485) by me and proved in practice (http://forum.fimk.fi/index.php?topic=539.0) by FIMKRYPTO, which is a clone of Nxt with over-time distribution.

Regarding a PoW distribution, back in 2013, when Nxt was launched, PoW couldn't be used as a good distribution method because a CPU-friendly algorithm would give enormous advantage to botnet masters and a GPU-friendly one - to owners of GPU-based mining farms left after Bitcoin rise in 2012.


Block explorers dumb down information so that it is easier for the common person to read. In reality, Bitcoin is not actually how block explorers display information; addresses do not exist at the protocol level and coins are not sent from addresses to other addresses.

  Is a id(hash) of tx included in next tx id?

Yes.

  Is there a way to get information of previous tx in these websites ?

Yes. Most block explorers have an advanced mode that will display this information, or at least link back to the transaction outputs that are being spent. On blockchain.info, you will see a link labeled Show Scripts & Coinbase when you view a transaction, click that and you will see the advanced information about the transaction.

  Why do these websites hide connection of tx?

Because it isn't useful to most people and is confusing.


Is there a website that tracks Bitcoin taxes paid to local government?

I think it would be fantastic if my tax jurisdiction were to accept payment in bitcoins.  Every additional way bitcoins can be used adds to bitcoin's value -- it accelerates the network effect.

When they do begin accepting bitcoins, each jurisdiction could be asked to supply the totals (via FOIA request, at a minimum).  Some organization or individual could then take that data and compile a report.

But expect this to occur long, long after bitcoin is "legitimized", as you describe it, and not before.


Is it possible to build a blockchain explorer to put on aws?

There are open-source projects available that make building your own query service possible. A good example would be Libbitcoin, see their github and official website.

You need to install libbitcoin server - this is a full bitcoin node with a database, and libbitcoin explorer - a set of tools among which you will find one for querying the server about addresses (balances and whatnot).

Be aware that the server will download the whole blockchain. It is not possible to have your own query server without having the blockchain on hand.


Using a mixer helps preserve your financial privacy. The question is: who are you protecting your privacy from?

Bitcoin transactions are public record, so anybody can view any historical transaction at their leisure. So when considering your privacy, there are a few different situations worth exploring, for example:

An unrelated third party is looking at your transactions

The blockchain history is public record, so anyone can view the entire history. Addresses aren't linked to real-world identities, but by looking at spending patterns, a third party can make guesses at which addresses are controlled by the same wallets (and thus users). Keep in mind this is only a guess, made by using certain heuristics that are not always correct, but nonetheless in many cases these guesses can still be accurate.

A counterparty to your transactions is looking

This is perhaps where a Bitcoin mixer becomes most useful. While addresses are pseudonymous, when you transact with someone they will gain some information about which addresses you control.

For example, if you have a 5 BTC UTXO, and spend it to send 1 BTC to somebody, then by looking at the transaction, your counterparty would know that you own at least 4 BTC more. And by analyzing the history of inputs (and outputs) from your transaction with them, the third party may be able to guess which other addresses you own, by using the same sort of heuristics mentioned above. So suddenly, just by transacting with someone, you've sacrificed a perhaps unnecessary amount of your financial privacy and history to them.

This is where a mixer can help: it breaks the links between addresses in your wallet, by allowing you to participate in transactions which break blockchain analysis techniques. As in the example above, your counterparty would still be able to see your change output, but they would be unable to look at the history of inputs (and outputs) from the transaction to gain more information about your wallet (though they would be able to tell you used a mixer).

An analytics company with a lot of resources is looking

This situation has the same considerations as above, but it is worth noting that analytics companies may have enough resources to engage in deeper investigations and analysis, for example by using IP address tracking to associate addresses to users. Nonetheless, using a mixing service will still help preserve your financial privacy.

As an example, many KYC'd exchange services are required by law to keep track of how their users interact with the service, and spend the bitcoin they acquire through it. This means the service might watch how you spend bitcoins that they sell to you, in order to ensure you aren't engaging in some illicit activities (according to the legislation the exchange must follow). So by using a mixer, you can sever the link between your exchange account, and your bitcoin spending habits.

Note that throughout all of this, the main idea is that you should only reveal your financial history to those individuals you choose to, meaning, this gives you the selective ability to preserve your privacy. If you need to provide a history of transactions for an audit, then you can do so, and a bitcoin mixer will not help you fake that history.

This makes a bitcoin mixer more useful for the everyday user that wants to uphold their privacy, than it is for a criminal wishing to hide their history from authorities. Maintaining privacy is difficult, but possible, and in fact many Bitcoin developers are working on technologies that will make the tracking of transactions more difficult. Maintaining privacy and fungibility is important: without it Bitcoin as a system of money and value would be broken.

EDIT: It is also worth mentioning that not all mixers are alike. In fact, many mixers have historically been unable to actually break the links between users/wallets/addresses, so they provide a false sense of security.

Consider this: if you were running a chain analysis company, and the existence of a mixer would hurt your business model, then why not just run a mixer yourself, and keep logs of all the transactions that users send through it? You would have front-row access to all their transactions, under the guise of providing them privacy.

With this in mind, A good mixer should be:

Non-custodial
Unable to distinguish between users/inputs/outputs, and thus unable to keep a history of users/transactions
It should probably run exclusively over the Tor network

If a mixer doesn't satisfy these points, it should be avoided.


Why are there different prices for bitcoins between exchanges?

Economically speaking, this can only happen if the expected cost and risk in arbitrage outweigh the expected profit. Arbitrage, in this case, would be buying coins on a cheap site and selling on an expensive one. The risk comes from the high volitility and long confirmation time. In the hour or so it takes to transfer the coins from one site to the other, it's very possible that the price could have dropped enough that you end up losing money. The  aforementioned risk is why no one has tried to take advantage of the price differences and (as a result) equalized the price.


Which wallets are built deterministically? (Besides Bitcoin Core)

Electrum's distributed binaries are determinisitc. Although Electrum is written in an interpreted language, the distributed binaries also need to provide the dependencies and the packaging process for producing binaries for python software is not deterministic. Electrum has their own process for ensuring dependency versions and determinism of their binaries.

Mycelium's distributed binaries are deterministic built. They use a docker container instead of Gitian to produce their binaries.


Accepting payment for bitcoins online: What types of payment "cards" or epayments are non-refundable?

Western union online money in minutes. The client pays western union with their credit card, the client send you the mtcn, you pick up the funds. Pretty Much Irreversible.

Have you looked in to Green Dot Money Pak?
While not technically for payment processing, it is possible to send these to a merchant and they are non-refundable. FYI they are tracked by the federal government. Also always get a copy of their receipt and a signed waiver for anyone purchasing anything from you with a money pak.

There's a few companies that offer money pak conversion services or you could get a re-loadable card.

did i answer it thoroughly or do you need more information?


I can't access my wallet at Bitknock cloud mining anymore

Unfortunately, most of the "cloud mining" websites are ponzi schemes trying to disguise themselves as a cloud mining contract provider.

This site catagorizes Bitknock as a ponzi/scam dated back to November 2015. A little bit research could have made you aware of the dangers.

I personally lost dozens of bitcoin in such projects, even if I joined only the most secure looking. General rule of thumb: If it looks too good to be true, don't buy it.


Is it still possible to issue your own assets on Ripple?

It is definitely still possible to issue your own assets. Here is the process:

Create an account on the Ripple network, you will need to get someone to send you enough XRP to perform transactions, $1 worth should easily do it.
Submit a transaction to set the DefaultRipple flag on the account. If you don't do this, people who hold your asset will not be able to send the asset to each other.
Choose a three-character code for your asset like PWR.
Convince other people to set up trust lines to allow them to hold your asset.
To issue your asset to people just use a Payment transaction.

Your asset will have the following characteristics:

Only you can issue it.
Anyone who agrees to hold it by creating an appropriate trust line can receive it.
People can place offers to trade your asset for any other asset tradeable on the ledger.
Your asset can be used as a source asset or destination asset for payments with automatic pathfinding so long as there are sufficient offers in the ledger.

The question of whether you need to be a Ripple gateway may reflect a misunderstanding about what a gateway actually is. A "gateway" is just a company that offers the service of issuing and redeeming a digital asset on demand. What makes you a gateway is that you bridge some asset outside the ledger to a digital asset on the ledger.

If you do this, you're a gateway. Whether or not this custom asset requires a gateway depends on how you are expecting people to be able to use it.

For example, if you wanted a custom asset that represented gold, you would probably need some way for people to trade the asset for actual gold (or, at least, the current value of that gold). And you would probably need some way for people to get the asset in exchange for actual gold (or, at least, the current value of gold). That would be the gateway's role -- to bridge the digital asset to the external value it's supposed to have.

By contrast, if you want an asset that represented an hour's worth of work, you might not need any gateway at all. You might let anyone issue the asset in exchange for an hour of work with it being redeemable against their own work. This wouldn't require a gateway, but you'd be trusting individual issuers to honor their obligations. (And it wouldn't really be one asset, since Jeff owing you an hour of work would be a slightly different asset from Sarah owing you an hour of work.)


Which Bitcoin weakness most hinder Bitcoins ability to gain market and mind share?

If the credit card industry has taught us anything it's that merchants will accept whatever form of payment there is adequate demand for. Merchants have been perfectly willing to absorb some percent of loss from credit card chargebacks, bounced checks etc. for quite some time and will likely accept some percent of loss from 0/unconfirmed transactions (once we actually know what percent loss that is, anyway).

The real "sell" is with consumers. If enough consumers use bitcoins, merchants will begin accepting them - and even if they don't they still hold value as a means of long-distance funds transfer and perhaps as a store of value. Consumers also don't care about technical limitations, that's for us geeks to figure out on their behalf, so points 2, 5 and 6 are basically "our problems" to fix. What consumers will care about most, in my opinion, is #4: "The client is difficult to use and its operation difficult to understand."

When there's "an app for that" that just works and doesn't need whitepapers, wikis etc. to comprehend, the biggest hurdle has been jumped.


Bitcoin Core does not immediately broadcast a new addr message to nodes with each new connection it gets. On average, those broadcasts are every 30 seconds, but they could happen sooner or later than that as the delay follows a Poisson distribution. You should wait a few minutes before checking again. Furthermore, just because they know about the address does not mean that the nodes will actually choose to connect to them.


In a given contract, should the "LockTime" timestamp include an extra hour for confirmations to prevent a double spend?

The nLockTime is the earliest time that a miner can include that transaction in a block.  It does not mean the exact time that both parties can assume final settlement has occurred.

You are correct to conclude that there is the potential for another transaction (with nLockTime = 0) to be broadcast and be in competition at the same time as the
original nLockTime > 0) transaction.

But it wouldn't necessarily be a double spend, as the transaction seen later with the nLockTime = 0 would have had to have been signed by both parties.

If a "double spend" scenario occurs, it wouldn't be a surprise to either party.

The situation can occur where the two parties believe the nLockTime = 0 transaction will be the one confirmed and for whatever reason it doesn't get confirmed fast enough.  Instead then at the original transaction's nLockTime (roughly, as there is a couple hour leeway available to the miner as far as timestamp goes) that transaction confirms and thus the transaction submitted later (where nLockTime = 0) will never confirm.

So the normal confirmation level threshold (e.g., six confirmations) still applies to these transactions as far as final settlement goes.


Is "Proof-of-work" a subset of "Byzantine fault tolerance (BFT)"?

Can we say that Proof-of-work is a type of Byzantine fault tolerance
  (BFT) ? In other words, is PoW a subset of BFT?

Yeah I think you can say that.

Proof-of-work is a proposed (and pretty well tested at this point) solution to the Byzantine Generals Problem, and therefore achieves Byzantine Fault Tolerance. The Byzantine faults that it solves includes the classic double spend.

The Byzantine Generals Problem is an illustration of the difficulty in arriving at consensus in a distributed network.


How exactly does MyWallet's Android client work?

I think when you scan the QR code, your password is encoded in that barcode, so your Android phone stores it locally.

I haven't tested it myself, but considering this I think you have to enter the secondary password to your Android phone as well. It will either require you to do it every time you make a transaction or remember it for you.


Setting minimal amount of nodes to reach consensus

That's not how consensus works in Bitcoin, as that would be highly vulnerable to a sybil attack.

First a full node validates all aspects of all blocks (incl. transactions) it receives. Anything invalid is discarded and not further considered.

Second the node picks the chain with the most total Proof of Work in it*.  Usually there's only one, but sometimes two miners find a block at roughly the same time, so the blockchain temporarily forks until the next block increases the total PoW for one of the chains and all nodes will converge on that chain.

TL;DR The valid chain with the most total Proof of Work

*) Often referred to as the "longest chain" or better "longest valid chain", although strictly it's not about the length, but about the aggregate difficulty.


NBitcoin Transaction sign(secret, bool) is giving error. Instead of bool it says to pass Coin Object

Sign method expects two arguments: private key and coins to be spent
false makes no sense in that line according to the documentation mentioned in the below link but I found similar code in another question NBitcoin: signing a transaction in TestNet so I will have to try on my system in VS 2019:
https://programmingblockchain.gitbook.io/programmingblockchain/bitcoin_transfer/spend_your_coin#sign-your-transaction

transaction.Sign(bitcoinPrivateKey, receivedCoins.ToArray());

UPDATE(I tried the below things and it worked for me):
Create a Private key and get address:

Send some amount to the address: https://blockstream.info/testnet/tx/6266c8262610ab0790f9f1841930bb27666588be8ab343a7e0470b7bb48a655b
Use the below code to create a Tx, sign and broadcast it:

            var bitcoinPrivateKey = new BitcoinSecret("cPof7e5g6xfgB6AZrc6XVTVwA4efLJurh9kVxa6FRChbr8Jyqaon", Network.TestNet);
            var network = bitcoinPrivateKey.Network;
            var address = bitcoinPrivateKey.GetAddress(ScriptPubKeyType.Legacy);

            var client = new QBitNinjaClient(network);
            var transactionId = uint256.Parse("6266c8262610ab0790f9f1841930bb27666588be8ab343a7e0470b7bb48a655b");
            var transactionResponse = client.GetTransaction(transactionId).Result;

            var receivedCoins = transactionResponse.ReceivedCoins;
            OutPoint outPointToSpend = null;
            foreach (var coin in receivedCoins)
            {
                if (coin.TxOut.ScriptPubKey == bitcoinPrivateKey.ScriptPubKey)
                {
                    outPointToSpend = coin.Outpoint;
                }
            }

            var transaction = Transaction.Create(network);
            transaction.Inputs.Add(new TxIn()
            {
                PrevOut = outPointToSpend
            });

            var myAddress = BitcoinAddress.Create("tb1q5va20jy9dg30zdyy0nakg5y95trdr3gtw5jy9d", Network.TestNet);

            var txOutAmount = new Money(0.01m, MoneyUnit.BTC);

            // Tx fee
            var minerFee = new Money(0.0005m, MoneyUnit.BTC);

            // Change
            var txInAmount = (Money)receivedCoins[(int)outPointToSpend.N].Amount;
            var changeAmount = txInAmount - txOutAmount - minerFee;

            transaction.Outputs.Add(txOutAmount, myAddress.ScriptPubKey);
            transaction.Outputs.Add(changeAmount, bitcoinPrivateKey.ScriptPubKey);

            transaction.Inputs[0].ScriptSig = address.ScriptPubKey;

            //Sign Tx
            transaction.Sign(bitcoinPrivateKey, receivedCoins.ToArray());

            //Broadcast Tx
            BroadcastResponse broadcastResponse = client.Broadcast(transaction).Result;

            if (!broadcastResponse.Success)
            {
                Console.Error.WriteLine("ErrorCode: " + broadcastResponse.Error.ErrorCode);
                Console.Error.WriteLine("Error message: " + broadcastResponse.Error.Reason);
            }
            else
            {
                Console.WriteLine("Success! Tx:");
                Console.WriteLine(transaction.GetHash());
            }

Tx: https://blockstream.info/testnet/tx/0ada6696fb134ebc4f96a55a3d5b60d90e5a723ec2e27634bb1777730e7df914


Recommendations on how to buy Bitcoins with limit orders

This answer is no longer applicable, since CampBX is shutting down.

CampBX offers limit orders, and allows US residents to deposit dollars by mailing postal money orders, or (after a verification process) personal checks.


Does all miners in mining pool increase the nonce variable one by one starting from zero?

This is not how mining typically works in a pool. Mining software typically assigns a different extranonce to each miner, which is part of the coinbase transaction, and will result in a different merkle root (and different block header. Then they can all start on nonce 0 as you suggest, but they will not be racing each other for the same block because they are different. See https://bitcointalk.org/index.php?topic=9438.msg136344#msg136344.

Also, just for clarification, the data that is hashing during mining is the block header, which consists of:

Version
hashPrevBlock
hashMerkleRoot
Time
Bits
Nonce

See https://en.bitcoin.it/wiki/Block_hashing_algorithm


Wrong Adress Blocking System for Transfers

This is technology but inside of this, there is no system to warn us "You input wrong currency adrress".

That is because Bitcoin and Bitcoin Cash addresses are completely indistinguishable (Bitcoin Cash copied Bitcoin entirely which includes the address prefixes). There is no way for a system to warn you that you entered the wrong address because both are valid Bitcoin and Bitcoin Cash addresses and there is no distinction between them, i.e. a Bitcoin address is a Bitcoin Cash address and vice versa.

The only thing you can do is to contact Bittrex and see if they can do anything. In theory they can because they control the private key for that address and Bitcoin and Bitcoin Cash private keys share the same identical-ness properties of addresses.


how to generate a bitcoin address for each user that registers

If you're running your own Bitcoind for JSON RPC calls via PHP then you can generate new address for each of your customers by this JSON Call command in PHP like this:

echo $wallet->getnewaddress();

This will echo the new address and stores it in wallet variable. Please refer to this doc https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list

I hope this helps.

Thanks


Is there a way I can reach the owner of the wallet address

No, There is no general way to find the contact details of an owner of a mistyped address. At least none that are likely to succeed for any arbitrary address.

You can check an address at any Blockchain Explorer - this will tell you if any bitcoins were really sent there - but will not identify the identity of any person.

There are many possible valid addresses, only a very tiny few of them are in use.

If you send bitcoin to a valid address that no-one is using, those bitcoin are lost forever unless you can re-spend the inputs using a much higher fee (or miner cooperation) before your transaction is confirmed.

  An extra letter was added, making the address 35 digits.

Most wallets make it impossible or difficult to mistype an address by using a checksum.

  The probability that a mistyped address is accepted as being valid is 1 in 232, that is, approximately 1 in 4.29 billion.

(from Bitcoin Wiki)

114dW3JX2sPPLVDnX4H8u2vsMc4CEJ3rVY is a valid address but has a balance of zero and no transactions.

114dW3JX2sPPLVDnX4H8u2vsMc4CEJ3rVYf is not a valid address. I don't see how any Bitcoin can possibly have been sent to it.

  It's a blockchain wallet.

If your wallet shows an amount has been "spent" to that invalid address and deducted from your "balance", you should contact the company that call themselves "Blockchain Luxemburg S.A.R.L." and who presumably provide your wallet.

I recommend not using custodial wallets. See types of Wallet

See also

Can a bitcoin transaction be reversed?
Is it possible to cancel an unconfirmed transaction?
What happens if I mistype the address when making a payment?
Possibly sent Bitcoin to wrong address
Is there any way for me to recover or reclaim a confirmed but unspent transaction that was sent to the wrong address?


Is there some way to safely prove that you control a certain number of Bitcoin?

Most Bitcoin addresses are derived using public key cryptography, so in the same way that our wallet can use a private key to sign a transaction that spends some BTC, it can also use a private key to sign an arbitrary message (in this case, a message that says "I own this address!").

As example: By using the private key that controls a funded bitcoin address, you can prove that you own the coins stored at that address (or at least, you can prove that you have knowledge of the private key that can spend them). Lets say Address X has 1 BTC, and so you create a message that reads 'Address X is controlled by Takwon', and then sign that message using the private key for Address X. You can now pass this signed message to someone, and they can verify that you do indeed have knowledge of that private key.

This post has info about how to create a signed message using bitcoin-cli:
How to sign a message using Bitcoin private key?

This post has info about how to verify a signed message using bitcoin-cli:
How can I verify a signed message?

This post has info about the nature of the signed message - to be absolutely sure that someone owns the address in question, you should provide a message that they will sign.
If someone wanted to pretend to be Satoshi by posting a fake signature to defraud people how could they?

  And is/could this be done without actually revealing which coins/parts of coins you control? Only that you have X amount of BTC in your wallet.dat?

The method above reveals which address(es) you control to anyone that is verifying the signed message(s). I am unaware of any method that would allow you to prove ownership of some amount of coin, without revealing which specific UTXOs constitute those funds. Perhaps there is some fancy ZKP math which could be done on a UTXO set commitment to accomplish this, but as far as I know no such thing has been developed for Bitcoin at this time (and, perhaps it is not possible, I'll leave that to the cryptographic experts to explain in more detail).


Why is the Bitcoin blockchain designed so that a block can be unconfirmed?

Every Bitcoin node creates it's own blockchain. When a new block is found, it is broadcasted to the network. Other nodes will only consider the highest blockchain as being the "real" blockchain.

Sometimes, two separate nodes build a block containing different transactions. Two competing blockchains now exist, it is now a race for the next block. Once the next block is found, we can reject the other inferior chain. But if that inferior blockchain manages to get two new blocks, it will be broadcasted again as the main one.

To avoid having a transaction that was once in a block, but it got replaced, we simply state how many blocks happened since the transaction as confirmations. After 6 confirmation it's considered almost impossible to alter, so we just say it's confirmed.


It is not possible to get the private key from a Bitcoin address. This is the whole point of the cryptographic technology that Bitcoin uses.

The way that this cryptography works is through the ECDSA algorithm which uses a private key --basically a random positive integer that can't be 0 and has to be less than "N" which is an astronomical big number (close to the number of atoms in the whole universe)-- to later multiply it by a point on a cryptographic curve in a finite field (secp256k1). This process is only one way and you can always calculate the result of the multiplication, but you cannot get this result and figure out the private key through division due to the mathematical properties of finite fields.

The result of the multiplication of the private key with the point on the cryptographic curve is another point on the curve which is called the Public Key. This public key is later hashed and encoded in base58 to get the address. The hash is to add an extra layer of security, while the base58 encoding is used to make the public key human readable --this was a thing a decade ago.


When a block that has a transaction with change in it is successfully mined, is the change transaction included in the newly mined block?

There is no change transaction type.

Transactions are defined as a list of inputs consumed, and outputs created, and the values assigned to those new outputs. The creator typically makes an output for a entity they wish to pay, and another output which pays excess change back to them.

Any amount of Bitcoin left un-used by the outputs is interpreted as the fee for the transaction.


How does this simple script use the OP_CHECKSIG opcode?

Let's run through the program.

The stack starts as <A sig> <A pubkey>.
You run OP_DUP. The stack is now <A sig> <A pubkey> <A pubkey>.
You run OP_HASH160. The stack is now <A sig> <A pubkey> <A pubkeyhash>.
You push (A expected pubkeyhash). The stack is now <A sig> <A pubkey> <A pubkeyhash> <A expected pubkeyhash>.
You run OP_EQUALVERIFY. If the initial public key on the stack does matches the expected one, the execution aborts and the script fails. If it matches, the resulting stack is <A sig> <A pubkey>.
You run OP_CHECKSIG. If the signature matches, the resulting stack is 1, which means success.

Without the OP_DUP, it would be impossible to verify the public key both against the signature and against the expected public key hash.


Why must the entire chain be included in calculations if it's already been validated. Why can't the validated portions be archived to save energy?

There is no difference between those two things. If you have a data set that includes only things that you have fully validated all of and you confirm that something is in that data set, you have fully validated all of it. So checking that it's in a data set of things you have validated cannot be done instead of validating the entire chain because it does validate the entire chain.
I'm not sure what you mean by "archived to save energy". If they aren't archived, they're stored. If they are archived, they're stored. So I'm not sure how energy would be saved.


What is the strategy behind a sell wall?

A large investor might be trying to move the market.

Sell walls create an impression of a strong supply. This makes some people, unwilling to wait for the wall to break down, pitch their sales offers below the wall. By moving the wall closer to the current bid again, a large investor might be able to move the market to a small extent and then buy at a lower price. The investor's goal is to move the market, not to actually sell his supply at that price, so when the price gets too close, such walls often disappear or move to a higher price. Especially, if you see the same amount popping up at different prices, there is probably someone trying to move the market without actually fulfilling orders or bids.

Another type of sell wall is composed of many combined sales offers at certain landmark prices, e.g. $600. These usually don't move around.


How can someone calculate the current/real-time value of a Bitcoin
  block?

Steps:

run bitcoin-cli getblockcount to get current block_height
current_block_reward = 50 / [(block_height MOD 210000) + 1]

  What is the equation/algorithm used to determine this?

Value the of a Bitcoin block defined here. The default value is 50 * 100,000,000 Satoshis.

After every "SubsidyHalvingInterval" blocks, the reward of each block halved. The SubsidyHalvingInterval is defined here

CAmount GetBlockValue(int nHeight, const CAmount& nFees)
{
    CAmount nSubsidy = 50 * COIN;
    int halvings = nHeight / Params().SubsidyHalvingInterval();

    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return nFees;

    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;

    return nSubsidy + nFees;
}


How to generate a Litecoin testnet addresses (Segwit also) (Derivation path, bip32)

const ltcnet = {
    messagePrefix: '\x19Litecoin Signed Message:\n',
    bip32: {
      public: 0x043587cf,
      private: 0x04358394
    },
    pubKeyHash: 0x6f,
    scriptHash: 0xc4, //  for segwit (start with 2)
    wif: 0xef
  }

use it like this:

var key = bitcoin.HDNode.fromSeedHex(seed, ltcnet)


Why is mining described as validation of a block through proof of work when it is the validation that is critical not the proof of work?

You are correct in that the proof of work itself does not validate transactions, that is done separately, so that only valid transactions will be included in the block.

However, the block itself must contain a valid proof of work (the block hash). Without this proof of work, the block would not be valid (even if the transactions are valid). So it can be said that a block is made valid by its proof of work.

Edit: it is worth noting the distinction between the act of performing the proof of work hashes, and the object that is the proof of work (block hash). My answer references the object, not the act.


is it safe to share the indexes folder between computers?

Yes, indexes is safe to copy. It only contains transaction data and is completely unrelated to the wallet. In fact, indexes used to be part of blocks so with older versions, if you had txindex=1, then copying blocks meant you also copied indexes. Only recently was this separated into its own folder in the datadir.


I made a wrong transfer to an unknown blockchain account, how do I know who is that belongs to?

In general you cannot readily find out who owns an address.

If the owner of the address is especially careless, a great deal of detective work may allow their identity to be discovered eventually. This is not a trivial process.

  I am very suspicious how people can transfer my btc out without my authorization.

They don't need your authorization, they only need to have once seen your private-keys. That gives them complete control for all time over any funds subsequently arriving at addresses associated with your private-keys.

As an example, many online-wallets (also called web-wallets or hosted-wallets) give control of your private keys to employees of the hosting service and to anyone who hacks that service. So any dishonest ex-employee might be able to empty your wallet. This sort of thing happens with depressing regularity.


How to tell when bitcoin has really stopped running

On linux:

ps aux | grep bitcoind

Or even:

watch ps aux | grep bitcoind

But to answer your question slightly differently I'd suggest keeping existing bitcoind running.  Then your new node add a connect statement with the local ip of the old node in the bitcoin.conf file (located usually in $HOME/.bitcoin/).

Your new node will then solely connect to the existing node and download, via your local network all the blocks from the existing node.

Also if both PCs are imobile you could leave it that way to avoid duplicate downloads from the internet.  An alternative if the second is a laptop for example is to use -addnode instead. From here:

-addnode=<ip>          Add a node to connect to and attempt to keep the connection open
-connect=<ip>          Connect only to the specified node(s)
-dns                   Allow DNS lookups for -addnode, -seednode and -connect (default: 1)


Is it possible to reach same address in HD wallets?

In theory it is possible to have a collision in this way. However in practice, doing so is basically the same as randomly generating new private keys and hoping for a collision.


Homework problem on Blockchain and Merkle trees

The question parameters restated:

Bob only has latest header stored locally
Alice's payment is k blocks before current head
n tx's per block

Alice needs to prove two things:

1) Her payment is committed to header chain_height-k
2) Current header at chain_height builds on chain linked to header at chain_height-k

Merkle-Proof

You need to construct the payment TX merkle-proof (merkle path only) for the header block at height-k. This proves your transaction was confirmed in a block.

  The merkle tree has a height of log2(256)=8. The size of this proof is
  (8*2+1)*32 Bytes.

Strong-Chain Proof

You also need to prove that miners performed POW on top of the block which contained your transaction. This can be proven by providing headers which are linked together, although the problem does not give you any figures on those header sizes.

  You could assume Bitcoin headers of fixed size 80B, so (k+1)*80 Bytes.

Note that only the headers are required for this POW proof, because the light client cannot verify whether the TX's committed to these headers are valid or not.

This chain provides the proof that the strong-chain builds on the block which includes your transaction.


Is it possible for an individual to start their own blockchain working with Bitcoin Core?

It is indeed possible, with some tweaks in the code to differentiate from the original. Effectively, you'd be starting an altcoin with all the same parameters as bitcoin.

However, if it had everything exactly the same as the original, it would be very vulnerable as some big bitcoin miner could one day wake up and decide to point his hashpower to this new coin and perform a 51% attack.

Note that this new x-coin would be worthless unless you could bring enough people to actually use it and enough miners to secure it. But if it's a copy-cat of bitcoin, why would anybody come?


...about is the pool option in it.

The best feature of NiceHash is that they allow you to choose for which pool to mine. So, you can choose the pool. Actually it's a feature that all cloud mining websites should have, but unfortunately NiceHash is the only one.


Can inputs to a transaction have different values for sequence?

According to BIP 125:

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


Sending this transaction through my own Bitcoin Core 0.13.99 node:

error message:
64: too-long-mempool-chain

This means you're building a long chain of unconfirmed transactions that depend on each other. Wait until the first few of those have confirmed before creating more.


The rate is set by supply and demand.  If there are buyers willing to pay $25, and sellers selling for $25.25+,  Then eventually someone will either buy at $25.25, or sell at $25, which then moves the price. This current price movement is due to speculation. People are buying and holding coins, and there are far more buyers than sellers. So naturally the price will continue moving up.