How to recover Bitcoin sent to example address on Bitcoin.org info page

Your coins are gone.  Sorry.

As KappaDev found, the transaction was confirmed, so it cannot be reversed.  The only way those coins can possibly be accessed now is by whoever generated that address, if they still have the private key.  It could have been someone working on the web page at bitcoin.org, or it could have been someone from coinspace who provided the image.  (I wasn't able to find any image on bitcoin.org with that address in it.)

However, you can see here that several other people sent coins to that address, as far back as 2016.  None of them have ever been spent.  So it's likely that whoever generated the address no longer has the private key, or never saved it in the first place, or at any rate has no intention of using it.  And even if they did, you would have no way to force them to give the coins back to you.


I believe the best option for you would be to write a script which grabs the data from Kraken's API, and parses that into a CSV output that you want.

Using the API to download trade history is explained here:
https://support.kraken.com/hc/en-us/articles/218198197-How-to-pull-all-trade-data-using-the-Kraken-REST-API?mobile_site=true


All wallet software that I know of has migrated from JBOK to some form of deterministically derived keys. The first wallet with deterministic key derivation that I know was Armory around 2011-2012, and its scheme inspired BIP32, which formed the basis of many key generation standards that followed. Obviously, software that predates these schemes did use JBOK (in particular, the Bitcoin reference software did, before it was called Bitcoin Core). These days Bitcoin Core still supports JBOK wallets (e.g. if you load a wallet created by an old version), but new wallets by default are BIP32 based.
As far as advantages goes, I know of one: JBOK wallets "unsteal" themselves over time. If someone finds your wallet file with keys, they have access to your current funds, and a number of future keys that are typically included in the backup. But over time, as you create more receive addresses and transact, moving old coins to new change addresses, these coins become out of reach for an attacker.
It's a small advantage only, and presumably not considered important enough to weight up against the advantages of easier backups.


In Math or Python notation - How to convert bits to difficulty?

This snippet converts the nbits integer as appearing in your blockchain.info link to the difficulty

def nbits(num):
    # Convert integer to hex
    hexstr = format(num, 'x')
    first_byte, last_bytes = hexstr[0:2], hexstr[2:]
    # convert bytes back to int
    first, last = int(first_byte, 16), int(last_bytes, 16)
    return last * 256 ** (first - 3)

def difficulty(num):
    # Difficulty of genesis block / current
    return 0x00ffff0000000000000000000000000000000000000000000000000000 / nbits(num)

>>> difficulty(392009692)
3007383866429.732


Is there a script for bitcoin core which prints all spendable UTXOs given a private seed?

You can import a descriptor composed of the xpriv(s) (or xpub(s) if you just want to watch the coins) to the bitcoind wallet, and then rescan the block chain for transactions involving derived key up to a configured gap limit.
For importing the descriptor, use the importmulti RPC call in versions <0.21 and the importdescriptors RPC as of 0.21 (upcoming).
Both calls allow you to pass a creation timestamp in order to rescan the block chain from this point. You can otherwise manually call rescanblockchain.
Note that, depending on the number of blocks you are scanning, it will take some time. You can monitor the progress in your debug.log.


What the difference between old segwit (3) and new segwit address (bc)?

The difference lies in the encoding and the underlying representation in the transaction data stored on the blockchain.

The 3-segwit addresses are known as P2SH-P2WPKH or P2SH-P2WSH. This stands for Pay-to-witness-pubkey-hash wrapped in pay-to-script-hash and pay-to-witness-script-hash wrapped in pay-to-script-hash respectively. This was done to provide backwards compatibility with existing wallets and allow time to upgrade to the bc1 addresses.

The bc1 addresses are known as native segwit addresses. An address starting with bc1 is always going to be segwit, while a 3-address could also be a regular multisig or other script address.

Both the 3-address version and the bc1 version require less fees, although the bc1 version requires even fewer fees than the 3-address.

bc1 is bech32 encoded, which improves error detection over the original base58 encoding, and also helps prevent cross chain transactions (for instance, you will not be able to send LTC to a bc1 address, but sending LTC to a 3-address will go through just fine)

You can learn more about the design of bech32 in this talk by Pieter Wuille.


The answer to your question is a clear NO, as two very different problems are being tackled but the onion routing in the TOR network and by the Onion Routing in BOLT 04.

The idea of the Tor network is to hide your IP address. If you run your lightning node on a tor onion you will have a tor address and not even your channel partners can know where your node stands. In particular if you receive money on that node no one can see who you are
The idea of Oninion Routing (with the help of the SPHINX paper) in BOLT 04 is that you as the payer of a network hide who is receiving the money. Also you hide that you are the sender (though every node can send back error messages to you). If you pay a person with these oninion payments and this person is NOT using TOR for their lightning node you will know who the payee is (at least you know the IP address and to some degree where the computer stands) Others on the way do not know this (only the channel partner knows that the payee is involved in the payment process but it is not clear that it is the receipient to the channel partner). If however the payee uses tor the situation like discribed above in 1.) takes place.

So in order to maximize your privacy you should run your lightning node on TOR even though the routing of payments is a source based Onionrouting similar to TOR.


Meaning of the Tables in the Blockchain Database

I've worked with Abe for some time; I'll try to have a run at it... I'm using the latest table list from Database version Abe39 on MySQL.

Utility tables:

abe_lock:

Used for locking while performing DDL
configvar:

Configuration and results of some auto-detected SQL features.

Blockchain tables:

block:

Block hash and related statistic/infos.
block_next:

Forward-linking of blocks (blocks references only the previous block; this table links to the next one).
block_tx:

Links blocks to all their transactions in tx.
block_txin:

I believe this is merely a "shortcut" table that contains information accessible elsewhere: somewhat links together block_id, txin and the block it's spent on.
orphan_block:

Used to link orphan block (for eventual out of order/multi-threaded indexing?) References the previous block hash (since we do not have pref block_id yet).
tx:

A transaction: links to inputs (txin) and outputs (txout)
txin:

A single transaction input.
unlinked_txin:

As for orphan_block, links to txin we do not have loaded yet. References the txout_hash as we do not have yet the txout_id.
txout:

A single tx output
pubkey:

A bitcoin address (pubkey)
multisig_pubkey:

A multisig pubkey
chain:

Chain name and properties (one per cryptocoin)
magic

Per-chain magic number
chain_candidate:

Identifies each block height and whenever it's part of the longest chain or not.
datadir:

Information relative to blockfile indexer

Sequences:

This is pretty much DB-specific; on MySQL these are tables that have a single AUTO_INCREMENT column and are used to create unique keys for their respective tables:

block_seq
chain_seq
datadir_seq
pubkey_seq
tx_seq
txin_seq
txout_seq


You have been robbed, sorry.

Use a strong password/better seed next time.


Bitcoins gone missing in Blockchain Wallet

My wallet password was not compromised but my bitcoins have gone missing from my wallet

It is very difficult to know this with absolute certainty. And even if it is true, there are other ways to have your wallet compromised. Blockchain.com offers some rather insecure backup options: by email, cloud storage, etc. If a backup is compromised, it doesn't matter how strong your password is, the attacker won't need it.

  Do you know what replace by fee means?

Replace-by-fee (RBF) is an optional flag that can be added to a transaction, to signal that until confirmed, it can be replaced by a new transaction that spends the same inputs, with a larger fee. See this question for more info.

  Can I find out where my bitcoins went with the wallet number?

You can view the transaction that used your bitcoins as input, to see what addresses they were paid to. This is all public information stored in the blockchain, but addresses are pseudonymous by design, there will be no info about who took your bitcoin, or where they reside.

A wallet is software that controls a collection of addresses, but as with addresses, there is no public info available that will tell you with certainty which addresses belong to which wallets, or which wallets belong to which users.

  Can I speak to a person atBlockchain to discuss my problem?

If they have a customer service department, then perhaps you can. But keep in mind they are just a business that works with Bitcoin, so they have no special position of control or power over what happens on the blockchain.

  How can I recover my bitcoins?

You likely cannot. I would suggest contacting blockchain's customer service, but there is likely not much they can do. If you lost a substantial amount of money, you could contact your local law enforcement to report the crime, but again, there is likely little they can do to recover the funds.

How you secure your funds is a big question for Bitcoin users. Some methods are more secure, while others are less secure but easier to use. I would advise not using blockchain.com's wallet if you are looking for a secure storage method.


What is in the Bitcoin Core LevelDB dbcache? Is it full records or metadata?

The Bitcoin Core documentation describes dbcache as the cache for the UTXO database.
Wikipedia describes a cache as a:

software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere.

Greg Maxwell added on IRC:

There are basically two separate uses: the block index which is
essentially metadata and the UTXO database.
The dbcache is not really a cache, it's a write buffer and it prevents
needing to sync the disk or make random writes. As a cache it doesn't
do much and isn't needed for that. It does also act as a cache, but
if you nullify that benefit it's only approximately a 10% slowdown
even with a huge dbcache.
With a fast SSD (e.g. NVMe) I think the difference between a 400MB
cache and a 5GB one is "only" a halving of IBD time (when syncing from
LAN peers).
To prevent corruption the database updates must involve synchronizing
writes.
We changed how dbcache flushing worked with the explicit intention of
making background flushing possible so that it could be concurrently
flushing and processing blocks constantly rather than inserting these
bubbles where it waits on the disk. Even though the consistency
requirements make that possible now (the UTXO database doesn't have to
be consistent except there is a record that states that all blocks
before it have absolutely positively been applied to the database),
actually making the change is still extremely complicated.
Every time you process a block, once the cache fills you could flush
out to disk the remaining dirty entries for the oldest remaining
blocks until it's back under the limit again.. So essentially flushing
every block in the background.  Then every once in a while, you do a
disk sync and update the record that says where the completely
consistent point is, without having to flush anything additional out.
So almost no latency spikes at runtime.
This would be good for mining but doing that requires a bunch of
machinery to efficiently track things and probably would make sense to
replace the dbcache's map with an open hash table of some kind at the
same time to cut the malloc traffic down by 10x. I expect there is a
factor of 2 IBD speedup waiting from these changes. I'm not sure if
it'll ever happen though, it's a big complicated task and any mistake
is a consensus bug.
You can even do neat stuff like resolve collisions in the open hash
table by displacing the oldest UTXO and once you've gone "far enough"
flush. The table could run extremely close to completely full at all
times.
I'm personally fond of cuckoo tables. Where every item has a small
number of possible locations like two random buckets which each hold 4
items and if those locations are full you pick one, insert the item
there, bump what was in that slot into one of its alternative
locations.
If the table has a little slack  (no more than ~95% full for 2 buckets
of 4 items for example) then it's always successful at finding an
empty slot after a few kicks. Lookup is extremely fast since you only
need to do two random memory accesses. There are a bunch of different
designs though most are best when you can keep the table <50% full but
the cuckoo design is easy to take up to arbritarily high fullness.
The STL sets that Bitcoin uses are a hash table, but collisions are
resolved by having each entry in the hash table be a linked list, so
every access involves several pointer chases and every insertion takes
a malloc.


