What is "canonical transaction ordering" that Bitcoin ABC is considering implementing?

Canonical Transaction Ordering is a different way to organise transactions in a block (different from Topological Transaction Ordering, currently used).

Bitcoin ABC's argument for CTOR
1. CTOR is simpler to implement than TTOR.
2. About 70% of block template creation time is due to ordering requirements. Eliminating this will improve performance.
3. Improves parallelisation
4. Easier blocks transmission
5. Security patch (large block with a transaction ordering that is as slow to validate as possible)
source

nChain's argument against CTOR
1. Unsecure (no technical explanation)
Note: nChain planned to implement CTOR in the past: source

It does require a hard fork.


SegWit2x is a combination of both SegWit and a 2MB hardfork (to activate three months after SegWit).

SegWit2x uses a different 'bit' for signaling (bit 4 instead of bit 1) than SegWit.

SegWit (BIP141) is not activated at the moment because it requires 95% of the mining hashrate, and not enough miners support SegWit at the moment, because some miners want a hardfork to increase the blocksize. To work around this the proposal of BIP148 allows users to force the miners to mine SegWit blocks by orphaning other blocks after August 1, 2017. BIP149 is a similar proposal, but will activate 11 months later. The vast majority of the core developers prefer BIP141 but most find BIP148 and BIP149 acceptable alternatives.

SegWit2x differs in implementation because of the activation of the 2MB hardfork and the lower activation threshold of 80% of the mining hashrate. SegWit (BIP141/BIP148/BIP149) itself has been developed by dozens of developers for over a year, has been tested extensively and has been ready for activation for some time now. It also has been successfully activated in Litecoin already. SegWit2x however is being developed at the time of writing by just a few non-core developers, although SegWit2x aims to be 'minimalistic', some people still consider this a risk because there is only a few months for development and only 2 weeks for testing.

At the time of writing the percentage of blocks signaling support for SegWit2x is at 78% of the mining hashrate:
https://blockchain.info/charts/nya-support


For transactions? https://en.bitcoin.it/wiki/Protocol_documentation#tx
This is the internal format, for communication between Bitcoin nodes. As such this won't be as useful as the JSON format, since you will need to parse it on your own.
This is also equivalent to calling the RPC decoderawtransaction with tx received in the hex format.


Using confidential transactions with plain-text ouputs

Is it possible to create a CT transaction, where the inputs reference UTXOs that are not confidential (just as in Bitcoin now), but creating new outputs that are hiding the value using CT's scheme?

Yes, you include a dummy blinding factor.

  What would the network have to do to check that the sum of commitments in the outputs are the same as the sum of clear-text amounts from the inputs?

With the dummy blinding factor, it would do exactly the same a normal CT tx.

The answer was a lot simpler than you thought.


What does the index of an UTXO stand for?

It is the position of your txo in the outputs array of the transaction that created it. You can see that this transaction created 2 outputs and that your output is the first one (0).
This index is also sometimes refer to as vout.


Yes, all move operations add an accounting entry to the wallet. If listtransactions doesn't show the move, this is most likely to be a problem with listtransactions.


I had the same issue, seems like the problem is that I had both qt5 and qt6 installed, and it used qt6. Try running:
brew uninstall qt
brew install qt5


The multisig is all handled in the backend without you having to handle private keys directly.

BitGo stores your private keys too, presumably in an encrypted form which is protected by your password so they can't access the private keys. When you login, your wallet is loaded in your browser locally and it contains one set of your private keys. When you make a transaction, it is made in your browser and signed in your browser using the private keys that were loaded. This transaction is then sent off to BitGo who also signs the transaction, presumably after you use 2FA to authenticate the send. Then it is broadcast to the network.

The third set of private keys are ones that only you have. You should have downloaded those (along with the set that BitGo has in your encrypted wallet) when you created your wallet. That set of keys also lets you create transactions without BitGo being involved.


How to send btc from the specific address using bitcoin api?

You cannot send from an address. All the coins inside a wallet are always treated as a single balance, for privacy reasons.

All sendfrom does is deduct the money you're sending from the virtual local account with that name. You can move money to those accounts using the move command. Received coins are by default credited to the "" account. Still, these accounts have nothing to do with actual coins on the network. This account system is scheduled for deprecation, though.

If you want to manually select the coins to use, look into the listunspent, createrawtransaction, signrawtransaction and sendrawtransaction RPC calls.


Is there any way to make a transaction invalid if it is not confirmed before a certain block?

No, there isn't a way to make a transaction that has to be included before a certain block number.

And there's a good reason for this: such a transaction would not be what is known as reorg-safe. Generally, transactions should be able to be included in either side of a block chain fork. If you make a transaction that can only be included before a certain block number, and then a fork occurs that makes a chain that doesn't include it before the designated block number, then that transaction gets reversed and so do all transactions that depend on the base transaction.


Could Blockchain be used for a different currency, leaving bitcoin behind?

The general idea here is that the blockchain provides some (really cool) new building blocks for us to play with:

Once something is accepted into the chain and has N confirmations (typically 3+, sometimes 6+), it's extraordinarily unlikely to be deemed invalid.

The "policy" for the validity of a block is codified.
It's still determined by people (which is the hullabaloo about BitcoinXT and block size being debated now in Hong Kong) but it's a world of "one-CPU one-vote", meaning if the majority of mining power agrees that these are the rules, then those are the rules and they'll continue mining.

