I tried to recover the public key from the signature, but I failed

What i missed?

You are hashing sigHash (ie. the already hashed message) with SHA1 and then recover public key using that result which will give you 03519e33c6b146628b4010ae2b56aa9127ae9b795c82df021979436296daf4ccea as the recovered public key (can't re-calculate the second one with my c# code)! I believe that this is the source code of the from_public_key_recovery function you are using. You probably have to use another function like from_public_key_recovery_with_digest


Is there an Android app that will scan a QR code and show the balance?

To get the balance and list of transactions you could do an HTTP get to blockchain.info. E.g:

http://blockchain.info/address/17w9uVZuPgsY7iLBVGB7qTZ1ZiZnTJKHLq


Mining Primecoin with one server and no pool?

pooledtx is likely the number of transactions that are waiting to be confirmed by the next block. These transactions are broadcast to the network and the miners collect them to include them in a block. Since primecoin still has a really low amount of transactions and since your mining a reward transaction this will swing between 1 (just your reward transaction) and 2 (someone just made a transfer).

Since you have a fully fledged primecoin client on your system to be able to mine (primecoind) it will also generate new addresses on demand, and the balance will be credited to those addresses. with primecoind listtransactions you'll see which addresses received the mined amount. You can now use primecoin sendtoaddress <primecoinaddress> <amount> to send any amount to an external address, i.e. your multibit client.


Does the BTC-e API have a method to transfer bitcoins?

As of July, on the wiki entry about them, they do not seem to have an API endpoint for "withdraw".

Source:

https://en.bitcoin.it/wiki/BTC-E#Withdraw_options
https://btc-e.com/api/documentation

I'm sure it would be helpful for arbitrage reasons.


In what order do new blocks get processed?

First to clarify:
Two competing blocks at the same height that build on the same parent block always have the same amount of proof of work, as that depends on the difficulty, which will be the same for both competitors.

Thus, a chain reorganization will only occur in practice if a competing chain tip pulls ahead of a previously accepted chain tip by accumulating a greater length.*

Bitcoin Core stores competing blocks it receives as a sidebranch, if the headers would potentially make it the best chain. Otherwise it discards them.

When chain reorganization occurs, Bitcoin Core will undo each block from the tip one at a time, reverting back to the common ancestor with the new best chain, then will apply the blocks in the new best chain one at a time until it is at the new tip.

* It is possible to construct a case around a difficulty change where competing chain tips have different difficulties at the same height. Then, the one with the higher difficulty would replace the one with lower difficulty at the same height. However, that would require a chain split of more than one block length.


Transaction unconfirmed for 5 days, and I don't think the fee is the problem?

The fee you have set leads a "fee per byte" value of ~20 satoshi/byte, as you can see on the blockchain.info. It's too small currently, as transactions with fees lesser than 60 sat/B doesn't seem to be trusted to clear right now, as you may see here: bitcoinfees.21.co. I could help you with clearing it, but I'm pretty sure the thread about it already exists here. The problem is likely solvable, good luck.


What happens if Bitcoins are sent to a wrong, randomly generated address?

Well, you don't need different addresses for sending and receiving bitcoins. In fact, you don't have to worry about addresses at all. The Bitcoin client will create addresses when you need one for receiving payments and it will automatically send bitcoins using one of the addresses you previously received coins with.

If you generated the address on bitaddress.org without saving the private key, your coins are lost. The situation may occur that sometime in the future someone will create a new key that's the same as yours and be able to spend your lost coins, but that's extremely unlikely.

If you did save the private keys and you are using the original Bitcoin client (bitcoind or Bitcoin-Qt), you can import the private key as follows:

Close the client that is running. Either close the Bitcoin-Qt client or typing bitcoind stop.
Start bitcoind as a daemon using the command bitcoind -daemon. (If it gives the error that you need to add RPC user details to your bitcoin.conf file, do so, but also add rpcallowip=127.0.0.1 for security.)
If you wallet is secured with a passphrase, unlock it with <space>bitcoind walletpassphrase <your passphrase> 120 The space is for not saving your passphrase into the command history.
Import the private key: <space>bitcoind importprivkey "<your private key>" "<label for key>". (Again the space is for security.)
The private key is now imported in your wallet. You can now lock it again and close the daemon: bitcoind walletlock and bitcoind stop.
You can now reopen Bitcoin-Qt to see the address added.

Then, this answer tells you how to easily add new addresses for receiving bitcoins.


What will be happen if 21 million of bitcoins become the property of one?

It's entirely up to the people living at this hypothetical future point.  There's no current rule about what happens.  Maybe when this happens, people are tired of Bitcoin, so they go back to trading seashells.  Or maybe when this happens, there's something better than Bitcoin available, so they all switch to that.  Or maybe they just restart Bitcoin and start mining again.

Remember that Bitcoin is a consensus system. Each user can change the software to do whatever he wants it to do.  If enough people all run the same software, and that software is designed to converge on a consensus block chain, all of those people will have the same block chain---even if it isn't the same block chain we use today.  Whatever rules we use today can be changed by people in the future (including our future selves), so there's no risk of ever permanently locking ourselves out of the block chain.


Unable to replicate block header validation errors: time-too-old and time-too-new

Since you say you are changing your OS clock, I am assuming you are using Bitcoin Core's built in miner for regtest. This miner will try to not produce invalid blocks.

To avoid the time-too-old failure, it will take the maximum between the median time + 1, and the network adjusted time (which is basically OS time). So when you set the clock too far back, it will end up creating a block that is 1 second ahead of the median time which is valid.

You aren't getting the time-too-new error because Bitcoin Core is using the system time in that check, not median time. A block that is too new will become valid after time has passed. So it uses the OS time for that check, not median time. As such, when you set your OS clock 3 hours in the future, it produces a block with a timestamp 3 hours in the future and compares that to the OS clock which is also 3 hours in the future. This comparison finds that the block is not too new, so it does not fail.

In order to test these specific errors, you need to implement your own miner to produce blocks with the parameters that you want to use. Bitcoin Core's test suite has an independent miner in python which is how these specific failures are tested.


How does "headers first" affect BLKxxxx.dat structure?

To the best of my understanding, it's just that the blocks are stored in a different order. Headers first synchronization makes use of parallel downloads and the blocks are downloaded (and then stored) out of order. It used to be the case in older versions that blocks were downloaded and then stored in order, so that's whey they added the comment to the README.

I believe it doesn't change the structure of how any individual block is stored, just that they are now likely to not be in the proper order.


The simplest form of it called Finney attack, named for Hal Finney who first described it. The attack is variation of a double-spend attack involving accepting 0-confirmation transactions.

An attacker would generate a valid block but will not broadcast it, and then broadcast transaction A as a payment for a good or service. A merchant will see transaction A with nothing conflicting with it and accept the 0-confirmation transaction. Right after that the attacker would broadcast the generated block with transaction B which will conflict with transaction A, the Bitcoin network will accept his block and invalidate transaction A.

The attack is quite costly because there is a time gap between generation of the block by the attacker and completing transaction A, during which someone else on the network could generate a valid block and broadcast it, thus invalidating the valid block generated by attacker. Therefore it is practical only if the merchant sells the product online and it could be release immediately, e.g. a key for a software product.

A general form of this attack was described by Satoshi Nakamoto: White Paper, section 11. In theory, an attacker could pre-generate any number of blocks, e.g. if a merchant requires 1 confirmation before releasing a product an attacker would pre-generate 2 blocks ahead of the network and only then broadcast transaction A to double spend. But with each block the cost increases exponentially, and the practice of accepting 6 confirmations before releasing the purchase makes this attack possible only in case where the attacker has close to 50% of network hash rate or more.


Will 64-bit miners work on 32-bit machines?

When you run 32-bit versions of software on 64-bit systems in Windows the applications are executed a bit slower than they would in a 32-bit system mainly because of the WoW64 subsystem that emulates the 32-bit environment.

On top of that, if your mining software requires lots of physical memory, the 4 GB barrier on the 32-bit architecture (or the 32-bit version of the software running in WoW64) would result in disk swapping for the required but not-available physical memory, which would significantly slow down the whole process especially if your system does not run on SSD disks.

Also note that, although it's rare, it's still possible that the 64-bit version of a program can actually be slower than its 32-bit version, and this occurs in low quality software where data variables are being represented by the biggest-in-size variable types while they shouldn't, which in turn results in the increase of the sizes of pointers that live in the system’s physical memory and from that point on memory swapping is just a few steps away.

So, no, you shouldn't use the same version of software across all your machines.


What is a good analogy (which a layperson would understand) for the process of Bitcoin mining?

I wrote a blog post called Bitcoin by Analogy that captures the best analogy I've seen for explaining Bitcoin:

The nation of Yap in the South Pacific uses a unique form of money called Rai stones, which are circular disks carved out of limestone, with a hole in the middle, that can be up to 12 feet in diameter and weigh up to 8,800 lbs!

Trading stones of this size is difficult: no one wants to cart around a 4 ton stone every time they make a purchase. As a result, the Yapese came up with a clever solution: they decided to determine ownership by verbal agreement. Whenever there was a trade, the parties involved would communicate to the rest of the tribe the amount of stone that had been exchanged. The stones wouldn't actually move from one house to another, but the knowledge of who owned what was memorized and handed down through oral history.

It turns out that this model of money is an excellent analogy for Bitcoin: the ownership of money is determined through collective memory (similar to Bitcoin's global ledger, known as the block chain), money is exchanged by telling everyone in the village about transactions (much like sending out messages in Bitcoin for each transfer), and new money enters the system through the time consuming and randomized process of mining (Bitcoins are created through digital mining).

It's a fairly long blog post, so I'm not sure it makes sense to copy it here; see Bitcoin by Analogy for the rest of the explanation.


Why did the lightning network implement a gossip protocol?

The main idea of Lightening Network is to make the Transactions as fast as possible and to solve blockchain Network scalability issues. Whereas the main essence of the Gossip protocol is that each participant randomly selects a peer and exchanges state. As it can be seen that  Gossip approach is converging in O(logN) gossip rounds where N is the number of participants. Whereas communication on off-chain Network is only O(1) hence reducing the space on the blockchain. Applying Gossip protocol to the lightening Network on defeats the property of 'Lightening' and makes the network massively less scalable. Hope you like the answer.


Which pooled mining scheme is better in terms of constant mining?

I think it will roughly (~1%) be the same, otherwise no-one would stay at Slush or GHash.IO, if one of them has obvious lower rewards. In your previous question I answered that there are differences in the way your share is calculated, and thus the reward changes. But because you don't want to hop pools, score will be the same as PPLNS. Otherwise you can try to mine a week in both pools, and see the reward you get in both pools. I think it is best to try it yourself. You get bitcoin in return, so it is not for nothing.

I'm not sure how the disconnection works with the score-system, but I think PPLNS wins on that area, because you won't get penalised. IN PPLNS you'll just get paid for each share you contribute. So if you mine 100 shares/hour, and you are offline 6 hours, you'll miss 600 shares. Depending on the btc/share, that exact amount of btc is what you miss during your offline time.


you subscribe to the wss feed you can see most the subsecond stuff is opening and canceling limit orders which doesn't effect the ticket price. Only market orders represent the exchange of bitcoin. Market orders are liquidity takers so get a fee. They represent actual market movement. The limit orders often will never get matched. I often market orders may only come in every minute to five minutes under normal trading atmosphere. So ticker price more constant. Hope this help.


Is BTC and Crypto Currency Illegal in USA

The United States government has specifically stated that Bitcoins are not inherently illegal and have legal uses. You can find this both in the new FinCEN guidance and in the legal documents submitted in the Ross Ulbricht case.

See, for example, pages 12 and 13 of this complaint: "Bitcoins are not illegal in and of themselves and have known legitimate uses."


At which stage is a transaction validated?

@James C.'s answer is correct, but I'll add a bit to address your two questions specifically:

  Whether while each node receives the transaction ?. Is it the stage , requires 51 % confirmation to validate the transaction?

No, each node acts independently, and there is no way to measure what percentage of them have accepted a transaction as valid. Because of this, whether or not a transaction is valid has no bearing on its permanence or place in the blockchain record, it is simply a yes/no check on whether the transaction is valid according to the network's rules. Invalid transactions will of course be rejected by the nodes, and thus not relayed through the network.

Any valid transaction can then be included in a new block. Once that happens, the transaction is said to be 'confirmed', though it is prudent to wait for a few confirmations before considering a transaction to be finalized.

Notice the difference between 'validation' and 'confirmation'. It is possible for a valid transaction to never be confirmed in the blockchain (perhaps it has zero tx fees, or somehow is never relayed to a miner), but it is not possible for an invalid transaction to be confirmed.

  Otherwise at the stage , once miner found the nonce, he has to broadcast the transaction , other miners will verify the correct combination of nonce.In this stage , does miners need to verify the nonce along with the all the transactions in the block??

A miner will construct a block from valid transactions, and if a valid block is found, it will be relayed to the network. All other nodes and miners will check this block to ensure they have validated each of its parts. Similarly to transaction validation, invalid blocks will be rejected by the network's nodes.


As Bitcoin is a digital-specie currency, if it replaced all fiat currencies it would be the equivalent of reverting to a (digital) gold standard and can be answered in much the same way.

Firstly, a gold standard is deflationary. Explaining this again and again is tedious, so I'll summarise:

People provide goods or services to others and receive IOUs for other goods and services, redeemable on the rest of the world; this is the essence of money.
As more people interact and do so faster and faster, the money supply must expand to reflect the transaction volume; otherwise earlier unredeemed IOUs are worth more than new IOUs for the same goods and services.
A currency with a fixed limit (be it Satoshis or Gold atoms) will either not expand (everything has been mined) or will expand slower than the rate required by the economy for its money supply1.
Hence, either society cheats and detaches their promissory notes from an exact gold amount (fractional reserve banking and the like) and thus moves towards a fiat currency; or suffers the acute boom and bust cycles of purchasing power and liquidity depending on when hoarders hoard vs sell their stockpile. If you are that lucky. Strictly speaking, hoarders as rational actors would hoard forever and the entire economy would need to bootstrap from barter or a different currency.

Secondly, possession of a deflationary currency encourages hoarding if the society is forced to use only that currency.

A person with a large amount of deflationary currency will consider it an investment as its purchasing power will increase the longer they don't spend it (sell the IOU for goods and services). Everyone receiving the currency will do the same2. The economy slows down both directly through forgone purchases and indirectly through no investment in endeavours with a risk greater than zero.

  Wouldn't the effect of this be to make the wealthy extremely risk-averse?

The wealthy are already extremely risk-averse. This isn't as apparent in a fiat currency as those currencies reflect (however poorly due to manipulation) the underlying economy3 where inflation driven by productivity growth, population growth and the price/wage spiral requires equity to be put into risky investments that outpace inflation. Indeed this relentless hunt by the wealthy for places to park money without the risks of normal productive investment created the sub-prime mortgage and financial derivatives market. And the counter-reaction of deflationary cryptocurrencies, when in practice honest propagation of risk information would have prevented the same crash.

So yes, a deflationary currency would allow the wealthy to better express their existing risk aversion.

  Wouldn't this increase wealth inequality and make social mobility more difficult?

Yes.

Both inflation and deflation entrench existing wealth inequality as the countermeasures require discretionary wealth to begin with. But while inflation forces the rich to continuously re-inject their wealth into society to keep it4, deflation requires them to hoard their money unless they just want to give it away. A lower and middle classes (i.e. those without sufficient assets to thrive without working) must spend what they earn and thus are essentially subsidising the rich in a deflationary economy; at the cost of their own social mobility.

 1. A true post-growth society wouldn't need an expanding money supply. But then the key differences between specie and fiat currency would be irrelevant to an "economically static" society anyway. Money itself would simply be a token of energy or entropic appraisal with culturally-specific multipliers.
 2.  Except poor people living hand to mouth. Which is why widespread poverty is considered to be an excellent way to keep money circulating in an economy that would otherwise be deflating.
3. As more accurate currency price signals out-compete inaccurate signals over time due to exchange velocity and trustworthiness of face value; hence the slow and often belated but forward progression towards currencies that better reflect the global economy.
 4. This doesn't make them any poorer as they own, to use a trite Marxist phrase, the means of production. But it does circulate the money which is a good thing. Consider it the objective of lending the serfs ploughs to work their allotment instead of hoarding the ploughs uselessly in the castle.

Caveat:

There is no hard fixed requirement that Bitcoin remain a deflationary currency.

It is possible - though perhaps not likely - that exchanges and mining consortiums will transform  into (or be purchased as) off-blockchain central banks with the capacity to manage Bitcoins as a fractional reserve or outright fiat currency.

TL;DR

Yes and Yes + Caveat.


no output on gettxout method [All Blocks Are Counted]

Assuming this is identical to Bitcoin Core.
This is somewhat confusing, but it simply means that UTXO is spent. It is reporting "nothing" as output.


How to generate the public Nextcoin key (NXT)?

There is now a getAccountPublicKey API request. But as you indicated, the public key is shown prominently in the NXT reference client (NRS version 1.3.2 currently) when an account is first opened with a secret passphrase.

This public key can be used along with the account ID (which is derived from the public key) to fund the new account from another account, thus securing the new account by adding the public key to the blockchain. If a different secret passphrase were then to be used which results in the same account ID (such a collision being a distinct possibility), it could not open the account since its corresponding public key would be different from the one already stored in the blockchain.

The public key will no longer be displayed prominently in the NXT client, but it still can be viewed by sending a transaction, then clicking on the timestamp of the transaction as displayed in the client, then clicking on "Transaction Details". The first field in the pop-up window is "Sender Public Key".

If you are interested in the algorithm for computing the public key from the secret passphrase, refering to the Whitepaper:Nxt:

The secret passphrase is hashed with SHA256 to derive the account's
private key.
The private key is encrypted with Curve25519 to derive
the account's public key.


It is so easy to use Bither app.
Generating Coinbase bitcoin receiving Address
first of all you need to check your Coinbase bitcoin receiving wallet address which is shown by a QR-code (you can find out how, from here).
Sending fund
Then you should try scanning that QR-code by your Bither app. for doing it, you need to choose one of your wallet (from the middle menu which is indicated by a big B and showing total amount of your funds) then you should choose the preferred wallet. then use the send icon and scan QR code and type the amount go ahead and send funds.
caution
by the way, you should be aware of your transaction fees. Bither does not propose any offer automatically; so you should choose your own policy for transaction fee by monitoring mempool to get informed use this website to see which tx takes how long to get confirmed.


C# library for exploring Bitcoin Cash blockchain

Since "Bitcoin Cash" is a fork of Bitcoin Core, you should be able to use the BitcoinLib C# Library to interact with a Bitcoin Cash node.


Mac 0.80b beta - says "database corrupted" and then Bitcoin-Qt quit unexpectedly

Joric's fork of pywallet can read a wallet.dat, decrypt it with your pass phrase and then you can export the keys.  But if it is corrupted and Bitcoin-Qt can't read it then pywallet may fare no better.

Doesn't hurt to give it a try.


The online script check program that you are using to evaluate the script has numerous issues. First, there is a known issue of the software calculating the OP_HASH160 incorrectly. For example, the HASH160 of the public key that you have entered (the one starting with 04...) is 7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8 while the program is calculating it as 6DF13DE1F1D824380834E0D42E49E5E451A647CF. This results in a failed validation when the OP_EQUALVERIFY opcode runs.

The error derives from mishandling the hashing strings as ASCII instead of binary. By this I mean that the program is hashing the public key as a string rather than treating the public key as a hexadecimal number and hashing the bytes. Below is a python code of how the hashing should actually be done.

import hashlib

def hash160(payload_in_hex):
    payload_in_bytes = bytes.fromhex(payload_in_hex) # note this step
    payload_sha256 = hashlib.sha256(payload_in_bytes).digest()
    payload_sha256_ripemd160 = hashlib.new('ripemd160', payload_sha256).hexdigest()
    return payload_sha256_ripemd160

pub_key = '0484ecc0d46f1918b30928fa0e4ed99f16a0fb4fde0735e7ade8416ab9fe423cc5412336376789d172787ec3457eee41c04f4938de5cc17b4a10fa336a8d752adf'
hash160(pub_key)
>>> '7f9b1a7fb68d60c536c2fd8aeaa53a8f3cc025a8'

Secondly, the signature verification against a public key without knowing what message was signed is simply incorrect. This is resulting in the program accepting any signature for any given public key. For example just try the below script and it will show you that execution was successful.

aecd 0484ecc0d46f1918b30928fa0e4ed99f16a0fb4fde0735e7ade8416ab9fe423cc5412336376789d172787ec3457eee41c04f4938de5cc17b4a10fa336a8d752adf OP_CHECKSIG


Can someone explain what it is and why it's called Base58Check encoding?

Because of the name the function in the original Bitcoin codebase had.

The "Base58" refers to the fact that it is a base 58 format (it uses 58 different characters to encode the data), and the "Check" refers to the fact that a checksum is added to the encoded data.

  Are addresses generated without going over those steps still valid in Bitcoin?

It's complicated.

Base58Check is simply a way to encode a number of bytes of data into a string. In theory, if you find another way to construct a string that can be decoded by the Base58Check decoder to something with the right length and version byte, the result will indeed be a valid address.

I expect the answer to your question is no. You need to use something at least vaguely similar to a Base58Check encoder to end up with a valid address.

  To further this question, what do npm packages like bs58check do exactly?

It implements a way to convert bytes to Base58Check strings, and a way to convert such strings back to bytes.


Those nodes listed in chainparamsseeds.h are fallback seed nodes. They are not what Bitcoin Core uses by default to connect to the network, they are only used as a last resort if none of the other methods for finding nodes works.

Furthermore, the nodes listed there are seed nodes. This means that Bitcoin Core will connect to them briefly to get IP addresses of other nodes to connect to, and then disconnect from the seed node. They are not there to maintain full connections.

If you want to have a node connect to another node, use the addnode command.


1ML shows larger number of nodes comparing to other lightning network explorers

Let's start by ignoring the 1ml case. It is perfectly reasonable that the number of nodes differs a little bit as the gossip protocol takes some time to forward the information. In particular there  could be private nodes having a channel to the node that is used  by the explorers and they could include the knowledge about such a node in their  counting...

So why is 1 ml counting almost twice as many nodes? As it is closed source we can only guess. I observed that 1ml also depicts closed channels for a node. So I could imagine that the number of nodes shown by 1ml also includes nodes which existed in the past by counting all nodeids they have ever seen in their database instead of counting the nodes from the gossip store. I did not find such an example quickly. Also the gossip protocol specifies to remove channels if they close on chain but has as far as I rember no rule for removing nodes. Maybe 1ml uses a different / secret lighing implementation. That never drops nodes from their gossip store.


The default RPC port for bitcoind is 8332. Unless you've changed it with the -rpcport option, you should be connecting to that port instead.


My BCH is marked 'unspendable' in my Blockchain Wallet

Exactly! Just reset your wallet and then import your private key. It'll work like magic.


How does Lightning Network over TOR work?

Running lightning node over TOR is no different than running it over normal IP connection. Sending payment, fulfilling incoming payment, sending error messages etc. would happen in the exact same way in both cases. The only difference is that the above messages that you send to your peer will now happen over TOR network rather than a direct IP package.

If you are using only TOR without any public IP address then to route your payment to a node that is using only public IP address you will need to have a node in your path to the receiver that is (1) running TOR and public IP or (2) or running public IP and can connect to TOR nodes using the socks5 proxy. If you do not have this node in between you would not be able to send the payment.

When Tor service starts it creates a socks5 proxy which is by default at address 127.0.0.1:9050. If a node with public IP is started with the option --proxy=127.0.0.1:9050 (or including it in the config file) the node will be able to connect to nodes running TOR (like yours).

If you are running TOR and have a public IP address then you can directly connect with nodes that run tor or public IP nodes via the tor service socks5 proxy.

  I am the sender, but I enabled TOR in my node. How does sending to a node R outside TOR network looks like?

The network routing happens according to what I mentioned above. However, the path calculation for sending the payment to the receiver happens on your node so it does not involve what network routing you are using. You would construct the onion routing packet with the path to the receiver (the channels you will use to send the payment), and try to send this onion and the payment_hash to your peer via the update_add_htlc message. This message will then go over TOR nodes before reaching your peer, instead of a directly reaching your peer.

  I am the recipient node, and I do not advertise an IP address, but an onion address. How do I receive payments?

You can receive payments from nodes directly that are running TOR. If you want to receive payments from nodes that have only public IP, then you would need to have a node in your path that has the proxy option set so that it can connect to TOR nodes via socks5 proxy.

  The sender node S is a regular LN node, without any Tor connections. As a sender, I want to send a payment to node R and my LN node finds the best path to send my payment to R. Is it possible that this path will at any hop go thought Tor or go through onion node, because any of the nodes in the selected path happens to be onion or has access to Tor? And if yes, how the routing looks then?

Assume you the path from S to R looks like this: S -> T -> U -> V -> R. Number of cases can arise:

S and R do not run TOR: It depends

All the nodes could be on public IP and your payment goes through.
T could be node running public IP and TOR. It has a public IP channel with you, and TOR channel with U. U can then have a proxy option set that allow it to have TOR based channels with T and public IP channel with U. V is a public IP node and U routes payment to V in normal way.

R runs TOR: At least one node in between should run/understand TOR

T/U/V has a public IP, and have TOR so that they can make channels with TOR nodes and public IP nodes
T/U/V are all public IP nodes but V has a proxy option set which allows it to have a tor based channel connection with R.


Api to automatically check the status of a BTC transaction

Almost all block explorer APIs have this functionality among their transaction API calls. You should check out their API documentation for more details and see which one is easier for you to use.
Here is an example from blockcypher API using the first non-coinbase transaction of one of the latest blocks:
https://api.blockcypher.com/v1/btc/main/txs/ca1662e85e137fae3ec13dace7f4bf64801a1ebdc8433150566b2ae838498a8a
Response:

{
  ...
  "confirmations": 2,
  ...
}

If the transaction is still in the mempool (unconfirmed) the value above shows as 0.

Note that if the purpose is unimportant things such as showing donations using a block explorer is fine, otherwise if the purpose is receiving payments (eg. for a sale) it is a much better idea to use a different method such as running your own full or SPV node.


The height of a block is the number of blocks in the chain between it and the genesis block.  (So the genesis block has height 0.)

The height of the block chain is usually taken to be the height of the highest block, in the chain with greatest total difficulty; i.e. the length of the chain minus one.


Is the block timestamp reliable enough to timestamp the hash of a document?

A hard fork, which is essentially a blockchain split, would result in the current blockchain to be declared as deprecated and worst of all; not verifiable in the future by the new/upgraded software which will abide by different rules and will not be able to accept pre-fork blocks and their transactions as valid, so if the above scenario would come in life then you would need to legally prove that some contract existed a few years ago in a blockchain that is now deprecated and off-line, whose value would not be much different than this of digitally signed plain-old text document. As a consequence, to prove that smart contract which was associated with a certain tx in the old-chain was signed before a certain time would be even more difficult.

It's also important the precision of time you're after. If a few seconds or even few minutes could invalidate your claim then this will not work for you as geographically distant nodes will receive blocks at different micro-times, as it happens with all large-scale p2p networks.


How to operate bitcoin core .14 without downloading the entire blockchain with limited hard drive space of 50gb free?

If pruning is enabled, old blocks are deleted on the fly while new ones are being downloaded.

With -prune=550 (the minimum value), you're able to run Bitcoin Core v0.12+ with just a few GB of disk space.


Has Bitcoin Cores encryption wallet security ever been bypassable?

Bitcoin core weaknesses?

Bitcoin core wallet encryption uses AES-256-CBC. So far as I know this is still regarded as a good encryption system although people have identified potential issues with cipher-block-chaining (CBC)

Other likely weaknesses might include

Poor implementation in Bitcoin core.
Poor choice of passwords/passphrases by the end-user.
Poor protection against snooping of in-memory keys etc by Bitcoin core or the OS.
etc

I don't recall any major issue being reported so far. There are currently 0 security advisories. A quick scan of previous common vulnerabilities for wallet related vulnerabilities doesn't find anything.

A careful study of the release-notes or even change-logs for Bitcoin core might reveal the fixing of an exploitable weakness. A careful web-search might throw something up. I haven't found anything but have not spent any time on this.

Trezor weaknesses

Published weaknesses include

weak proof of genuineness with respect to cloning etc.
side-channel attack by measuring power consumption during PIN entry.
extracting private key or seed from flash memory ICs

These require physical access to the device.

These don't really translate well into possible attacks against bitcoin core.

If you run bitcoin core on a PC say, and an attacker gets physical access to your PC, your security is probably gone.

If I had bitcoin core on a PC and suspected someone malicious had had physical access to it, I'd burn the PC and everything it touched, buy a new PC and recreate the wallet from offline backups, then transfer all remaining funds to yet another new/fresh/clean wallet or wallets.


How to answer merchant who asks "What is Bitcoin?"

The simplest way to explain it is that it is an alternative currency.

Of course, this is just going to prompt more questions. So why not use a different example. Explain it like this:

"Bitcoin could be thought of as a commodity, like gold, that people purchase to invest it. Let's say I have a Gold Bullion coin worth USD 1,600, and you have a software program that costs USD 1,600. I could then offer to use my Gold Coin to buy your software program. I get the software program, you get the coin. You can then choose to sell the coin now for the USD 1,600, or you could hold on to it to see if its value appreciates."

Just my personal opinion. If merchants aren't already accepting Bitcoins, they probably won't start right away. However, explaining it to them could generate interest in the currency, so in the future they might start accepting it. Again, just my opinion!

Hope that helps!


I have the identifiers for my wallet, but I don't know how to access it

If your list of words is 12, 18, or 24 words long, it is likely a BIP 39 seed. This means that you should be able to access your Bitcoin by using any software that supports BIP 39 seeds (such as Electrum) and restoring your wallet from those words. Note that not all wallets that support BIP 39 will derive addresses in the same way; some derive them with a different derivation path so you may not necessarily see your Bitcoin and may have to use a different wallet. For most wallets though, it should work.

The exception is MultiBit HD. If you think you used MultiBit HD, you can only use MultiBit HD to restore the wallet. MultiBit HD will not be able to restore your Bitcoin if you a different wallet generated the seed (well technically it will restore, you just won't see any balance).


Is there a maximum size of a scriptSig/scriptPubKey?

10,000 bytes.  See Bitcoin Core source code: https://github.com/bitcoin/bitcoin/blob/v0.17.0/src/script/script.h#L31-L32
https://github.com/bitcoin/bitcoin/blob/v0.17.0/src/script/interpreter.cpp#L299-L300
Note that the EvalScript function only runs when someone tries to spend a script, so it doesn't apply to unspendable outputs like OP_RETURN.  In that case, the consensus rules allow you to include as much data as you want in the output up to the maximum block weight limit.  Bitcoin Core has long placed much more restrictive limits on what transactions it'll relay and mine when they contain OP_RETURN outputs, so we rarely see transactions exceeding those limits.


Is there a Shapeshift service for Testnet coins to convert Bitcoins to other Altcoin testnet coins?

Most testnet coins have a working faucet to obtain coins. Alternatively you can usually mine them with a CPU.


Can you combine 2 of 3 brain wallet addresses to form a multi-address?

I'm not familiar with warp wallet, but this can be done via Armory. First generate the brainwallet addresses. Second import the private keys into 3 different wallets in Armory. Third, create a lockbox using those 3 addresses. Voila, you have a multisig address that can be sent to.


What vulnerabilities have been found in Bitcoin Core using fuzzing?

For a list of historical Bitcoin related CVEs (common vulnerabilities and exposures) see the Bitcoin wiki.
However, for a focus on Bitcoin Core vulnerabilities found by fuzzing there is a resource on the Bitcoin Core dev wiki on "fuzz trophies".
Marco Falke stated here in May 2021:

I did a survey of all bugs found first by fuzzing, excluding known
bugs that can merely be reproduced by fuzzing (regression fuzz
testing). I found that most bugs fall into one of the categories:

Silent merge conflict (forgetting to update the fuzz target after code changes)
A bug in the fuzz target itself
A recently introduced critical (exploitable) bug, but only present in    the master main development branch
A minor (non-exploitable) bug, potentially present in previous    releases


there is an issue out discussing the strategies for the autopilot (c.f.: https://github.com/lightningnetwork/lnd/issues/677 ) there it is stated that it currently uses a constrained barabasi albert model or preferential attachment ( https://en.wikipedia.org/wiki/Barab%C3%A1si%E2%80%93Albert_model ) this means that it will look at the topology of the network and randomly select nodes to connect to. However the probability distribution is not uniformly distributed but weighted by the node degree (meaning the numbers of channels a node has) of the nodes resulting to the fact that the autopiolot is more likely to connect to nodes which are already highly connected.

the model is constrained because currently nodes that are too big ( I think having more than 5k channels) will be excluded.


At the time of this writing, "Verified" Accounts are eligible for monthly/daily withdrawal limits up to 10 times the default daily amount and 5 times the default monthly amount, while "Trusted" Accounts are eligible for monthly/daily withdrawal limits up to 100 times the default daily amount and 50 times the default monthly amount.

For verified status it is enough to send by email a scan of the ID and bill, and they only need to be translated if they don't include an English name. For trusted status, physical copies of the documents must be sent by mail, they must be certified by an apostille, and if they are not completely in English they must have a notarized translation.

The withdrawal limits for normal / verified / trusted accounts are:

Daily BTC: 400 / 4,000 / 40,000
Monthly BTC: No limit
Daily USD: 1,000 / 10,000 / 100,000
Monthly USD: 10,000 / 50,000 / 500,000

You can also choose to lower your limit if you want.


Yes, you are correct. In addition, we assume that there are adversaries which can operate arbitrarily and replace some honest-looking devices on the network and make them behave like a "malicious intelligence". They send data adversarially designed to disrupt your protocol.

You want your "distributed consensus" to be able to work under these conditions.

Furthermore, if an arbitrary number of such malicious devices can be injected and you cannot tell devices apart, we call it "anonymous distributed consensus", the problem that bitcoin is solving.


What informations are contained in a transaction?

What data is in scriptSig

scriptSig in a typical p2pkh scenario, which is the vact majority of bitcoin transactions, only contains the public key of the scriptPubKey hash as well as the signature. This means there's no metadata other than the public key and the signature for authorizing the payment.

For non-p2pkh transactions, such as for example p2sh transactions, more data is included in the scriptSig. For example in p2sh multisig, the multiple public keys capable of authorizing the multisig will be revealed. In even more complicated scripts, the scriptSig may reveal significant information, depending on what the scriptPubKey script is requesting. For example, there are snowflake transactions that require scriptSig to be solutions to certain puzzles. However, these transactions are very rare.

How transactions are validated

There are multiple security models in validating a transaction. Transaction validation is a different notion from transaction confirmation which you are talking about. Transaction validation asks whether a transaction is valid – for example, it is of the right format, it follows Kirchhoff's Law (i.e. sum of outputs is less than sum of inputs), and the outputs it spends have not been double spent. Validating a transaction requires access to the current UTXO.

Transaction confirmation on the other hand validates that a transaction has been buried under a certain amount of proof-of-work, for example k = 6 blocks. Checking the confirmation status of a transaction does not require traversing the whole data in the blockchain. It only requires looking at the blockchain headers.  In the SPV security model, the transaction confirmation status is checked simply by checking that it was included in a block and buried under a certain amount of proof-of-work. This is done quickly without looking at the whole blockchain data (but just all of the blockchain headers) by providing a proof-of-inclusion which consists of Merkle tree path siblings.


Where is the code making OP_RETURN a standard transaction type?

This is the PR that made OP_RETURN outputs standard:

  https://github.com/bitcoin/bitcoin/pull/2738

The commit:

  https://github.com/jgarzik/bitcoin/commit/a79342479f577013f2fd2573fb32585d6f4981b3

The current code:

  https://github.com/bitcoin/bitcoin/blob/v0.11.0/src/script/standard.cpp#L56-L58

    if (GetBoolArg("-datacarrier", true))
        mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
    mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));


Is there a point where bitcoin mining will not be profitable?

It's already here. At present, you're simply not going to be able to mine Bitcoin with consumer grade hardware. Even with ASICs, you're still looking at returns that would have been laughable just a year ago. You're better off mining something like Mint or Aurora, or Doge, and turning them in for Bitcoins. Just my 2400 satoshis.


If you have a paper wallet, that means you have the public key and the private key of your BTC address.

This is sufficient to control both BTC (Bitcoin) and BCC (Bitcoin Cash) after the fork.


Which language has better Bitcoin API experience, C# or Node.js?

API selection with other technology selection is having major dependencies on final goal. so you have to select the best suit of technology as per the business requirement.


How much would it cost to execute a 51% attack?

Adding to David's quote of $65,415 per hour here's a quick analysis of non-EC2 attacks (i.e. buy and run ALL the hardware to sustain a 51% attack)

Since power efficiency will be HUGE for this scale of an operation, let's use the most power efficient card we can find. This lovely pastebin doc tells us that is the Radeon 5850 at 1.595 MH/W.

At present you need 12.42 TH/s to pull off a 51% attack, which would require 51,585 of these cards. Assuming we put four cards to a rig it also requires 12,897 computers to run them all. Assuming the PCs take a scant 200 watts, each rig requires 804 watts of power, 10,365,735 watts in all. Assuming a fairly high efficiency cooling system, we can bump that up to about 14,619,916 watts. Before anyone claims that this alone is impossible, keep in mind it's about 0.7% of the peak output of Hoover Dam. Speaking of Hoover Dam, I'm going to use my local energy rate of 11.28 cents per kW/h (I live in Vegas) to find that it would cost $39,579.04 to run and cool these rigs for a single day.

Since these cards cost $192 at the cheapest outlet I could locate, we'd spend $9,904,320 on cards and at if we spent a scant $500 on each rig's other hardware they'd cost us $6,448,120 as well for a total hardware cost of $16,352,440. If we amortize that cost over a year of operation before the parts die or become too obsolete to pull off our attacks any more, we can estimate $44,770.54 per day in hardware costs.

Total cost in amortized hardware and electricity to run a 51% attack for one day on the bitcoin network: $84,349.58 - but also recall that our total startup costs were 16.35 million dollars, and all that would buy you is the ability to double-spend for a time, so no it wouldn't really be worth it.


Can I see which bitcoin node sent cli command

Yes, it is. If the node is running with -debug=rpc, then all RPC events will be logged, including RPC commands and where they came from.

Note that Bitcoin nodes do not communicate over RPC nor is the RPC interface typically exposed to the internet. Furthermore, the RPC interface is authenticated; connecting to it and being able to send a command requires knowing the username and password configured for that node.


Is it possible to run two nodes with the same public key?

With reliability, I assume you mean protecting channel balances against server failure (Not being able to close the channel correctly following an error).

You can reproduce the wallet in both nodes, but that doesn't contribute to securing a payment channel's balance in the case of a failure. It simply just means both node instances have identical wallet keys.

In other words, the two node instances may be signing with the same wallet keys, but they cannot be operating as a single peer for a given channel.

Since it is the individual payment channel balance (unbroadcasted, signed commitment transactions) which is at risk, it would be necessary to secure the commitment transaction data of a single node instance to protect your balance in case of a server failure.


Viewing truly raw but decoded transaction data


If my phone is powered off will i still receive my bitcoin

The recipient doesn't need to have a wallet online to receive Bitcoins.
This is because the transfer of the money is recorded in the blockchain - which every full node (wallets etc) worldwide has a copy of.
Bitcoin wallets don't actually contain money. So they don't literally receive money. The only really important data in a wallet is the secret number known as a private key.


Is there any full node supporting multiple crypto currencies like BTC, BCH, Litecoin?

Different networks are completely independent, and while it is technically possible to put together a single node software that is able to connect and process all of them, it makes little sense for someone to invest that amount of time and money in it when you can simply run each network independently (even on the same machine).


nLockTime transactions, how do they persist? Are they broadcast before they are valid?

The release notes for Bitcoin Core (Satoshi client) version 0.9.0 states

  Accept nLockTime transactions that finalize in the next block

So it will just discard other nLockTime transactions. Since most miners run bitcoind or some fork of bitcoind, it is unlikely that an nLockTime transaction will persist for a long time.


Why do transactions need to be spend fully?

All bitcoins that you hold in a wallet are received direct from generated coin (issued as the block subsidy) or value assigned to you by the previous holder.   That assignment does not have a value field, only authorization for the value to be spent by you.

Many other accounting systems use the approach where account balances are used, rather than aggregating all transactions like how Bitcoin works.  Bank account systems work like this.

Work is underway to bring this capability to Bitcoin.


The client calculates the priority of the transaction, which is defined as coin days destroyed (i.e. number of coins times coin age) divided by transaction size. If it is above a certain level, the transaction may be sent for free. Otherwise, a 0.001 LTC per KB fee is enforced by the client. In general, this also happens to be the minimum recommended fee per KB.

Some miners choose to enforce these fees and won't include a transaction in a block they mine if it does not have enough fees. Other miners don't care and include any transaction in their block.

As you can see in an example block, most transactions of any decent size don't require a fee. Generally, if you send 1 LTC which you did not receive very recently and is not composed of a lot of small input transactions, you do not need to pay a fee. If you try to send a transaction with zero fee when it needs one, miners might skip over your transaction, and you'll need to wait until some miner is willing to include it in their block. If you grow tired of waiting, you can broadcast another transaction using the same coins (but this time with a fee). It will be included in a block, and the previous transaction will be regarded as a double spend and thus be rejected and disappear from the network.


Is it a way to restore private key from 12-phrase?

You can restore your wallet using another external solution called Exodus.

You can find a step by step process here: How do I restore from my 12 Word Phrase?

I hope it helps you.

There are some other ways as well, I will keep this answer updated.


Where can I see the current size of the bitcoin blockchain?

Yes, you can use this website:

https://blockchain.info/charts/blocks-size


No, it cannot be reset. Yes, I believe it can only include letters and numbers.


Join a pool or create my own pool with my 500 PCs?

With that much hash power, I believe you could be better off creating your own mini-pool and putting those computers in it. In theory, solo mining will always give you more coins in the long term for pools always take a fee for their services. In practice, of course, you could be mining for years without ever finding a block, so it's more a matter of how much you can wait to see a return on your costs and investment: more constant payments but less gain in the long term, or the inverse.

This formula can aproximate how much time on average would elapse before you found a block - it depended on the difficulty level of the network and your hashing power. Have a look at it and decide if you can wait that much weeks/months with no yield in order to gain more in the end.

https://en.bitcoin.it/wiki/Difficulty#How_soon_might_I_expect_to_generate_a_block.3F


TRX is an ERC20 token so you can use https://www.myetherwallet.com/ offline to create a cold wallet. As of now TRX don't have any official wallet.

Here is a how-to Using MyEtherWallet For Cold Storage


10 days, still no confirmation. Will this ever get confirmed

Your fees are 17 sat/byte which is very low. I’d recommend using the “replace by fee” feature to accelerate the confirmation speed.


Can a system of trust be built on top of the current block chain

This won't work. Consider:

I send you 1 Bitcoin from an account that has 2 Bitcoins to an account of yours that has 99 Bitcoins.
Your account now has 100 Bitcoins. You rely on this new system and consider my transaction to you confirmed. You send the 1 Bitcoin I sent you and 9 other Bitcoins you had before to someone else.
I double spend the 1 Bitcoin I sent you. Your transaction of 10 Bitcoins is now a double spend as well.

Now, there are two choices and they both suck:

Only my account is frozen. But anyone who relied on your transaction is screwed with no recourse. And only my 1 Bitcoin is frozen even though someone got screwed on a 10 Bitcoin transaction from an account holding 100 Bitcoins.
Your account is frozen. But you did nothing wrong but rely on my transaction, and now your 100 Bitcoins are frozen.

You and I may or may not be in collusion, and there's no way to tell which just from looking at the transactions.

You are operating on a set of false assumptions about how double spends actually occur.


There is an Electrum branded mobile wallet with source code:

It's OS with a MIT license.


What is the typical size for an extended public key?

An extended public or private key is always 78 bytes of data. When Base58 Check encoded, this results in a string that is up to 112 characters in size.

The format of the data is defined in BIP 32.


Broblem for wallet blockchain privet key

Without more information, I see a few posibilities:

You may have a BIP38 encrypted private key.

see: https://github.com/bitcoin/bips/blob/master/bip-0038.mediawiki

I suspect that maybe you are trying to claim a paper wallet?  If so, you need to know the password, or brute force it (unlikely).

If you are referring to a blockchain.com (formerly blockchain.info) wallet, those are proprietary to them and use their own format for the keys.  Again, you need to know the password, or brute force it.

If you don't have the password to your key any longer, then there are some wallet recovery services on the internet, which are risky and take a large percentage of the balance.  You can google "bitcoin wallet recovery", and always check reviews before engaging with one of these services to check their reputation.  Even so, they may be unable to recover the password.

Barring that desperation, do not provide your private key to anyone!


From the bitcoin wiki:

  Several of the characters inside a Bitcoin address are used as a
  checksum so that typographical errors can be automatically found and
  rejected. The checksum also allows Bitcoin software to confirm that a
  33-character (or shorter) address is in fact valid and isn't simply an
  address with a missing character.

In other words, your wallet shouldn't let you sent coins to a bad address, and servers won't accept the transaction.


You cannot import your existing MEW to Trezor wallet.

It is the security of a hardware wallet which makes it worth the price, and that is why the wallet is generated in Trezor offline.

Thus, the only way is to create a new wallet in Trezor. Transfer all your coins from existing MEW to Trezor. And after that, you can use Trezor with MEW to send or receive other alt coins which Trezor don't have support directly.

Hope this answers your query.


Is "fee higher than block reward" attack possible?

An attack like this is possible, it is just a way to profit off a 51% attack. However you must remember several things:

if a miner controls less than 51% of the hashpower, then chances are they will not be able to catch back up to the network after mining the malicious tx, so the honest network will prevail as the longest chain
if a miner tries the attack but fails to succeed, they will have wasted a lot of resources in doing so (opportunity cost). Compare this to a more guaranteed profit of not being malicious
if an attack like this succeeded and users noticed, it would hurt the security of the network, and thus coin prices should be expected to fall. So the miner has undermined their own investment.

If you hunt around online, I have seen a simple formula for determining the value of transaction vs the number of block confirmations to wait for before considering the tx ‘final’. Your line of reasoning is correct: for larger transfers of value, the wait period should be longer, so that the potential reward of malicious behaviour is outweighed by the reward of honest mining.


I am afraid, you can not recover your wallet without the password. That is the idea of the password: if someone steals your wallet, she can do nothing without the password.

So, try hard and do recall the password.


Is there any way to access my btc without my bitcoin core wallet?

To do this, you'd have to parse the .bitcoin/wallet.dat file (possibly using a script like this python script) to recover the private keys, convert them to a WIF (Wallet Import Format) and find another application that will let you import private keys. You might be better off just waiting for it to sync.


Given the current hashing powers, what do pools actually do in practice?

For a given combination of

version(4b) + prevBlockHash(32b) + merkleHash(32b) + ctimestamp(4b) + ctarget(4b),

There is no guarantee that there will be a valid nonce. There usually isn't - the probability that there will be is 1 divided by the difficulty, which is currently 9 billion. So miners try different combinations, try the nonce range for each, until they find a valid solution.

a) The most general method is to change extraneous data in the generation transaction to change the Merkle root. Currently, to reduce communication overhead between the pool and miners, a method such as GBT is used, where the miner gets a block template and can fill in the generation transaction himself.

b) No; hashing, like much of the core cryptographic primitives, is kind of a "dark art" - there's little in the way of proof that it all works. Let's say you fix just the prevBlockHash, there is no proof that you can fill in the other details to obtain a valid hash. However, if hash functions behave more or less the way we think they do, it is extremely unlikely there will be no solution.