It is said that never reuse an address, but the news is stating biggest bitcoin addresses are buying?

This is mostly about privacy

Because they don't care about their privacy

Because they don't care about their clients/customers/friends' privacy

Because they want to keep their code simple

Because they don't want to keep a database of their addresses

Because their identity is already obvious: This is the case for exchange wallets

Because multisig addresses whose transactions require mulitple private keys to be signed are one each and I'm not aware of a "multisig hierarchical deterministic wallet" system. Multisig addresses are intended for reuse, at least until someone finds a way to solve this


Gateways can refuse to issue or redeem fractional amounts and users can refuse to pay them. But there is no authority to say to someone "you may not hold a fractional amount of this currency". Nobody can stop you from holding fractional amounts if you wish to.


How to use Multisig feature on Bitcoin Core RPC in an online exchange?

Multisig does not make funds more secure just because you are using multisig. Multisig requires multiple keys to sign in order to release funds. The typical use case is with multiple parties holding the required keys. That way in order to spend multiple parties need to agree and sign. If all of the keys required to sign are held by a single party then it defeats the purpose of multisig and no additional security has been added.


Can a transaction disappear? (Orphan Blocks)

When a block, or set of blocks, is dropped (orphan block, minor fork, chain reorganization), any transactions in those blocks are returned to the mempool. Usually, many of these transactions will be contained in the blocks that replace the dropped blocks, and end up in the chain anyways.

It is relatively rare for a transaction to outright disappear, and will never happen for a transaction with sufficient confirmations. It is not unheard of for transactions with very low fees to be evicted from the mempools of enough nodes to be lost entirely during times of network congestion, however.


Are the miners to decide if a consensus rule is accepted or not? Or are the buyers in power?

Yes. Even more direct: owners of Bitcoins before the fork will suddenly own both types of coins after the fork and can start selling the side they don't want.

However, in general, this is a very messy and damaging way of deciding consensus: in times of uncertainty a lot of people will decide to move to USD to sit out the storm (causing both sides to drop in price). Another fact is that a lot of people do not follow all the day to day drama and will not notice the fork until they're too late. Those people will take the largest losses.

Those things combined make it a further red flag for people considering investing in Bitcoin in the first place: why invest in something that radically changes course every x years through dramatic and damaging civil wars? Where you could be the one losing out if you blink your eyes. A currency needs stability to become trustworthy.

Also: Miners do have to make a choice fairly quickly after a fork, if they mine the wrong side, they will lose a lot of money. And yes users should not want to stay on a 10% mined chain very long: 10% security means that a 51% attack is incredible easy, so that coin would not have enough security to really survive.

All in all it's much better if consensus is reached in a peaceful manner. Luckily the long term goals of both miners and devs are fairly well aligned with the long term goals of users, so those coming to a consensus says a lot. As well as that users (as a group) have a lot of influence over what devs do or don't do (as is the nature of open source), as well as pressure over miners.


This is more an issue of willingness.
Generally you are right, address re-use is seen as "should not be done" :-)
Biggest threat would be, that some bitcoins get "tainted", and loose their value. I leave it to the experts to get this explained.
With HD Wallets you can generate enough adresses for your webpage/business usage. Just some coding required...

How many public/private keypairs can a Hierarchical Deterministic Wallets (BIP0032/BIP0044) produce? If I got it right, it should be some 2^31 addresses - probably enough for the majority of business cases.


descriptors is a boolean argument, so it should either be true or false. As with all RPCs, the argument is positional by default. So your command would look like
bitcoin-cli -signet createwallet "mywallet" false false "" false true

You can specify that the arguments be named so you don't have to put the position correctly. In that case, you do
bitcoin-cli -signet -named createwallet wallet_name="mywallet" descriptors=true


Has the transaction already been mined into a block? I'm assuming not since it's in your raw mem pool. Why wasn't it mind in that case? Did it not have any fee?

I would try sending the coins to yourself with a much larger fee than the original transaction. Like Steven Roose said above, once transactions have been sent out to the network, they can't really be undone. Even if you delete it from your raw mem pool, it's still in everyone elses raw mem pool just waiting to be confirmed.

To make your own custom transaction that spends the UTXOs you want to spend, use the rpc calls:

listtransactions
listunspent
createrawtransaction
signrawtransaction

The default behaviour is for clients to accept whatever transactions spend an UTXO first. So most standard clients will not accept secondary spends of specific UTXOs. Mining pools may be a little bit more persuadable.

Not sure how viable this is, but I just found this: http://www.bitundo.com/. Read up on it before giving any money to a service like this. It also only works for transactions that haven't been confirmed into blocks at all yet.

I would also read this article http://bitcoinmagazine.com/2960/instant-transaction-fraud-an-explanation/. It has some very interesting stuff relevant to this question.


What is the Elliptic Curve algorithm used in Ripple to generate public / private key pairs?

Yes in ripple-lib the default elliptic curve is set in sjcl-custom/sjcl-secp256k1.js

// Overwrite NIST-P256 with secp256k1 so we're on even footing
sjcl.ecc.curves.c256 = new sjcl.ecc.curve(...)

Then in keypair.js when a new key pair is instantiated its _curve attribute is set to secp256k1.

function KeyPair() {
  this._curve  = sjcl.ecc.curves['c256'];
  this._secret = null;
  this._pubkey = null;
};


You are asking two questions which might seem to be related but are actually very different.

To move coins between addresses, you have to create a transaction and get it included in the blockchain.  Just like any other transaction, this might require you to pay a fee.  (You might be able to send the transaction without a fee, depending on the priority and/or whether your transaction finds its way to a generous miner.)

Accounts, however, exist only within the Bitcoin Core client.  They are just a bookkeeping device to group your funds.  You can move coins between accounts with the move command in the Bitcoin Core console.  This updates the client's internal records to adjust the balances of those accounts, but doesn't actually cause any coins to move between addresses, so it has no fee.


AntMiner S5 chain #2 intermittently operational

Why is my AntMiner S5 chain only intermittently operational?

It's due to hardware failure.

Will BitmainTech replace it for me?

Yes, I had the same issue. I had to pay to ship it back to them, and they very promptly shipped back a replacement board.

How do I know if it's under warranty?

Ask them. They're able to figure it out for you.

Is there a warranty?

Yes, I believe it's 3 months (90 days).


How is the Max Target of a Genesis Block Decided?

It's important to note that "difficulty" as such doesn't actually exist in the system; it's just a convenient way of representing the target value for human consumption. Internally (and on-chain) only the "target" and "nbits" representation are used.
Furthermore, the actual difficulty for the genesis block doesn't really matter, except for the fact that at least in Bitcoin it also happens to be the maximum permitted target value. And that value is relevant.

We don't know how or why Satoshi picked the specific value of 65535×2208 as maximum target. But perhaps they measured the speed of mining on their own system/implementation, and chose a nice round number (in nbits representation) corresponding to what they estimated would be reasonable for the operational network.

Not sure what you mean. Questions about specific altcoins are off-topic here.

Yes, probably.

Well, in Bitcoin the genesis's difficulty is also the minimum difficulty a block can have, and early on in Bitcoin's history, there were many retarget periods where the difficulty was just 1, because the hashrate wasn't sufficient for a higher difficulty.

My reasoning for asking this question is because when I look at the difficulty charts for cryptocurrencies, I've been curious if they're relatable to one-another, that is, if you could reason that because BTC has a difficulty of X and LTC has a difficulty of Y, you could determine which to mine based on difficulty and block reward alone.

You cannot compare hashrate of unrelated proof-of-work functions. They require separately-designed hardware, so one cannot be converted into another once you get out of the realm of general purpose (CPU & GPU) hardware.


Downloaded and installed bitcoind--bandwidth usage gone through the roof

Bitcoin Core is full node software. This means that it will download, validate, and keep up with every transaction made in Bitcoin's history and future. Its goal is independence: if you run a node, you know that everything you see adds up (no theft, no money created out of nothing, ...), without relying on anyway else's judgement. However, it comes at the cost of high resources.

This is one of the ways of interacting with bitcoin-the-currency, but certainly not the only one. A good resource for finding wallet software is here: https://bitcoin.org/en/choose-your-wallet


There are several pool-implementations that create the individual workloads and track their completion. The Poolservers article at the bitcoin.it Wiki has a comprehensive list, with a feature comparison.


I sorted it out through Blockchain eventually and was able to move my BTCs somewhere else..phew..

Blockchain wouldn't let me import my qt wallet over Firefox but with Chrome, no probs. Then I had to import priv key (dunno why) aswell then bingo!


Difficulty target representation in bitcoin wiki

To explain that, let's look at the code that unpacks the compact format into a 256 bit int.

arith_uint256& arith_uint256::SetCompact(uint32_t nCompact, bool* pfNegative, bool* pfOverflow)
{
    int nSize = nCompact >> 24;
    uint32_t nWord = nCompact & 0x007fffff;
    if (nSize <= 3) {
        nWord >>= 8 * (3 - nSize);
        *this = nWord;
    } else {
        *this = nWord;
        *this <<= 8 * (nSize - 3);
    }
    if (pfNegative)
        *pfNegative = nWord != 0 && (nCompact & 0x00800000) != 0;
    if (pfOverflow)
        *pfOverflow = nWord != 0 && ((nSize > 34) ||
                                     (nWord > 0xff && nSize > 33) ||
                                     (nWord > 0xffff && nSize > 32));
    return *this;
}

The first 8 bits here are the exponent. The next bit is a sign bit, with 1 being negative. The next 23 bits are the mantissa.

So, 0x00800000 is equal to 0x00000000.


How do transactions in the blockchain work

What I don't understand is the need for the hashing of B's public key

