How do I safely accept bitcoins without waiting for confirmations?

There are no such arbitrators currently, as far as I know. There have been plans discussed to create trusted sources of Bitcoins. The idea would be that I'd hold my Bitcoins with an e-wallet service and ask them to transfer my coins to you. The e-wallet service would confirm (outside the Bitcoin network) that it was going to send you so many coins.

In one plan, the e-wallet service would send you a signed email containing the transaction ID and a copy of the transaction. If a conflicting transaction ever appears in the public block chain, you would have proof that the e-wallet service had cheated you, destroying its reputation.

There is another method that doesn't require the sender to use an e-wallet service. In this method, a verifier connects to as many Bitcoin clients as possible over as much of the network as possible. He monitors the transactions appearing. If he sees a transaction on all points and doesn't see a conflicting transaction anywhere, the only possible double-spend attack would be to conspire with a miner who happens to mine the next block by luck.

For most transactions, just seeing the transaction posted is sufficient. But if you add in making sure the transaction is seen over most of the network, the risk is low enough to be worth taking for all but the highest-value transactions (say $5,000 or more). For transactions higher than that, it's hard to see how a 10 minute delay is a big deal. But if it is, you'll need to develop a method to handle it.

There have also been proposals for "side chains" that generate blocks more quickly and permit transactions to be confirmed faster. However, they're really not suitable for large transactions as they are unlikely to ever see enough hashing power to ensure they're resistant to a 51% attack.

Note that if you are ever ripped off in this way, you can always prove it. If you see the unconfirmed transaction, you can save it. If no conflicting transaction gets in the block chain, you can still post that unconfirmed transaction. If a conflicting transaction does get in, you'll have both transactions. So you can at least name and shame.


How to perform atomic swap Bitcoin-Litecoin

You would need to find another party to do the swap. An example:

Alice and Bob have accounts on both chains. Alice has Litecoin that she wants to exchange into Bitcoin. Bob has Bitcoin that he wants to trade for Litecoin.

Alice tells Bob that she is willing to give him 2.5 Litecoin for 1 Bitcoin. Bob agrees. They both agree that Alice will publish a contract on the Litecoin blockchain that transfers 2.5 Litecoin from Alice to Bob.

Once the Litecoin contract is published, Bob examines it. He sees that the parameters are to his liking, so he publishes a contract on the Bitcoin blockchain that transfers 1 Bitcoin from Bob to Alice.

Alice examines the Bitcoin contract, and likes what she sees. She uses the preimage that she used to build the Litecoin contract to unlock the 1 Bitcoin. Bob is no longer the owner of the 1 Bitcoin.

When Alice used her preimage, that preimage was published on the Bitcoin blockchain. Bob sees it, and uses the same preimage to unlock the 2.5 Litecoin on the Litecoin blockchain.

That example is a simplified version of the typical scenario, but I hope it helps you see the coordination required to do an HTLC.

A little more detail into the mechanisms can be found on a writeup I did for HTLCs between the Bitcoin and Bitshares blockchains. It can be found at http://www.jmjatlanta.com/index.php/2018/09/27/bitshares-and-hashed-time-lock-contracts-htlc

If you are looking for more technical how-to, you can use the following resource:

HTLC (Hash Time Lock Contract) using bitcoin-qt

I use the libbitcoin library for BTC. A tutorial that can get you started with HTLCs using that library can be found at http://aaronjaramillo.org/libbitcoin-cross-chain-swaps-with-htlcs


Will "all" bitcoins ultimately vanish? (be unusable)

The math is clearly absurdly unrealistic because as there are fewer Bitcoins available, it becomes harder to lose them. So the rate of loss has to decay as the availability of Bitcoins goes down.


What is the formula for inferring hash rate from difficulty and block frequency?