The most important to secure online transactions in bitcoin trade is that you use irreversible payment methods. Otherwise, the disparity between irreversible bitcoin transactions and reversible soft money transactions opens the bitcoin seller up for fraud. Reversible - irreversible payment method scale is called "money hardness".

The safe online payment methods include

Cash deposits (thus far the safest, popular in US)
OKPay (advertises itself to be irreversible, not available in US)

Experienced traders are trading with very fraud sensitive methods like PayPal. However, they usually do identification checks or similar to further have guarantees against spammers.

Some tips how to avoid fraud with bitcoin and PayPal (applies to all other payment methods too)


Can ECDH peers waste each other's time at will?

It was in the context of the peer sending an invalid point. The proposed scheme would not detect that immediately, and so would do extra (wasted) work.

However the peer could equally waste your time by sending a valid point (possibly without knowing the private key) and just abandoning the protocol after you've done the work anyway.


What is the maximum channel capacity allowed on the Bitcoin testnet?

I noticed that on the mainnet the maximum capacity is siginificatly higher as some exchanges allow LN withdrawals of 0.5 BTC

I think they are using wumbo channels:
Is the Lightning Network sufficiently secure and well tested for wumbo channels?


There is no technical limitation. However, to perform a $15,000 transaction, you need $15,000 worth of Bitcoins. There are times when it's hard to acquire that many Bitcoins without moving the market in unfavorable ways. It's worse if you need to cash out. However, if you're willing to buy and sell the Bitcoins slowly or under favorable market conditions, the transfers are not a problem.