Hashing the public key is done for two reasons. It is a cost saving measure as it reduces the size of A's transaction. It also protects the actual public key so that, if Elliptic Curve Cryptography is broken, the private key cannot be reversed from the public key because the public key is not known until it is used in an input to a transaction.

  and the previous transaction,

Including the hashing of the previous transactions lets a transaction refer to the transactions it is spending from so that you can verify whether the money is legitimate.

  and what exactly is being verified/signed.

The message that is signed is the transaction (the one that is being created) itself. Of course it does not contain the signatures, but it contains everything else - the transactions being spent from and the outputs being created. This protects the other parts of the transaction from being modified by people not authorized to spend the money.

  If transaction i - 1 is being hashed in transaction i, that means only transaction i - 1 is known. It says nothing about transaction i - 2, where the same money that is being spent in transaction i could have already been spent. It doesn't seem like transaction i - 1 or i keeps a list of all previous transactions, so there's no way of verifying where the buyer in i actually has the money.

Transaction i - 1 contains the hash of transaction i - 2, which contains the hash of i - 3, and so on and so forth until you reach transaction i - i (the "first" transaction) which is a special transaction known as a coinbase. This is a coin generation transaction. Thus by following the entire chain of transactions backwards, you can verify if the money actually exists.


There is zero chance of it being used in Bitcoin.
There is prior incidents to gain wisdom from. Before zcash existed as an altcoin, zcoin was an implementation of a similar concept which people rallied behind and tried to ham fist into Bitcoin. It's essential, it's a mandatory, it's my right to be private! If you don't put zcoin into Bitcoin you are the manifestation of the devil himself, brought to destroy the fabric of society!
Unfortunately whenever things like this have been social pressured into existence for reasons of perceived valor, it has lead to problems. In the case of zcoin, it was later discovered that the implementation of zcoin slated for use in Bitcoin had an unbounded, invisible inflation bug which would have instantly ended the currency.
Bitcoin survives by being conservative with changes, not grabbing onto everything shiny.


How can I create a private blockchain with my own transactions?

Here there is a repository that allows you to add all kinds of data to a blockchain.
If you look at the "Data" field of each block you can add your own transaction in JSON format.


Using importmulti to import a single address to keypool does not work

Currently the keypool is not an address pool. You cannot put addresses in the keypool. You need to be importing public keys in order for anything to be added to the keypool.


Just got back into bitcoin but theres almost no way for me to use my bitcoins, please help!

There must be a solution so don't be too worried. According to the multibit blog, an attempt to move it to Electrum is valid.

  If you are having problems logging into Multibit, we created a utility to export the keys from your Multibit wallet file. Instructions for how install and use it are at https://github.com/Multibit-Legacy/read-multibit-wallet-file

The github repo provides a process of getting the key.

Install node version 6 or higher. You can get it from https://nodejs.org/en/download/.
Open a command prompt and install this utility: npm install -g mbexport
mbexport <path-to-wallet-file>

<path-to-wallet-file> is on the README file of the repo.

If you can provide information about OS you're using and about software class (Multibit classic or MultibitHD), you'll probably hear the more detailed answers.

Hope you'll find a way.


Lightning Network on testnet - listchannels and listnodes returning empty values

In order for your node to be aware of all (public) nodes and channels on the network it need to download them first.

If you look at your output of getinfo you see that you don't have any peers. You should peer with at least one node for example with mine which you can find at https:ln.rene-pickhardt.de you do this via:

lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735

The gossip deamon of your node will then query my node for the network. Once the syncing is complete you will see all channels and nodes with the commands you mentioned.

Not that you will see some channels nodes right away as the output lists the nodes and channels it is already aware of


Yes it's possible to add more outputs in coinbase transaction.
https://bitcoin.stackexchange.com/a/103612


The DNS seed addresses are hardcoded into Bitcoin Core (or other clients).  You would need to convince the Bitcoin Core developers to add your seed node to the hardcoded list.

You can find here a list of the requirements you'd be expected to fulfill.


If you installed Bitcoin Core via Snap, then you can easily dump your wallet keys to snap/bitcoin-core/common/ directory, like
dumpwallet /home/alex/snap/bitcoin-core/common/walletdump.txt

In case of success, you'll see the following response:
{
  "filename": "/home/alex/snap/bitcoin-core/common/walletdump.txt"
}


Zeusminer not being recognized with BFGminer

I'm running BFGminer 5.4.0 on a pi with two Zeusminers. Here is an example of my command that I run:

--scrypt -o stratum+tcp://pool:port -u username -p password -S zeusminer:/dev/ttyUSB0 --set zeusminer:clock=328 --set zeusminer:chips=6 -S zeusminer:/dev/ttyUSB1 --set zeusminer:clock=328 --set zeusminer:chips=6


How to distinguish addresses currencies apart on php

A Bitcoin address always start with 1 or 3.
A [Litecoin] address always starts with the letter L.
A Peercoin address starts with the letter P.

Assuming you can figure out how to check the first character in php, you can distinguish between different addresses. Then you can program whatever value you want into the transaction. Good luck!


Using a dedicated phone as "hardware wallet"

Is a comparable level of security achievable with an Android device with full phone encryption?

Short answer: No. This doesn't mean an Android device is bad, there are less secure ways to store bitcoins. But it does have more attack vectors than a hardware wallet.

You can add whatever encryption to the phone you'd like, but ultimately if that device can connect to the internet, there is risk that some malware could be loaded to it. A hardware wallet is not at risk of this type of attack, the secure element is kept isolated from the internet.

For example, if screen capture malware is loaded onto the Android device, and it snaps a screen grab of your seed phrase, the encryption methods won't matter at all. This sort of attack isn't possible on a hardware wallet.


Access funds on legacy address related to segwit address from which I have private key

I'm afraid you have a bug in your mining software, and your coins are gone.

Instead of sending to the P2SH address, a block was created with a P2PKH output script, reinterpreting the script hash from the P2SH address as a public key hash. This happens somewhere in broken software that doesn't support P2SH and additionally also fails to check the address version byte.

If this is the case, it is unrecoverable and those coins are lost forever. You can't find a public key whose hash matches that script.


A low difficulty is only insecure if the malicious miners have a combined hash power much greater than the difficulty level.  The difficulty level is adjusted up or down every 2 weeks so that a new block continues to be found approximately every 10 minutes.  So, to forge transactions, a large percentage of the current miners would need to stop mining in order to get the difficulty level to drop.  Then the malicious miners could jump in and create bogus transactions assuming they controlled enough hash power to make their blockchain the accepted one.


Can it be mathematically proven that a block can be solved?

The clients make use of the Target to determine if a block hash is valid and will be accepted by the network. The Bitcoin wiki states the following:

The target is a 256-bit number (extremely large) that all Bitcoin
clients share. The SHA-256 hash of a block's header must be lower than
or equal to the current target for the block to be accepted by the
network. The lower the target, the more difficult it is to generate a
block. [...]
Each hash basically gives you a random number between 0 and the
maximum value of a 256-bit number (which is huge). If your hash is
below the target, then you win. If not, you increment the nonce
(completely changing the hash) and try again.

The current target value can be found here: http://blockexplorer.com/q/hextarget


How transaction fees differ between different wallets?

Bitcoin-Core is a full node and can therefore build up a mempool and estimate fees. This is probably the most secure way how one can estimate fees. You can verify the source code and make your own improvements. The fee estimator allows you to estimate the fees for different confirmations targets (2-25 blocks).

MultiBit does either use a web-api and/or static fallback fees. You depend on third-parties, estimating fees for you. All SPV wallets cannot reasonable estimate fees.

Blockchain.info run its own full-nodes and use it's own fee estimation logic. You need to trust the estimations produced by blockchain.infos logic.


Preventing the exposure of public addresses on a website

You should try using BIP32 to generate addresses.

There's a node.js implementation here: http://cryptocoinjs.com/modules/currency/hdkey/


Is the Bitcoin Core software managed by a central authority?

It is propagated server-to-server and, with luck, eventually gets to a bunch of miners who will include it in a block. There is no central authority -- individual servers are free to propagate transactions using whatever rules they wish.


Why is the scriptSig formatted this way in the Genesis Block (inside function CreateGenesisBlock)

The scriptSig field of a coinbase transaction is special. It doesn't need any signatures at all, as no coins are being spent. The ability to produce new coins, which that input represents, is inherent to the protocol - every block is allowed some fixed amount of produced coins. Requiring a signature on it would be wasteful and pointless. Which key should we expect a signature with? Miners don't have identities by design, as it is intended to be permissionless.
Instead, this field just contains arbitrary data the miners chooses. It can function as an "extra nonce", when the nonce in the header overflows. It is used by BIP34 to store the block height. It can further be used to store messages - which is what happened here.
As for why Satoshi chose that specific structure, i'm afraid you'll have to ask him.
Also note that the genesis block is hardcoded by the protocol, so there are no real rules that apply to it. It could have been declared to be anything.


Bitcoin Core Multi-wallet limit to 333 wallets

Ok, I found a solution. Adding

set_lk_max_lockers 400000

Did the trick.

https://docs.oracle.com/cd/E17276_01/html/api_reference/C/set_lk_max_lockers_parameter.html

I tested and was able to auto-create and load 932 wallets, until I hit an out of memory error:

Logging region out of memory; you may need to increase its size
DB_TXN->abort: log undo failed for LSN: 227 171878: Not enough space
PANIC: Not enough space
PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
PANIC: fatal region error detected; run recovery

Setting:

set_lg_regionmax 1048576

Resolves the above Logging region out of memory; you may need to increase its size issue.


Try to migrate Bitcoin Core wallet to an HD wallet but get "St13runtime" exception

The answer you linked explains how to migrate without using upgradewallet in the section "Versions of Bitcoin Core prior to 0.17`. You will need to follow those steps instead.


The transaction you're trying to send spends from an segwit input, but BitPay Insight does not currently support segwit.  On segwit-supporting software, the transaction is valid:

 $ bitcoin-cli testmempoolaccept '["010000000001013920fd5fa5ff9243f96fe11f2ff032dc5842dee09c7992f81441b511ac5584020100000017160014354966a45844090d7152d104326c681ca1075e5effffffff02e8030000000000001976a914e42a54ba2042e889461c7966ac6ba13eeb144a3f88ac905f01000000000017a9148ff360136ee24aa4d5f3ed298947dbc5cfd8ebd58702483045022100c625106241f0b4e90cf4819945d1ff43f2108d9581bbc32f5052c91a28dcc9f5022031760808c4b7ca2b686ef49b9c03d486a2dfea9b85396a7f22914bf3eeeff3800121027a8d1c43339ffddeb722b92189412602720f722ed640a08dcbe7e473e71ca11600000000"]'
 [
   {
     "txid": "e4fdf857b97f1d41c277ffab61dd1367774311303db982d42f7f80e4baa4105a",
     "allowed": true
   }
]