Bitcoin itself is just one particular use of this idea of "a chain of blocks" proving that a certain amount of hard work was done to get to that state.
Altcoins (as mentioned in a comment above) are just modifications of BTC, changing some parameters and the name, which is interesting, but unlikely to be as "mainstream" for the simple fact that most people with money in Bitcoin don't fully understand cryptocurrency in general. Some of these do really novel things (ie, Nu, which splits "currency" into one part used for investing and another used for transacting), but AFAIK they're not mainstream yet.
Back to Bitcoin and banks...
Bitcoin effectively allows everyone to act as their own bank. This is really cool (I was amazed when I could "send transactions" and see them show up on another computer without a central authority...), but it comes with it's own drawbacks like... if your wallet is stolen, there's no one to call and yell at (see https://bitcointalk.org/index.php?topic=83794.0)
Banks want a way to "be their own banks (in the modern way BTC does)" because right now they're centralized and rely on a lot of trust. This means that transactions are slow (ACH is super slow compared to the BTC block time) and can be reversed if enough people make a stink (see https://www.quora.com/If-my-bank-mistakenly-deposits-1-000-000-into-my-account-am-I-legally-allowed-to-spend-it-before-they-realize-their-mistake)
When banks talk about using the concept of a block chain, I don't think they're really thinking about currency in the way we think of USD, but rather a "better way to handle trading in an open and untrusted system".
In other words, banks are saying "We want a way to not trust each other, and still clear trades quickly and efficiently."
For example, I agree to trade you 1 share of GOOG for $700 USD, and I want that to happen quickly, reliably, irrevocably, and without me knowing or trusting you. Sounds kind of like a Bitcoin transaction, right?
Bitcoin is one way to do it, but that would mean the same currency you use to settle trades is the one you use to buy a cup of coffee -- which can cause issues. If banks just create their own currency that's used exclusively for trading, it's just an Altcoin with a very special purpose and very big backers.
That (I believe) is what SETLcoin (Goldman's idea) does (http://www.americanbanker.com/news/bank-technology/goldman-sachs-files-patent-for-cryptocurrency-system-setlcoin-1078153-1.html)


Is there an API that provides information on the consensus algorithm of altcoins?

The API from CryptoCompare will give you the consensus algorithm under the key proofType.


Why is the default mempool size in Litecoin so small?

To save memory. Back in time LTC was not getting too much transactions for block, there was no reason to eat more mem. I guess this way people could run LTC node on embedded devices. But that was fixed in February and since 0.15.1 default mempool size in Litecoin is 300Mb.


You can, but the process is broken up into multiple RPCs.

First you use the listunspent RPC to find outputs to spend.

Then you use createrawtransaction with the inputs you want, and the outputs (destinations) you want.

If you didn't select all inputs and outputs already (including change, if necessary - any difference between inputs and outputs goes to fees), you can use fundrawtransaction to add more inputs using the normal coin selection algorithm, or to add change.

Then you use signrawtransaction to sign your inputs.

When all is ready, you can broadcast your transaction using sendrawtransaction.


Where is the bitcoin wedding transaction?

I think I found it, although it doesn't have the text as advertised.

History was made today when David Mondrus and Joyce Bayo tied the knot on the blockchain. The transaction took place through Eric Grill’s CoinOutlet ATM at Disney World. The couple ‘burned’ 0.1 Bitcoin, committing their marriage to the network. Jeffrey Tucker officiated the wedding with one of the most moving speeches you’ll ever hear.
Here is the historic transaction ID: https://blockchain.info/tx/ad2e849f1de6d48dce1b671fe9b4ef6aee9c50710daccce3c0195087233ef2f6

Looking at the transaction history, it appears that they repeatedly made transactions until they spent 0.1 BTC. Ick.


the list is found here:
https://api.kraken.com/0/public/AssetPairs

Also here's a list of assets:
https://api.kraken.com/0/public/Assets


Unconfirmed/Pending Blockchain.info Transactions Returned to Wallet

The transaction was finally confirmed 56 hours after I initiated it.  I assumed the transaction would be rejected, and the funds would revert back to my BlockChain wallet, but they found their way to my Coinbase wallet.

Interestingly, there was no record of the transaction on Coinbase.  After 24 hours, the network had no record of the transaction.  Anyone viewing my Coinbase wallet would have no idea how the funds arrived in the wallet.  All's well that ends well!


Electrum wallet requires a special Electrum compatible server where it can query the data needed.

There are now several implementations eg:

https://github.com/spesmilo/electrum-server
https://github.com/chris-belcher/electrum-personal-server
https://github.com/kyuupichan/electrumx

  ...code snippet that implements such funtionality

https://github.com/spesmilo/electrum-server/blob/ce1b11d7f5f7a70a3b6cc7ec1d3e552436e54ffe/src/storage.py#L286


How do I compute merkle root for genesis block?

Instead of looking at the source code, take a look at the relevant wiki page.

As blockexplorer will reveal, the merkle root of the genesis block is equal to the hash of the transaction in it. This is because building a hash tree of one transaction will simply result in that one transaction, and the hash of that tree will be the same as the hash of that one transaction.

When dealing with more transactions, simply put them in a tree and hash them from bottom to top, as the wiki page mentions.


What's the relationship of Bitcoin addresses to public keys?

you generate a Bitcoin address basically by hashing a public key with a RIPEMD160 hash function,

You use HASH160, actually. HASH160 is RIPEMD160(SHA256(x)).

This is a good resource for learning how to transform a private key into a Bitcoin address: https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses

  how is it possible to connect more than 1 address to a single public key

The compressed and uncompressed versions of an address hash to different values. That's one way that the same key could hash to two different values. There are also Hierarchical Deterministic wallets that allow you to take a single key, and derive many different subkeys from it, all of which have different addresses.

It's also not 1:1 in the sense that it's theoretically possible to create two different public keys that hash to the same value.


How much time it takes to verify a Bitcoin signature in the Satoshi client?

It depends a lot on the hardware, and on the architecture. OpenSSL use some assembly-optimized routines, which result in a speed factor of +- x2 between 32 bit and 64 bit (the latter is faster). That said, I've seen verifications taking around 0.47 ms on an Intel Xeon E5-1650 @ 3.20GHz, using 64-bit code.

Also, version 0.8 will actually do signature verification in parallel. There is also a patch with an optimized ECDSA verifier for the specific curve we're using, which should give a 20% speedup (discovered by Hal Finney). This patch will probably not make it into v0.8, though.


Can a mobile be protected against the "Linode problem"?

If your private key is compromised your coins are gone

So the short answer is that the "Linode problem" where your entire private key is at the mercy of a third-party capable of root access to your system is somewhat intractable. As others have stated you can limit your key's exposure, but malware is patient.

Off topic, but possibly of interest, is a project by the MultiBit team to use a HP50G scientific calculator as an item of trusted hardware capable of signing transactions. Not much use out in the field like a mobile would be, but handy for a small business reconciling small volumes of transactions.


Benefits of generate address from sha256 hash than random address

Generating from the hash of a string is known as a Brainwallet. This has the advantage that it is potentially easier to remember and recreate your wallet if you lose the keys.

This also have the disadvantage that people are terrible at picking entropy, and it is trivial to crack most brainwallets via brute force. You have far more security relying on randomized generator than more or less any brainwallet you could come up with.


How does the BTC protocol guarantee that a "main" blockchain emerges?

Bitcoin nodes consider the chain with the most accumulated proof-of-work the best chain. Whenever one chain tip pulls ahead by adding another block, all nodes will reorganize to that chaintip as soon as they learn about it.
Another reason for the network to quickly converge on one best chain follows from how Bitcoin miners get paid. When miners construct their block templates, each includes a unique coinbase transaction which pays the block reward to themselves. This means that finding a valid block results in the block author paying themselves the block reward via the coinbase transaction they included. However, the outputs of coinbase transactions are subject to a maturation period of 100 confirmations. This means that only blocks that spawn at least 99 successors can be spent. This essentially means that a block reward only gets paid out when a block becomes part of the best chain. As mining operations incur large hardware and power expenses regardless of success, miners bleed money when they work on blocks that do not end up in the best chain. Therefore, even when occasionally two miners find blocks at the same time and produce two competing chaintips, even the "losing" miner usually reorganizes quickly to the best chaintip and works on extending that as soon as one pulls ahead, because the stale block that has fallen behind is highly disadvantaged in its bid to become part of the best chain.
While the individual mining efforts are not centrally coordinated, it is uncommon for two competing blocks to be found at the same height: it only happens about once per month. Bitcoin mining is a Poisson process which aims to produce about one block every ten minutes. The cadence is regulated by difficulty adjustments that occur every 2016 blocks, which reset the difficulty target such that the next 2016 blocks are expected to take 14 days under the assumption that the network continues to produce the same amount of hashrate as observed for the previous epoch.


Blockchain.info does not have a sandbox nor testnet support.


Do you sign only the previous output of transaction?

The sighash type conditions what is part of the digest which is eventually signed for the transaction to be valid.
Some sighash types allow to either include (commit to) part --or none-- of the outputs of the transaction in the digest. Using these far less common sighash types introduce some malleability for a transaction, which usually allow more flexibility when different parties create a single transaction.
You almost always want to use SIGHASH_ALL and you anyway should append a SIGHASH_ALL signature to an input before broadcasting a transaction.
Regarding your question and to sum up, you always sign the current transaction and append this signature to the witness or the scriptSig. This signature can be conditioned using different sighash types.
For reference, you can see the wiki page on OP_CHECKSIG (it only covers the legacy transaction format, though).


Opening a short position on Kraken requires BTC to begin with?

You have to get money into the exchange to purchase and secure your position somehow. BTC is probably an easy way to do it but you could also do it with EUR or USD. You will need BTC to close the position but since you're going to be shorting BTC, you won't want to hold BTC while the position is open, so you'll be holding some form of fiat instead.


Lost wallet problem: I have a 240 byte file from a 2013 wallet. Can I access bitcoin with this?

That is very likely to be the "Bitcoin Wallet for Android" by "Bitcoin Wallet Developers" also sometimes known as the Schildbach wallet.
Other people on Reddit discuss having a file of that size created by this wallet.
Apparently the backup format changed from text-based Base-58 encoded private keys to a binary Protobuf wallet file.
It seems likely that the backup was encrypted and that you will therefore need to know the wallet password. I've no idea if encrypting the backup was optional in that software in 2013.
The process for either form is described here:

GitHub: Bitcoin Wallet - Recovering Bitcoins

This document describes how you can use a backup file on a standard PC to recover your Bitcoins. Normally, this shouldn't be needed. It is much preferred to just use Options > Safety > Restore wallet from within the Bitcoin Wallet app if you can.

i.e. first try installing the Bitcoin Wallet app and using its recovery menu.

Other discussion:

Bitcoin Wallet for Android - Issues decrypting the wallet backup BIN file using OpenSSL
How to restore from backup of Android Bitcoin Wallet
Reddit: Found Bitcoin wallet keys in my phone from 2013


Dump results from bitcoin-qt debug console to file

You can install bitcoin-cli, and update your bitcoin.conf to enable the RPC server. bitcoin-cli will let you pipe the output from the commands through to any shell commands you want, or redirect to a file.


How to get the Public Keys of a bitcoin User

You cannot compute the public key of an address (that is not yours), because the address is computed from the hash of the public key.

You can find the public key of your own address with the Bitcoin-QT debug window or with a validateaddress RPC call.


There is a bitcoinj.cash project currently being put together.  The code is not ready for use but should be by next week: https://github.com/bitcoinj-cash/bitcoinj


Why do my futures keep getting cancelled using BitcoinJ?

Ok figured it out. The memory pool only holds transactions that have not been included in a block. The reason it stops working after a few minutes is the transaction is included in a block, and therefore the peer does not have it in its memory pool.

It seems I will need a different approach.


How does Ripple solve the double-spend problem?

The details are very complex, but the core concept is fairly simple. Ripple solves the double-spend problem by consensus.

The analogy I use is an "agreement room". To walk into the room, you have to agree with everyone who is already in there. If you want to disagree, you have to leave and form your own room. Everyone who is honest wants to get into the biggest room they can with the most people in it.

In the room, people constantly agree on the current state of the system. It's implemented as a hash tree, so that's just one 256-bit number.

To perform a transaction, you walk into the big room and read out the transaction. Everyone checks the transaction against their ledger. Assuming there's no conflicting transaction or other problem, everyone agrees that the transaction is valid and they include it in the set of transactions they believe should be applied.

They then work on any disagreements they have by an avalanche process. Essentially, if someone is voting yes on a transaction that doesn't have overwhelming majority support, they just change their vote to no. This ensures there's a quick agreement on a set of transactions.

Once a set of candidate transactions is agreed upon, those transaction are applied and everyone computes the next ledger according to a set of deterministic rules. They all sign it, publish those signatures, and now clients know which transactions have been accepted by the consensus process.

If a transaction doesn't get in for some reason, but it's still valid, every honest person in the room will say yes to that transaction in the next round.

So, back to the double spend problem. A double spend is essentially two transactions, each of which is valid if and only if it's applied before the other. Thus solving the double spend problem "merely" requires agreeing on an order for the two transactions. If everyone agrees which comes first, the problem is solved -- the one that comes first is applied and thus the other is invalid.

In the Ripple system, if two transactions are a double spend, one of three things can happen:

One transaction will get voted into a consensus set before the other. In this case, that transaction will be in a ledger signed by all the people in the room, forever invalidating the other.
Both get into the same consensus set (this should almost never happen). In this case, a deterministic rule when the consensus set is applied determines which gets into the ledger, forever blocking the other.
Neither gets into a consensus set because neither gets a majority and both transactions are at around 50%. In this case, every node that sees both transactions (which will quickly be the vast majority of nodes) will vote yes on the transaction that wins by a deterministic rule and no on the transaction that loses by that rule. The one that wins by that deterministic rule will get in the consensus set, be applied to the ledger, and forever block the other.

That's a gross oversimplification, but it's inherently fairly complex.


What are the requirements for running a Dash Masternode?

Dash Masternodes are archival full nodes. They enable the PrivateSend and InstantSend feature. Masternodes get to vote on funding and governance proposals. Masternodes are paid for these services with 45% of the mining reward.

A Masternode needs to put up a collateral of 1,000 Dash, have a dedicated IP address and may not be offline for more than 1 hour in 24h. Anyone can run a Masternode.


All bitcoin transactions are actually traceable by protocol definitions. Basically the blockchain is a long list of all the transactions throughout the history of bitcoin. The problem arises when trying to pinpoint who owns the address the transactions are being sent to. You can create as many BTC addresses as you want. Also with services like coin join and tumbling you can make tracing the coins much harder. Basically what your saying is possible but there are ways to easily mitigate any tracing being done.

The "bad guy" requests payment to a certain BTC address, they then tumble the coins through multiple intermediary addresses. At this point it's pretty hard to trace where the money actually ends up. Tumblers have built in features that convert a 100 BTC transation into multiple 10 BTC transactions that all end up at the same address in the end, making you tracking idea much harder. They also have features to delay a transaction making it harder to trace on the way out since you are expecting the transaction to happen immediately and instead it was delayed by a random increment of time. Tumblers also institute a random fee usually varying from 1-3% meaning the value coming out of the tumbler is not going to be easily traced to the value going in.

Wallet (A) is sent 100 BTC
Wallet (A) tumbles 100 BTC over 10 transactions of 10 BTC increments to wallet (B)
repeat until satisfied.

Since the attacker can create as many BTC addresses as they want they can easily hide the trail of where the BTC is being sent.

Basically bitcoin transactions are traceable, there are just ways to make it not worth attempting to trace.


Can miners choose which transactions to mine?

I know that there are limits to the minimum size of a transaction fee (around 5400 satoshis)

Actually, some transactions can sent for free.

  For example, if I gave a mining pool a list of addresses and offered an incentive to them to mine them even though the transaction was non-standard, could they do it?

Absolutely. A miner can include any transaction that doesn't break network rules, for any reason.


Windows 7 : Unable to start bitcoin server using daemon in regtest : bitcoind -regtest -daemon

In the command line on windows you must type just bitcoind -regtest whitout -daemon


Instantaneous exchange/conversion of bitcoin into cash

Because the exchanges are in possession of confirmed bitcoins from the get go. Mtgox makes you wait about a full hour before you are accredited deposited bitcoins to get those 6 confirms. And to exchange it they just decrement the person's account's bitcoin balance and increment the fiat balance (according to whichever market order).

On coinbase they just decrement your account balance and send fiat to your bank account simultaneously.


Can one recover the full list of public keys generated in electrum with the seed/private key?

Yes.

As a plan B if that fails, you should be able to use piped bitcoin explorer bx commands offline. This is because Electrum v2.0 and above uses the same BIP 32 Hierarchical Deterministic (HD) technology that bx supports.

However, the Electrum HD paths are different from the BIP 44 convention. See It appears Electrum uses: m/0/0 for wallet addresses and m/1/0 for change addresses. Additionally, the English Electrum Seed Word List is quite different from the newer English BIP 39 Seed Word List, and I don't believe Electrum uses a PBKDF2 stretching function that is not invertible. See stretch->passlib.pbkdf2 for high level details for what bx mnemonic-to-seed is doing. Unlike BIP 39, an Electrum private key should be invertible to a group of Electrum seed words.

For the synthesis of BIP 44 paths for Bitcoin m/44'/0'/0'/0/0 private key and M/44'/0'/0'/0/0 public address using bx, see Example 7. See BIP 44 path-levels.  The change level is set to 0 for external addresses that you share with others to receive funds. The change level is set to 1 for a wallet's internal return addresses.

If the information above is too pedantic, read Chapter 5 of the Mastering Bitcoin Book. Albeit, details about Electrum are scarce.


interpreting coin base api historical price data

This seems to correspond to the ISO 8601 datetime format, specifically the complete date plus hours, minutes and seconds with time zone designation format.

YYYY-MM-DDThh:mm:ssTZD (e.g. 1997-07-16T19:20:30+01:00)

The TZD hereby stands for time zone designator, which is a ±hh:mm offset from UTC* .

Accordingly, "-05:00" would represent Eastern Standard Time.

* UTC (Coordinated Universal Time) is also known as GMT (Greenwich Mean Time), i.e. the time in London's time zone.


Where can i find instructions on how to install a NXT wallet app on my Ubuntu server so I can access it via the web?

Make sure Java 7 is installed on your Ubuntu Server

sudo apt-get update && sudo apt-get install openjdk-7-jre nano zip

Download the latest NRS release and verify the hash sum, example:

wget https://bitbucket.org/JeanLucPicard/nxt/downloads/nxt-client-1.1.6.zip
sha256sum nxt-client-1.1.6.zip
Compare with valid hash found on https://nxtforum.org/nrs-releases/nrs-v1-1-6/
unzip nxt-client-1.1.6.zip
cd nxt

To change NXT's properties (such as port), edit nxt-default.properties

nano conf/nxt-default.properties  (CTRL+O to save, CTRL+X to quit.)

Launch NXT

./run.sh and access via browser, ip:xxxx


Does it make sense to create cryptocurrency based totally on go programming language?

I don't know how well it performs, but here is a full node implementation of Bitcoin in go-lang that you could investigate: https://github.com/btcsuite/btcd


Can I use bitcoin USB block erupters to mine litecoin?

No, you can't. USB block erupters are ASIC miners. They cannot have their algorithm modified in any way because the algorithm is designed into the silicon. They can only mine coins that use the same mining algorithm as Bitcoin (SHA256d) such as Namecoin and Devcoin.


Import of BTC BIP38 Paper Walet into Electrum 3.3.4 not working

The blockexplorer shows the BTC balance is still in the Paper Wallet and not in the Electrum wallet.

Here's my understanding of the relationship between wallets, keys, addresses, balances and explorers:

A blockchain-explorer generally shows total unspent amounts ("balance") associated with a bitcoin-address. Blockchain-explorers do not normally have any reliable notion of wallets.

Two or more wallets can contain the same bitcoin-address and therefore both wallets can be said to "contain" the same money (BTC).

Therefore if both wallets contain the same bitcoin-address, a blockchain-explorer won't be able to tell you that an amount is in one wallet but not in another.

A wallet can contain many bitcoin-addresses. A wallet that shows a "balance" is likely to be showing you the total of the spendable amounts or unspent amounts associated with all the bitcoin-addresses it knows of.

If your new Eelectrum wallet is not showing the same balance as a blockchain-explorer shows for a bitcoin-address, it suggests the wallet does not contain that bitcoin-address (or contains more than one bitcoin-address with unspent amounts, or is not fully synchronised)

A beginners guide to the Electrum wallet says

  the Addresses tab ... will be hidden by default. To reveal it, select Show Addresses item from the View menu.

Perhaps this can be used to verify that your wallet contains the same bitcoin-address that you are examining using a blockchain-explorer.

You can also check the synchronisation status:

  When the block count under “Blockchain” equals the height indicated for the servers you’re connecting to, Electrum will be fully synchronized


How do I run two instances of bitcoind on the same linux machine with different conf files?

Change the -datadir flag to a new absolute location. Each instance will follow the bitcoind.conf in their respective directory.


Blockchain.info stores information in a database, it does not show only the information that is currently in it's Bitcoin. It is connected to many nodes, so it may see information your Bitcoin doesn't, and will store data after a normal Bitcoin client would discard it.

Bitcoin uses a basic rule "I'm going to use the first block I receive as the current best block". The duplicate numbered orphaned block was usually broadcast too late to everybody. If the "unpopular" later block is somehow the one that is next built upon, there will be many requests between clients for the correct blockchain up to the new block.


bitcoind and bitcoin-cli 'unrecognized', how can I access them from command line?

Bitcoin Core does not include bitcoind or bitcoin-cli. You can use the "debug" window to input the same commands there, or use  Homebrew to install bitcoind and its related tools bitcoin-cli and bitcoin-tx directly.

brew tap WyseNynja/homebrew-bitcoin
brew update
brew install bitcoind

This will download, compile, and install the most recent version of the daemon and the tools. The homebrew script used to do that is viewable on github. To keep up with new versions of Bitcoin Core that are released every few months, brew update && brew upgrade will check for new releases and rebuild if necessary.


The guarantee comes from the consensus rule that a block's timestamp must be greater than the median timestamp of the last 11 blocks. This median timestamp is known as the median time of the block. Because the median is used, and because timestamps of each block must be greater than their median time, the median time will always increase from block to block. This also means that the median time for a block is set prior to it being mined.


How to determine how many transactions are being processed by the lightning network?

Yes, that is possible. If you operate all nodes in the network :)

If you are interested in a specific node, performing an effective sybil attack will also allow you to determine number of transactions which are routed through or initiated by that specific node.

Other than that, there is no way to accurately determine transaction rate of the network, as only channel capacity is publicly broadcast.


Where do I get the public key to verify the Bitcoin.org PGP signed message?

If you check out https://bitcoin.org/en/download, you'll see some links below the download button: 'Bitcoin Core Release Signing Keys'


How can you get a list of all addresses mentioned in the blockchain?

Addresses aren't mentioned in the blockchain. But you can calculate them based on the transaction scripts. In order to do this, you need to calculate the address from the scriptPubkey of each transaction. To calculate the address you have to:

Determine whether it is a P2PKH or P2SH, so you know what prefix to use: List of address prefixes.
Calculate the BASE58CHECK(HASH160(<prefix><scriptPubKey>))


Is PoW and consensus unnecessary without double spending?

The only solution I see to above is that each coin is initially issued and signed by a trusted party. Once these coins are in existence the trusted party is removed.

This is not correct. Why would that party need to be trusted?
Is the issue that they might sign more coins than they said they would sign? But that's a double spend problem. Right?
A double spend is when a party is only supposed to transfer X coins but they sign valid transactions to transfer Y coins where Y is more than X. The assumption we started with is that double spend isn't a problem. So there is no need to trust the "trusted party" since the only problem would be if they double spend and the starting assumption was that double spend wasn't a problem.
At every point in the system's existence, there has to be some set of future transactions that are valid and some set of future transactions that aren't and everyone has to agree on which transactions go in which set if they know the system's state. The system's initial state is also a system state, and so part of the system's rules have to be to see which transactions are valid from the initial state.
So simply a rule that there exists spendable tokens in the system's initial state is sufficient. The party that can spend those initial tokens doesn't need any special trust -- they are no different from any party that can spend any tokens in any other state.


What ultimately happens to mining if blocks contain mostly non-Bitcoin data?

Whoever discovers the block can choose what information to put into it. Therefore a miner that finds a hash that has a sufficient level of difficulty can choose to only include transactions that actually pay their transaction fee.


How was the new target for block 32256 calculated?

The actual target (and thus difficulty) is determined by its compact 32-bit encoding.

After the computation you did above, you should round it to the nearest compactly-representable target (24-bit accuracy, multiple of 256). That is the target encoded inside blocks, and the one that matters.


Help sending bitcoin to bitcoincash wallet

If you control both the sending (BTC) and receiving (BCC) wallets, you can recover the money by restoring the private key from the BCC wallet into a new wallet created on the BTC BlockChain.  Unfortunately, in this case it appears you have sent money to a BitCoin Cash wallet you do not control.

If you do not control the receiving address, sending a Bitcoin payment to a Bitcoin Cash address will almost certainly result in total loss of the money sent to the Bitcoin Cash address.  When you send Bitcoin, you are sending it to another address on the Bitcoin BlockChain.  There is no built-in method of sending Bitcoin to Bitcoin Cash directly; you should convert the Bitcoin into currency, then purchase Bitcoin Cash with that currency, typically through an exchange.

If you do not own the receiving wallet, the only way to get that money back would be in the highly unlikely event you sent it to an address that happens to exist in the Bitcoin BlockChain, and the person who owns that Bitcoin address decides to be nice, and send the money back to you.

As always, it pays to understand how a currency works by using a small amount of money at first.  You wouldn't give your 4 year old $1,500 to play with, would you?


Where can I get email notifications on any transactions to/from an address I do not control?

http://www.Blockchain.info/wallet <-- add address as watch-only.
http://bitnotify.com
http://bitcoinwhoswho.com
http://txnotify.com


I accidentally transferred my Bitcoin Cash to Bitcoin (BTC) wallet in BitMEX!

I'm going to not close this as off topic as OP has already contacted the customer support in question. Instead, I will try to answer why some exchanges/companies have such a stance.

Unlike traditional finance systems, crypto does not really have a refund system. If money is sent out of an address, there is no way to recover it without the receiver's cooperation. Due to this, crypto custodians (companies that hold crypto on behalf of others, such as exchanges holding their users' crypto) must take extensive steps to ensure that a rogue staff member, or someone who is able to gain access to internal systems, is unable to send the crypto to an address not controlled by the exchange.