Better Late than Never. I was asking myself the same question...I thought the hash rate of the network came from Full Nodes observation on Miners...I was wrong.
I was looking for this answer on Bitcoin.org, but it's on Blockchain website: https://www.blockchain.com/charts/hash-rate. Look at the methodology at the bottom of the page.
Formula is Hash rate = (Difficulty*2^32)/(intervals in seconds between 2 blocks.
Theoretically you know this to be 600 seconds. So the tell it as H = 2exp32 D/T..
For the second part of your answer, this is from my own inference, but within a day, we can expect a persistent shorter time of resolution per blocks, as hash speed in the long run accelerates at about 400% per year (from technological efficiencies and Mining Nodes being added), meaning about 0,45% per day. Look at Network Difficulty over time, and you see that it continuously increases Difficulty, neutralizing efficiencies, to maintain block resolution time around 10 minutes. If it did not do so, reversibility would increase making reliability of security vulnerable, weakening users confidence, whom would either seek trust signals or defect . On this you can read Nakamoto's introduction of his white paper.
Many factors may affect the slowing of the Networks Hash rate. The most important is not from technology when Hash slips, but from defections (permanent or temporary) of miners associated with Price of the Bitcoin usually.
With blockchain.com latest charts (data from March 18 2021)I can infer the average time of block resolution from the same formula. By doing T = (Difficulty*(2^32)/Network Hash Rate. (21.6TH*4,294967296)/157.6EH = 588.65 seconds or 9'48".
I am new to this, a week or so, and am not and won't be either an investor, nor miner...but I am always very curious, like estimating the number of Miner Nodes, a statistics I cannot find anywhere.
They are about 70 Million lightweight Nodes (mostly wallets), Between 8,000 to 12,000 Full Nodes...but how many Mining Nodes? At Least 1,1 Million to up to 6 Million depending of the formula you create (or I create). If someone has the answer to this, please go ahead.


Does a brokerage firm have its own price matching engine? or it is only that exchanges can do this all matching stuff?

In a financial world, no broker offers his own matching engine to execute the orders of his client with another trader, all trades have to go through echanges (except FOREX market). They typically contract the exchange or another data feed vendor. By doing this they transfer the risk to the data vendor that if anything happens with the data feed, they are not in charge.


list of addresses for major bitcoin exchanges

Try searching for largest balances on the blockchain explorers and they sometimes have them labeled. For example: Bitcoin Rich List shows:

3D2oetdNuZUqQHPJmcMDDHYoqkyNVsFk9r
wallet: Bitfinex-coldwallet 179,384 BTC
16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe
wallet: Binance-wallet  158,779 BTC
16rCmCmbuWDhPjWTrpQGaU3EPdZF7MTdUk
wallet: Bittrex-coldwallet  112,203 BTC
3Nxwenay9Z8Lc9JBiywExpnEFiLp6Afp8v
wallet: Bitstamp-coldwallet 101,848 BTC
3Cbq7aT1tY8kMxWLbitaG7yT6bPbKChq64
wallet: Huobi-wallet 98,042 BTC


How to transfer bitcoin? No third party, no exchange, no hard wallet, no mobile wallet

If you want to avoid all third parties, you need to run a node yourself. Download bitcoin-core and let it sync might take a day or two depending on your machine.
You can import your paper wallet by taking the WIF private key and using the importprivkey command in the bitcoin console. Note the rescan will take a while, but once it is done you can spend to any address you like.


How bitcoin finds a few transactions earlier account balance from outputs?

How an account's balance is found if the latest input and previous output are away from each other away more than 1 transaction.

They never are. They are the same. Someone's input becomes someone else's output, until he decides to spent said output as an input in a new transaction.

Or, am i not understanding the question? Are you asking why a wallet understands why an output ...(that he received more than X blocks away) still belongs to him? See =>

  Also how an account's balance is found if there are some outputs to that account with small values in different transactions and another output which is account's balance? How they are gathered?

I don't really understand what you're asking here, but your node keeps track of every transaction, and then creates a UTXO set- Unspent Transaction Output.
In this set are all the unspent outputs of the entire network. The wallet then checks if any of these outputs belong to an adress you own (Note: the wallet doesn't actually directly use the adress to scan for UTXO's, but rather the output script, but for practicality you can just see it as an adress, i  guess.) (have the private key of), and if so - will show it as belonging to you - and thus your (account) balance.


The initial block file parsing can take a lot of time. From the readme:

  Reading the block files takes much too long, several days or more for the main BTC block chain as of 2013. However, if you use a persistent database, Abe remembers where it stopped reading and starts more quickly the second time.

It depends on the hardware you have, besides a good CPU it probably benefits from a fast hard drive (SSD at best).
On my Macbook Air (2013, 8GB RAM, i7, SSD) it took a few days.


Is it safe/wise to buy bitcoins with a credit card?

Buying any crypto from your credit card is same as buying it through any other payment method. both are equally secure.
But always buy it from authentic source only, there are many scamming sites running in the crypto world.


What Hash need for Signature verification?

I think that the hash function used is sha256d, a non-standard function obtained by hashing with sha256 twice (first hash the data, obtain 256-byte digest, then re-hash the digest).


Here is my merged mining implementation - not quite up to date


Will your shares be lost if you restart p2pool before the payout?

You can restart p2pool at any time without losing your shares, because your shares are recorded in p2pool's share chain and permanently associated with your payout address.

From the wiki:

  Whenever a peer announces a new share found (new block in the P2Pool block chain), it is received by the other peers, and the other peers verify that this block contains payouts for all the previous miners who found a share (and announced it) that made it into the P2Pool share chain. This continues until some peer finds a block that has a difficulty that meets the Bitcoin network's difficulty target. This peer announces this block to the Bitcoin network and miners who have submitted shares for this block are paid in the generation transaction, proportionally to how many shares they have found in the last while.

Please note that this also means that you cannot change the payout address of the shares you've already found - you can only change the payout address for future shares. Additionally, this architecture means that you will be able to collect payouts from your previous shares without p2pool running at all!


Of course there is a way to change anything. But you must carefully think over the changes you do. The source code is available here. Here are some directions:

  Blocksize to increase it?

Change the MAX_NUMBER_OF_TRANSACTIONS constant

  Block timing can this be increased either along side blocksize or separately?

It can be increased or decreased separately from the block size. In Nxt there is no constant for that. Easiest thing to do is to see how the BLOCK_TIME constant is used in Ardor and do the same in Nxt

  Datacloud can this size be increased to upload larger files and also can it be changed so these are permenatly uploaded or put up and only removed when required by the person that uploaded them ?

The size can be changed - MAX_TAGGED_DATA_DATA_LENGTH. You cannot delete data which is already announced to the network. You simply cannot force someone to forget some data. If you find a way to do this, please tell me, we will solve the double spend problem in truly scalable way :)

  Fees such as uploads, currency creation, asset creation can these be modified increase or decreased there base and max ?

They can. Search for the implementations of the nxt.Fee interface


Yes, you would simply import the private key to your client or online wallet.

I think the purpose is to move funds to the address on the card, then keep the card in a place somewhere safe and not use it. For everyday use, I think high grade steel, ceramic cast engraving, fireproofing, etc. is overkill.

You can always send more money to the address after you have swept the balance, but like you said, using it once may compromise the private key.

However, I don't see why you can't use the card to send to an address in your Multibit wallet (or other client). This means only your own computer "saw" the private key. As long as you feel comfortable with that, I see no reason why you can't reuse the card. But, and I am not sure about the following, I think private keys change with every transaction, which might be why you have to sweep the address, rather than just take a portion, and also why you cannot reuse it.

I will post more once I learn more on this topic. Also, another user may clarify in the meantime.


Ironically, encryption is not an important part of bitcoin (?)

Cryptography and Encryption

In the wider world, cryptography is used for a variety of security related purposes:

Authentication (proof of identity, or proof of ownership)
Non-repudiation (author cannot later deny authorship of data)
Confidentiality (secrecy - third parties can't see the data)
Integrity (proof that data has not been changed or tampered with)

When we say "encryption" without clarifying further, we are usually talking about the use of cryptography to ensure confidentiality (secrecy of data, but not secrecy of a transmission having occurred - the latter might involve steganography or private channels etc).

Bitcoin's peer-to-peer protocol doesn't need secrecy but it does need a form of authentication and integrity proof that is provided by digital-signatures.

Traditionally digital-signature algorithms used RSA which involves encrypting a hash of data but not encrypting the data itself. Bitcoin uses Elliptic Curve cryptography which produces digital signatures without involving encryption of a hash.

So the author is perhaps pointing out that the data sent by Bitcoin peer-to-peer protocols is not encrypted for confidentiality and does not involve encryption.

Terminology

The word crypto-graphy literally means hidden writing. There is a certain irony in using this term for elliptic curve cryptography which cannot directly be used for hiding the text of messages - what many people mean by encryption is the process of converting normal readable plaintext into unreadable ciphertext.


What database engine does Bitcoin and other top altcoins use?

It depends on the implementation. The network itself does not have a database engine. Bitcoin Core and software derived from it (most altcoin software is derived from Core) uses LevelDB to index the blockchain and store the chainstate data (UTXO set, current best block, etc.). It uses BerkeleyDB for the wallet.

However different implementations can use whatever database engine they want. For example, Armory uses LMDB for storing block indexes and other chainstate data.


Why is a privacy problem to pay always to the same address?

Assume you are using a unique common address for each customer and at the end of the day/week/month you make payments to your employees, suppliers or partners.  When making those payments, if those outgoing amounts exceed the amounts received from one customer, you will have to include inputs coming from other customers. If some of your customer addresses are well known (leaks or otherwise) then people can use those addresses to track others when you are batching multiple inputs to make payments. Once they know those addresses belong to you, they will track those to see how they are included in other inputs. So, a determined person can definitely make interconnections thus compromising privacy.

If you are not re-using addresses, then even if some of them get leaked only few of your addresses gets compromised when you are including them in the transaction. However that will be one-off and snooping will end there. However, if you are persistently using the same unique addresses with the consumers, the problem is compounded as that address will be continuously monitored to compromise other addresses which are also being continuously used.

So now the attacker can create a map of all your customer specific addresses. If you reused the same address for all customer, the attacker could only know the volume of traffic and the revenue from those customers. But with unique address to each customer, the attacker can not only map the above but also now can know customer specific metrics like revenue/customer which is one level deeper and can create competitive issues.


What is the easiest way to "listen" to the network?

https://blockchain.info/ , 'nuff said.

They feature live events of transactions appearing in the network, as well as blocks.

Other than that, there is this - http://bitcoinmonitor.com/ . It shows such events graphically, along with currency trades.


Yes. You can send ETH to any compatible app or wallet. It will just take a small amount of ETH to pay the fee for the transfer (it's called gas). Gas price can be small, sometimes 0.004 ETH or less. It depends upon how busy the network is with transactions.

https://etherscan.io/chart/gasprice


How to find out where I sent my coins in 2011?

Check your email account around that time to see if you created an account on a Bitcoin exchange, or if you got a deposit confirmation.

To find it more quickly, you could try to search your emails for the amount you sent, the address that you sent from, and the address that you sent to, because either might be contained in such a deposit confirmation or payment request.

As Jannes mentioned, you could also try to search for the receiving address on a block explorer, to see if the address or a succeeding address where the money was forwarded to is a known entity.

Unfortunately, the most commonly used exchanges from 2011 are now defunct. But it may be worth seeing if you sent it to a Bitstamp account as that was founded in 2011.


What part of the transaction is scriptSig in?

I was confused by that too. Here's the picture with some more labels on it.


How to get unique rpcpassword for bitcoind

Since Bitcoin Core 0.12, an RPC password is no longer required for normal operation. Instead, a random password is automatically generated by bitcoind and stored in a temporary file on disk. When an RPC client (like bitcoin-cli) wants to connect, it automatically uses the password from this file.


Is Bitcoin truly decentralized? Explanation below

Short Answer: The control is mostly with few hands.

Long Answer:

Even though in expectation the block generation may seem somewhat reasonable with 0.01%, the variance is quite high. Also, the mathematical puzzle miners are solving continuously follows the property called memoryless.

In brief, the memoryless property of a puzzle is say you failed to solve the puzzle till time t_0, then the probability that you will at sometime later is equivalent to a fresh start at time t_0, in other words, the failed past effort does not increase any chance of winning a block in future.

So, to reduce variance miners come together to form pools to reduce the variance. Coming to centralization the current hash rate distribution can be found in (https://blockchain.info/pools).

The intermediate between total centralization point comes a classic attack call 51% attack(some close instances in history can be found https://www.coindesk.com/bitcoin-mining-detente-ghash-io-51-issue/). The caveat with 51% attack is that the stakeholders may lose trust in bitcoin in case of 51% attack which will reduce the value of bitcoin which might not be beneficial to miner considering the effort required to launch a 51% attack.


Probably no.

Bitcoin transactions work by consuming transaction outputs and creating new transaction outputs. Your wallet will look at what outputs it has available to spend (i.e. your received coins) and choose enough outputs to cover the amount that you want to send plus the transaction fee. If you have sent Bitcoin before, then not all of the outputs that  you have received will be eligible for selection because some of them have already been spent. Your wallet will also choose enough outputs, not all of them, unless all of them are needed to be enough.

So in general, your transaction does not contain a list of all of your previous transactions. The only case where it might is if your wallet decides it needs all available transaction outputs to cover the amount you are sending. And even then, if you have sent Bitcoin before, then some will not be part of the inputs list as they would already be spent.


What are the different upgradeability features in the BIP-Taproot (BIP 341) proposal?

There is the annex, leaf version, ext_flag, OP_SUCCESS, unknown pubkey
types and you could probably include the existing witness version too.
I believe that list is exhaustive.
The ext_flag isn't so much an extension mechanism in itself; more a
structure that permits safely reusing the sighashing code (as opposed
to needing a new tag or other mechanism for collision avoidance).

Leaf versions: for revamping script semantics
OP_SUCCESSx: for new opcodes, without coordinating new version
Pubkey types: for new sighash flags/cryptography without needing an explosion of new opcodes
Annex: for effectively adding new fields like nLockTime

Leaf versions were really only added because we had a few bits to
spare in the control block, and it seemed wasteful to reserve them.
They're mostly a convenience, I think, as OP_SUCCESSx can achieve the
same (add an OP_V2 etc).
As the annex isn't committed to by the scriptPubKey, it's more a way
to extend witness possibilities than it is directly a way to add new
semantics.
So is there something an annex can do that a new leaf version can't? I
think they're orthogonal.
For example, a feature where you could restrict a tx to only be valid
in a chain that contains a certain block hash. It can't be done with a
leaf version, as it's a sign-time thing. I believe the annex can't be
used to introduce new script conditions. A new leaf version could
introduce its own annex-like thing, but that wouldn't be able to apply
to old leaf versions.
The motivating example for the annex is this. Imagine a new opcode is
added that needs few bytes but has high CPU cost. You'd want a high
weight budget per such opcode, but that may require actually stuffing
the witness with dummy data just to get the necessary budget. Instead,
it would be nice if there could just be a marker on the input that
says "increment the apparent weight (and corresponding op budget) by
N", without taking N bytes. Logistically, it would be annoying if that
marker can only be parsed when the spent output is available. The
annex is recognizable without context, mostly by exploiting a thankful
coincidence about what set of witnesses is valid for v0 (first byte of
last witness stack item can only take on certain byte values). This, I
think, can't be accomplished with a new leaf version.

This question was answered by Pieter Wuille on Twitter.


Digital Signature and private/public key

Is the secret key equal to the private key which is needed to spend transactions.

Yes

  Analog: Is the public verification key the same as the public key whose hash is the bitcoin adress ?

Yes, also correct. You’re on the right track :)


How can I trade BTC for other crypto currencies?

Use an exchange such as Bittrex, Poloniex, ShapeShift, etc.
There you can create an account, deposit your BTC to your account, trade one cryptocurrency for another, and withdraw your new coins to an external wallet.


Why do crypto exchanges impose withdrawal limits for BTC and other coins

Limits could be in place for a number of reasons, such as:

Regulations imposed by the government of the country the exchange is operating within (eg unverified customers can only withdraw a certain amount)
The majority of the exchange's coin reserves are held in an offline, cold storage wallet. So a very large withdrawal may require more coins than the exchange has available in an automated hot wallet (this is a security consideration)

Every exchange will have its own considerations in this regard, but these examples should give you some basic understanding of why limits would exist.


Is there a reason transactions aren't compressed?

Transactions themselves do not compress well, they are mostly
cryptographic hashes and signatures. You can save a couple of bytes
here and there by bit-packing, but generally speaking there's not a
lot of reason to introduce massive complexity for moderate savings. Many wallets today grind the signatures to save an
extra byte, but this is possible without changing any of the other
software in the network.
A good portion of the transactions (30%) are produced by wallets which do not use compressed ECDSA keys, which is a more obvious optimization to make. The majority of these are likely produced by blockchain.com wallets.

See above. Compression at the block level also does not present significant improvements. It is possible to compress ECDSA public keys (that are in the uncompressed format) before storing them on disk, but this is very computationally expensive.


Bitcoin deposit stuck 0 confirmations high confidence/low priority

Miners naturally select the  highest fee transactions to include in the blocks they create.  At 300 sat/byte, the fee you paid is too low for the transaction to be immediately included in a block.

See https://core.jochen-hoenicke.de/queue/#8h to visualize the current set of transactions waiting to clear.  As you can see, transactions at your fee level have not been reliably clearing since ~7h ago.


How can you verify a wallet ?

I think you should use

"C:\Program Files\Bitcoin\bitcoin-qt.exe" -zapwallettxes  -dbcache=3000

it will clean the transactions and give you the edge of faster reload.


Yes, your client will fully verify each block it receives.

Your biggest issue with accepting 0-confirmation transactions is making sure an attacker can't send your node(s) a transaction that the rest of the network will discard as a double-spend. Basically you'll want to disallow direct connections to your node(s) and connect them to trusted nodes such as large miners.

This doesn't eliminate risk but reduces it somewhat to Finney attacks and an attacker getting lucky with getting the bad transaction to you through a big miner that ends up not putting that transaction in a block before the conflicting transaction is mined.


getnewaddress (RPC) on encrypted bitcoin wallet without wallet password?

Check out Hierarchical Deterministic Wallets (BIP32) and eventually this blog-post to get a better understanding of the implications it brings.

There are many wallets today that have BIP32 implemented. Bitcoin Core is NOT one of them and should probably not be used for the wallet feature.

In the scenario you described, your webserver will provide new public addresses, but will also know the private keys to them. Therefore, if your webserver were hacked, the bitcoins could be spend from those addresses.

With BIP32 you can separate the information to create public keys from the information needed to create the corresponding private keys.
The information to generate the corresponding private keys can be kept in Cold Storage.


Inconsistency in pubkey hashes usage explanation

No, you are not missing anything. Yes using P2PKH obfuscates the public key, and yes the public key will be revealed when the UTXO is spent (the public key is needed to check the signature). Hence, the obfuscation of the public key only exists until the UTXO is spent and not after. This is why it is recommended not to use the same address twice. If you partially spend a UTXO, the 'change amount' should be sent to a new address, so the public key of the new UTXO is still obfuscated.


what about that the adress change all the time?

Short answer: yes.

Addresses are just a representation of the public key from a public/private key pair.  Wallets generate new key pairs for every transaction.  Every time you click "Receive", you generate a new key pair.  Your wallet manages these keys for you, so you don't have to think about them.  For best practice in privacy, it's best to always use a new address (key pair) every time you receive payment.  That is why it has changed without you telling it to.  You can always re-use one, but there's really no reason for it.


I have lost the ‘seed keys’ (password) to my Mycelium soft wallet (which is on my old iPhone)

If you didn't write down the seed phrase, didn't write down the private key and didn't make a backup, you don't have any way to recreate your wallet and have lost control over any money.
A seed phrase is not a password.


How to retrieve the from and to wallet addresses of a transaction?

Which part / field of the input refers to the hash of the output?

The outpoint contains a txid (32 bytes) and vout (4 bytes), which specify the output you're spending.

This is not the sending address!

What you do (when you're not dealing with a coinbase transaction) is that you look up the transaction with the txid, and look at the transaction output that corresponds to vout. So, for example, if vout was 3, you would look at the fourth output of the corresponding transaction. If vout was 0, you would look at the first output. The address that can spend that output is the sending address of the original transaction.

The genesis transaction is a coinbase transaction, so the txid is all zeroes, and the vout is all ones.

  And which part / field of the output refers to the address which will receive the output?

It depends on the format of the output, but here are the general rules:

If it's P2PK, like here, run HASH160 on the first element of the scriptPubKey, then encode it as an address.
If it's P2PKH, take the third element of the scriptPubKey, and encode the pubkeyhash as an address.
If it's P2SH take the second element of the scriptPubKey, and encode it as an address with Address.fromP2SHHash.

I go into more detail about possible kinds of addresses here: Which bitcoin script forms should be detected when tracking wallet balance?

  How can I extract that the receiver address is that from that scriptPubKey?

Do this:

import org.bitcoinj.core.*;
import org.bitcoinj.params.MainNetParams;

import org.spongycastle.crypto.digests.RIPEMD160Digest;

import java.nio.file.Files;
import java.io.File;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class Test {
    public static void main(String[] args) throws Exception {
        byte[] b;
        NetworkParameters np = MainNetParams.get();
        Context.propagate(new Context(np));
        b = Files.readAllBytes(new File("genesis.bin").toPath());
        Transaction tx1 = new Transaction(np, b);
        System.out.println(tx1);
        byte[] pk = tx1.getOutput(0).getScriptPubKey().getPubKey();
        System.out.println(bytesToHex(pk));
        System.out.println(bytesToHex(hash160(pk)));
        Address a = new Address(np, hash160(pk));
        System.out.println(a);
    }
    static byte[] hash160(byte[] in) {
        MessageDigest d1;
        try {
            d1 = MessageDigest.getInstance("SHA-256");
        } catch(NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        }
        d1.update(in);
        byte[] digest = d1.digest();
        RIPEMD160Digest d2 = new RIPEMD160Digest();
        d2.update(digest, 0, 32);
        byte[] ret = new byte[20];
        d2.doFinal(ret, 0);
        return ret;
    }
    final protected static char[] hexArray = "0123456789abcdef".toCharArray();
    public static String bytesToHex(byte[] bytes) {
        char[] hexChars = new char[bytes.length * 2];
        for ( int j = 0; j < bytes.length; j++ ) {
            int v = bytes[j] & 0xFF;
            hexChars[j * 2] = hexArray[v >>> 4];
            hexChars[j * 2 + 1] = hexArray[v & 0x0F];
        }
        return new String(hexChars);
    }
}

(Note that I have a file in my current working directory named genesis.bin, which contains the raw bytes for the genesis transaction.)

And you get:

  4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b
     == COINBASE TXN (scriptSig PUSHDATA(4)[ffff001d] PUSHDATA(1)[04] PUSHDATA(69)[5468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73])  (scriptPubKey PUSHDATA(65)[04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f] CHECKSIG)

04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f
62e907b15cbf27d5425399ebf6f0fb50ebb88f18
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa

Which is the address we were trying to get.


How can the alert system be triggered? Who can do it?

Just got confirmation that Satoshi passed the signing key to Gavin before he retired, so at present only Gavin (and Satoshi if he ever returns) is able to send out alerts.


Which kinds of transactions show quadratic signature-hashing scaling?

Quadratic means that something grows as a square function of something else. If you're just talking about a single transaction, there is nothing that changes.

The quadratic hashing issue is that the amount of data to hash to compute or verify signatures grows as a square of the number of non-segwit inputs.


It it posible, pros and cons using multiple pass phrases on same blockchain?

Yes, there is no limit on setting up multiple wallets. The main disadvantage is that you will need to keep track of numerous separate sets of funds. While it has advantages not to put all your eggs in a single basket, you may want to focus on just a few separate storage solutions for each of which you invest some more time to set up securely.


BTC recovery from registration details without wallet.dat

is there any way to get my BTC back from the registration process?

In general there is no registration process for buying or mining bitcoin or for most types of bitcoin wallet. Certainly not in 2009.

I started mining march 2009, i remember registering.

There is no registration process for mining. At least not in the January 2009 Bitcoin software released by Satoshi Nakamoto.
At that time, I believe mining would have placed any mined coins into an address controlled by the private-key in a wallet on your PC.
Registering for a custodial wallet service (trading/exchange service)
There may have been a registration process if you had a "custodial" wallet, a type of wallet where you arranged with a third party for them to manage your wallet on your behalf. There are many such companies, all different. In that case you would have to contact the specific company that you registered with. This would not have been the case in March 2009 but maybe in later years you signed up with a custodial-wallet business to use their trading services? (In any case, this paragraph may be helpful to later searchers who find this question because they have the problem expressed in the title).

there are lists of dormant addresses, can they be used to get my BTC back?

No. To regain control of the BTC you need the private-key that was stored in the wallet. The address is not enough.


How can I verify my wallet.dat file against an older version?

You can use the dumpwallet command and export the private keys to a text file. Do this for both wallets and then compare the text files. You should see the same addresses and private keys. If you do not, then something has gotten corrupted.


Unverified transaction with 78 confirmations

All the inputs seem to be verified. (At 2017-05-24 13:58:05.)

You cannot have a confirmed transaction with unconfirmed input.

There might be an issue with your Electrum wallet that displays something else, I cannot help you with that, since I don't use Electrum. However, right now, everything seems to be confirmed.


Can two related "spends" be in the same block?

Yes, but only if A -> B is placed before B -> C in the list of transactions.
Here is a graph of the percentage of transactions spending each other in the same block, it is usually around 10%.


How are the unlocking script + locking script executed?

This appears to be a bug in BitcoinIDE. The issue is that it is computing the hash differently from what it actually is. Because it finds a different hash, the comparison that checks that the hashes match (the OP_EQUALVERIFY) fails.
However the hash does match. If you compute the hash manually, you get a different hash than what BitcoinIDE is showing.
Using the btcdeb project, I am able to execute this script and step through all of the opcodes correctly.


Verifying a P2SH transaction script by hand. How should I concatenate OP CODES in order to hash the script?

You can find the execution of a similar pay to script hash (P2SH) transaction here:
Pay to Script Hash Execution

Basically the scriptSig is evaluated first, it pushes an empty array of bytes onto the stack because of the OP_FALSE code, and then pushes the signature 3045....001 onto the stack, and finally pushes the redemption script 5141...1ae on. Then we move on to the scriptPubKey evaluation, the encoded redemption script is taken off the stack and hashed, and the hash is compared to the hash e9c3...60a. if these are equal, we move on to the actual evaluation of the redemption script. This means the stack is taken back to the point before the scriptPubKey execution, so we have:

 5141...1ae
 3045....001
 (empty value)

The top element is popped off, decoded, and then evaluated. In this case, it is a OP_CHECKMULTISIG script, the decoded version is on the webpage you linked as well as in your question, but this multisig only has one public key and one signature, so it's basically equivalent to paying straight to that one address. The OP_CHECKMULTISIG will check the signature 3045...001 against the public key, and if it matches, the transaction is valid. The empty data pushed on at the start by OP_FALSE is simply there due to CHECKMULTISIG taking one more element off than it needs, due to a bug, so it's just an unused bit of data needed to make it work.

I'm not sure what you mean by it being a script. It is a script, it is just encoded in the 5141...1ae. You can decode it with the decodescript call on bitcoin RPC.


I suspect the router in my network prevents the block chain from being sucked into my machine, using the classic way, i.e. bitcoin-qt or bitcoind.

You should check if you can open the 18333 and 18332 port on your router.

  Is there a way of dowloading the testnet block chain?

I havent find a direct link to download it but you could do it yourself:

Find a separate computer which share the same operating system and is able to download the blockchain.
download the whole blockchain repository which size is ~2GB
Copy the repository of the blockchain which location depend on your operating system mine is in /home/user/.bitcoin/testnet3 then put it on a usb drive for example.
Then go back to your first computer and put it on the same repository as your first computer.


The concept of banscore is mostly historical at this point in time. The original concept was that minor misconfiguration or implementation wouldn't cause the whole network to disconnect itself instantly from one another. Small violations would just be counted towards their ban score, with large violations (like sending invalid block data) resulting in immediate maximum score.

Today most events which will cause an increase in ban score are going to reach 100 either instantly or very quickly, so it serves almost no purpose. You, as a node operator, get no value out of peers which are misbehaving, so there's no reason to change this value upwards. If the peer to peer logic was to be implemented today any protocol violation would just result in disconnection.


electrum - how to rename automatic a new wallet?

Change the source code.

Here you can see where the word 'default_wallet' is defined:
https://github.com/spesmilo/electrum/search?utf8=%E2%9C%93&q=default_wallet

If you would change that to 'wallet1' the default created wallet would be called wallet1.


Bitcoin's design paper was published on cryptography@metzdowd.com on October 31, 2008, which is considered by most to be the official beginning of the project. On January 3, 2009 at 18:15:05 GMT the Genesis block was established. Six days later, Bitcoin 0.1 was released and announced on the Cryptography Mailing List.

It is hard to estimate the size of the community at any point, especially historically, but there is a decent timeline of the major events in Bitcoin history at the official wiki.


When the total capacity of the channel is less than it costs to close the channel, neither party has an incentive to close the channel.

If broadcasting an outdated commitment transaction returns some funds to the cheating party, the cheated party can create a transaction to claim all funds from the cheater. In the worst case, the justice transaction can just burn all funds by sending them to fees. In no case would the cheating party be able to get any gain from broadcasting an outdated commitment transaction as long as the cheated party recognizes the attack.

Thus, the potential cheater is limited to choosing to hurt both parties. This seems strictly less beneficial than just keeping the channel open.

Especially, if you consider that other channel partners of the attacker would see the channel closure on-chain and may choose to ostracize the attacker.


Has the BitForce Bitcoin Miner be connected to a PC all the time?

Yes. Mining devices such as this are merely highly-specialized processors that communicate with a computer via serial over USB. The computer is necessary in order to tell the device what to do, and to get its result to post to the mining system (i.e. a pool or bitcoind).


Obviously you would normally use a database with an efficient algorithm, but conceptually it goes like this:

1) You find the first instance of the account ID in the blockchain. If the account ID does not appear, stop. The account has no firstbits.

2) As a safety, make sure that there are at least six blocks after the block in which the account ID first appears. Otherwise, you risk having the firstbits change if that block is invalidated.

3) You search all previous transactions for the account ID that matches this account ID to as many characters as possible.

4) You output one more character from the account ID than the number of characters matched in step 3. This is the ID's firstbits.

So if the longest match prior to the first appearance of "13xdjsNsf5zJV9tpbxL6iirp1WdettzwyB" starts "13xdjq.." (and thus matches 5 characters), the firstbits for "13xdjsNsf5zJV9tpbxL6iirp1WdettzwyB" is "13xdjs" (the first 6 characters).

To go the other way, you search every account ID that appears in every transaction in the hash chain in appearance order. The first ID whose start matches all of the firstbits is the account ID for that firstbits.


If someone with a business account wants to send me bitcoin, do I need a minimum deposit in my wallet?

No, anything claiming something like this is a scam.


bip39 converting from entropy to seed failing tests with entropy "00000000000000000000000000000000"

you need to remove python binary denominator '0b' and then zero fill the binary representation of sha256 digest to 256bits --> then it works

checksum = bin(sha256_entropy_int)[2:].zfill(256)[:checksum_bit_length]

also there is a reference implementation mentioned in the bip (must have missed it initially)


Does a trusted blockchain import from BitcoinCore require that chainstate and blocks be from the same source?

It’s not self contained. The chain state contains references to the positions within the blocks which are unique to the sync state.


What were 'high-priority' transactions in Bitcoin Core v0.9?

Historically it was not required to include a fee for every transaction. A large portion of miners would mine transactions with no fee given that they had enough "priority". Today, low priority is mostly used as an indicator for spam transactions and almost all miners expect every transaction to include a fee. Today miners choose which transactions to mine only based on fee-rate.

Transaction priority was calculated as a value-weighted sum of input age, divided by transaction size in bytes:

priority = sum(input_value_in_base_units * input_age)/size_in_bytes

EDIT:

input_value_in_base_units = satoshis to be transferred (e.g 1000 sat).
One Bitcoin is worth 100,000,000 satoshis.

input_age = is how many blocks the input has been present for. An unconfirmed transaction
has an age of 0, and one that has 100 confirmations has an age of 100. An input that
was confirmed 50 block before have input_age of 50

size_in_bytes = size of transaction


What happens to rejected transactions ( i.e double spend or invalid transactions)?

Invalid transactions are never included in valid blocks. They can be included in a block, but that block would be rejected as invalid (and not classified as an orphan block).


How we decode output address from Bitcoin genesis transaction

This is a pay-to-pubkey (P2PK) script, where the transaction contains the destination public key itself. These were common in the early days of Bitcoin, and were originally the type of script that would be created by default by miners (see Why does the default miner implementation use pay-to-pubkey?), though nobody seems to know why this was chosen.

Nowadays the norm is to use a pay-to-pubkey-hash (P2PKH) script, which as you know contains the hash160 of the public key, rather than the key itself.  You can note that such a script looks different, e.g.

 DUP HASH160 PUSHDATA(20)[536ffa992491508dca0354e52f32a3a7a679a53a] EQUALVERIFY CHECKSIG

Blockchain.info is taking the pubkey from the transaction, computing its hash, and converting it to a base58 address.  This is just a convenience for the user, so that one can think of either P2PK or P2PKH transactions as crediting an "address".  So Satoshi could use the same private key to spend a P2PKH transaction sent to the address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, as to spend the genesis coinbase transaction (disregarding the fact that it actually can't be spent at all).


Is there bitcoin implementation in python or C#?

There isn't yet a complete implementation AFAIK, but there are different libraries that implement bitcoin features (wallets, keys, utilities,

Depends on whether you want an implementation of bitcoin network protocol or wallet or just an overlay on top of the JSON-RPC interface of bitcoind.

Useful code on github:

https://github.com/jgarzik/python-bitcoinrpc - Python interface to bitcoin's JSON-RPC API

https://github.com/etotheipi/BitcoinArmory - Python-Based Bitcoin Software

https://github.com/gavinandresen/bitcointools - Python-based tools for the Bitcoin cryptocurrency system

https://github.com/jgarzik/python-bitcoinlib - Bitcoin library

https://github.com/spesmilo/electrum - Electrum thin-client

https://github.com/spesmilo/electrum-server - Electrum server

https://github.com/spesmilo/sx - Python CLI tools


Is it possible to spend outputs with very small amounts?

They won't be lost. But it won't be easy to get them recovered.
The wiki page on Transaction Fees mentions the following:

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

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

So if you have 1,000,000 outputs with one satoshi, you can bundle them by combining them few at a time with a larger output.
Let's say you have another output of 1 BTC. You can make a transaction using this output and any number of 1-satoshi outputs until the limit of 10kB is reached. Make the transaction create only one new output.
I'm not very familiar with output sizes, but let's plan for the worse and consider you can only add two inputs (this will probably not be the case). You will need to make 1,000,000 free transactions each combining the 1-satoshi with the 1 BTC. First tx will give you an 1,000,001 Satoshi output for that address and so on.
So basically, 1-satoshi outputs are not lose, but they are hard to spend. However, the price will need to increase substantially until it's worth the effort to go through this hassle in order to free some satoshi.


What are those bitcoin mining hardware doing 24/7?

Latest technology of Antminer or rather do your research for the new ones.


That all depends on your local electricity costs, including cooling costs.  It may also be determined by the rates offered at the exchanges you have access to.

I don't know of any India-specific mining profitability calculators, but here's one that calculates based on US dollars.  You could probably convert your costs to dollars and come up with a reasonable answer.


It's due to miss-sync of bitcoind in my case.

Just wait the bitcoind sync with the bitcoin network (9GB actually), and after you can use it.

du -ksh ~/.bitcoin/ will give the size.


gettransaction (The remote server returned an error: (500) Internal Server Error.)

Doesnt work for transactions that are not your own.


Must mining be profitable for Bitcoin to succeed? If no, what are the mitigations?

If there are to be people that only mine Bitcoins for living, mining has to be profitable. However, it needn't be only profitable through transaction fees and block rewards. People could subsidize the miners if needed be. Moreover, miners could be providing some paid services while mining - for example giving priority to certain transactions, embedding some messages in the block chain (advertising?), or the like.

It would also be possible for various companies that profit form other sources than mining to run their miners at a loss. This would be similar to say, Google providing free email, social networking and web hosting, as they are gaining enough money from ads to soak up the costs. Moreover, some people could run some charity miners that would for example include 0 fee transaction or some other ones that would be shunned by normal miners. However, if such for-loss mining would be too popular, regular miners would have a smaller profit margin (higher difficulty to reward ratio). This could cause them to stop their business and leave the whole burden on the other miners.

In the end, miners have a semi-regular source of new Bitcoins. They can hoard them and sell them only when they have a profit. If they have enough money to get by for awhile, they can just not sell the coins at too low a value and eventually drive the price up. I'm not sure, however, how well this would work.


Is there a sandbox in bitcoin for testing?

Testnet is really heavy (hundreds of gigabytes), there is a lighter alternative to that now: signet. There is also a local-only network called regtest, which I put in its own section. Finally, I'll explain txindex, which is a useful option to have your own mini block explorer.
Signet
To use it, first start bitcoind with the option:
bitcoind -signet

It will need to sync, but it will be a lot faster than testnet since the chain started recently and as of writing only has about 27000 blocks:
% bitcoin-cli -signet getblockchaininfo
{
  "chain": "signet",
  "blocks": 26029

You can use bitcoin-cli -signet getnewaddress to get a new address, which you can paste into the faucet: https://signet.bc-2.jp/ (if it complains that you have no wallet, see next section). Note how signet addresses also start with tb (which is called the "human readable prefix", hrp), just like testnet addresses.
% bitcoin-cli -signet listunspent
[
  {
    "txid": "9484eff65e5c33f601a8d6446859ffbc6ba59ffd53dca564d66a7c09e040c26a",
    "address": "tb1q7x3nnyskqmgrj9hp95fgfg75fz50x4khay3s0t",
    "amount": 10.00000000,
    "confirmations": 3,

If you don't see anything right away, wait a bit. Once the transaction arrives, you'll see the confirmation count rising at a regular interval. Signet has much more regular blocks than testnet.
Regtest
The regtest is not really a network, since it isn't meant to be used publicly. The chain starts with the genesis, and proof-of-work is effectively disabled, so you can just mine your own blocks. This is useful if you need to test reorgs and stuff like that, which you won't be able to do with signet.
% bitcoind -regtest

Let it run in the a separate terminal window.
Now you should have an empty chain:
% bitcoin-cli -regtest getblockchaininfo
{
  "chain": "regtest",
  "blocks": 0,

Now, lets see if you have a wallet:
% bitcoin-cli -regtest getwalletinfo
error code: -18
error message:
No wallet is loaded.

If you get an error like this, create a wallet:
% bitcoin-cli -regtest createwallet testwallet
{
  "name": "testwallet",
  "warning": ""
}

Now, you can create a new address:
% bitcoin-cli -regtest getnewaddress
bcrt1q0qx0d7prvrd64s3e3trq39fet7jwdecstw5tzu

Note how the HRP mentioned above is now "bcrt", "bitcoin regtest".
Mining some coins
That's right, CPU mining is alive and well ;) In fact, regtest only has blocks when you generate some, yourself. That's nice for testing, you have time to figure out.
You can mine directly to the wallet (so-called coinbase outputs, you may have heard of a company named after these). Here I am using the shell to insert an address generated using the command from above (should work in PowerShell on Windows too):
% bitcoin-cli -regtest generatetoaddress 10 $(bitcoin-cli -regtest getnewaddress)
[
  "2e25176b5122a3d16eca11355b2807ebf99e8ef3cf01e32634417baf47cb9a4b",
  "3e8136a62d513925a075700e92789d70da67d5b3dd986e936d65b12a3ba53c72",
  "55ca10e3932a9087259a3826148aa660e09b69b63fe84d6a81bc4e57de052060",
  "4864e894662693ae7e32cb0d2a8bc3ad94c4f5e67e109873555bc5f7b5c166bc",
  "0de8a4bfb5fa5a38fba39dcf9fe360e3382e6fa56c226553c30736525bea659e",
  "69e3a04724793b90de126358a99f297b821cac83b9be12f3d569effd73729199",
  "3eb2a83540ce04ef75f5258359ee1695fa0b2e6cbc04a078f85e3182cd500004",
  "35e39307638bca2db359ee8fa6930fbbf20e5d465882c50e05c05e2510ca2e28",
  "12f2b855729929aa091a7cffccb66886a6c406c7855f8851c25ab162b17455f1",
  "2414f3ddfa767aa1916f296066d35ae58c828b49e84542c57509e7161201b746"
]

We mined some bitcoin, but you have to remember that there is "coin maturity", which means that coins can not be used immediately after mining, not even on regtest.
So after mining these 10 blocks, you'll see that the wallet still reports no unspent outputs:
% bitcoin-cli -regtest listunspent
[
]

To mature the coins, mine a hundred blocks more (I'll omit the output, it's just the command above with 100 instead of 10), and you'll see the coins mined in the first command:
% bitcoin-cli -regtest listunspent
  {
    "txid": "6fe92df06b95a20db44f989471483802a9aebc56e93057dca9fe0546445d35ff",
    "vout": 0,
    "address": "bcrt1qlu9a5687f3m4ct3r5ndlwy8juppgghysy2s67f",
    "label": "",
    "scriptPubKey": "0014ff0bda68fe4c775c2e23a4dbf710f2e042845c90",
    "amount": 50.00000000,
    "confirmations": 110,
    "spendable": true,
    "solvable": true,
    "desc": "wpkh([a45ff478/0'/0'/2']02ebc0275e56ecca4a80d6a6ff7d7ab884c972cff9db9a91b9bb3681741624d41a)#rgeusc6u",

There will be a ten tx's like this, because the ten blocks that we initially mined have all matured. They have confirmation counts from 101 to 110.
Processing bitcoin output with jq
Note how you can use standard JSON tools to extract information from the bitcoin-cli output.
For example, we can verify the number of unspent wallet outputs. In the example from the previous section, we mined 110 blocks, that each have one coinbase output for the Core wallet. But only the first 10 have matured:
% bitcoin-cli -regtest listunspent | jq length
10

Starting over, nuke the chain
You'll possibly want to reset your testing environment before and/or after running a test. With regtest, you can remove the whole blockchain. So shut down the bitcoind process that we started above. You can simply wipe the regtest directory, but be very careful that you don't wipe the wrong one (actually, you shouldn't even have real (mainnet) coins in the filesystem that you run your tests from).
% rm -rf ~/.bitcoin/regtest/

This isn't a true factory reset, since if you have any configuration in ~/.bitcoin/bitcoin.conf, it would still be loaded. So if something is still working unexpectedly, check your config.
Deleting a signet blockchain makes less sense, since you'd just download the exact same chain after relaunching (unless something is horribly broken). So to ensure a clean signet testing environment, maybe just wipe everything except blocks, e.g. chainstate, wallets and indexes.
Txindex, your own block explorer
Bitcoin Core has a neat feature that lets you look up information on an arbitrary transaction. But you enable must it first. To do that, write txindex=1 in ~/.bitcoin/bitcoin.conf, possibly in a regtest or signet section, though I just put it at the top-level since my mainnet coins are elsewhere, and it is useful for all testing.
Now, with txindex enabled, you can retrieve information on, lets say, the first transaction of block 1 (right after genesis):
bitcoin-cli -signet decoderawtransaction $(
  bitcoin-cli -signet getrawtransaction $(
    bitcoin-cli -signet getblock $(
      bitcoin-cli -signet getblockhash 1
    ) | jq -r '.tx[0]'
  )
)

You get, for example, the output script these coins were locked with:
  ...
  "vout": [
    {
      "value": 50.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "0 9243f727dd5343293eb83174324019ec16c2630f",

The "getrawtransaction" step requires txindex.
This is similar to information that you'll see in a block explorer. In this example, I used signet (which has a public block explorer), but for regtest you obviously won't have a block explorer available, so the txindex could come in handy.


Where does it go and who verifies private keys?

There are a few steps involved here.

You create an address. That address is the hash of the public key corresponding to a private key you generated. This is a purely local operation. No communication with the network (or anyone) takes place.
You give that address to someone.
They create a transaction that credits (the hash of) your public key. This hash is stored in the transaction T1, and known to the entire network once it confirms. The coins are now yours.
You get an address from your friend.
You create a transaction T2 that credits your friend's address, while spending the coin you just received. That coin was encumbered with your public key hash, so it needs a proof that the corresponding key owner agrees with the spend. For that purpose, a digital signature created with your private key on, and included with, this T2 transaction. Every (full) node verifies this signature. That includes miners, but they just do it because they don't want to risk creating a block that includes a transaction that is invalid (which would mean losing their payout for the block).


How much memory (RAM) does a Bitcoin node use?

In addition to my answer to the question Minimal system to run a full Bitcoin node: Netbook? Raspberry Pi? etc:

I just restarted my full node and waited for it to receive a new block, which revealed that 256MB of RAM will not be enough for running a full node without memory paging/swapping:

so I would suggest you opt for RasPi Model B+ which comes with double the RAM of its A+ predecessor or you can equip your A+ with a flash storage but you should expect degraded performance in this case.


Aborting/cancelling a transfer transaction

You can't cancel a transaction even if your node has not yet synced. Your transaction is immediately broadcast to the network.

If the tx is still in the mempool, you send the coins to yourself with a higher fee... and pray.


Transfer wallet from Armory to Bitcoin-Qt

You can't transfer the wallet, per se, but you can transfer the private keys. Here's how to do it:

Run armory in offline mode (simply run armory --offline)
Click on your wallet and click "Backup This Wallet" and enter the password.
Select "Export Key Lists" and click the button at the bottom
Check "Private Key (Plain Base58)" from the checklist and nothing else.
Select "Omit spaces in key data", as these may cause an "Invalid private key encoding" during import
Take each private key listed in the window and import them into bitcoin by using this command: bitcoin-cli importprivkey <privkey>

Just out of curiosity, what aren't you happy about with Armory? I ask because I'm an Armory developer.


Is there any way to contact the makers of bitcoin qt and bitcoin core?

It's open source software by many independently cooperating developers. The name is now Bitcoin Core, where bitcoin-qt is the GUI application.

Discussions happen on many forums and media, so it depends a little on what kind of message you want to send them.

"Official" website: https://bitcoincore.org/ and http://bitcoin.org

All others I mention here are public media where many people participate, including some of the Core developers (not always by their real name). Always be wary of fake user IDs.

Stackexchange: you found it already
IRC: #bitcoin, #bitcoin-dev, ...
Forum: http://bitcointalk.org
Reddit: http://reddit.com/r/bitcoin

Be careful that there are a lot of companies and groups with confusing names or even purposely misleading names, trying to give themselves credibility.


Getting orphaned Blocks from the Blockchain

Orphaned blocks are stored in blkxxxx.dat files forever, though each node will know about different orphaned blocks. Bitcoin will print a list of all known blocks, including orphans, to debug.log if you pass it -printblocktree.


How is a node in the middle prohibited from keeping the money in a routed Payment in Lightning network?

Lightning forwards payments using a construction called a "hashed timelock contract" (HTLC), which allows the payee to redeem the transaction if they know the preimage to a given hash, or allows the payer to redeem the transaction after a given timeout.

So eg if I'm selling you something for $2 over lightning, I might say "I'll tell you the sha256 preimage of 1bc9852364a8aa073daedb3965716ab63d84570c645b091f535a3677010d9984 when you pay me $2. You setup an HTLC with Alice giving them $2 when they know the preimage with a timeout of 50 hours, Alice sets up an HTLC with Bob for $2 with a timeout of 28 hours, and Bob sets up an HTLC with me for $2 with a timeout of 4 hours. At this point no money has actually changed hands -- if I don't reveal the preimage, everyone gets their money back. If I do reveal the preimage ("the password is xyzzy"), I get $2 from Bob; but Alice and you still haven't actually paid any money. But Bob knows the preimage, so he can claim $2 from Alice; and then Alice can claim $2 from you.

So the effect is, the middlemen never have the option of running away with the money, they can only run away having paid the money, but not collected it from you: if Bob received the preimage, but didn't collect from Alice before the 28 hour time limit expired, I'd be paid, while Alice and you would get your money back.

This would be pretty stupid of Bob, so we assume that mostly people like Bob will avoid doing things like this, and in effect the whole chain will be cleared at once.


Understanding BIP 143 [hash computation, lockTime, sequence number, witness format]

I believe you can use either at this stage. The marker and the flag show let the client decipher which scheme is being used and interpret appropriately.
lockTime sets when the transaction is valid from. 0x00 is from the first block, 0x11 is from a later block. You can continue to use 0x00 if you wish. https://bitcoin.org/en/glossary/locktime. Most transactions are published with a locktime in the past so that they are immediately mined.
The sequence number: https://bitcoin.org/en/glossary/sequence-number
The stack items depend on the type of transaction. See the examples in bip 141. For example the witness for p2WPKH nested in BIP16 P2SH is "signature" "pubkey"


When is it too late to get BCH and BTG from the fork from an appropriate wallet?

Is it enough that the funds where sent before the forks on the blockchain, or should they also have been recieved (enough with 1 confirmation on the blockchain?) before the forks

The bitcoins must have been recieved BEFORE the hardfork.

  and why?

If I understood it correctly, an unconfirmed transaction during the hardfork means "that the BTC's are still on the sender's adress".
Why? Because the people behind BCH/BTG copy the whole blockchain at one moment and if your transaction is unconfirmed => it's not in the blockchain => they can't copy it.
And that means that the sender of the BTC will have access to the BCH/BTG and the receiver gets nothing of that.


Without using something like Bitcoin Script, how NEM verify the transaction?

NEM uses some servers as the transaction validators called NIS. User signs the code and then the signed byte is sent over the network which is received and processed by the other servers. If you are not a server then all you need to do is to sign the transaction and send it to the severs and that is why NEM doesn't need a similar script language like bitcoin. However servers should have a complicated mechanism and code to verify transactions.

You can check NEM servers here and anyone with the server software running can be a server.

This creates a server-client architecture which eliminates some processes from the clients.

Resource: Makoto, a NEM core developer


How is spamming of the block chain discouraged by the Bitcoin protocol?

It's not really.

Of course there are transaction fees, but in the situation you describe, where blocks are not already full, the supply of available block space must be lower than the demand, and so you should be able to create many transactions at low fees, and miners will put them in their blocks because low fees are better than none at all.

Or, if you are a miner yourself, or have a deal with one, you can fill up your blocks with your own transactions, with whatever fees you like, since they are all going back to you.  (There is a slight risk here: if you make the fees significantly higher than the market rate, the next miner may choose to orphan your block and include those transactions in her own; then she gets to keep the fees you were planning to pay back to yourself.)

There is a slight disincentive for such a miner in that large blocks propagate slower and thus are slightly more likely to be orphaned.

Other miners might notice you are doing this, if you appear to be getting way more transactions in your blocks than anyone else, and so it might not help convince them to support larger blocks.  But it doesn't really prevent the "spam".


How do I reset my TFA token in Coinbase?

You should have the option to remove / change the 2-factor Authentication under Settings >> Personal Details, though this may have changed. My guess is you'll probably need to contact Coinbase support if nothing else has worked so far: http://support.coinbase.com/customer/portal/emails/new


Can I generate payment adresses while offline?

No, you don't need to be online when generating a new receiving address, as this is done locally by your bitcoin-core. You also don't need to be online to receive funds to these addresses, as long as you protect your wallet and keep your system free from malicious software you are the owner of these addresses and you will be able to check their balance as soon as you get online and let your wallet synchronize with the network.


Does this method really work as replay protection?

this does in fact protect from replay attacks?

no

  Would this be a valid method for any hard fork?

no

  My concern is that somebody could replicate the first transfer

you are right


anyone attempted a multiple p2sh(multisig) send (ideally using python)?

answer is yes, its possible: I was merely doing it wrong in my earlier attempt(s):
have posted a gist to illustrate how I got it working using a few python libraries on the testnet: https://gist.github.com/kumrzz/111f8ea12af3528f496cbe678d153fc0


From what I gather you sign both the input and the output of the transaction, meaning that nobody can alter the content of the transaction without invalidating your signature. I also had some problems with this part of the algorithm, and even asked a similar question earlier, but this one deals with more of the low-level bit operations rather than the high-level concept.


Why is bitcoin-qt startup so slow compared to MultiBit

Bitcoin-QT is slower than Multibit because Bitcoin-QT is a thick client(it downloads the entire blockchain,) whereas Multibit is a thin client(it does not download the full blockchain.)


Receiving payment on Lightning Network with LNBig as initial funder?

In principle what you do should work. However there is a subtle but important feature in the lightning network protocol (meaning this is with every implementation) which we call the channel reserve.

If you want to send money along a channel your node has to keep at least 1% of the channel capacity as a reserve / collateral to protect your channel partner in case you try to steal funds.

Let's say lnbig opened a 1 million Satoshi channel with you. As long as you do not have 10 thousand Satoshi on your side you will not be able to send money. If you have 11 thousand Satoshi in such a channel you can send up to 1000 Satoshi because you have to keep above 10000.


What node implementations and mining pools relay and process 'non-standard' scripts?

There is [old] bitcoin version by Lukejr
http://eligius.st/~luke-jr/programs/bitcoin/files/bitcoin-qt/next/test/20130721/
It accepts and relays non-standard transactions running with commandline option "-acceptnonstdtxn"

It is very unstable program, use it with separate database and empty wallet.dat
But it definetely works.

There is at least one pool, which accepts non-standard transactions
It is eligius.st
Its public IP-address is 192.3.11.20
Just add option "connect=192.3.11.20" in your conf file or commandline param and you are a part of "non-standard relaying network"

for more information refer to
https://bitcointalk.org/?topic=260749


What is the definition of an inactive channel?

If you look at the channel_update message of BOLT 07 you will find that a node

  MAY create and send a channel_update with the disable bit set to 1, to
  signal a channel's temporary unavailability (e.g. due to a loss of
  connectivity) OR permanent unavailability (e.g. prior to an on-chain
  settlement).

  MAY sent a subsequent channel_update with the disable bit  set to 0 to
  re-enable the channel.

This means that if you shutdown your node correctly the node or the peer will set the channel to inactive and send a channel message. In particular there is no time(out) encoded to the protocol.

If your node stays online and the TCP-connection stays alive the channel won't become inactive.

If your node dies the peer might send an inactive message. However from the specification it is not clear when and how this will happen.

In general it is considered to be a good practice to shut down your node properly and send out the fact that the channel is inactive so that others won't experience unnecessary routing errors. I think lnd will start collecting statistics about failed routing attempts and locally start to rank nodes by their reliability. While planned downtime is also not as nice as constant uptime it will certainly not downrank your node as much as discovered downtime during routing attempts.

Sorry that this answer might be not as satisfying as you hoped for. Another way to approach this would be to look at the implementations and check when and how they send channel_update messages. For example in c-lightning the send_channel_update function is called 5 times. in Most cases to activate a channel. I can only find 2 cases in which the channel might be broadcasted to be inactive:

static void maybe_send_shutdown(struct peer *peer)
{
    u8 *msg;

    if (!peer->send_shutdown)
        return;

    /* Send a disable channel_update so others don't try to route
     * over us */
    send_channel_update(peer, ROUTING_FLAGS_DISABLED);

    msg = towire_shutdown(NULL, &peer->channel_id, peer->final_scriptpubkey);
    sync_crypto_write(peer->pps, take(msg));
    peer->send_shutdown = false;
    peer->shutdown_sent[LOCAL] = true;
    billboard_update(peer);
}

and:

static void handle_peer_shutdown(struct peer *peer, const u8 *shutdown)
{
    struct channel_id channel_id;
    u8 *scriptpubkey;

    /* Disable the channel. */
    send_channel_update(peer, ROUTING_FLAGS_DISABLED);

    if (!fromwire_shutdown(tmpctx, shutdown, &channel_id, &scriptpubkey))
        peer_failed(peer->pps,
                &peer->channel_id,
                "Bad shutdown %s", tal_hex(peer, shutdown));
    ...

The last one handle_peer_shutdown is the regular shutdown the first one maybe_send_shutdown seems to be called at three points in the code. It can be traced down from there to see if there are any special circumstances at which the channel is broadcasted as inactive.


"Fidor to integrate Ripple protocol", what does that mean?

After digging some more and finding pretty much every possible interpretation on different media outlets, I just called Nick Riegger, the press spokesman of Fidor Bank AG.

According to my conversation with Nick Riegger:

  Fidor Bank AG has already started implementing support for Ripple on their back end. They will first be on the lookout for business partners also using Ripple, in order improve channels for sending money abroad to other banks and business partners. Long-term they want to offer their customers access to any major payment protocol, including Ripple and Bitcoin. To that end they are closely watching the development of the Ripple network just as they are already doing with Bitcoin.

To me it sounded as if they will first use Ripple as a user, but are also considering to provide gateway services long-term.

Update:
At Bitcoin2014, I had the chance to talk to a Ripple Labs employee and fellow SE user, who outlined to me the immediate problem that Fidor Bank AG was hoping to solve: Previously, Fidor had been paying a third party to transfer funds between its own subsidiaries in different federal states of Germany. As the counterparty of such a transaction is still part of the own company, this was like "paying someone to transfer money bills from my left pocket to my right pocket", as he put it. Fidor is hoping that using Ripple for this purpose will substantially lower the cost for such in-company balancing at low risk, while Ripple Labs is hoping that the demonstration of such a use-case would find mimics, or perhaps will convince Fidor to use Ripple for a broader range of purposes, such as transfering money to business partners using Ripple, or even providing their customers access to Ripple by becoming a Gateway in the long run.


Bitcoins are a purely electronic currency. If you want to sell them in exchange for dollars or euros, you can do that. But as Bitcoins, they exist purely electronically. There are physical Bitcoins but basically, they're just the key to an electronic account printed in some form.

I think you're missing the concept that Bitcoins act like a currency or commodity. You can have 10 Bitcoins just like you can have 10 ounces of gold. The key difference is that the Bitcoins exist electronically rather than phyiscally. If you have Bitcoins and want dollars, you have to find someone who has dollars and wants Bitcoins, then you exchange with them.

Bitcoins are not a payment or fund transfer system for national currencies like PayPal and Western Union are. Bitrcoins are a currency that has an efficient built-in transfer system.


How to size in bytes for a transaction using BitcoinJ

You cannot know the size in bytes of a transaction without knowing the inputs to the transaction. Just knowing the amount you want to transfer and just the output does not tell you anything.

Using the sendCoins() method and setting feePerKb in your SendRequest should create a transaction that pays the specified fee rate. If you want to get the transaction details after you send, the SendResult that you get has a field named tx which is a Transaction object. You can then get the necessary information from there.

If you want to know the size before you send, then you need to craft the transaction yourself as sendCoins() will automatically create and send the transaction for you.


Does variability of block solution time change as difficulty increases?

The variability is exactly the same no matter the difficulty. It is always an exponentially distributed random variable with mean 10 minutes (the mean could be slightly off if hashrate mismatches difficulty).

What we may see in the future however is a reduction in variance due to decrease of the block reward. As transaction fees become a more significant part of the reward, the profitability of mining will increase the more time has passed since the last block; just after a block is found, mining is unprofitable so the hardware may idle/switch to a different task. So the network hashrate will increase with time, meaning that few blocks will be solved quickly (hashrate is too low) and few will take a long time (the hashrate will be high so it won't last long), meaning less variance.


Does the chain become computationally more expensive to validate over time?

Validation of proof of work is extremely cheap, and scales linearly with the length of the chain. That is to say, validating the proof of work for 2N blocks will take only twice as long as validating the proof of work for N blocks.

The part that does not scale linearly over the life of the chain is the transactions themselves - signature validation is expensive, and as networks get more busy, validating the transaction signatures and the utxo set takes up the bulk of the block validation time. These are limited by the SIGOPS limit of a block, which limits how many signature verification operations a block may have
(although it is not an exact 1:1 correlation, but more of an upper limit/yardstick to manage script complexity), and the block size, which puts an upper limit on how many transactions can be in a block.

Note that transaction validation as an isolated operation is still mostly linear - signature validation has a fixed, but high cost. Validating 2N signatures will take roughly twice as long as validating N signatures. It's just that blockchains naturally tend to grow at an exponential rate, so the number of transactions in block 2N may be exponentially more than those in block N, thus leading to a non-linear validation time.

A blockchain such as Bitcoin that runs at near-full capacity most of the time will still have a linear validation cost for recent blocks.


Integrate Bitcoin node RPC with website API

There are two ways you can about doing this:

Using a Bitcoin Node (RPC)
Using a library like this

You asked about RPC so I will talk about that.

Ubuntu

1. You can install the Bitcoin Daemon like this:
$ sudo apt-get install bitcoind

2. You have to start the daemon and wait for blocks to download. You can start the daemon like so: $ bitcoind -daemon
You can check the progress of blockchain download like so: $ bitcoin-cli getinfo

If you don't have space to download the full chain, you can use the prune method. Create a new file ~/.bitcoin/bitcoin.conf and add prune {megabytes of space}. This will limit blockchain space allocation to the value of the prune method.

3. Setup your JSON RPC configuration. You can refer to this thread for adding your RPC username and password.

4. After the blockchain has been downloaded (~150GB), you can connect to the RPC server on port 8332 by default. You may use this library or this library to make calls to the RPC server in NodeJS; you may also use any JSON RPC client to make calls.

5. Use walletnotify to receive transaction updates related to your wallet. Setup an insight-api if you want to receive transaction updates from any wallet. You can use insight-api to index and retrieve transaction data and block data on demand as well.

Resources

Bitcoin API Calls - You may want to reference to these methods as you are programming
Bitcoin Full Node - More information on starting a local node if you are coming across trouble
Insight API - Used for indexing displaying all transactions and blocks.
walletnotify - Information on how to use walletnotify.


NBitcoin - how to set RBF to true in order to give higher fee for transaction

NBitcoin just follow BIP125

public bool RBF
{
    get
    {
        return Inputs.Any(i => i.Sequence < 0xffffffff - 1);
    }
}

If you are using the TransactionBuilder for creating a transaction, you have two ways:

One is to use TransactionBuilder.SetLockTime(blockHeight) where block height is the currentHeight-1 (actually, if you put 0 it will be fine as well)

The other way is to build your transaction without signing first with TransactionBuilder.BuildTransaction(false) change one of the input sequence, then use TransactionBuilder.SignTransaction to sign.


Bitcoin Exchanges for Self Directed IRA LLC

Coinbase was easy and only took a couple of days. I provided ALL required information and it was simple. I also established one with Binance no problems there.


Why was the bip32 fingerprint used for bip174 psbt?

Why was the fingerprint chosen for psbt instead of the full hash? Collisions aren't that rare for just 4 bytes of data and adding mitigations in the psbt transaction parsing for such a case seems unnecessarily complicated.

Fingerprint collisions would still require thousands of signers in a single PSBT to actually be a problem. Collisions aren't all that probable when you consider the circumstances.

There is also a practical issue. You can't get the full pubkey hash160 from hardware wallets. There is no existing standard that includes this data and no existing APIs that export it. In some devices, you could get the master public key and hash it yourself, but not all devices supported getting that. The fingerprint is far easier to get, just get the xpub for the key at m/0h and pull the parent fingerprint from that.

  There is also the issue that if the chain code changes without the public keys changing, the fingerprint will remain the same. If this would be the case, the fingerprint would be identical between two identical public keys, but each would lead to differently derived child keys. This leaves even more work for collision detection and potentially even destroys the benefits of using the fingerprint for fast account ownership checks.

I don't see how this would even be possible unless you are intentionally messing around with the chaincode, and I don't see why you would be.

The chaincode is derived by hashing the BIP 32 seed with HMAC-SHA512 and taking the last 256 bits. The first 256 bits becomes the master private key. So you would have to somehow collide the first 256 bits (and thus have the private component of the master private key). But that is highly improbable and is akin to a normal private key collision. The only situation where you could possible have the same public keys but different chaincodes is if you were directly modifying the chaincode itself, but I see no reason for anyone to do this, and if they were, they would really only be inconveniencing themselves.


How is a Ripple gateway different than a conventional bank?

A Ripple gateway acts much like a bank. They compete based on trust, convenience, and cost. They hold other people's money. They promise to handle that money according to their customer's instructions.

One difference is that there's no formal barrier to entry to becoming a Ripple gateway. Someone can open a gateway anywhere in the world and have equal access to the Ripple network for transferring balances, exchanging currencies, and so on.

You can imagine a "central bank" setup on Ripple. One way the central bank could work would be for the central bank to guarantee the performance of gateways and ensure liquidity between them by committing to maintaining a 1-to-1 exchange between the balances of the gateway's it guarantees and its own balances.

Another way a central bank could work on Ripple is if the central bank is the sole currency issuer and manages the account people trust. This would allow a currency with a money supply managed by a central authority.

A bank could also maintain interest bearing deposit accounts on Ripple. A central bank could maintain such accounts for banks or gateways.


Could increasing Block size solve the "End of mining" issue

That will be part of the solution, of course. But it's already assumed that in the far future there will be more transactions. That's not a solution in and of itself.

Keep in mind also, that the more transactions there are, the more valuable the system is, and so the greater the incentive to attack, and the more mining is required to defend it.


What does "H-not-zero" and "Share is above target" mean?

H-not-zero means the hash of the header isn't zero for the first 32-bits. In other words, it indicates a share that was inherently invalid and could never have been valid. This is generally caused by overclocking, overheating, or undervolting. You can probably get these errors to go away by lowering the clock speed, raising the voltage, or improving your cooling.

If you aren't getting very many of them, you may prefer to just ignore them. All that matters is the rate at which you are generating valid shares. If 1% of your shares are invalid and you can only get the errors to go away by reducing your clock speed so that you generate 2% fewer shares, it's not worth it. On the other hand, if 5% of your shares are invalid and you can get the errors to go away by dropping the clock speed by 2%, it's probably worth it.

In one specific case, I was getting that message while mining with bfgminer and made the mistake of sha-256 mining on a scrypt pool = invalid hashing.


Blockchain synchronization is painfully slow / Best way to download blockchain

What usually takes time is the validation of the transactions in the blockchain, not downloading it. Bitcoin Core implements a fully validating node, which does not trust any of the information other peers give it. The only way to accomplish that is by validating everything itself.

30 hours sounds painfully long though. If you have memory to spare on your system, you absolutely should increase the database cache size. The default in 0.13 is 300 MB, but you'll see very significant speedups from using a higher value, up to 4000 or so (which would require an extra 4GB of memory).


The basic idea is to find somebody else who is willing to pay money to obtain dogecoin. This is difficult to do by yourself, so there is the idea of an "exchange" where people who are interested in buying and selling can find each other.

You would create an account on an exchange, send your freshly mined dogecoin to your exchange account, and then put them up for sale at some price. Hopefully, another person who wants to buy dogecoin will meet your price. When the sale happens you would get some amount of dollars in your exchange account. Note that in order to sell your dogecoin, there must be another buyer who is willing to buy them. If nobody is willing to buy, you can't convert them to cash.

Finally, after a successful sale, you arrange with the exchange to withdraw your money into your bank account.


Are bitcoin transaction confirmation times limited by block size?

https://en.bitcoin.it/wiki/Block_size_limit_controversy

Here it states that larger block size would allow more transactions per second.

If blocks have around constant mining rate (1 per 10 minutes) and fixed "amount" of transactions can fit in one block the statement logically follows. How are the size of one transaction and block size defined is a separate question.

The link also gives some context about the size limit.


Who is spamming the bitcoin cash mempool and why?

It is not too difficult to check the low-fee transactions in large blocks with block-explorer. Follow the link
https://blockchair.com/bitcoin-cash/transactions?q=block_id(479479)&s=id(asc)
and press Load more... link several times.

There are a lot of one-input-to-one-output dust transactions like https://blockchair.com/bitcoin-cash/transaction/2ad1135d02924336901d23179d41a74a800da4f2247cf9e66e4cdccf8656f10c

So, this looks like spam. Sorry, I do not have any more information about the creator(s) of these transactions and their goals. You should investigate yourself. Hope my links are useful


How to withdraw from an offline / paper wallet into Bitcoin-Qt on Mac?

Goto: Help > Debug Window > Console

In the input box, type:

importprivkey [YOUR_PRIVATE_KEY_HERE]

Example:

importprivkey 5J5njVrrim5SX9LF56GPx571iViS7LGqpH5TH49ncfaaWFtzMjY


Do you have the exact same configuration on your other rig? If you do, copy the configuration exactly. Sometimes if you don't have long-polling turned on and using the correct port, in some rare cases you will keep going if you are using the wrong protocol for a said port.

In general, if you are doing Bitcoin mining on a Phenom of your type, and you are doing SHA256D hashes, you should wait around 5 minutes.

If it doesn't immediately say long-polling activated, you've got a problem and need to configure your mining application to do so.

From the time you get the Long-Polling started message, anywhere from 30 seconds to 5 minutes is normal.

I have my scan time set for 1 second, by default it's set for 5 seconds but depending on your hardware and the pool you're in they might tell you to set it for 10 to 30 seconds.

Are you using Slush's Mining Proxy too? I know that can stall out if you're not using the correct configuration for that too.


In Bitcoin QT 0.12 for Windows, how do you whitelist an IP address?

There are 4 options (either command line or in the bitcoind.conf file) that have to do with whitelisting. I myself have only used whitelist where you simply specify the IP address (IPv4), without port number.

-whitelist=192.168.10.20

According to the documentation you can also specify a netmask, which I haven't used yet, but should be in this format if I'm not mistaken:

-whitelist=192.168.10.0/24

  -whitebind=
         Bind to given address and whitelist peers connecting to it. Use
         [host]:port notation for IPv6

  -whitelist=
         Whitelist peers connecting from the given netmask or IP address. Can be
         specified multiple times. Whitelisted peers cannot be DoS banned and
         their transactions are always relayed, even if they are already in the
         mempool, useful e.g. for a gateway

  -whitelistrelay
         Accept relayed transactions received from whitelisted peers even when
         not relaying transactions (default: 1)

  -whitelistforcerelay
         Force relay of transactions from whitelisted peers even they violate
         local relay policy (default: 1)


I didn't receive a Bitcoin Payment. What does it mean when the Client is synchronizing?

This is probably normal. "Synchronizing with network" really means "downloading the block chain", and it can take a few hours to a day.

Following the "catching up" you should see the number of blocks already downloaded. At the time of this writing there are 220,000 blocks, when it reaches that you are fully synchronized. If the number keeps increasing you're probably on the right track.

You can speed it up a bit by forwarding port 8333 on your router (not very important, if you don't know how you don't need to bother).


It's not saying that it's confirmed because it isn't confirmed. See Why is my transaction not getting confirmed and what can I do about it?

Your fee is pretty low at 40 satoshi/byte, so according to this chart, you should be using a fee 2.5x times higher if you want your transaction to confirm within a day.


Electrum: How to generate hardened public addresses with HD BIP32 wallet

Electrum uses a few different derivation paths for various script types. For example for legacy p2pkh addresses (addresses beginning with 1) it uses m/n/i where m is the extended private key (xprv) derived from the seed, n is 0 for external and 1 for change addresses and i is the address index with addresses being generated sequentially starting from 0. Electrum also lets you create a wallet using any xprv and then it'll assume that xprv is m in the derivation path and generate addresses relative to that. So all you have to do is restore your wallet from a hardened xprv such m/1' and electrum will then generate addresses relative to that. These addresses will not be visible to the person who has the extended public key for m.

To generate a wallet using m/1' you can use this script like so:

electrum getmasterprivate| python3 xprv.py -m - -d "m/1'" -p|electrum -w wallet_name restore -


How to implement a green address in Bitcoind?

Green addresses are by convention, not by protocol.  You would need to publish an address and then sign a message with the corresponding private key that says, "I promise never to double-spend any coins from this address."  Then you'd need to convince others to believe your promise.


How do "Pay to Script Hash" transactions work?

You're correct so far, you just stopped before you were finished. As BIP16 says, it "defines additional validation rules that apply only to the new transactions" -- specifically, "{serialized script} is popped off the initial stack, and the transaction is validated again using the popped stack and the deserialized script as the scriptPubKey."

So:

1) The script is popped off the stack, leaving only [signature] on the stack.

2) The deserialized script is added, leaving [signature] [pubkey] OP_CHECKSIG.

2) The transaction is validated again, that is, a normal signature verification occurs against the specified public key.


Is it possible to mine bitcoins faster on CPUs with this strategy?

It's not clear what the strategy is. It just says "and solve the system of equations".

The entire structure of cryptographic hashes like SHA256 is carefully designed to make doing this as difficult as possible, and there's not even a hint of how to solve that system of equations.

This is precisely what ordinary miners do, except they try to solve the system of equations by guessing possible solutions and seeing if they solve the equations. If there is a simpler way to solve them, what is it?


How does the blockchain resolve arbitration issues?

I understand that bitcoin wallet is nothing but transaction record performed on block chain.

A bitcoin wallet stores keypairs, and allows the use to interact with the network by sending/receiving bitcoin transactions.

How are transaction details updated in decentralised block chain?

A 'full node' can be run by a user that wants to independently verify the state of the network for themselves. Each full node keeps their own local copy of the network state (blockchain history), and the nodes communicate new blocks and transactions to each other. By doing so, all of the nodes will come to agree upon the current network state, without the need for a central server.

How are arbitration resolved in case misplaced transaction.

Network nodes follow a set of rules (often called 'consensus rules'), that allow them all to arrive at the same conclusion about what the network state should be. In the event of conflicting blocks, the chain with the 'most work' is eventually ruled the valid chain.

In other words is there any confiscate mechanism to strip the owner of his bit coins who involve in illegal practices?

No.


How can users have confidence that there are no backdoors in paper wallet generators?

There's really no way for a nontechnical user to know. In fact, most technical users do not have the specific technical knowledge required to evaluate cryptographic code (including the random number generator). Therefore, it comes down to a matter of trust. If the user does not directly trust the software author, they may sufficiently trust somebody else who has evaluated the technical aspects of the software.


What is the most expensive Bitcoin purchase ever made?

If you mean the greatest amount of bitcoin spent,  the "bitcoin pizza" comes to mind. At a whopping 10k BTC spent.

Pizza for bitcoins? (bitcointalk.org)


How to know a given file is a valid bitcoin wallet?

On Linux, you can use the file command. If the file is a Bitcoin wallet, you should see

wallet.dat: Berkeley DB (Btree, version 9, native byte-order)

(It will always say Berkley DB version 9, but the filename might be different.)

file is also availible on Windows: http://gnuwin32.sourceforge.net/packages/file.htm

How does file tell that it's a Berkley DB file? See How did file identify this wallet file?


I'm guessing that the uninstall didn't remove your wallet or block files.

Delete the folder C:\Users\YourUserName\Appdata\Roaming\Bitcoin to delete both of those.


Although the fee is roughly 0.0002 BTC/KByte (corresonds to 20 Satoshis/Byte), at the moment there is a congestion of transactions happening in the network, with roughly 30,000 unconfirmed transactions:
https://tradeblock.com/bitcoin/

Therefore the required fee has increased dramatically for high priority transactions:
https://bitcoinfees.21.co/#delay

So it looks like your transaction fee should have been three times as high to be regarded with high priority.

But just wait some more time, the transaction should be confirmed soon.