If you just need your transaction broadcast, feel free to reply to this answer in a comment and I'll send it for you.


How to access a blockchain.info wallet's funds from another site like greenaddress.it

You can't move out from blockchain.info to greenaddress.it since they are using p2sh and blockchain not!

You got many solutions:

Create new wallet on greenaddress.it and send your funds from blockchain.info to that new wallet, You can use some VPN software to access it.
install electrum, easy, lightweight and you can import your mnemonic phrase.


Using seed to send bitcoin from a wallet's specific private key

You can use any BIP39 compatible software to enter a mnemonic (12-24 words) and turn it into a seed. Seed is just a number between 1 and 2^256. You can then use this seed to create a Master Private Key. This key then serves as the root of a chain used to create other private keys based on a derivation path.

The whole process is deterministic so same mnemonic and same path will always lead to the same key. Once you have a normal private key you can import it to any bitcoin client and access the funds as usual.


Coins sent without downloading the full wallet

Ultimately, if you:

have the private key for the receiving address the funds have been sent to
can still see the expected balance for the receiving address in the appropriate block explorer for BitConnect
can confirm the receiving address was correctly generated from the private key (eg by importing the private key to a freshly installed wallet, and checking the receiving address)

Then your funds should be retrievable, somehow (but you may need to resolve an issue with the wallet).

Firstly, I'd recommend ensuring you have a safely stored backup of the private key(s) for your funds.

Then, you may like to try re-installing the wallet, or deleting some of its data so that it re-sync's from the network.


Retrieving an addresses' public key from Pkscript/sigscript/witness

The output script (typically referred to as the scriptPubKey, but for some reason blockchain.com is calling it pkscript) tells you where to find the public key(s). It depends on the output script used. The public key(s) could be found in any of the three places.
In your example, the output script is a Pay to Script Hash (P2SH) script. This tells us that the script that is actually being executed is found in the input script (typically referred to as the scriptSIg, but for some reason blockchain.com is calling it sigscript). P2SH stipulates that the first item in the scriptSig is another script. In this example, there is only one item in the scriptSig, and that item is a script. This script is a Pay to Witness Pubkey Hash script (P2WPKH). This tells us that in the witness for this input, we should find a signature, followed by the public key. If you look at the witness section, you will see two items, the first is the signature, the second is the public key.
So in your example, the public key is found in the witness. However this is not always the case. It all depends on the various script types. If the output script were a Pay to Pubkey (P2PK) script, then the public key would be found in the output script. If it were a Pay to Public Key Hash (P2PKH) script, it would be found scriptSig. The address could also refer to a more complicated script that has multiple public keys, or no public keys at all. It all depends on the scripts.


Yes, this tx has only the signatures in the V_IN part (unlocking script), no public keys directly behind it, or a redeemscript. The V_OUT part (locking script) has a redeemscript for a 2-of-3 multisig. Usually one would expect a redeemscript hash in the pubkeyscript, but here it is the plain hex codes.
So it is an old type multisig (not using P2SH). The unlocking script is the two signatures, and locking script provides the required pubkeys.

So what would happen on the stack:

<sig1>

<sig2>

<redeem script data> ("2" pk1 pk2 pk3 "3" CHECK_MULTISIG)

In a first step the unlocking script is executed, and if valid (results in a TRUE value, or no remaining operators remain on the stack), the tx would be marked as valid. It only pushes data (the signatures), so ok. Then the second step would clear the stack, and sigscript and pubkeyscript would be pushed and executed. As one can see, the three elements on the stack can be resolved to TRUE, and as such it is a simple multisig.
Decoding the pubkeys in the redeem script shows:

5221037BF122821AE522F67B7BC09387C2907607CDD66E6BD67BCB53F39D5346ADC74821033E81519ECF373EA3A5C7E1C051B71A898FB3438C9550E274D980F147EB4D069D21027AA4A8DAFFF9B6307899BB7762BF92C50ABDE14C3636719FFC4D4FABF3DC6B0F53AE

    52: OP_2
    21: OP_Data21 (= decimal 33)
        037BF122821AE522:F67B7BC09387C290
        7607CDD66E6BD67B:CB53F39D5346ADC7
        48
        bitcoin address:   18pvHhDLrGJpJ7SznnoxxFdwPnKCqjqVCj
    21: OP_Data21 (= decimal 33)
        033E81519ECF373E:A3A5C7E1C051B71A
        898FB3438C9550E2:74D980F147EB4D06
        9D
        bitcoin address:   1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW
    21: OP_Data21 (= decimal 33)
        027AA4A8DAFFF9B6:307899BB7762BF92
        C50ABDE14C363671:9FFC4D4FABF3DC6B
        0F
        bitcoin address:   1BDp6sR3bHH8ACzbwZccY4y9GohG3KX828
    53: OP_Data53 (= decimal 83)
    AE: OP_CHECKMULTISIG

So just an "old type" multisig transaction.


Generate my own public/private key to secure my bitcoins

As long as you have the wallet dump, you will be able to access your bitcoin.

However, your approach doesn't line up - if you are already at the point of not trusting hardware wallets, trusting a random dedicated server is not a reasonable approach. In fact, a dedicated server may be a worse choice simply because you have no control over the storage drives - it is trivial to recover deleted files from most drives, especially when such a small amount of data is being written.

Additionally, you also are exposed to any compromise on your local machine. The moment you copy over the wallet dump, or even cat it, anyone who has reasonable access to your local machine via a remote access tool or other malware will be able to see the keys.

The entire point of devices like the ledger is to ensure that the private keys are never, ever placed on any computer at all. They exist solely on that device, and on the paper backup of the mnemonic words.

If you want to go a step further, you can use something like the Cold Card (this is not an endorsement, I have no relation to them, and cannot vouch for them). These aren't even connected to a computer at all, and work with PSBTs via SD cards.


What is the "main" difference between consensus mechanism of Bitcoin and Ethereum?

The base proof of work system only differs on the block time, and the hashing algorithm. Bitcoin uses sha256d, ethereum uses ethash.

Ethereum currently does not make use of Proof of Stake, although it is planned for the future. Some of the testnets use Proof of Authority.

The consensus rules differ by a fair extent, however, since the two chains follow different models. Bitcoin is a utxo based system, and the consensus rules revolve around that. Ethereum is an account based system, and has its own consensus rules to deal with that.

Moreover, ethereum has a much more complete smart contract platform, which requires additional rules, such as ensuring transactions are executed in order.


Is it possible to have a cryptocurrency based on email address?

With Bitcoin and its derivatives, you can already generate a private key any way you like and import it using the importprivkey RPC command.  You may start with any 256 bits of data (i.e. any number between 0 and 2^256-1), convert it to WIF format as explained at https://en.bitcoin.it/wiki/Wallet_import_format, and import it.

However, don't start getting attached to this idea before you understand things better.

  I just don't like the fact that cryptocurrency keys are randomly generated. Even though I know generating such a pair again is almost impossible. I don't like it because it's "almost" impossible.

The solution to this is not to invent something new - the solution is for you to learn more math until you are convinced that it is reasonable.  This is the case with everything in cryptography: no attack can ever be made impossible.  But making it sufficiently improbable really is close enough.

If you generate a private key some other way besides randomly, it makes it a lot easier for someone to guess it and steal all your money.  There used to be a fad called "brain wallets" where you would make up some memorable phrase and use it as a private key.  People who did this got their money stolen routinely, because the number of memorable phrases you might come up with is relatively small, and it's very easy for someone with a good computer to just try and guess all of them.  But the universe cannot support a computer good enough to try all 2^256 possible random keys.


How do I restore a Ripple wallet backup?

This was already asked here.

  Following these instructions, after clicking on Create a new wallet,
  you will have the option of using a custom secret key.


Original Bitcoin (Core), how did it generate private key?

The Bitcoin software has always used OpenSSL's random number generator in some way to generate private keys. Originally, it just used OpenSSL's EC_KEY_generate_key function to generate a new key and OpenSSL would handle the RNG and object creation. Even now, Bitcoin Core still uses OpenSSL's RNG and mixes it's output with several other sources of randomness in order to generate private keys.


Scripts are one of Bitcoin's more clever features. The most obvious way to implement a crypto-currency is to make a transfer be to a public key. To claim the transfer, you sign with the corresponding private key. This is not the way Bitcoin works.

When you send Bitcoins (the out of a transaction), you send them to a script. When you claim Bitcoins (the in) of a transaction) you claim them with a script. To determine if a transaction input correctly claims a transaction output, the two scripts are combined and the result is executed. If the result is true, then the input claims the output. The scripting language is stack-based and roughly similar to Forth.

The transaction input (the script trying to claim the Bitcoins) runs first. It will typically put a public key and a signature onto the stack. Then the output (the script whose Bitcoins are being claimed) runs. It will typically confirm that the public key is the correct one and that the signature signs the transaction with the corresponding private key.

Thus, you get the same effect as if you just specified a public key and signature, but you have the option of specifying more complex scripts. Unfortunately, this kind of simple script is pretty much the only kind of script supported right now. The original developer(s) imagined much more interesting scripts including things like contracts, multi-party signatures, and so on.

M of N signatures are planned. This way, you could list, say 3 public keys such that any 2 of them could claim the Bitcoins.

Unfortunately, some of the scripting components are feared to have security risks, so many of them are disabled currently.


I mistakenly deposit my BTC to my BCC address. How can i get it back?

You will need to contact HitBTC and ask them to correct it. In theory they have the private keys and can recover these coins in a way similar to splitting Bcash and Bitcoin in the first place, but prudent security practices may make this difficult for them to do.

You might also want to contact the creators of BCash and point out to them how this decision to use addresses which are indistinguishable from Bitcoin has caused you problems. This was a conscious choice on their part and has resulted in funds losses for a number of people, just as Litcoin's similar mistake years ago with P2SH addresses caused.


Bitcoin Cash difficulty before first hard fork: Emergency Difficulty Adjustment (EDA)

The first rule is well understood.
The second rule, ensures that difficulty gets readjusted quicker if the MTP between blocks is big (12h.)