A side effect of this pattern is that in the normal course of operation, private keys are often completely inaccessible to humans. In exceptional cases such as forks and disaster recovery, there will only be a handful of people who are able to access the raw keys/mnemonics and sign arbitrary transactions needed to recover full operations.

Moreover, such keys are often stored inside Hardware Security Modules, which impose further restrictions on access.

For an exchange such as bitmex, the time, effort, and security risk required to recover BCH from a BTC address for just a few users is likely not worth the engineering or human resources.

Many companies adopt such a stance to avoid compromising their security unnecessarily, and to safeguard funds for all users. Certain exchanges, such as Bittrex, have clearly run into this issue often enough that they have a system in place to recover some cross chain funds. However, that is the exception, not the norm.


How does Whopper Coin released in the summer of 2017 on the Waves platform solve the native fee problem inherit with many colored coin approaches?

On the Waves platform, it is possible for transaction fees to be paid in tokens. To do this, a full node with mining capabilities (anyone can run a node, but at least 10,000 WAVES is required to generate blocks) has to accept the particular token as a fee.

Thus, Burger King Russia could either host a full node or persuade another full node to accept Whoppercoin. Burger King Russia plans to have an app on both the Apple Store and on Google Play for the loyalty program.
These apps will likely make use of the Waves Node REST API by specifying the fee asset as Whoppercoin.