$15,000 is not a huge problem right now. $300,000 definitely is. Just remember, if you have to buy bitcoins with dollars and then the other party has to sell them for dollars (or another currency), you'll take a sextuple transfer hit. You'll pay two half-spreads plus two conversion fees. Then, as you buy, you'll move the market up. And as you sell, you'll move the market down. This is a huge issue with Bitcoin today. Just the spread and conversion fees add up to about a 2% loss, assuming prices don't change -- that still beats credit cards.

Bitcoin transaction fees for transferring Bitcoins are based on the size of a transaction in bytes, not the number of Bitcoins transferred. What makes a transaction "expensive" (though we're usually talking a few pennies if even that) is having to "gather" funds from a lot of sources or "scatter" funds out to a lot of different destinations. So your $15,000 transaction will likely cost less than a penny.

So in sum, moving the Bitcoins from one account to another will probably be less than a penny. But in most applications, you have to factor in the cost of buying Bitcoins on one end and selling them on the other.

In the most recently-mined block at the time I wrote this answer, there was a transfer for about $16,000 worth of Bitcoins. The transaction fee was about a quarter of a penny. And currently you can process transactions without paying any fee if you're willing to wait an extra 30 minutes or so. (Because many miners don't care about transactions fees and will include any valid transaction so any valid transaction will get into a block eventually.)