In practice:
Check the MTP of the current block (mining time of a block 6 blocks earlier)
compare to the MTP time of a block mind 6 blocks earlier
if the difference is 12 hours then difficulty will reset
for example:
block 478574 has an MTP of Aug 1 14:39: UTC
block 478568 has an MTP of Aug 1  11:52 UTC
so not yet 12 hours apart

also see: https://medium.com/@jimmysong/bitcoin-cash-difficulty-adjustments-2ec589099a8e (edit: fixed link)


So I found the reason behind the block downloading issue.

I had forgot to point to the block's data dir when running bitcoind. So instead of utilizing the block downloaded from the GUI it was downloading an entirely new block and using that one instead.


is wallet vulnerable when unlocked for transactions?

You can create, sign and broadcast transaction on different machines. When private keys are offline it's called cold storage.
Example: Create unsigned tx (PSBT) in a watch-only wallet using bitcoin core, sign it in electrum and broadcast using bitcoin core


"Shared wallets will not work correctly."

A shared wallet is often what online services and exchanges often use. They aren't fully functional wallets, and rely on a backend service to manage funds across users, this is the "sharing".

The reason you can't send from a shared address is because shared wallets only allow 1-way transactions due to technical limits. Satoshi Bones sends back bitcoins to the address it receives from after betting from what I'm assuming.

You're using a shared wallet if your sending from an exchange, Coinbase, and most online wallets or websites. The only web wallet that is not a shared wallet that I know is blockchain.info. Else just use wallets you install like Bitcoin-qt, Armory, or Electrum. I recommend Electrum.


Are there estimates on the geographical distribution of the bitcoin supply?

http://fiatleak.com/

This tool supposedly gets data from "Mt. Gox, Bitstamp and BTC China to show you which countries and which currencies are moving in and out of bitcoin in real time."  I'm assuming it's just Mt. Gox and Bitstamp now and possibly others.

-http://www.zerohedge.com/news/2013-11-11/meet-fiatleakcom-%E2%80%93-real-time-map-bitcoin-transactions-country

UPDATE

As of September 2019, the exchanges from which the data seem to come are listed under "exchange" in the bottom left of the tool. Perhaps take it with a grain of salt, as there's some obvious errors, such as gdax still being listed along with coinbase pro. Gdax was rebranded as coinbase pro about two years ago. The listed exchanges are:

bitfinex
bitflyer
bitmex
bitstamp
bittrex
cex.io
coinbase pro
exmo
gdax
gemini
itbit
kraken
livecoin
neraex
quoine
yobit


Why can’t the genesis block coinbase be spent?

When a node starts up it initializes its copy of the block database alongside the genesis block and then begins the synchronization process. For some reason, Satoshi decided not to add the coinbase transaction from the genesis block to the global transaction database. Thus all the nodes in the network would reject the block.

I'm not sure if this was done on purpose or if it was simply an oversight. In any event, it is forever bound to 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa.


Address reuse, cold storage and private keys

Not sure if I got your question right.
If you pay to the same address multiple times that is address reuse. Even if you never spend from that address. But if you don't spend from that address the issue would "only" be privacy related not security related.
When you spend from an address the ECDSA public key becomes publicly known. As far as I know this is only a security issue if ECDSA breaks. So it would not really be a problem as of today but it migth be 10 years from now. Therefore it's not advised to do so.
A bitcoin address is only the hash value of the ecdsa public key. That leads to the fact that you could not sign a transaction from that address even if you could break ECDSA because you don't even know the ECDSA public key.
BUT in the scenario you described you would not reuse the address after sending from it. The way a seed works is that you generate an arbitrary amount of pairs of private keys and  corresponding addresses from it. So in your scenario you would generate privk_1 and address_1. Then you would make multiple payments to address_1. Later you would generate a second pair privk_2 and address_2 from the seed and send all your money from address_1 to address_2.
So if I got you right, I don't see any security problems with this. It's just that everyone would know that all the money belongs to a single entity. That is the afore mentioned privacy issue. I don't see the benefit of reusing that first address for receiving payments because you could simply generate a new address with your hardware wallet every time you want to receive bitcoin. Therefore I would not advice to receive everything on the same address.


The sig part signs the entire transaction, not just the input part. So if someone intercepting the transaction replaced the transaction output part, the sig would no longer be valid. In fact, changing other inputs or outputs or amounts would also render the sig and thus the transaction invalid.

When you sign away an input, you are essentially saying "only this very specific transaction may spend this input".


What is the point of miner signaling in a soft fork activation mechanism? What should the threshold be on miner signaling?

What is the point of miner signaling in a soft fork activation mechanism?

Miners are signaling readiness for a soft fork activation, they are not signaling to support (or vote for) a soft fork. It seems generally accepted at the time of writing (February 2021) that any opposition towards a soft fork should be raised and discussed before an activation mechanism is proposed. If arguments are raised that haven't previously been considered or that opposition is material and sustained across the wider community, activation for that soft fork shouldn't be considered.
Ideally you want as many miners enforcing the Taproot rules at the point it activates as possible. Otherwise an invalid Taproot spend could creep into a block and some miners wouldn't reject it as they would be treating it as an anyone-can-spend. It would need a small, naturally occurring re-org to get that invalid Taproot spend out of the blockchain. This wouldn't be a disaster but ideally you don't want a greater frequency or greater magnitude of re-orgs than usually occur. Ideally you want all miners enforcing the Taproot rules from the point of activation.
There is also the consideration of miners deliberately or inadvertently producing blocks with invalid Taproot spends in them and fooling SPV/non-upgraded clients that is discussed here.
As devrandom pointed out on IRC there is motivation for presumably unready miners who haven't yet signaled to get ready urgently if the soft fork is activating soon. They don't want to expend resources mining blocks (with an invalid Taproot spend in them) that will ultimately be rejected by a proportion of the network. But that doesn't guarantee they will be ready and may lead to miners rushing to get ready for activation which again is not optimal.

What should the threshold be on miner signaling?

This is harder to answer as the threshold chosen appears to be a trade-off between ensuring as many miners are ready to activate the soft fork as possible and preventing a small minority of miners from unnecessarily delaying the soft fork for political or strategic reasons. With the SegWit soft fork in 2017, a BIP 148 user activated soft fork needed to be proposed because miners were assessed to be deliberately blocking activation to attempt to force through an additional block size increase.
In this developer survey conducted by AJ Towns the question "What do you consider a reasonable threshold for activation by hashpower supermajority?" it appears 90 percent or 95 percent would be the preferred threshold. The threshold for the SegWit activation was set initially at 95 percent.


You've hit the nail on the head. A deterministic wallet is any system which uses a passphrase or other snippet of data to build a keypair in a repeatable manner. So long as you remember the passphrase, the keypair can be re-generated from it, so storage is no longer a security concern. There are several methods for generating deterministic wallets, but my favorite is Casascius' Bitcoin-Address generator (C#, Windows, binaries here)


You should have at least one node that can be accessed from a public IP address. This might mean setting up your router/firewall to forward your altcoin's port to the internal IP address of the machine.

You might hardcode this (public) IP into your altcoin code if it's static (it sounds like this is a very small, probably made by you, altcoin), and/or hardcode DNS server(s) that point to known node(s) (maybe use No-IP if you're looking for a free/cheap approach with a dynamic IP). These are the same techniques that Bitcoin Core uses to discover your first peers.

Once a new client has connected to its first peer, the peer will tell you about more peers, etc.


Another option would be to use an exchange which can withdrawal USD/EUR (depending what you want). A good option for that is Kraken, as they have very low withdrawal and trading fees. You can trade your bitcoins to USD/EUR, and then withdrawal to your bank account. And no, I am in no way associated with Kraken, just a happy customer there


Why does Mt gox BTC price discounted with other exchanges?

MtGox has stopped allowing people to withdraw bitcoins off of the site. What this means is that in an attempt to get money off the site everybody sells their bitcoins to begin wire transfers. When you have a bunch of people selling and no one buying, the price drops.

Mtgox's prices often get discounted because they are isolated from the rest of the bitcoin market, as no one is able to transfer funds from the rest of the market onto MtGox, and vice versa.


What does Bitcoin-Qt "Change Passphrase..." do to existing private keys and corresponding addresses?

The wallet actually uses a randomly generated master key to encrypt the keys, and this master key is encrypted using your passphrase.

When you change the passphrase, all that changes is the encrypted master key. The actually encrypted wallet keys aren't touched at all.


Does that mean that not all validations follow just plain "concatenate unlocking and locking script and execute' method of validation? As a beginner I'd expect that for uniformity and security all transactions should follow this same uniform rule.

Nothing uses the "concatenate unlocking and locking script and execute". That approach was abandoned in Bitcoin v0.3.7 (released in July 2010), as it was the reason for one of the two theft-enabling bugs Bitcoin had in its infancy.

The current approach is to first execute the unlocking script, look at the resulting stack, and then execute the locking script with that stack as initial stack. The resulting top stack item determines whether validation succeeded or not.

  Based on the quote, it looks like the P2SH (or possibly other types) scripts are evaluated in a different manner?

It is not so much a different rule - just an additional rule. Because of backward compatibility, network rule upgrades can only add additional restrictions on previously-valid scripts. They can't make invalid scripts valid, as those would risk splitting the network in two (look up "softforks").

  If the answer is yes, how does the Bitcoin node know which type of unlocking/locking script type should be applied for each particular transaction?

Whenever a spend (a) validates using normal rules and (b) has a locking script that satisfies a specific pattern, defined in BIP16, an addition P2SH-specific execution follows, whose validation result is what matters.

  Also, if the answer is yes, are there other deviations from the plain "concatenate and execute" rule?

This same approach is used for a much more recent network rule improvement, called SegWit, specified in BIP141, which is expected to be activated on the network around August 22nd 2017.

  Say there's a very old legacy node that's not P2SH enabled. The transaction above would still evaluate to true (if the provided redeem script is right) as the stack would have a TRUE on top at the end of execution?

Yes, by definition, because P2SH only adds additional restrictions. The specific P2SH locking script just checks whether the spender knows the "embedded" unlocking script (also called redeemscript).


Is my profit calculation for Genesis mining correct?

One factor I know you are currently missing is mining difficulty. It will become more and more difficult to mine litecoin. So profits will drop as there will be less litecoin mined for the mh/s you're leasing.

I'd recommend you watch some videos about it on youtube.