Here is the relevant API:

POST /assets/broadcast/transfer

Here are the relevant parameters:

"type" - Transaction type (4 for TransferTransaction)
"id" - Id(hash) of transaction, Base58-encoded
"assetId" - Asset ID in Base58 format, effectively equals transaction id
"timestamp" - Transaction timestamp
"sender" - Sender account's address, Base58-encoded
"senderPublicKey" - Sender account's public key, Base58-encoded
"recipient" - Recipient account's address, Base58-encoded
"feeAsset" - Asset ID of transaction fee, currently is null, i.e. WAVES
"fee" - Amount of transaction fee
"attachment" - Attachment, Base58-encoded
"signature" - Signature of all transaction data, Base58-encoded

Here is a request JSON example:

{
  "type": 4,
  "id": "3xPyT73TGV7c5PKEJpicwSsX7PXyi3Lm1JFNQivFRLuy",
  "sender": "3NBVqYXrapgJP9atQccdBPAgJPwHDKkh6A8",
  "senderPublicKey": "CRxqEuxhdZBEHX42MU4FfyJxuHmbDBTaHMhM3Uki7pLw",
  "recipient": "3Mx2afTZ2KbRrLNbytyzTtXukZvqEB8SkW7",
  "assetId": "E9yZC4cVhCDfbjFJCc9CqkAtkoFy5KaCe64iaxHM2adG",
  "amount": 5500000000,
  "feeAsset": null,
  "fee": 100000,
  "timestamp": 1479222433704,
  "attachment": "BJa6cfyGUmzBFTj3vvvaew",
  "signature": "2TyN8pNS7mS9gfCbX2ktpkWVYckoAmRmDZzKH3K35DKs6sUoXHArzukV5hvveK9t79uzT3cA8CYZ9z3Utj6CnCEo"
}

On Waves platform right now, you can buy Whoppercoin on the Waves DEX, and the fee is 0.003 Waves. I demonstrated this here: https://youtu.be/ZAFZNEwIooM

Additionally, you can transfer Whoppercoin between accounts, and the fee is 0.001 Waves. I demonstrated this here: https://youtu.be/OYHPlgj0HjY


How do i find out what city and whatwas posted with code?

This is not information you can find in the blockchain and whatever information you do find is not considered terribly reliable.

That said, you can see from blockchain.info where this transaction originated:

https://blockchain.info/tx/065e7ad1111963cacd4e2ca978ff57023b8297c123911ffbb8a61011d29d1849

The IP address that relayed it was:

45.33.113.199

When you look up this IP address, you find that:

http://whatismyipaddress.com/ip/45.33.113.199

It's originating from Dallas, TX on a Linode server. This may or may not be the actual server that originated the transaction as there may have been several hops before blockchain.info saw it. Also, a user can have a Linode account and be pretty much anywhere in the world, so this information is probably not all that useful.

That said, if you want to speculate on where this transaction originated, this is one publically available way to do so.


Bitcoin halving conflict? Is this a rumor

It is exactly at block 420000.

When block 420000 will be mined is not certain, as the block mining process is random and influenced by hashrate variation.


Can someone explain how does Bitshares market pegged assets work?

Abstractly spoken, what you have in the current BitAsset 1.0 implementation is that in the market two parties meet that have different estimations for the future price.

Let's define the price to be the price of a bitAsset (i.e. bitUSD) denominated in BTS (base base currency in the BitShares network). For example 0.1 BTS per bitUSD. We need to clarify this here, because every market in BitShares can also be flipped, i.e. we can trade BTS:USD or USD:BTS.

Going Short

Let's say Mark thinks the price (i.e. 0.1BTS per bitUSD) will go up in the future while Nanny expects the price to drop soon. Nanny wants to a bet for this and goes short on bitUSD. Going short on a bitAssets means, that you lend it from the network (i.e. the network creates them for you) and sell it to a buyer (here, Mark).

The collateral

In order to go short, you need to lock up some of your funds (here BitShares) as collateral, you can see this pretty much as a security that you will be able to give back your lent bitUSD eventually. The total collateral is 200% the amount your short payed by both parties of the trade. This means that:

In order to short 1 bitUSD, the amount of BTS worth 2 USD has to be locked up.
The shorter pays half of the collateral and the buys pays half.
If you want to short-sell 1 bitUSD you will have to lock away 1 USD worth of BTS and will not get anything from the trade.

Price movment

If the price (say to 0.09BTS per bitUSD) goes down then the market moved according to Nanny expectations and she should make a profit from the prediction. How is this achieve? As a short-seller, she has to give back the lent bitUSD eventually, so she can decide to do this at a price of 0.09 BTS/USD. This means she needs to buy bitUSD cheaper from the market than she sold it earlier in the short-sell. With the bought bitUSD, she can close her short order (i.e. cover) and give back the lent USD which will free up the collateral, which, considering that she had to buy bitUSD with BTS, should leave her a profit of 10%.

However, if the price goes up she can do one out of three things:

Wait for the 30 day short limits to arrive. The Network will put a buy order for bitUSD and close here order automatically giving her what is left from the collateral
Wait for the price to go up even further and risk a margin call. This will be triggered from the network if the collateral is only 150% (in contrast to the 200%). The network will force (i.e. it does this automatically) you to buy up bitUSD on the market and close the order.
The short seller can decide to cover on her own buy buying up bitUSD and closing the order herself.

All of these options will make the short-seller a loss as the prediction was wrong.

Market Peg

In the end, the market peg is achieved by a social consensus in such that 1 bitUSD should be worth 1 USD. Hence, trading against the peg should make you lose money because someone else will make a profit from trading towards the peg. Wouldn't you want to trade if someone offered you $1 for $90c?


Probabilty of a Race Attack in time t with hashing power q

So there are two ways to launch this attack.

(stupid way) get 6 confirmations on a transaction, the go back to the block before the transaction and mine 6 blocks in a private chain before catching up to the mainline and eventually beating it. I would describe this as a race between main chain and private chain where the main chain has a 6-block lead.
(smart way) immediately after the transaction is in the mempool of the main chain, start a private chain with the double spend tx and keep the chain private until there are 6 confirmations on the main chain and release the longer chain into the world to win. I would describe this as a race between the main chain and private chain where they start from the same place.

I think you're talking about doing (1) where (2) is the more likely to succeed attack. With (1), yes, this will take a long time since you have 6 more blocks to catch up. With (2), you're likely to beat (1) soon after however many confirmations. Since the length of the chain is determined by how much proof-of-work is in it, you might be able to win with a shorter chain (!). In any case, calculating the probability of doing so by time T is an interesting problem for (2) but it's at or above your percentage of the hashing power at any length as long as the second method of attack is used.


Prioritizing BTC transactions using Bitcore APIs

This feature available on bitcoin-core RPC

bitcoin-cli help estimatesmartfee

estimatesmartfee conf_target ("estimate_mode")

Estimates the approximate fee per kilobyte needed for a transaction to begin
confirmation within conf_target blocks if possible and return the number of blocks
for which the estimate is valid. Uses virtual transaction size as defined
in BIP 141 (witness data is discounted).