What is the relationship between the Ripple secret key and the wallet name/passphrase?

Is the wallet name/passphrase just for convenience (easy to remember)?

Yes. Because anyone trying to steal your funds would first have to get hold of your wallet file before he could use the passphrase, it doesn't have to be quite as secure as the secret.

  Why can't the wallet name/passphrase be changed?

Because then you'd have two passphrases you'd have to keep secure forever to protect your account. The decrypted wallet yields the secret and the secret owns the account. There's generally no way to be sure you've destroyed every copy of your wallet.

  Why not generate the secret key from the wallet name/passphrase so that the user has only one secret to keep safe?

That would defeat the point of the passphrase because it would no longer be able to be any less secure than the secret. Anyone could try common name / passphrase combinations at a very high rate to see if any of them matched existing accounts.


Can we derive parent’s private key using child’s private key?

But not the former. Can anyone explain what he meant in the former?

A child key can refer to two different things: the child private key and the child public key. With just only one of these two things, you cannot determine the private or public keys of any parents or siblings. Just revealing one of those keys does not necessarily reveal any other information.

However, when a child private key AND the parent extended public key (so public key and chaincode) are revealed, we can derive the parent's private key. This requires more than just the child private key and cannot be done with a child public key.


What is a worker exactly from Antminer Pool Worker field?

  a worker is "simply an identifier for you to use so that you can track different machines within your account".