https://www.youtube.com/watch?v=0phyRzSisyE


Is instant profitable arbitrage impossible?

Both are possible; in fact, I do both when the opportunity arises.

For #1, for example, I have successfully conducted an arbitrage on UTC, by buying in at Crypto Rush for 0.00018 and selling it on Mintpal for 0.00019. You definitely have some risk here of not executing the trade quickly enough, so look for markets that are reasonably liquid (i.e. relatively low bid-ask spread). I've done similar arbitrages at least five times. It's not going to be super profitable, but it's a nice opportunity to take advantage of.

For #2, it all comes down to what kind of a long position you wish to hold. So for instance, if you wanted to hold 0.2 BTC and 100,000 DOGE in the first place, then it makes sense to spread them across two exchanges, with 0.1 BTC and 50,000 DOGE at each. When the bid of one becomes higher than the ask of the other, execute the arbitrage ASAP. Of course, it goes without saying that you should not attempt this strategy on a coin that you did not intend to gain exposure to in the first place.


How does bitcoin core choose which node to broadcast to? Any vulnerability?

The Bitcoin Core connected outbound nodes are chosen using a random method. The only time that they are very predictable is if nodes are manually added.


Has anyone ported the Bitcoin software to "pure" Clojure?

There are several Bitcoin Clojure projects, but none of them appear to have a full rewrite of Bitcoin as a goal.

Of particular interest is https://github.com/johnwalker/bitcoin-protocol , which is an implementation of the Bitcoin networking protocol. It can be used to communicate with peers within Bitcoin networks.

Rewriting Bitcoin core in another language is doable, as the btcd developers have done porting it to the Go language - https://github.com/btcsuite/btcd , however it took almost a year of development time between several developers to become fully functional.


What is the "sequence" and its details as referenced for the segwit application?

Sequence is part of any input, before segwit as well. feffffff is the hexadecimal number 0xfffffffe because the bytes need to be reversed. This sequence number, as per BIP 125, is because:

  Wallets that don't want to signal replaceability should use either a max sequence number (0xffffffff) or a sequence number of (0xffffffff-1) when then also want to use locktime;

So this sequence number uses the locktime but does not signal replaceability

If instead you used 0xffffffff, the sequence number would have no effect on the transaction.

If you don't know what locktime is, check out this question: What is Bitcoin's locktime feature exactly? How can it be used?


How to get the balance of a wallet using only bash interface?

you can do it by using blockchain.info and common bash tools that you already have in your system like wget, grep and awk, printf for formatting

For example by using (replace ADDRESS with the actual address you want to query):

wget -qO- blockchain.info/rawaddr/ADDRESS 2>&1 | grep -Po '"final_balance":\K[0-9]+'

And if you want to format the output from satoshi to btc you can use:

wget -qO- blockchain.info/rawaddr/ADDRESS 2>&1 | grep -Po '"final_balance":\K[0-9]+' | awk '{s=$1/100000000} END {printf "%0.8f\n", s}'


How can I set the transaction fee when creating a transaction through Bitcoin-cli commands?

settxfee sets the fee/kb for future API calls like sendfrom.  It is remains in effect as long as the program runs.

estimatefee 1 returns the fee estimated to result in confirmation within 1 block.


How to trade BCC with Blockchain app and private key

In case you have your private key (or the memnomics) you can use the BIP39 browser at https://iancoleman.github.io/bip39/ to see the funds in your internal and external addresses.

More info on how to at How to sweep private extended key from mycellium into coinomi for bitcoin cash coins?


It appears that your device is affected by malware. Likely, the malware detects when a Bitcoin address is in the clipboard and replaces it with an address owned by the malware creator.


Main Differences from Counterparty vs NXT Assets Exchange (SecureAE)

Counterparty is based on the Bitcoin blockchain while NXT is not.
This site compares Colored Coins with Mastercoin with Counterparty, it might be helpful to you: http://www.bitcoin2comparator.org/


how do i convert an uncompressed key to an extended bip 32?

With "uncompressed key" you probably refers to an uncompressed public-key.

An extended public-key has additional informations (next to the compressed public-key itself).
You can get the pure compressed public key from an extended public key, but not vice-versa.

depth (in the hierarchy)
child-index
chaincode (the hierarchal link)
fingerprint (first 4 bytes of the keyId [ripemd(sha256())])


Bitcoin Full Node + Lightning running on single-board-computer, possible?

Please take a look at pine64.org. They have the Rock64, which has a quad-core A53 ARM 64-bit CPU; up to 4GB RAM. And I have heard they will release a new model with a hex-core CPU soon as well. I have used the Pine64 (original 2GB model) for simple Linux experimentation; installed Ubuntu on it, etc. Have not tried Rock64 yet, but am planning to.

The ODROID XU4 may work well too, although I have found with my VPS full nodes, that 4GB of RAM is helpful... see: http://www.hardkernel.com/main/products/prdt_info.php?g_code=G143452239825


So you want to limit your bot strictly to gdax? There are some libs providing abstraction layers from a specific exchange. One example is

https://github.com/timmolter/XChange

This becomes very helpful once you want to make trades on more than 1 exchange.


In terms of "Accounts discovery" algorithm, it is not needed to get internal addresses. We just sequentially take receiver addresses of an account and check whether one of them was used in any transaction. Literally: we get a transaction and check whether receiver address is in the set of target addresses of looking transaction.

This is so because if there is a change address in the transaction then there is a receiver address mandatory. It allows us to skip checking of change addresses for this task.


Electrum only offers online wallet, does it not?

No, electrum only offers offline wallets.

I think your confusion comes from electrum being a thin client. But this only means that electrum does not download the blockchain, instead it uses a server to query for the the information it needs out of the blockchain. From the elextrum bitcoin.it Wiki page:

  Main features:

  ...
  Instant on: the client does not download the blockchain, it requests that information from a server. No delays, always up-to-date.
  Transactions are signed locally: Your private keys are not shared with the server. You do not have to trust the server with your money.
  ...


Does Bitcoin Core accepts uncompressed address generation?

You can import an old uncompressed key. It'll work fine.  Getnewaddress always uses scripts with 'compressed' keys now.  BIP-143 (segwit) style inputs also require compression.

The smaller key format results in smaller transactions, and where it's required and not just optional also simpler code.


Connect to Bitcoin Node behind tor network

The RPC interface is not exposed over Tor. The only thing that goes over Tor is the P2P connection. To access the RPC server, you need to connect directly to the node's IP address, not connect to it over Tor. Note that the RPC interface and the P2P interface are two different things; the RPC interface is private facing while the P2P interface is public facing.


How often does Bitcoin connect to the fallback nodes?

Bitcoin only connects to them specially when you don't have enough nodes, and then it will disconnect as soon as the seednodes give you a nodelist. Bitcoin might choose to connect to seednodes as regular peers as well, but they're not given any preference.


why my bit coin txn is still processing for more than 24 hours?

The fee you paid for the transaction is currently non competitive at 149.712 sat/B.  The transaction volume for legacy transactions on the Bitcoin network is at capacity which means people are paying much higher fees than usual.

Sites like https://bitcoinfees.earn.com/ can help you estimate a competitive fee.  Looking at their estimates for 141-150 S/B transactions it looks like 5x as many transactions have been processed in the last 24 hours than are currently waiting to be processed.

If your transaction is time sensitive, look into "Replace By Fee" to speed up your stuck transaction.  https://bitcoinmagazine.com/articles/what-to-do-if-your-bitcoin-transaction-gets-stuck-1481042383/


Why do the creators of ASICs not just keep them for themselves?

I can't really answer this without speculation, since I'm not an ASIC developer myself. Please keep that in mind when you're reading this!

There are a two paths that ASIC miner manufacturers have to make a profit.

Expend fiat to produce mining equipment

Use mining equipment to mine bitcoin

Sell bitcoin for profit

Profit

Accept fiat or bitcoin in exchange for ASIC mining equipment

Profit

The shortest path to profit is to sell the device. Existing bitcoin is worth more than non-existing bitcoin right now, especially when that existing bitcoin can be turned into more mining equipment.

Keep in mind that they can also do some of both. While it may not actually be so, it's fair to believe that employees of an ASIC manufacturer are likely to invest in their own product by purchasing one.


Multisig vs Multi input transaction signing

They are fairly different things and represent very different use cases.

Imagine you are the head of the party planning committee and you have two workers (A and B) to help you buy items for the party. You are given 1 bitcoin to fund the party.

You have two options.

You can split the funds up between A and B. For example, you could give A and B each 0.5 bitcoins in two separate outputs. If they need to buy something worth more than 0.5 bitcoins, they will need to combine their outputs as inputs to the same transaction. However, for items less than 0.5 bitcoins, A and B will be able to act independently to purchase items (or steal the funds!).
You can jointly give A and B the 1 bitcoin in a 2 of 2 multisig address. Now for any purchase they will need to agree in order to spend from the party committee's funds.

To summarize:

Spending a 2/2 multisig output:

Spends a single previously UTXO and requiring two keys to sign.

Spending multiple inputs:

Spends multiple previously UTXOs and requires each input to be signed separately.

With regards to signing these types of transactions, they have to be done slightly differently.

When signing an input that spends a 2/2 multisig output, the transaction is signed by the two keys and they are encoded into the same scriptSig of the one input. The transaction only becomes valid when both keys have signed with valid signatures.

For example, suppose the scriptPubKey of the previous 2/2 multisig output is:

OP_2 {pubkey1} {pubkey2} OP_2 OP_CHECKMULTISIG

The the scriptSig to spend that output would be:

{pubkey1's signature} {pubkey2's signature}

Notice how they are in the same input's scriptSig.

When signing two different inputs, assuming their previous scriptPubKeys look something like this:

{pubkey1} OP_CHECKSIG

and

{pubkey2} OP_CHECKSIG

Then the two inputs would have scripSigs in this format (respectively):

{pubkey1 signature}

and

{pubkey2 signature}

NOTE: I've used simple scriptPubKey's to be try to be clear about how it generally works, but you should probably use Pay-to-script-hash multisig address and pay-to-pubkey-hash addresses instead of the raw multisig and pay-to-pubkey scriptPubKeys that I used in this example.


Why are Bitcoin addresses hashes of public keys?

It's just to get shorter addresses. Regular public keys are 65 bytes long, which is much too long to be convenient. Compressed public keys are 33 bytes and could potentially be used instead of hashes, though these are a little longer than 20-byte hashes. It also seems likely that Satoshi didn't know about compressed public keys or wasn't comfortable with using them when he designed Bitcoin.