Arguments:
1. conf_target     (numeric) Confirmation target in blocks (1 - 1008)
2. "estimate_mode" (string, optional, default=CONSERVATIVE) The fee estimate mode.
                   Whether to return a more conservative estimate which also satisfies
                   a longer history. A conservative estimate potentially returns a
                   higher feerate and is more likely to be sufficient for the desired
                   target, but is not as responsive to short term drops in the
                   prevailing fee market.  Must be one of:
       "UNSET" (defaults to CONSERVATIVE)
       "ECONOMICAL"
       "CONSERVATIVE"

Result:
{
  "feerate" : x.x,     (numeric, optional) estimate fee-per-kilobyte (in BTC)
  "errors": [ str... ] (json array of strings, optional) Errors encountered during processing
  "blocks" : n         (numeric) block number where estimate was found
}

The request target will be clamped between 2 and the highest target
fee estimation is able to return based on how long it has been running.
An error is returned if not enough transactions and blocks
have been observed to make an estimate for any number of blocks.

Example:

bitcoin-cli estimatesmartfee 6


How do I get the temperature of my USB Miner?

If your device has a temp sensor it will show in the API output and in the Text User Interface that is default when running at the command line


Representation of coordinates in signature. OpenSSL

The value r is just a number and doesn't explicitly store or encode any point coordinates.  In a signature, r is set to the X coordinate of the point R, which is really k*G, where k is the secret nonce used during signing, then reduced mod the curve order.
In secp256k1, this usually means that r is in fact the X coordinate (because r itself is usually very big), but it is not always so.

During verification, the verifier attempts to reconstruct the original R point by from the signature values (s, r), the message z and the signer's public key P by solving the equation s*R' = z*G + r*P, then reduce the X coordinate of R' mod the curve order and check that it is equal to r given in the signature.

I've never used openssl, but the process seems to be in ossl_ecdsa_verify_sig().  So you can see R' being computed here :
https://github.com/openssl/openssl/blob/master/crypto/ec/ecdsa_ossl.c#L396-L404

After these lines, the reduction mod the order is done and finally the equality test.  In simple signature verification, the Y coordinate of R' is not used, but it is available from the value point (which is R') in openssl's implementation.

edit:
Also, I just realized I should add a something about pubkey recovery since you mention the v or recid value in your question.
When doing pubkey recovery from message and signature (as in the case when the signer's pukey is not given), to get the Y coordinate from a possible R' point, you would try a few values based on r as the candidate X coordinates.

The possible X coordinates of R' will be r itself, or r + curve_order (and both can be valid X's).  You can then solve the curve's equation y^2 = x^3 + 7 to get the possible Y values for each.


Can my 10,000 satoshi channel with a large LN node receive multiple LN payments that are larger than the amount in the channel?

Can my LN channel for some amount "X" receive a LN payement larger than "X"

No, you can only receive payments until the entire channel capacity ("X") has been pushed to you side of the channel. At that point, you will no longer have incoming capacity.

..or receive multiple small payments that exceed "X"?