Is a Worker any random name you make up right then in the Antminer General Settings > Pool # > Worker field, or do you set these up with your associated Antminer account and then once on the pool start dropping in the names you registered on your account?

You set these up with your pool and then use them in your mining hardware to keep track of individual machines.

I assume once you use one specific Worker name that you will get an error if you try to use that same name on that same pool from another miner device?

No, you can generally use a worker name over and over on different machines, all the work is added together to show the worker work.

The pool is a URL with a port number and the Worker seems to be a private name you use on your account connected to this public URL pool but the Workers in this context are like the private bitcoin miner nodes—if someone else on that same URL pool from another account uses the same Worker name as another account's Worker name, then that does not make any difference—only no duplicates on same account only, right?

I thought that you had to enter your username and worker password in addition to the information shown in your screenshot. In many pools you enter the username as {username}_{workername} or similar. The worker password hardly needs to be secret - if someone steals it they can generally just mine on your account giving you greater share.

To answer, it depends on the pool but generally worker names are isolated to sepcific individual accounts, so it doesn't matter if a different user on the pool has the same worker name. If you can create the worker name on your pool account it should be safe.


What license is used for the content of Bitcoin.org?

I've posted this question on Bitcoin.org GitHub repository and I've got the answer.
According to @harding, from Github, the content of Bitcoin.org is commonly licensed under MIT, only not when specified. Here is his full answer:

the MIT license, as stated. You can also check the COPYING file in the repository, which says;
The intellectual property rights in the files are owned by the respective authors. Some of the files can be licensed under MIT License (MIT) available on http://opensource.org/licenses/MIT or other licenses. Appropriate licensing information can be found in the header of the file or in the folder containing the file.
In general, text files have the license information near the top and image files have the license information in a file in the directory.

@saivan commented:

[FAQ] certain pictures listed on the page are not MIT licensed (see the COPYING file here: https://github.com/bitcoin/bitcoin.org/tree/master/img/faq). This being said, although I am not a lawyer, I think you can easily use screenshots like this without much copyright issues

Thanks for your replies, guys, but I will elect this one as the best answer cause this is the response I really wanted.


You actually don't use the addresses, but the RPC info for the daemons. For example you'd start the pool with the following switches:

python run_p2pool.py --net vertcoin3 --merged http://*RPCuser1*:*LongRPCpass1*@127.0.0.1:6888 --merged http://*RPCuser2*:*LongRPCpass*2@127.0.0.1:7817

You will see "Got new merged mining work!" in console as confirmation.


In order to send more hashes for mining do you need to connect into a bigger mining pool?

The difficulty determines how many hashes it takes for you to produce a share. Most modern mining pools will raise the difficulty as your hash rate increases. The idea is to keep your share generation rate roughly constant, regardless of your hashing rate. This allows the mining pool to still accurately measure your hash rate, still collect an actual block should you find one, but not have to process an absurdly large number of shares. Even a small pool can handle a client with an extremely high hashing rate. It's not more difficult, so long as you aren't using obsolete protocols like "getwork".


Calculate transaction fee for external addresses which doesn't belong to my local bitcoin-core server?

"fundrawtransaction" and "walletcreatefundedpsbt" are wallet RPCs. They add inputs and change outputs from your wallet to aim for a specific feerate for the transaction.

These operations inherently require the relevant wallet. Change addresses are generated by the sender's wallet, and inputs have to come from the wallet of the sender. If you don't have that wallet, you simply do not have access to that information.

I don't know what advice to give you except to run these RPCs on a  instance of Bitcoin Core that actually has access to the relevant wallet.

If you do things entirely manually, the fee is the difference between the inputs and outputs of the transaction. If that fee value for the transaction you have is not desirable, you'll need to create a different transaction, with either different inputs, or by adding change yourself back to your own wallet.


What exactly is a "blockchain developer"?

In bitcoin core "block chain" is used at lot of places and all the pull requests to change it since 2014 got NACKs so never changed
https://github.com/bitcoin/bitcoin/pull/5242
Satoshi mentioned 'timechain' : https://bitcointalk.org/index.php?topic=382374.0
The timechain is a tree shaped structure starting with the genesis block at the root, with each block potentially having multiple candidates to be the next block.  pprev and pnext link a path through the main/longest chain.  A blockindex may have multiple pprev pointing back to it, but pnext will only point forward to the longest branch, or will be null if the block is not part of the longest chain

Isn't "blockchain" just a simple word to refer to the "chain of blocks"

Yes
According to a definition mentioned in one of the slides used by Andreas in video: https://youtu.be/FYo5E7zT-vM
Blockchain is the public ledger where the network records are written.

Why is there such a focus on something they refer to as "blockchain", sometimes "Blockchain", as if this is some sort of "service" that magically exists somewhere on the Internet

Not sure when people started using the word "blockchain" as technology, became a buzz word and now used for lot of things related to applied cryptography and cryptocurrencies.
There are few more concepts which use 'chain' in it: sidechain, statechain, spacechain, softchain, etc.
So I am assuming few developers that are involved in something related to cryptocurrencies categorize themselves as Blockchain developers.


If this is 12 words, you can download Electrum that is a Bitcoin wallet and import this SEED. Go to the website and download and install the wallet on your computer.
Then you will create a new wallet using this SEED, basically, these are the steps to do this:
1 - Go to create new wallet and give any name to this wallet.
2 - Go with the option to standard wallet.
3 - Go with I already have a SEED.
4 - Click on options and check BIP39 SEED and enter with your SEED.
If there is any Bitcoin in this SEED, you will probably see them. You can also try to just paste the SEED without check the option Bip39 in step 4 to see if the SEED will be recognized.


micropayment channels, n-m addresses, interoperability

Not necessarily interoperable.

Firstly, libraries have to agree on what kind of parameters to exchange and how they are exchanged. There's no guarantee that the parameters required by bitcoinj and libbitcoin are the same.

Secondly, it is now considered standard practice to create P2SH transactions regardless of what kind of transaction you're setting up, unless it is P2PKH. In the case of P2SH transactions, you then have to assert that the payment channel protocol would also be able to parse/recognise/understand the redeem script provided by service provider of the payment channel (assuming that you're talking about a single-direction payment channel).


Is there a way to configure bitcoind to be nicer about its harddrive bandwidth usage?

I don't think there's any way to configure bitcoin to self-limit.

That said, Windows has an IO scheduler, which shares read/write bandwidth between processes. You can tell this IO scheduler to deprioritize a specific process. This isn't directly accessible from Task Manager or Process Explorer, but there are two third-party programs, called Process Lasso and Process Hacker which are capable of changing this.