Hashes seem to help against certain attacks (some attacks against ECDSA, for example), though they also open up the possibility of other attacks (such as attacks against RIPEMD-160). It's not clear to me that they do improve security overall.


bizarre transactions involving one address

https://blockchain.info/address/1F89hmmrtonJfAQNAqDmeDadcw7AsZcvXG

The "Unable to decode output address" are as Nate commented OP_RETURN scripts whose purpose is to insert a short message or data snippet into the block chain. They are not so bizarre

Looking at some of the timestamps on the smaller transactions they are not all sent at the same time and fairly spaced out like someone might be manually making the transactions as opposed to a script running.  Each transaction is approx 30 USD so maybe not so unusual?


Why is the value of the input way higher than the output resulting in a second change output?

Why is the value of the input 0.19 instead of 0.1? Why is this type of transaction created?

Bitcoin works on a system of transaction outputs. Transaction outputs are spent as inputs to another transaction. When they are spent, they must be spent in full. The input of your transaction is spending an output with value 0.19, so all 0.19 Bitcoin must be spent in full in this input. The remainder must then be sent to a change output.

  Why can't a transaction just be created with 0.1 input and 0.1 output without any change returned?

Inputs don't actually have a value attached to them; what block explorers show you as the input value is really the value of the output being spent.


How do I calculate the witness commitment hash for a given block?

How are transactions that do not have witness data effected in the
  witness hash? Are they entirely omitted?

It will still include transactions that are not witness, it will just compute the normal hash to use as a leaf in the tree. See BlockWitnessMerkleRoot() in src/consensus/merkle.cpp and ComputeWitnessHash() in src/primitives/transaction.cpp:

uint256 CTransaction::ComputeWitnessHash() const
{
    if (!HasWitness()) {
        return hash;
    }
    return SerializeHash(*this, SER_GETHASH, 0);
}

Also, you are forgetting to reverse endianess, and hash the witness reserved value 0000000000000000000000000000000000000000000000000000000000000000 (from the last 32 bytes of the coinbase input witness). So step by step:

$ reverse_endian 66beaceb4be99da1e9824448231ab4fd37bacaee912381e779b37cf0e1dadad7
d7dadae1f07cb379e7812391eecaba37fdb41a23484482e9a19de94bebacbe66

$ reverse_endian aecb37e25954e15489e25548eb663ffdfd8a1362cac757ad62e9614453d2a577
77a5d2534461e962ad57c7ca62138afdfd3f66eb4855e28954e15459e237cbae

$ reverse_endian 5b211bc589cbdf5ad86cab1e2fe91f01c8ab934d21536b35864d30a3ff778456
568477ffa3304d86356b53214d93abc8011fe92f1eab6cd85adfcb89c51b215b

$ hash256 0000000000000000000000000000000000000000000000000000000000000000d7dadae1f07cb379e7812391eecaba37fdb41a23484482e9a19de94bebacbe66
d822d7717f284b89ea6a97874af567e9887a26a9f7db449ce02377d8fae4643f

$ hash256 77a5d2534461e962ad57c7ca62138afdfd3f66eb4855e28954e15459e237cbae568477ffa3304d86356b53214d93abc8011fe92f1eab6cd85adfcb89c51b215b
c182a158773ea7fc7a252fa725fc726de2a171088b40528ca00de0569fe53afe

$ hash256 d822d7717f284b89ea6a97874af567e9887a26a9f7db449ce02377d8fae4643fc182a158773ea7fc7a252fa725fc726de2a171088b40528ca00de0569fe53afe
30d002641e0eb81b11c3d14f4b120e80b4c06bcb3d34d90a5a606ca85e90c841

$ hash256 30d002641e0eb81b11c3d14f4b120e80b4c06bcb3d34d90a5a606ca85e90c8410000000000000000000000000000000000000000000000000000000000000000
4a657fcaa2149342376247e2e283a55a6b92dcc35d4d89e4ac7b74488cb63be2

Which matches the op_return data in the second coinbase output: RETURN PUSHDATA(36)[<aa21a9ed> <4a657fcaa2149342376247e2e283a55a6b92dcc35d4d89e4ac7b74488cb63be2>]

  Where does the (concatenated?) witness reserved value come from?

I alluded to this before, but it is in the witness field of the coinbase input:

  the coinbase's input's witness must consist of a single 32-byte array
  for the witness reserved value - BIP 141


How long does it take to download blockchain

It depends on your bandwidth and (to a lesser extent) your power of your CPU, because each block requires verification. You can see the latest size at here. Currently it is 10.8GB or so.

One option to speed up the download is to download a bootstrap.dat. The Bitcoin client will look for a "bootstrap.dat" file to pre-seed blocks. You can download on version of bootstrap.dat at bitcoincharts.com. In most cases this will be faster, than the under-resourced bitcoin network.

Alternatively, if you run linux try this batch script:

#!/bin/bash
[ -z "$1" ] && echo "Usage: input=coinname" && exit 1
coin="$1"

while sleep 1; do
blk="$(eval "$coin getblockcount")"
h="$(eval "$coin getblockhash $blk")"
coin_t="$(eval "$coin getblock $h" | grep '"time"' | awk '{print $3}' | sed -e 's/,//g')"

d="$[$(date +%s) - $coin_t]"; dm="$[$d / 60]"; dh="$[$dm / 60 ]"; dd="$[$dh / 24 ]"
echo "Difference from main chain $d s. or $dm m.  or $dh h.  or $dd d."

if [ -z "$first_t" ];then
        first_t="$d"
        start_watch_time="$(date +%s)"
else
        difference=$[$first_t - $d]
        speed="$(echo "$difference / $[$(date +%s) - $start_watch_time ]" | bc -l)"
        remain_seconds="$(echo "$d / $speed" | bc -l)"
        remain_minutes="$(echo "$remain_seconds / 60" | bc -l)"
        remain_hours="$(echo "$remain_minutes / 60" | bc -l)"
        remain_days="$(echo "$remain_hours / 24" | bc -l)"
        # eval "$coin getinfo"
        echo -n "Approximate Time Remaining: $remain_seconds seconds to complete  sync."
        echo "[m: $remain_minutes; h: $remain_hours; d: $remain_days ]"
fi
[ "$LAST_BLK" == "$blk" ] && echo "Alarm! Stuck on block # $blk!"
LAST_BLK="$blk"
done

Save it to "coin_get_diff.sh" and run:

$ bash coin_get_diff.sh bitcoind

Example output:

...
....
Difference from main chain 2528577 s. or 42142 m.  or 702 h.  or 29 d.
Approximate Time Remaining: 2186.83957899106610047826 seconds to complete  sync.[m: 36.44732631651776834130; h: .60745543860862947235; d: .02531064327535956134 ]
Difference from main chain 2526232 s. or 42103 m.  or 701 h.  or 29 d.
Approximate Time Remaining: 2184.21035499949140474011 seconds to complete  sync.[m: 36.40350591665819007900; h: .60672509861096983465; d: .02528021244212374311 ]
Difference from main chain 2524021 s. or 42067 m.  or 701 h.  or 29 d.
Approximate Time Remaining: 2205.15551284291455530316 seconds to complete  sync.[m: 36.75259188071524258838; h: .61254319801192070980; d: .02552263325049669624 ]
...
..


Wallet gone and lost recovery phrase, how to get back my bitcoins?

Your bitcoins are lost forever, unless you have the key. Let this be a lesson learned to always write down your keys on paper.

There are no ways to recover your bitcoins without the key.


Trouble with getting litecoins in my give-me-coins account

You need to launch cgminer with --scrypt at the command line, you will see instead of Mh/s you should be getting Kh/s.


How can I get all transaction for a specific address using Nbitcoin?

var client = new QBitNinjaClient("http://api.qbit.ninja/", Network.Main);
            var address1 = new BitcoinPubKeyAddress("your --Address", Network.Main);
            var balance = await client.GetBalance(address1);


Why does the daemon require peers in order to start mining?

I wanted to start mining bitcoin from the genesis block

I'm pretty sure regtest will let you do that.

  why wouldn't the peer just let me mine on my own chain and not broadcast my results to anybody?

Because that would be pointless. You're not confirming transactions, and you won't get rewarded for your mining. Your chain will probably be overwritten the very next time you connect to the network.

  Where in the v0.9.3 code does it essentially say "if not connected to peers, then don't allow generation"?

Here:

if (Params().NetworkID() != CChainParams::REGTEST) {
    // Busy-wait for the network to come online so we don't waste time mining
    // on an obsolete chain. In regtest mode we expect to fly solo.
    while (vNodes.empty())
        MilliSleep(1000);
}

It's here on versions after 0.9.3:

fMiningRequiresPeers = true;

This commit  changed it.


This is the original announcement post by coblee. In a short bit of research, I wasn't able to find a formal paper. The post describes the changes divergent from Bitcoin.


What exactly is sol/s as far as a hash rate is concerned?

It means "solutions per second" and means the number of attempts per second made at generating a valid block.
In Bitcoin, where 1 hash is equivalent to 1 attempt at a potential valid block, it's equivalent to "hashes per second".


Is Bitcoin stateless? Do miners keep track of current 'state' of bitcoin blockchain?

Bitcoin certainly does have state. The blockchain itself is a representation of the state of Bitcoin at various points in time. Each new block is an update and  commitment to the current state in Bitcoin.

The state that blocks updates is really the Unspent Transaction Output Set. The UTXO set is what determines everyone's "balances". Only outputs that are in the UTXO set can be validly spent by in a new transaction. If a wallet has an incorrect UTXO set, it could create invalid transactions. If a node has an incorrect UTXO set, it could think a transaction is valid when it is actually invalid.

In addition to the UTXO set, nodes also have to know the hash of the most recent block. This too is state. If nodes or miners do not keep track of this, they could create invalid blocks are mark invalid blocks as valid.

So yes, Bitcoin does have state, and all participants in the network must track it in order to actually be using Bitcoin.


How can miners alter timestamps to prevent or delay BIP09 feature activation?

Blocks have a field in the block header which is the time stamp. However this time stamp is set by the miner and can really be changed to whatever they want (although there is some restriction).

  Can anyone elaborate on what and how is this fiddling carried out?