You could receive multiple payments that exceed "X", but you would also have to send payments out in between the receives (to push the channel balance back to your channel counterparty's node).

What happens if:
(1) I receive fifteen 10,000 satoshi order/payments routed via the 100k big LN node channel...or

Assuming your channel starts with 100% of the capacity on your counterparty's node, you would be able to receive 9-10 payments, and then there would be no route to complete the last 5-6 payments.
I say 9-10 instead of 10, because each node involved in a channel must keep a small amount of capacity in reserve, to initiate a channel closing in case of an uncooperative closure. So if the capacity was exact 100,000 sat, and the payments were exactly 10,000 sat, then you would most likely not be able to receive the full 100,000 sat in payments consecutively, due to this reserve requirement,

What happens if:
(2) I receive one 1,000,000 payment routed to me via the 100k big node channel (a purchase of my one "expensive" 1,000,000 item).

The same as above, you might be unable to receive that payment, due to the reserve requirements.

I believe to run my store I would need to create multiple giant channels to accommodate any potential payments received...right? So in both cases above, the channel must have enough to receive the payments and cannot receive a payment larger than what is in the channel.

Right, you cannot receive a payment larger than your current incoming capacity on that channel (the remote_balance). As a shop owner, you can actively maintain channels with incoming capacity, but you could also allow customers to open channels with you directly. There are also services forming that allow you to buy incoming capacity, etc.


How do I get my Bitcoin "Spendable" instead of it being "Non-Spendable" on my Blockchain Account?

OP answered own question:

  I have been using my laptop to try all this and I just opened up my phone and the Blockchain app and apparently the Private Key was stored on the phone app and so it released the funds.


Can I buy Bitcoins in Romania and if yes, where?

There are no exchanges yet that accept RON (Romanian Leu).

There are individuals in Romania who trade bitcoins for face-to-face cash trade:

https://localbitcoins.com/country/RO <-- But be careful of the listings who are not local, wanting to trade online instead.

Also there is the #Bitcoin-otc marketplace and the #bitcoin-otc-eu IRC channel in which you might find someone willing to trade.

If you have access to purchase UKash vouchers with cash, there are several services such as Mercabit.eu, VirWoX, and Bitcoin Nordic who will accept that voucher for the purchase of Bitcoins.

Otherwise, if you have the ability to send a SEPA transfer, there are many exchanges you can use, include BITSTAMP:

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


How to get Electrum 3.1.3 on bitcoin testnet?

General answer is running:
$ electrum --testnet

If you are using Mac OSX then open terminal an jump to:
 /Aplications/Electrum/Contents/OSX
there you need to run:
& ./Electrum --testnet


What's the purpose of ScriptSig in a SegWit transaction?

The reason is that for now, no native segwit address format exists, so transactions cannot be sent directly to segwit outputs. A proposal for native segwit addresses was created, but it won't be usable until all senders and receivers support it.

Instead, segwit-inside-P2SH is used, where outputs go to a BIP16 output with as hash script the hash of the witness program.

To spend such outputs, we must stay compatible with BIP16, and thus a scriptSig that reveals the full witness program is required. That is what you're seeing in this transaction: a BIP16 scriptSig, which reveals a witness program, which on its turn causes inspection of the witness data for the real verification.


It would be running on the blockchain.. which is a chain of blocks. So really its running on the whole blockchain network regardless of how many blocks there are.

Although the smart contract never existed until the block which you deployed the smart contract on.
For example you deployed a smart contract at block 1500 and right now its block 2000. If someone forked that blockchain at block 1499 your smart contract would never exist. But if they forked at block 1500 then your smart contract would exist on the new forked blockchain (look up the Ethereum classic fork.
I hope this clears it up for you.


How can I create uncompressed public key in C++?

I don't know much about c++ or libbitcoin, but I found a public method in the bc::wallet::ec_public class

bool to_uncompressed(ec_uncompressed& out) const;

So I guess you can probably convert your ec_public to ec_uncompressed(which is just a byte_array) by

ec_uncompressed uncomp;
<public key>.to_uncompressed(uncomp);
std::cout << "Uncompressed: " << uncomp << std::endl;


When trading bitcoin on exchanges you trade directly at the exchange (not through a broker). Another big difference is that everything at an exchange is visible publicly, this includes the current orderbook and a recent set of historical trades.

What is features are supported and what the fees are depend on the exchange, a few big exchanges are:

bitstamp: They only support trading assets that you own, you can make limit orders or market orders. Margin trading is not supported.
bitfinex: They support the same as bitstamp as well as margin orders.
kraken: Similar as bitstamp, but also supports other cryptocurrencies.

Besides the top few, there are also exchanges that do not have markets with FIAT money, the biggest one here is poloniex (which supports margin trading).


Download blocks in blk00000.dat format from a specific period

Bitcoin Core is the only software that saves the blocks in the blk*.dat format. This format is not standardized and internal (i.e. not exposed to users). The contents of, for example, blk2342.dat can differ between multiple instances of Bitcoin Core.
The only option is to run Bitcoin Core yourself, or to find somebody who runs Bitcoin Core and can provide you with these files.


Why are there no very low bids/very high asks on GDAX?

It appears that the GDAX main page only shows orders that are fairly close to the market price, probably to keep the user interface manageable.  You can see a wider range by increasing the aggregation.

You can't view the complete order book through the UI, as far as I can tell, but you can get it through the GDAX API.  If you fetch
https://api.gdax.com/products/BTC-USD/book?level=3
you get all outstanding orders in JSON format.  There are asks as high as $9999999999 and bids as low as $0.01.


bitcond and bitcoin-Qt system configuration and bandwidth requirements

Would you be mining by yourself, or in a pool? If you are mining in a pool, you won't need bitcoind or bitcoin-QT running, and you can use a Raspberry PI to run CGMiner. Raspberry PI is very easy to set up, fast and requires much less oversight/administration as compared to a consumer grade laptop/computer.


Do stale blocks get reported by bitcoin daemon?

My question is: does the client report stale blocks which are mined into the blockchain but not part of the main chain or are they ignored and hidden from me?

Blocks that are not part of the main chain are never reported unless you specifically ask for them.

However if you are online, new blocks can become stale blocks and you will need to be able to handle that case.

  what would I need to to with the transactions from that block?

Undo everything that happened in that block. So all of the transactions become unconfirmed and go back to the mempool. Any UTXOs that were spent become unspent and re-enter the UTXO set.


Since there is a limited number of bitcoins, will miners become obsolete?

It is an frequently occurring but incorrect assumption that the purpose of mining is creating bitcoins. The reason mining exists, is finding blocks, so that a global consensus about the order of valid transactions can be established. Mining is hard because we don't want too frequent blocks.

One of the very original ideas in Bitcoin is combining this block construction consensus mechanism with the initial introduction of new currency, but it could have been done in very different ways.

So, even when the block subsidy dwindles and eventually becomes zero, mining will continue. Blocks will still be needed and if miners don't create them, other miners will pop up. They are expected to be paid from transaction fees.


Explain how to send bitcoins from multiple addresses to one

How would he do it?

It depends on the wallet manager you are using.

If you mean how does it do it under the hood it adds multiple inputs to the transaction and signs it with the private key of each address.

  What about miner fee

Considering that the suggested fee should be proportional to the weight in terms of data of the transaction, since a transaction from multiple addresses should be smaller (always in terms of data) of multiple separate transaction the fee can be slightly smaller too.

Yust to give you an idea writing

A -> D
B -> D
C -> D

Takes more space than writing

A, B, C -> D


Does the Bitcoin Qt client have a minimum transaction fee?

(Update: The client has changed the min fee from 0.0005 to 0.0001)
Yes, the Bitcoin-QT client applies a minimum fee of at least 0.0001BTC to some transactions. Quoting the wiki:

Sending
A transaction may be safely sent without fees if these conditions are met:

It is smaller than 1,000 bytes.
All outputs are 0.01 BTC or larger.
Its priority is large enough (see the Technical Info section below)

Otherwise, the reference implementation will round up the transaction size to the next
thousand bytes and add a fee of 0.1 mBTC (0.0001 BTC) per thousand bytes1. As an
example, a fee of 0.1 mBTC (0.0001 BTC) would be added to a 746 byte transaction, and a
fee of 0.2 mBTC (0.0002 BTC) would be added to a 1001 byte transaction. Users may
increase the default 0.0001 BTC/kB fee setting, but cannot control transaction fees for
each transaction. Bitcoin-Qt does prompt the user to accept the fee before the
transaction is sent (they may cancel the transaction if they are not willing to pay the
fee).
Note that a typical transaction is 500 bytes, so the typical transaction fee for
low-priority transactions is 0.1 mBTC (0.0001 BTC), regardless of the number of bitcoins
sent.

The "priority" mentioned is calculated based on the quantity of bitcoins and the age of the bitcoin inputs making up the transaction (ie how long since you received them). It prevents a user flooding the network by repeatedly sending bitcoins to themself.
Note that this isn't a restriction on the Bitcoin protocol itself though. More details here.
In your case, the only thing you can likely control is the ages of the bitcoins; ie waiting will help meet the third requirement.


How to restore Bitcoin Core HD wallet private keys by master key?

Unfortunately, Bitcoin Core itself does not provide methods to generate private keys from master key. However, there are libraries that can produce correct keys from xprv string (chain m/iH/0/k with hardened keys according to BIP0032) - I used https://github.com/prusnak/bip32utils for Python.


Why doesn't Bitcoin migrate to proof-of-stake?

Proof of Stake is basically a case of having your cake and eating it, too.
PoW is a simple work-around to a coordination problem that was previously thought to be unsolvable. It sort of "cheats" by providing an economic solution to a distributed systems challenge, by introducing a real cost as a disincentive to unwanted behavior as well as using a reward system both to bootstrap itself and to incentivize security. The advantages of Bitcoin's PoW system include that the group of block authors is truly open to anyone with computational resources, that the system converges on one ground-truth because there is a real cost in producing a competing chaintip, and that it is simple enough for its security model to be well understood.
PoS is more similar to the approaches that were pursued before the publication of Bitcoin. PoS is naturally divergent as there is no real cost in staking. The "Nothing at Stake problem" allows stakers to work on multiple chaintips and only publish the next block from the chain most favorable to them. There are different ways of approaching the vastly different security model of PoS.

Source: Bram Cohen describing ETH's PoS research
For example, ETH's effort to switch to PoS has been in research since at least 2015.
The latest I've read, ETH's current PoS proposal piles multiple layers of complexity on top of the staking to achieve convergence. Stakers have to register as "Validators" of which there are a limited number, put up a sizeable collateral that can be slashed in retaliation for misbehavior, and additionally maintain frozen capital to stake in the first place. More mitigations are in place to punish validator malfunction and recover the system from such breakdowns.
Other approaches to and issues with PoS include:

Some systems introduce a central party that rubberstamps the latest block (e.g. Peercoin). A central coordinating party costs the system its censorship resistance.
It's difficult to fairly launch a PoS system since stakers have to hold funds in the system to author blocks. Many PoS systems get either started as airdrops, Initial Coin Offerings (ICOs), or a proof of burn auction.
Staking requires some representation of the private key to be online at all times, which may mean that it is easier to redirect some of the staking power (in early PoS systems it had to be the actual private key, so not only staking power but actual funds could get stolen). Not participating in staking means that your share in the monetary supply is being inflated away.
Some systems require coins to have a certain amount of confirmations before being allowed to be used for staking, so spending funds interrupts your staking revenue.
Some people expect that staking revenue will be taxed differently than mining revenue.
Some PoS systems can be gamed for profit by trying a vast number of block candidates to cause the staker to get blocks more often than their stake should qualify them for. Such an incentive may turn such PoS systems just into PoW schemes under the hood.
Some researchers argue that "by depending only on resources within the system, proof of stake cannot be used to form a distributed consensus, since it depends on the very history it is trying to form to enforce loss of value".

So, while the Ethereum Foundation keeps giving (and missing) new delivery dates for an incomplete research project, there seems to be less interest among Bitcoin contributors to discuss Rube Goldberg contraptions.
And then, beyond the general skepsis for PoS, it wouldn't be feasible to just switch to it:

"Even if there somehow was a workable solution that had desirable
properties and security proofs, it would be working under a vastly
different security model than PoW… and nobody can just decide to make
such a change without enormous community consensus for such an
invasive change."  –Pieter Wuille


Different ways to encode Bitcoin Address

What you're talking about is actually two separate concepts. A "Bitcoin Address" is not a keypair, it does not have public and private components. The Address is derived from the public portion of the key pair and is almost always expressed as a Base58 string.

Firstbits is merely a way to look up addresses. When you enter someone's "firstbits" address at firstbits.com, firstbits converts what you've entered to all lowercase characters and then looks through the block chain to find the first (chronological) occurrence of an address beginning with that string. You can't send coins to my firstbits address of "1enmaku" for example, but plugging that into the search box will produce an address "1EnmakuaAN1WgAK2tUFvmsYcKc3NvH3NML" which is valid.

The others mentioned are all methods of expressing the private key. An address represents a receiving address, but the private key represents the right to claim coins at that address. A private key is a 256-bit number which can be represented in many ways. The most common way is WIF or "wallet import format" which is a 51-character string in Base58 which always begins with the number 5 and has some built-in error checking.

The mini private key format is also seeing some widespread use such as in Casascius' physical bitcoins. Mini private key uses as few as 22 characters of the same Base58 encoding as Bitcoin standard addresses. There are some criticisms that the fewer number of characters represents a smaller number of bits, making these keys vulnerable to brute force attack, but even the smallest of them still represent a substantial amount of entropy.


Why I can transfer btc from unconfirmed balance?

Transactions spend outputs from other transactions. Just because the transaction hasn't been included in a block yet, doesn't mean it isn't valid. It's valid as long as it isn't a double spend, so spending unconfirmed transactions is all about trust and risk. If you trust that the transaction is not going to be double spent (e.g. it's your own transaction) or its relatively low risk (e.g. small amount being sent), you can safely spend from it. If it's higher risk, though,
 (e.g. larger payment), it is safer to wait for it to be included in a block to reduce the chance of it being double spent and invalidated. If the unconfirmed transaction becomes invalid, so does it's child.


Bitcoin has rules without rulers.
Bitcoin has many groups of people who independently write software that implements those rules.
Software
There are many different groups of people who independently create Bitcoin software. For example there are many different wallet programs/apps.
The developers of any piece of software usually don't have the ability to force users of that software to upgrade. However such users are reliant on the honesty of the developers if they can't download and inspect the source code themselves. Many people rely on open-source software because it does mean ordinary users can inspect the code and verify that the software can be compiled from that code. Most users probably do assume that someone else will have done this and will let the world know of any malicious code.
When you choose to use a website or choose to install a Bitcoin program or app it is important that you are vigilant and diligently check the credibility of the source and the authenticity of the websites or programs.
Rules
There is no single person or organisation with the power to make changes to the Bitcoin network.
There is an open process for proposing changes to the Bitcoin rules but no-one has the power to force other people to adopt those proposed changes.

if there was a major bug discovered in the Bitcoin architecture, there is someone who would have the power to push an update and fix it.

No.
There are a group of people who could propose a fix. They cannot force anyone to implement the fix and cannot force people to upgrade to the fixed version.

I assume that they could also make changes for malicious purposes.

Proposals for rule changes that are malicious would quickly be seen because the whole proposal process is public. There are many different participants with a huge financial incentive to see that the rules are not malicious.
The developers of a closed-source wallet program or custodial-wallet service could make malicious changes. They could only affect their own software and not directly affect people using other software. This is one reason why those categories of software (closed-source and custodial) are regarded as the least trustworthy.
The nearest cases to this that I know of are

Multiple failures of custodial services (exchanges etc) where theft or fraud has occurred. MtGox, Quadriga-CX etc.
Fake wallets such as the Electrum hack a few years ago.

Who has the power to make changes to the Bitcoin architecture

You or I could propose a change. We would have to provide a well-reasoned case supported by evidence in order to convince many other independent groups of people in many countries to support and adopt that change.

Could they turn of the Bitcoin system completely?

No.
Even if you could somehow infiltrate and make several software products stop
working, people with other software would be unaffected and affected people would switch to unaffected software. Any damage made by malicious software to the "blockchain" public replicated journal of transactions would be ignored or undone by unaffected software. The malicious software and its damaged blockchain would form an unused fork.


Which wallets belong to Satoshi Nakamoto?

No real way to tell that Satoshi indeed owns wallets (unless he sends a signed message).
You can assume which blocks he mined and therefore his wallets like so.
http://bitslog.wordpress.com/2013/04/17/the-well-deserved-fortune-of-satoshi-nakamoto/


How can I generate more coins while mining on PoS?

Yes, you have to have client with all your coins open with your private keys and have it sitting on online machine.

See Proof Of Stake Details section for NXT


How bitcoin nodes update UTXO set when their latests blocks are replaced?

Bitcoin Core since v0.8 maintains "undo files" that contain the information necessary to undo the effect of a block on the UTXO set.

In a way you can see blocks as authenticated patches to be applied to the UTXO set; they list new outputs to be added, and which inputs to be spent. In order to support rolling back the UTXO set, undo blocks are created as a side effect of validation: structures that contain the UTXOs that were spent. When rolling back, the undo files are applied in reverse order.


Import bitcoin core generated multisig public address to electrum multisig wallet for watch(2/3) and sign(1/3)

As you were told on bitcoin talk forum you can't import arbitrary private or public keys and create a multisig setup with them using electrum. It only supports using extended private and public keys or seed words for this functionality.

If you just want to create a watch only wallet with the address itself then you can do that. Go to file > new/restore, enter a unique filename and click next and when asked what type of wallet you want to create choose the option to "import bitcoin addresses or private keys". Then paste in the address in the next step and proceed with on-screen instructions for the rest. This will let you watch transactions relevant to this address but you won't be able to sign any outgoing transactions.


That's a paper wallet. Search for that. bitaddress.org or paperwallet.com are examples.

The way you intend to use it basically comes down to printing the private key part of a bitcoin wallet and giving that to someone else. Another use would be putting it in a safe so you can't get hacked.


Do miners have both the incentive and ability to keep the reward at 50BTC?

It's not just about the miners, it is also about people using bitcoin. If miners decide to fork the chain and keep block bounty at 50btc, they cannot use those bitcoins in any place where people have not also modified their non-mining bitcoin client. Protocol changes are not just about >50% of miners, but about >50% of user clients.

In this case, since users do not have any incentive to modify their clients to treat the new fork as legitimate, rather than the original rules fork, any miner that decides to spend his resources mining the new "50 btc forever" fork is just going to be wasting time, since he will not be able to spend his coins anywhere; they'll be rejected as illegitimate by users, merchants, exchanges, etc.


bitcoind: cannot obtain a lock on wallet directory

Make sure that there is no other instance of Bitcoin Core running on your system. Once you are absolutely sure that nothing else is using the data directory, delete the files named .lock and .walletlock within it. Then start Bitcoin Core.


call to bip39_mnemonic_from_bytes in libwally-core returns NULL

There are a few problems, you are passing mnemonic_secret incorrectly resulting in the API call getting a NULL pointer hence returning WALLY_EINVAL. Here is a corrected version, although note that your myArray is still the wrong size:

#include <stdio.h>
#include <wally_bip39.h>

int main()
{
    /* Note that this array is 34 elements long which seems incorrect, it should be 32 */
    const unsigned char myArray[] = { 0x00, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22, 0x11, 0x22,  0x33 };
    char *mnemonic_secret;

    int ret = bip39_mnemonic_from_bytes(0, myArray, 32, &mnemonic_secret);
    if (ret != WALLY_OK) {
        printf("mnemonic did not work. error: %d",ret);
        return 1;
    }
    printf("HSM: your should remember / write down the following words do recover your funds!\n");
    printf("%s", mnemonic_secret);
    wally_free_string(mnemonic_secret);
    return 0;
}

You may get a faster response with wally question by asking on their github at https://github.com/elementsproject/libwally-core.


Bitcoin Core full node wallet - questions about security & recovery

1) Which secure full node wallet implementations exist? Currently I just know of bitcoin core. Is there not any other one with a GUI?