(Source.)

(I think your problem is more likely to be a CPU bottleneck than IO, but you asked for this approach, and I assume you have a good reason.)


Does the block size issue also apply to Dogecoin?

It has been discussed before, but you're right that the problem isn't nearly as big. There are a couple of reasons for this:

Dogecoin has the same blocksize limit as Bitcoin, but it has ten times as many blocks, and therefore the limit is ten times higher.
As you say, there are fewer transactions on Dogecoin's network.
Hard forks are regarded differently within the Dogecoin community. For example, they recently altered their coin to remove the one hundred million coin cap. I don't think the Dogecoin devs would have any compunctions about raising the 1MB limit.


How to redeem a private key in case it is compromised

If you want to redeem all funds from a private key and never use it again - you can for example create a new wallet file, run a bitcoin client, import the private key, let the client fully synchronise, and then send all your available funds to another address you own. After that, you can move your old wallet back where it belongs and use the new funds transferred. The redeemed key will not interfere with your normal wallet and you will have your funds.


Why is the Bitcoin Wiki protected against editing?

To prevent vandalism and spam. You can gain edit access by making a payment (in bitcoins, of course).

The payment required is (at least) 0.001 BTC, which is actually no longer trivially small in my opinion.

  BitcoinPayment is a MediaWiki extension to limit spam, by requiring a
  small one-time bitcoin payment before a user is allowed to edit or
  create pages.

  While the payment is deliberately trivially small for a normal user,
  it presents a barrier to a mass-spammer.

  Funds sent to this wiki will be used to keep the wiki online (cost of
  domain name and hosting), and remaining funds will be donated to the
  Bitcoin Foundation.


Wait a few minutes and the error will be gone.

The source code defines error 28 as

  Client still warming up


If you want a bitcoin miner of your own, don't reinvent the wheel and instead use efficient software. You're wasting your time if you aren't mining with ASICs anyways.

I like to think of mining Bitcoins as a way of bruteforcing SHA-256. Basically the difficulty of the Bitcoin network determines how long it should take the total computing power of the entire Bitcoin network to brute force or 'guess' the input to a SHA-256 function. By making the input sufficiently complex, the Bitcoin network can control how often new blocks are awarded. This concept decentralizes the currencies by enforcing a proof of work system. It comes down to the math behind computing algorithms and time.


Is there an easy explanation to understand the different types of pools

I've written a tutorial a while ago; I will be using some terminology in my answer and it would be best to acquaint yourself with it.

Prop (proportional) is one of the easiest to understand. All miners submit shares, and after the pool finds a block, the reward is divided proportionally among the miners based on how many shares they submitted that round.

PPS (pay per share) is also quite straightforward. Each time you submit a share, you get paid a fixed amount. As I mention in my tutorial, that amount is equal to the block reward divided by the expected number of shares that round. With PPS, the pool operator takes on a lot of risk (e.g if a block is not found in 500% the expected time, the owner is basically paying out a lot without any compensation in return), so typically they will charge a large pool fee (as a risk premium). For instance, BTC Guild charges 7.5% for PPS compared to 3% for PPLNS.

PPLNS (pay per last N shares) is similar to Prop but is designed to combat a major problem with it: pool-hoppers. Basically, since mining is a Poisson process, there's no such thing as partial credit. If a pool finds a block at 10%, it is worth just as much as a block found at 1000%, even though it took 100x less time to find it. So it is advantageous to mine only when the pool % done is low, and then switch to another pool that has a lower % done, because your expected payout per share is higher when the % done is lower. PPLNS solves this problem by making it by (roughly speaking) distributing the block reward not according to who submitted shares in that round, but who submitted submitted the last N shares (N is often twice the expected number of shares per round). I won't go into the full mathematical details here, since it's explained perfectly well by other people.


16 word recovery phrase for blockchain wallet not working

Above answers regarding seedrecover.py and BIP39 are wrong.
Blockchain.info legacy wallets can use any number of words from 15 to 21 or more. The number of words changes depending on your password length.
The words are NOT a part of the BIP39 seed words and seedrecover.py will NOT be able to find the missing words as it is based on a completly different algorithm.
Blockchain.info used their own wordlist composed of over 50000 words not compatible with the BIP39 wordlist pre 2016. From 2016 they started to use 12 word seeds compatible with BIP39.
Your seed is either missing a word or you have entered a wrong word.
The seed does not contain your private key like the BIP39 seed words, instead it has your wallet ID to login to blockchain.com and your password. In rare instances the seed only contains your username and pass, that is if it was created pre 2013.


Getting Imported address privet keys. (Blockchain)

Only if you have inserted the private key, you will be able to export the private key again. So in your case, you never gave blockchain your private key. So you are unable to export it. Blockchain cannot magically create the private key.


As that address belongs to an exchange, the only thing you can do about it is contacting their support (the exchange you sent your coins to).


Can I restore a wallet using any valid 24 words?

If you choose the words yourself, you're more likely to be biased towards some word selections based on position in the list, words you like and dislike, etc. Ledger is designed to pick the words as securely as possible. Also, some words are used as checksum I believe, so if you just picked them randomly the checksum would be invalid and you'd probably get a warning. But yes, it would still probably work.


How bitcoin core bootstraps [in source code]

The following source line shows how a set of seed domains are used to bootstrap the network:
https://github.com/bitcoin/bitcoin/blob/06d573f053c63eb6521c62d210c5924418ae2b83/src/chainparams.cpp#L121

These are called seed nodes. Once the bitcoin core is connected to one live node successfully, it can receive more peer information from that node and continue to expand the network. It can then save that information on disk and if the system is restarted, it can reload from disk. If that fails it can go back to seed domains again.
The above list is accessed here:
https://github.com/bitcoin/bitcoin/blob/320e518b9062ea5510abd7876d22dc5bd3352535/src/net.cpp#L1591

And then it is looped through here:
https://github.com/bitcoin/bitcoin/blob/320e518b9062ea5510abd7876d22dc5bd3352535/src/net.cpp#L1620


Is it possible to explore the blockchain without downloading the blockchain?

To get anything other than blocks, you will need to download the entire blockchain. The only things you can request from a node is a block if you know the block hash, and transactions, if you know the transaction id AND the transaction is still in the node's mempool. Transactions which have already been confirmed cannot be requested as the node will have removed the transaction from its memory and stored it to disk with the block. Everything else requires the full blockchain as they are mostly human abstractions of the blocks and transactions that are not relevant to the network.

The "balance" of an address (besides technically not existing) can only be found by having the entire blockchain and reading through the blockchain and scanning all transactions for any inputs and outputs that are associated with that address. Getting the transactions that an address is involved in requires doing the same thing. This is because addresses don't exist to the network as they are only abstractions for humans to more easily think about transactions. Balances don't exist either as Bitcoin does not use an accounts or balance system for tracking money. Rather it is all based on transaction outputs.


Forgotten password for wallet. Must a password be entered before spending?

Learn from other people's past mistakes
Some good advice is at https://bitcoin.org/en/secure-your-wallet#encrypt

Encrypt your wallet
Encrypting your wallet or your smartphone allows you to set a password for anyone trying to withdraw any funds. This helps protect against thieves, though it cannot protect against keylogging hardware or software.
Never forget your password
You should make sure you never forget the password or your funds will be permanently lost. Unlike your bank, there are very limited password recovery options with Bitcoin. In fact, you should be able to remember your password even after many years without using it. In doubt, you might want to keep a paper copy of your password in a safe place like a vault.
Use a strong password
Any password that contains only letters or recognizable words can be considered very weak and easy to break. A strong password must contain letters, numbers, punctuation marks and must be at least 16 characters long. The most secure passwords are those generated by programs designed specifically for that purpose. Strong passwords are usually harder to remember, so you should take care in memorizing it.

Notice that second item.
Once you set a password, which you definitely should, it is important to never forget your password. This is why people use password managers and make backup copies in secure places.

What next?
If you have some idea of what your password might have been, you might try recovery tools such as btcrecover. (not an endorsement, other tools exist, take extreme care choosing tools)
If you care about your money ...

Only download tools from sites you are 100% certain of, Check carefully.
Compile any tools from source code if you can.
Never give any potentially sensitive information to helpers. Treat all helpers as if they were thieves (almost all people offering to help will in fact be confidence tricksters). A genuine helper never needs to know your password or any part of it or anything about it. A genuine helper never needs any kind of access to your PC. A genuine helper never needs to create a wallet for you.
It is better to spend time learning how to do things yourself with no active participation from any helper. A genuine helper needs no more information than is already in your question above.
Don't attempt recovery on any computer that has ever been used or accessed by anyone else in the past.
Don't attempt recovery on any computer or device that is connected to the Internet.


P2SH-P2WPKH private key or revert to P2WPKH

In 0.15.1 you'll need to find the P2PKH address corresponding to the key (it's the argument to addwitnessaddress you used for creating the address in the first place), and pass that to dumpprivkey.

In 0.16, things will likely just work.


How do you import an xPub from a Ledger Nano to a watch only Bitcoin Core

You can't. Bitcoin Core currently does not support importing extended public keys.


What's the deal with OP_RETURN and length?

The length (amount of data to be pushed into the stack) typically comes directly after the OP_ code.

If the byte after OP_RETURN (0x6A) is between 0x01 and 0x4B, that is signaling the amount of data to push into the stack. This is defined in the Script language; a chart can be found here.

For example:

6A24AA21A9EDA45B20BAE4C0D9C747D7C17074D0606AF70FABA1394FC75E5DA6ABDA0426232E

The first byte 0x6A decodes to OP_RETURN and the next byte is 0x24 signaling
to push 36 bytes of data to the stack. (0x24 hexadecimal is 36 in decimal)

Our example therefore decodes to:

OP_RETURN PUSHDATA(36) AA21A9EDA45B20BAE4C0D9C747D7C17074D0606AF70FABA1394FC75E5DA6ABDA0426232E