BIP 9 has a start time and a timeout time which indicate the time period that a proposal can be signaled for. This times are based on the Median Time Past (MTP) which is the median time of the last 11 blocks as reported by their time stamps. Since miners can manipulate the time stamps, they can change the time stamps on their blocks so that the MTP is never past the signalling start time or so that the MTP is past the signalling timeout. This can delay signalling from starting and end signalling quicker.

  Why does this raise the difficulty significantly?

The difficulty is calculated by looking at the block time stamps. The difficulty is adjusted so that 2016 blocks happen over 2 weeks. The difficulty will rise if the last 2016 blocks were found in less than 2 weeks, and it will drop if they were found in more than 2 weeks. If miners were to increment their time stamps so that each block had a time stamp of 1 second after the last block, the difficulty retarget algorithm would think that 2016 blocks had been found in 2016 seconds so the difficulty would increase to compensate for this perceived fast blocks.


Needing to recover husband's bitcoin account

I'm sorry for your loss.

If your husband is keeping bitcoin at a big name bitcoin exchange, you may want to contact the exchange administrator to inquire about the procedure.

If the bitcoin is outside an exchange, then accessing it requires knowing a very long password or a very large number, possibly starting with "0x" (meaning hexadecimal). It would probably be written somewhere on paper, but may also be hidden in a password-protected file or stored in a special USB or other crypto device.

If you have reason to believe your husband may have significant money in this, you should really find a knowledgeable friend whom you trust to help you find the access credentials for the money. Unless you are pretty tech savy yourself, you should strongly consider immediately selling the bitcoin for "real money".

On the other hand, if you have no evidence that your husband had money in bitcoin (other than, as you said, "a link that said Bitcoin") you may want to understand that there are a lot of people with interest in Bitcoin who do not hold a meaningful amount of Bitcoin.

Lastly, as said already, do not trust anyone on the internet. Do not give anyone any passwords or any numbers you do not fully understand until you get help from a knowledgeable friend or have educated yourself very carefully. It is extremely easy to steal Bitcoin, it is nearly instantaneous, and it is almost completely outside of legal protections.


In an earlier Version of bitcoin-qt the line was the following:

  SetBestChain: new best=0000000000000419f719  height=212580  work=666804971104474944731

From: https://bitcointalk.org/index.php?topic=136628.0

  In the log messages, new best is the start of the hash of the block
  that it considers to be the head of the best chain, height is the
  length of the path through the tree, and work is the sum of the work
  embedded in that path.

It basically means that your client received a new best blockchain, so a new block was found. You can compare those log entries, they will allways increase in height and its always followed by ProcessBlock: ACCEPTED

I'm not sure why this is CPU intense for you, i didn't recognized this at my client yet. There is no way to remove this function because its a fundamental one of bitcoin-qt client and the bitcoin protocol. Also making it less CPU intense can only be done by changing the source of the client.


Is cgminer used for both bitcoin and litecoin GPU mining?

Cgminer can be used to mine both LTC and BTC.  When executed to mine Litecoin one would need to add the command line switch --scrypt  It is also worth noting that the last version to support GPU mining and scrypt is version 3.7.2  Versions after that have all GPU mining capability removed.


Why did bech32 define a new base32 encoding scheme rather than use an existing one?

There are multiple aspects to the design of bech32. There is the choice of character set (i.e. which characters are included in the 32 options and which characters are excluded because they visually look like other characters e.g. 1 because it looks like l), the mapping of specific bits to this character set, the type of checksum to use and the final address structure.
BIP 173 explains the choice of character set.

The character set is chosen to minimize ambiguity according to this visual similarity data, and the ordering is chosen to minimize the number of pairs of similar characters (according to the same data) that differ in more than 1 bit. As the checksum is chosen to maximize detection capabilities for low numbers of bit errors, this choice improves its performance under some error models.

The mapping of bits to bech32 characters is also included in the BIP.
e.g. 11 maps to t (3 on x axis and +8 on y axis) and 30 maps to 7 (6 on x axis and +24 on y axis)

Note that although 1 is included in bech32 addresses as a separator (see here) the character 1 is not included in the permitted character set of bech32. Nothing maps to 1 in this mapping.
Pieter Wuille explained the rationale for this bit to character mapping at SF Bitcoin Devs in March 2017:

The reason for this is we were able to select our code to optimize for low bit error rates. Wouldn’t it be great if we could choose the character set in such a way that 1 bit errors are more likely than non 1 bit errors. This character set is the result of another year of CPU time to optimize for this. We found a bunch of information on tables for similarity between various characters. What you can see on this slide, the z and the 2 are considered similar in some fonts or writing. As you can see they are 8 apart. One is 2 and the other is 10 so they are 1 bit apart. And r and t are 1 bit apart. And y and v are 1 bit apart. And x and k are 1 bit apart. And e and a are 1 bit apart. And s and 5 are 1 bit apart. And 4 and h are 1 bit apart. There are way more similar errors overlaid in this data that you can look for. It’s pretty cool. We made a character set that optimizes for 1 bit errors. As a result our code is distance 6 for 1 bit errors. If you just look at these 1 bit errors we guarantee 5 errors. If you only make errors like this you can detect 5.


Is there a database of all transactions?

I haven't seen anything that is tracking all transaction including failed ones, etc although  this project looks like it has promise:

http://codesuppository.blogspot.co.uk/2013/07/work-in-progress-on-bitcoin-blockchain.html

That said I'm not even certain what your suggesting would be possible.  Consider the following scenario.

If a person / organisation were monitoring and recording all transactions and I were to submit a transaction that then where then to be marked invalid and discarded, the nature of bitcoin is that you send your transaction to peer nodes who in turn will broadcast those out if they verify the transaction.  Now If someone can explain to me otherwise than fine but surely this transaction would only have a limited number of broadcasts before a different chain showing it to be be invalid was received and the erroneous block discarded.  Now unless the 'monitoring party' where within the peers that received the broadcast there would be no way for them to track it?


How do I withdraw bitcoins from my MtGox account?

Easy: you transfer them to other addresses. Go to Mt Gox, log in, select "Funding Options," select "Withdraw," select "Bitcoin" in the drop down box. You then can put in an amount, and an address of where you want to send your BC (bitcoins).

If you want to know where to spend them, check out https://www.bitcoinstore.com/ as an example. Personally, I am keeping mine as an investment - I have owned them for around 6 months and have made 150% returns. But you can also use them to pay friends around the world without paying a middleman.

Enjoy your cryptocurrency!


Can I CPU mine other coins to win Bitcoins?

This is largely what the sCrypt() based forks are intended for - both utilizing un-tapped CPU power on dedicated rigs or allowing casual miners to use their CPUs. At present, the difficulty on the Bitcoin network is so high that it's not even a question of profitability but capability - even with pooled mining, CPU mining is so slow that you may not actually submit even a single share for each round. That said, let's do the math. I'll use Tenebrix (TBX) as an example since I have numbers handy for it.

Keep in mind that the numbers presented are based on difficulties and exchange rates right now and as such will change. I will provide sources for all values and calculations so that you can re-calculate at any time.

A decent dual-core CPU will net you about 3 kH/s on Tenebrix (0.003 MH/s) and our friend the Bitcoin Mining Calculator says that at the current difficulty of 0.288 you should mine 10.48 TBX per day. BTC-E has the current TBX/BTC exchange rate at 0.000195, so that's worth 0.0020436 BTC per day. The same math could be done for FairBrix, LTC or any other sCrypt() derived forks.

Now for the BTC side of the fence: At the current difficulty of 1379647.43921 (auto-populated in the calculator, but available from the same blockexplorer clone I linked earlier) the same CPU will run about 3 MH/s on the Bitcoin network worth approximately 0.00219 BTC, roughly the same result.

So there's your (hopefully future-proof) answer: let the math guide you. As of this exact moment, mining TBX about the same efficiency though you'll probably see smoother returns with an sCrypt() fork (i.e. more shares per hour)


Difference between having bitcoin in my wallet or in a third party like an exchange or an e-wallet

Only the respective trade-offs of trusting another party with your money vs trusting yourself not to lose your data.

When you keep your money on an exchange website or online wallet service, you are not only trusting their good intentions, but also that they stay in business and are running a secure service. A significant number of exchanges and OWS have been compromised or put out of business.

When you keep your money on your own devices, you are trusting yourself not to be hacked, fooled into sending money to a wrong address, and to keep your data safe. The latter requires you to engage in a decent backup policy and to have a basic understanding what you are doing. There have been numerous cases of personal computers being compromised (google for example "AllInVain"), people losing their data to hardware failure without having a backup, or recently, someone just throwing his hard drive worth $7Mio in the garbage.


How to move money to the default bitcoind wallet?

For this, we have the bitcoind move command:

$ bitcoind move "w1" "" <amount>

These kinds of transactions do not incur a fee:

https://en.bitcoin.it/wiki/Accounts_explained#Account_-.3E_Account_Transfers


How to check if an address is valid in Bitcoin Cash?

You can't. Most segwit addresses are actually p2sh addresses that are wrapped around segwit. As it is impossible to determine what the redeem script of a p2sh will look like there is no way of telling them apart. In summary: If an address starts with a 3 it is impossible to know if its segwit, multisig or something else. If an address starts with a 1 it is safe to send to it, the private key to access the funds will be the same on both chains.


It is atomic
If a node goes offline the htlc will not be settled off chain but onchain. of course that is more expensive with respect to fees but that is true for channel closes in any case


Creation and Distribution of a New Block

Does this imply that every miner could be working an different block to add to the chain? Or, are they all working on the same block in a given 10min interval?

Each miner is 'working on a different block', in that any valid block they find will be unique (if another miner simultaneously finds a valid block at the same blockheight, it will have a different hash). The miners can add whatever transactions they'd like to the block, and even if all the transactions are the same, the blocks will still be unique (because other variables will be different, such as the payout address for the coinbase transaction).

  What about adding a newly mined block to the local copies of all other participants? If there is not explicit synchronization between all the participants, some participants (miners) could be working on a stale copy of the blockchain in which the latest transaction has not posted yet. How is this prevented?

Miners broadcast the blocks they find to the network, and everyone updates their copy of the blockchain. The system incentivizes everyone to start working on the next block immediately, since mining on a stale block is wasted work. As a miner, you would want to ensure you have very good network connectivity, so that you hear about new blocks as soon as possible.

The network has been optimized for low latency, see for example the FIBRE relay network. So in practice miners are able to work efficiently, we can see proof of this by the fact that orphan blocks are becoming more rare.