I don't know of any others, apart from forks of Bitcoin Core like Knots. See https://bitcoin.org for an overview of various types of wallet software.

  2) Can you use a Ledger device with those full node wallets?

Yes, though it is a complex manual process using command-line tools for now.

  3) Many wallet apps like "Ledger Live" use their own servers for transaction verification. What is the case if you use a full node wallet like Bitcoin Core? Whose servers are you pinging there during transactions?

Bitcoin Core is a full node that does not rely on any trusted services. The built-in wallet in Bitcoin Core (or any other wallet you'd connect to it) is solely querying your own node.

The node of course needs peers to download blocks and transactions from, but all it needs is one honest peer. As all data is locally verified it does not matter if your peers are trying to mislead you.

  4) Can the bitcoin core wallet censor in any way your transactions, hide them or simulate, prolong them?

If the software you yourself use is malicious it can do anything, including censoring your transactions or stealing your coins. Bitcoin Core is open source, and many eyes review all changes in it, but you have to make sure to use the official Bitcoin Core binaries from https://bitcoincore.org (or https://bitcoin.org), and verify the signatures (see instructions on those sites for doing so), to prevent someone from giving you a modified version.

  5) In bitcoin core, how is the funds recovery mechanism? Is it "Hierarchical Deterministic", can you you always restore your funds with a 24word mnemonic (also by other HD wallets)?

It uses BIP32 derivation internally, so keys and addresses are deterministic. There is no seed phrase; you need to make a backup of its wallet.dat file.

  6) If someone for example gets access to your computer where your bitcoin core wallet is installed on, would this person be able to freely access the wallet and transact with it? What security mechanisms are in place for that scenario?

You can protect a Bitcoin Core wallet with an encryption passphrase. Nobody can send funds away without access to the passphrase. Note that there is no way to recover: if you lose the passphrase your coins are irrecoverably lost.

  7) How can you restore funds with bitcoin core when you lost your computer where the wallet was installed on? Which different recovery options exist?
  Is bitcoin core wallet compatible with this recovery mechanism listed in github: https://github.com/iancoleman/bip39

You restore the wallet.dat file from backup. No other options are supported.


How to execute bitcoin transactions in a decentralized way?

What you're asking for is called Oracle and as we speak there are no perfect implementations of it. It's an ongoing problem to be solved for example it's hard to weed out false information. I advise you to read more about it outside this forum.


Why does Ripple use Blockchain technology in the first place?

This is a very good question. The simple answer is marketing. Technically, a standard database would have been much more efficient in achieving the same. However, there would have been even less reason to invent a token (XRP), you couldn't have found them on coinmarketcap, and they couldn't call it blockchain. So no billions for the founders.


How to accept payments with Blockchain in PHP

Since you say "sort of a BitPay system", I assume you don't want to use BitPay.

You can start with dissecting some of the work people have done in the space on repositories such as bitwasp or bitcoin-php. This is probably more than you need, however the building blocks are there for what you want to do if you wanted all of the logic to live in php.

If you want to actually generate addresses, here is a good place to start.

Here's a quick stab at a workflow that I think would be pretty straightforward to develop.

User enters value in their currency.
Querying an exchange rate table such as the one on Blockchain.info, display the amount in Bitcoin.
You could generate a QR code using PHP QR as well as displaying a link to click/address to copy/paste, then verify that the transaction was completed using Blockchain.info or something else.

Or.... you could just use Blockchain.info's free tool, but I assume you have a reason why you want to build your own solution.

In the case that I'm mistaken and you do actually want to use BitPay, you would probably use either the Bill or the Invoice method of the BitPay API.


A GPU miner does not have sufficient speed to satisfy the minimum difficulty requirements of pooled mining today (which is why it shows as offline). GPUs have been completely obsoleted since 2013, this is unlikely to change for the better, even if you find valid shares you will have spent several orders of magnitude more in power than it is worth.


Threat probability? 1 state controls >70% of miners. Other states go to war with them

China has dominated mining due to cheap power and hardware expertise. However, other than mining the US has been much friendlier to Bitcoin companies, startups, investors, open source developers etc than China. In addition, there are recent US based mining initiatives to attempt to decentralize mining and reduce Chinese dominance. A decentralized and censorship resistant protocol does not gel particularly well with China's surveillance and Great Firewall philosophy to digital communications and its renminbi currency controls.
With regards to probabilities, obviously no one can quote probabilities because it is purely speculative. It seems to me though that the probability of the US government banning Bitcoin or in some way attempting to destroy it via multi m/billion dollar attacks is extremely small (especially for the suggested motivation of hurting China). China holds over a trillion dollars of US government debt denominated in dollars which massively dwarfs any Bitcoin it may hold. Fiat currency wars and monetary policy are far more impactful than any attempt to devalue a country's Bitcoin holdings. The majority of attacks on the network would only achieve short term disruption at best and would be very costly when compared to using that investment to generate Bitcoin block rewards.
The US regulates the fiat to Bitcoin onramps and may seek to impose more burdensome regulation. However, it has funded and put in place a regulatory regime that has allowed internet companies to thrive over the past two decades and there is little reason for it to not to do the same for Bitcoin.


What will happen to bitcoin if the world population increases?

The amount of bitcion in circulation does not increase or decrease based on human population.  So, yes, it will likely be distributed more sparsely among people if the world's population increases.

However, bitcoin is only divisible to 8 decimal places, and your example uses 10.  It's also difficult to say what role Bitcoin will play as far as global currencies go, so it is unwise to assume that an amount as small as 0.00000001 will be equivalent to a modern day yearly salary (or whether Bitcoin will be used for salaries at all).  Speculation like that is off topic in this forum, which is why you've received some close votes.


Can Segregated Witness function in an Emergent Consensus environment?

Technically, there is no reason why the two protocol upgrades couldn't be added to a blockchain in combination. Obviously, they would have to be amended for compatibility in their treatment of blockweight/blocksize. The perceived incompatibility mostly stems from the radically opposed visions the two developer teams appear to have regarding the scaling roadmap of Bitcoin.

SegWit was especially engineered to provide a capacity increase in a way that does not require a hard fork. Many of its proponents appear to expect a hardfork to permanently split the Bitcoin network.

The Emergent Consensus proponents on the other hand appear to take the position that hardforks are preferable to softforks or at least perceive them as much less risky.

Neither of the teams appears to perceive the other proposal as a priority for inclusion into the codebase. A bridge proposal was provided by means of the "BitcoinEC" client that patched the Emergent Consensus feature on top of Bitcoin Core 0.14 which doesn't appear to be maintained anymore though.


How to raise the bad-txns-vout-negative error?

The createrawtransaction command will do a sanity check of the arguments and return the Amount out of range error if the value is not >= 0 and <= 21000000 * 10e7, so that you don't shoot yourself in the foot.
You need to craft the invalid on your own, you can see an example of precisely what you are trying to achieve in the functional test suite (which uses python-bitcoinlib).


If I buy a house for Bitcoin directly, do I owe the government taxes in Bitcoin or in fiat?

I am not expert in US law, but I have understading of taxes in my local country and general principles.
In general, transactions and taxes are made in local currency, unless it is external trade, financial (like currency exchange) or other operation allowed by local tax/economic laws. Even if transaction is made in foreign currency, it is treated for tax purposes in local currency (converting foreign currency to local at the day of transaction).
In your example there is 99,99% probability that you will pay taxes in fiat currency after buying home. The exact amount depends on the value of bitcoin in the day of transaction. For example, if you by a house at 1 June for 1 bitcoin in the US, then the price of that home is converted to USD, and that sum is later used in calculating taxes.
However, not all jurisdictions currently allow to contract (setting price) in bitcoin for all assets. For example, in your country you can buy bitcoin at local exchange, but you cannot buy a house with bitcoin. However, you can still write buying agreement quoting local currency, paying in bitcoins and signing additional document with the seller regarding that transaction occured in bitcoin in the amount equivalent to price in local currency (this document is equivalent for bank recepeit for local currency). Still, such agreement may not be recognized by local authorities and declared as void.
Regarding the demand for fiat currency. In your example Sue will have to sell some amount of bitcoin to pay taxes. Unless the tax rate is not 100% (which in nonsense) the loop is not eternal.