If there was any more data after the 36 bytes it would be interpreted in coordination with the proper OP_code.


I am wondering how to create a P2P database (like blockchain?) which can be maintained by some party (miners)?

This is quite a big question to answer in one message. There's "Mastering Bitcoin: Programming the Open Blockchain" book that explains all the internals of Bitcoin in details. Also you can refer to Bitcoin Developer Guide – there're answers to all you questions.

  How do I stop spammers?

This is why Proof-of-Work is needed: adding a block to blockchain takes a lot of time and a lot of computations (that's why people buy fast video cards for mining). Thus, spamming is not possible.

  And, how does a Bitcoin node start finding peers?

There're are DNS seeds hardcoded in Bitcoin clients. When a new node is started it queries the seeds to get the IP address of at least one other node.


Specific explanation of "timeout" configuration option in Bitcoin

The -timeout flag sets the amount of time to wait during an attempt to connect to a node. It defaults to 5000 ms. This is the connection to other peers on the network for syncing the blockchain, receiving and sending new transactions to the mempool, etc.

  A follow question is, would a node with a 15 second timeout hurt the
  coin network with a fast block-time of e.g. 45 seconds?

Faster blocktimes mean that the network has less time to 1 - propagate transactions and 2 - validate them before the next block. This is definitely something to take into account when thinking about block times. A slower node (both in terms of network latency for syncing and cpu power for validation) may not be able to confirm new blocks fast enough, but the bigger problem is if a majority of the nodes are slow compared to the block time.


Moving funds from MultiBit 0.5.18 into new Software (Electrum)

You can use it. Electrum, nowadays, is as popular as Multibit used to be, so you can assume that you will always be able to recover your coins.
To be safer, you can export the private keys from Electrum and save them in an encrypted archive such as ZIP or 7zip. (But you need to do this every time you make a transaction)
What I would actually do would be to create a new wallet in Electrum, but this time, of type HD wallet. Then you can write down just a few words (12 or 18 ?) and be able to physically backup your coins. This would have the advantage of not having to update the backup as all your private keys would be deterministic childs of your master key (=those words)


understanding bits and difficulty in a block header

Contrary to popular belief, Bitcoin's proof of work is not actually based on the number of zeroes. Rather the block hash, when interpreted as a 256 bit integer, must be less than the target value. The target value is what actually determines the difficulty. The target value is represented in a compact form in the nBits field of the block header.
The nBits field of the block header compresses the target from 256 bits into a 32 bits. A description of the format can be found here.
Basically, the nBits field, when represented in Big endian, is split into two parts: the first byte, and the last three bytes. The formula for decompressing the nBits field is as follows: (last three bytes) * 256 ^ ((first byte) - 3). This gives you a 256 bit integer that has the first 3 most significant bytes of the target.


Single API Platform for multiple cryptocurrency?

Kraken deals in all of these. You can find the API at api.kraken.com


George gave you the idealistic answer.  The cynical answer: the point is to get you to look at ads and produce revenue for the faucet operator, while paying you an amount of Bitcoin that you hopefully won't realize is equivalent to an hourly wage several orders of magnitude below sweatshop.


How to perform automated mining in regtest mode?

The miner can generate a block candidate with the getblocktemplate call, which uses certain heuristics to construct an approximation of an fee-optimised block given the current local mempool state.

1) The question in regards to when to begin mining

Generally, the miner will want to begin mining the next block as soon as the strong chain is extended, maximising the time available to search for the solution.

However, consider building an optimal block template from a growing number of unconfirmed transactions being accepted into the mempool. This means a transaction selection so that total block fee reward is optimised, whilst ensuring no double-spend. A growing mempool provides a greater optimisation space, but takes time. Solving for the exact optimal block from an increasingly large pool of valid transactions is NP-Hard (knapsack/max independent sets) and expensive.

At some point, the gains in fee rewards of solving this optimisation problem will be offset by the opportunity cost of the miner (during optimisation, the miner hashing equipment will necessarily be idle). Simpler heuristics may optimise for a less than optimal block template (as in getblocktemplate), but enables the miner to begin mining immediately.

If you wish to apply your own block template solver, you can get a mempool dump via
getrawmempool (not very efficient to acquire over RPC).

2) Regarding regtest in a local network

Is it possible to create bitcoind regtest network on Ubuntu (which itself is on Virtualbox)?


at what time do you generate the public and private keys

Your wallet (the software managing your keys and your connection to the Bitcoin network) handles this for you, typically just before you generate an address to receive a payment.

  how do you store your private key on a hardware wallet

The hardware wallet comes with a software which handles the storage of the key(s) on the hardware.

You might want to take a look to the wiki page about "storing bitcoins" and follow the links :).


How to get a full view of the lightning network with c-lightning?

lightning-cli listchannels is what you are looking for to also see the channels and not only the nodes.
In general the lightning nodes learn the network view from the gossip protocol where closed channels may be discarded and not forwarded anymore. If you look proprietary tools like the one you mentioned they might have stored older nodes and channels this is one source how the different numbers can arise.
BTW you get the gossip information from your peers so you could also peer with as many nodes as you learn from your initial peers and hope that you get a larger view of gossip.


Difference between Monero, Dash and Zcash

Monero - A cryptocurrency that uses ring signatures, a type of cryptography that enables untraceable transactions.  It is extremely unlikely that a transaction can be traced to a particular user. Monero is based on the CryptoNote protocol and possesses significant algorithmic differences relating to blockchain obfuscation

DASH - rebranded from "Darkcoin" to "Dash" on March 25, 2015. Dashcoin is an anonymous cryptocurrency and the first automatically mutating cryptocurrency created with CryptoNote technology. It offers instant transactions (InstantSend), private transactions (PrivateSend) and token fungibility.

ZCash - is said to offer total payment confidentiality while still maintaining a decentralized network that runs on public blockchain.  Zcash transactions hide the sender, receiver, and transaction value.  One must have the correct view key in order to see a transaction. This cryptocurrency uses zk-SNARK, which allows a network to have a secure ledger of transactions without making the parties and amounts transferred public.


Government disrupting reception of bitcoins. Is it possible?

Would they need to control 51% of mining power to make it impossible to send funds to such an organization

If you have less than half of the mining power:
You control what transactions go into blocks you mine. You can definitely slow down payments to WikiLeaks2. However, you can't prevent payments from going out forever. Other miners will look at the WikiLeaks2 transactions, see nothing wrong with them, and include them into their blocks. You cannot do a 51% attack because the honest nodes, working together, will simply overpower you.
If you have more than half of the mining power: (51%)
You can now prevent everyone else from getting blocks. This means that you can prevent transactions you don't like from getting confirmations forever.

  Which begs the question: who validates the acceptance/rejection of a transaction, done by the miners, is correct? I.e. who validates the validators?

Certain network rules are never voted about - For example, transactions must be signed, a block must have a valid timestamp, you can't spend more bitcoins than you have, that sort of thing.

What bitcoin miners do vote about is what should be on this global, shared, ordered list of transactions.


anyonecanspend final condition of a script can be spotted just by looking at the script hash, without the redeem data?

As there are no known preimage attacks on RIPEMD160 and SHA256, it is impossible to know what the contents of a redeemScript are given just the scriptHash. So yes, it is impossible to know what conditions are necessary to spend from an address given just the address. That is one of the main points of using scriptHashes: it hides the redeemScript from others until it is spent from.

  Also, can miners learn the final condition if the output is spent at its second nLockTime, like when Bob and Carol try to spend, they must also provide the redeem script, thus allowing miners to see that if they wait 500 more blocks they can claim the entire output, not just the fee, and not include it in a block until then.

Yes, this is currently a problem. If the transaction is signed and broadcast, the redeemScript will be revealed and miners could then see the ANYONECANSPEND condition in which case they may be incentivized to not let the transaction confirm. This is an issue.

However that issue is not without solution. This is specifically something that MAST (BIP 114) fixes. Basically un-visited branches in the script are hidden behind a hash. So if MAST were available and the redeemScript made use of it, then the conditions which were not used (e.g. the ANYONECANSPEND condition) would be hidden behind another hash and thus outside observers would not know about it.

Taproot is an expansion on MAST which adds further privacy by making it so that observers won't even know that there were other branches that were not used.


Does 4 byte Nonce enough to proof of work?

No, it is not enough.

There is extra-nonce field. The scriptSig of coinbase transaction.


Why are there always some unconfirmed transactions?

Transactions selected in mining blocks is not like a queue, where you wait your time and get to the front eventually.

Fees are not mandatory, but should be included in every transaction, if you have sent none, or low fees, you can still be selected (although it's highly unlikely), but the miner would be silly as they could just take the higher fee offered by someone else. Remember when you post a transaction you offer a fee.

If you owned a bakery and made 1000 loaves of bread a day, but had 1500 customers, would you sell them to someone offering $0.10 when other people are offering $1.00+.


Looking for a place to buy bitcoin with a credit card

you can try Cubits, they are Bitcoin payment processor based in UK and Germany.


Can an exchange or marketplace benefit from private key encryption?

It depends what your goal is. Normally when sites have a user's key encrypted as to be unreadable to the site, it's to have a system where users don't have to trust the site not to steal the key. In that case, then no, because the whole point of a technique like that is to have it so the service provider doesn't have control of the user's keys at all. Any workaround to that would defeat the purpose.
If your goal is to protect the keys from outside hackers, then the site can (and most do) employ cold storage or hardware security modules (basically a fancy hardware wallet) that store the keys. In this case, the site owners still have full control of the keys, and the users have to trust the site owners to be honest. However, the scope of a potential hack is limited, as the keys are stored either on dedicated hardware, or if in cold storage, large withdrawals are performed manually by site staff after review.


Is it technically possible to send a transaction with two identical destination output addresses?

Yes, absolutely.

You can chop a 1 BTC input into 5 equal 0.2 BTC outputs, all to the same address.  These are not strange at all.