Bitcoin mining question about hashrate helping you exponentially

That seems to good to be true and probably is a scam. The word 'exponentially' is being used with no regard to what it really means.

To mine 'exponentially' more coins you have to have 'exponentially' more hashpower.


Bitcoin core: boostrap.dat trade-off with "Synchronizing with network..."

the minimum amount(?) necessary to begin secure operation

Letting Bitcoin Core synchronize on its own will do the following:

Download block headers in packages of 2,000 and quickly rebuild the chain of headers for a total less than 50 MiB
Request multiple block bodies in parallel from several peer nodes
Validate blocks in order as they finish downloading including all transactions they contain

For the last 50 weeks that would cause Bitcoin Core to download and validate about 35 GiB of data.

Synchronizing from the bootstrap.dat you download the complete blockchain first, then rebuild the blockchain from scratch.
This means that you have to

download more data (78 GiB instead of 35 GiB)
have to validate blocks of more than four years instead of 50 weeks
and delay the validation until after the download is complete instead of validating while downloading already.

It seems to me that unless the download speed from the peers is the bottleneck for you, letting Bitcoin Core synchronize on its own will be quicker. On my fairly new computer the bottleneck is the validation and not the download.


bitcoin core what is it all about does it make my desktop a server

when my bitcoin core finishes synchronizing does it make my desktop to be like blockchain.nfo where people can create wallets.
and must i be online always.

No.
Bitcoin Core is purely a wallet, mostly for personal use.
When bitcoin core syncs it means it is downloading previous blocks / blocks that have ""happend"" while bitcoin core had no access to internet.

apart from that does it mean i have all the bitcoin history from 2009 till date on my hard drive

Yes. It does mean you have all bitcoin transacations and blocks since 2009 on your computer.

if my hard drive is compromised does it put all the bitcoin core information in my desktop at risk

It shouldn't if you have your wallet encrypted, otherwise, yes.


The cards don't need to be identical. Your mining software should identify each GPU and allow you to control/use each one separately.


P2Pool Hardfork 14.0 where and when is it decided?

This has nothing to do with any proposed hard forks of Bitcoin.

The hard fork being referred to is internal to P2Pool, and has already happened.

P2Pool has something called a sharechain is parallel to Bitcoins blockchain, only using a 30 second block time rather than a 600 second block time. It is internally used for tracking mining progress in the pool, and ordering payouts. It has the same features as the Bitcoin one, in that it is completely in consensus between all the P2Pool nodes and has very specific rules for what is acceptable and what is not. Some rule altering is a hard fork, where previously invalid things become valid after the change.

The reason a hard fork needs to happen is that BIP66 enforcement will cause all subsequent version 2 blocks to be invalidated, anybody mining a version 2 block after this point in time will be throwing away money. P2Pool had to be internally hardforked to support version 3 blocks, or risk just burning all of the miners income on rejected blocks. This Bitcoin soft fork will happen very shortly, when the average version of the last 1000 blocks is 2.95, which is why P2Pool had to make such a drastic change in such a short period of time.

P2Pool is unlike all other centralized pools in its operation and management. Other pools simply updated their Bitcoin nodes to the latest version of the software and anyone mining with them accepted the soft fork by proxy.

  I have read on here that hardforks are a point where the pool with the biggest stick gets to decide which course the blockchain will take.

This is not correct. A hard fork is controlled by the users of the network, not the miners. The miners must mine blocks which the network views as acceptable, if they don't the nodes in the network will simply reject their (to the rules they have) invalid block and ban the peer that sent it to them.

  Has the hardfork only just begun?

There is no accepted proposal for a Bitcoin hard fork.


Is it possible to trace bitcoin ATM withdrawals?

That would depend on the owner/operator of the ATM, and your relationship with them.  Normally, you will need to register with a Bitcoin ATM company in order to use their machines.  This is so that the company can comply with local laws and regulations, just like exchanges need to comply.  Effectively, Bitcoin ATMs are not "automatic teller machines", but rather "automatic exchange machines".

By looking at the blockchain alone, it would be hard to determine whether a transaction was received by or sent from an ATM.  However, if the party operating the ATM were to open their records to whomever is tracking, then it would be trivial for them to report who used the ATM, where it was located, and the exchange rate you received at the time.

Basically, it's the same as using an exchange.


It is as you suspect: You can recover the public key knowing only the signature and the message. The recovery id byte in the signature is not strictly necessary as there's a brute force option, but it is included for efficiency.

There's an implementation of public key recovery in bitcoin core's secp256k1 library.


Why are there fees for arbitrage trading and wallet transfers?

Deciding which exchange to buy BTC from (and sell at a future date) I wondered if I could choose one with the best fees for buying and a separate one with the best fees for selling and if this is even allowed.

Sure, but you'll have to use the blockchain to transfer the bitcoin from one exchange to the other.

It is as I read in other threads but there seemed to be a fee for this type of operation. I thought when you bought BTC from an exchange it would be exactly the same BTC (not a wrapper instrument) as if you bought it from any other exchange. How could there be extra fees if the exchanges themselves can't tell where the BTC in your wallet came from?

There's a fee for executing a transaction on the blockchain. Exchanges typically impose this as a "withdrawal" fee. They don't care where you're withdrawing from or where your deposits come from. But those transactions do have a fee associated with them.

I also struggle to understand why there would be fees to transfer BTC from one wallet to another. A wallet AFAIK just stores private keys, anyone in possession of those keys (like yourself) could just register in another wallet and use that private key to transfer the BTC to your second wallet. I'm sure there's a hole in my reasoning somewhere.

Right, so to transfer the bitcoin from one wallet to another wallet, the private key that authorizes their transfer has to be changed from one custodied by one wallet to one custodied by the other wallet. Only the blockchain can do that.
It is impossible for an exchange to assign separate private keys to every user to minimize fees. In fact, such a setup would maximize fees because every transfer of bitcoin balances between users on the same exchange would result in a blockchain transfer.
For example, say I deposit one bitcoin, then sell it to Alice who sells it to Bob who then sells it to Charlie. If the private key securing that bitcoin had to change each time, then each of these exchanges would require processing a transaction on the bitcoin blockchain. That would be much more expensive than executing blockchain transactions only on withdrawals.


checking from https://hastebin.com/raw/imodonelic

static void test_sig ( )
{
  const MyKey32 prv ( QByteArray::fromHex ( "39f8ca6c7e7c05aaf9c97e3253fd4c688730b4404d0f502441eb3aacea01b569" ) );
  const MyByteArray pub ( prv.getPublicKeyCompressed ( ) );
  const MyByteArray sig ( QByteArray::fromHex ( "3045022100aecf494d10f3696809972bad0546a7ea65802ebc40dd1f369185fd52eac016c902201b35692e40d6edb21c422a735f217d028da5f14447ccb31c27aec56ee26b426e" ) );
  const MyByteArray dat ( QByteArray::fromHex ( "0200000001f8f9599fc41346a68507bfbdb26b06af464d20ef709075660657b29b7bc6136c01000000000000000002d5b4eb050000000017a914064ebb4529c5cade492e1790ae1f19943e0c6bfd87d2100a000000000017a914064ebb4529c5cade492e1790ae1f19943e0c6bfd870000000001000000" ) );
  qDebug ( ) << "prv =" << prv.toHex ( ).constData ( );
  qDebug ( ) << "pub =" << pub.toHex ( ).constData ( );
  const MyKey32 digest ( dat.sha256d ( ) );
  qDebug ( ) << "hash=" << digest.toHex ( ).constData ( );
  qDebug ( ) << "your values=" << ( digest.verify ( pub, sig ) ? "passed" : "failed" );

// now create correct values

  const MyKey20 addr ( prv.getAddressHashCompressed ( ) );
  MyByteArray csig;
  MyByteArray cpub;
  prv.signHash ( addr, digest, csig, cpub );
  qDebug ( ) << "sig=" << csig.toHex ( ).constData ( );
  qDebug ( ) << "pub=" << cpub.toHex ( ).constData ( );
  qDebug ( ) << "my values=" << ( digest.verify ( cpub, csig ) ? "passed" : "failed" );
}

The output is:

prv = 39f8ca6c7e7c05aaf9c97e3253fd4c688730b4404d0f502441eb3aacea01b569
pub = 02118805dc4fc1bc36c86a606e760fcc3875e215b88306cca33cd549d3d5668339
hash= cc8fc76706ec95500d170cc01e915725e3c35979b00c27e8638b2ef3399f3ce1
your values= failed
sig= 30430220683555525c15dfc685580824d172890d16f24a996fa37ad4cd22d1a49ff61510021f60d78601ed827e0d46fe8043cbc36f054f4a9cb96c481714b8b6d21575d336
pub= 02118805dc4fc1bc36c86a606e760fcc3875e215b88306cca33cd549d3d5668339
my values= passed

Note: my code does not use dECDSA


Duplicate addresses in transaction possible?

A transaction can have several inputs come from a single address and can have several outputs go to the same address.

It is also possible that there are more inputs in that same address and that they're spent in a different transaction or that money is sent to addresses which have already been used (and may or may not still hold money).

You may also want to have a look at this when coming up with data structures: https://en.bitcoin.it/wiki/Transaction_Malleability


How are messages exactly sent in bitcoin p2p protocol

I got the answer myself. Sorry!

The src/net.cpp has this logic which explains all:

void CNode::BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend)
{
    ENTER_CRITICAL_SECTION(cs_vSend);
    assert(ssSend.size() == 0);
    ssSend << CMessageHeader(Params().MessageStart(), pszCommand, 0);
    LogPrint("net", "sending: %s ", SanitizeString(pszCommand));
}


Can cryptocurrencies be liberated from the menace of exchanges?

There are decentralized exchanges that will launch soon such as Bisq or Coinffeine.