What to do when you genuinely don't understand anything about taxes, yet are apparently expected to pay them for your Bitcoin?

If I cannot understand the laws/regulations, what am I supposed to do?

A fairly widespread legal rule is that ignorance of the law is no defence.
If you don't understand how the law applies to your situation, you are expected to seek help from someone who does.
You can contact your local tax authorities and ask them, or you can pay for advice from a tax-expert such as an accountant.
All this applies to Bitcoin as much as it does to other forms of money and other assets or investments.

I'm obviously afraid of sending them a letter and asking about my specific situation, because then they will know that I have coins and probably start pestering me about "unpaid taxes" or something.

I wouldn't have such concerns. We all like for hospitals, roads and waste-collection  to exist and be organised by government and paid for by all of us with any significant income or with assets. If you prefer, pay a tax expert for advise.


Why are some of my peers rejecting this CSV transaction?

First of all, the Bitcoin network does not have a time granularity of minutes. At best, you can expect things to be within hours of what you want the time to be. So timelocking something for 10 minutes is useless and not very helpful as the "network time" updates only every 10 minutes. The time that you set does not correspond to real time, it corresponds to "network time" which is nowhere near real time.

The "network time" is the median time stamp of the last 11 blocks which will generally be an hour or so behind real time. But it is based on the block timestamps so it does not increase at a fixed increment nor is it a consistent amount of time behind. Combined with the fact that blocks are not found on a consistent timing, the "network time" has a granularity of a few hours at best.

So your transaction has a locktime of 10 minutes in the future from real time. But for network time, that's at least an hour, probably an hour and a half, before "network time" catches up to your transaction's locktime. So your transaction will remain non-final until that time.


For a redeem script to satisfy the conditions of a script what must it leave on the stack post execution?

Thanks to harding for answering this question on IRC and sanket1729 for edits.

Presumably TRUE is equivalent to 1 and FALSE is equivalent to 0?

TRUE is any non-zero value.  This is often used in scripts involving the former OP_NOPx opcodes that don't pop their values off the stack after verification, e.g. a script that can be spend by a miner after a certain height could use: <locktime> OP_CLTV ; if CLTV fails, the transaction is invalid; if it passes, then the non-zero  value left on the stack allows the script to pass.

Any opcodes that evaluate to FALSE will result in immediate failure and termination of execution? So with non-CLEANSTACK you would never see a resulting stack of TRUE FALSE TRUE pass as FALSE would result in immediate failure and you wouldn't assess the final TRUE. However, you could see a stack of say TRUE 3 TRUE 5 and this would pass with non-CLEANSTACK. (It would fail with CLEANSTACK as CLEANSTACK must have a single element in the resulting stack).

All that matters without CLEANSTACK is the top value on the stack at the end of execution.  Anything further down the stack doesn't matter.
CLEANSTACK is a standardness rule for P2SH but it is a consensus rule for Segwit v0 (BIP141 specification) and Tapscript, SegWit v1 (BIP342 specification, rule 4, ii)
The word "failure" is ambiguous here. There are different ways different opcodes can fail. For example, if OP_CHECKSIG fails it just pushes a 0 to the stack. But if OP_CHECKSIGVERIFY fails, the whole script fails. You can put TRUE FALSE FALSE on the stack using just OP_0 OP_0 OP_1.
Some of the VERIFY opcodes e.g. EQUALVERIFY, CHECKSIGVERIFY, CHECKMULTISIGVERIFY terminate immediately on failure but their non-VERIFY equivalents don't.
All that matters is the state of the stack at the end of script evaluation.  For example, you could do OP_CHECKSIG followed by OP_IF OP_PUSHNUM1 OP_ELSE OP_PUSHNUM2 OP_ENDIF, e.g. if the signature succeeds, take one branch; if it fails, take another branch (This isn't considered best practice though and shouldn't generally be done.)
CLEANSTACK is an attempt to prevent malleability by having people put a bunch of junk in your scriptSig or witness data. Because you can just push a bunch of data onto the stack that never gets used and doesn't prevent the script from evaluating correctly. (Pre-segwit, this affected txid malleability and was enforced as a standardness policy rule; with segwit, this is no longer possible as it is a consensus rule)


What contributions have Blockstream developers made to the Bitcoin project?

Disclosure: I'm a Blockstream co-founder

Major feature contributions to Bitcoin Core:

Greg Maxwell, Andrew Poelstra and myself (as well as several other contributors) worked on libsecp256k1, a well-tested library for efficient elliptic curve cryptography using the curve secp256k1. Bitcoin Core switched signing to it in 0.10 and verification in 0.12 (with a 5x speedup for signature validation as a result). This work also led to the discovery of CVE-2014-3570 (OpenSSL bignum squaring bug). Work on the library started as a hobby project of mine in 2013, but many optimizations, tests, correctness proofs, and automated verification were added after we could work on it full time.
I worked on headers-first synchronization (Bitcoin Core 0.10), a new mechanism for block chain downloading which downloads from multiple peers at once, and solved many of the problems with the earlier mechanism. The idea was first described by Greg Maxwell in 2012, but the implementation only got finished after starting at Blockstream.
Jorge Timon and Matt Corallo (as well as Cory Fields) worked on the creation of libbitcoinconsensus, a shared library built from the Bitcoin Core codebase that exposes part of the validation logic, and shipped with 0.10.

Besides that, we provided a large number of changes implementing numerous features, cleanups, optimizations, refactors, improvements, and general maintenance. When looking at the history of Bitcoin Core v0.12.0rc1 after august 1st 2014, 500 out of 2185 commits (23%; over 30% when including libsecp256k1) came from Blockstream employees and contractors. Most of these people were active in the project long before the creation of the company, as these same people were responsible for 866 out of the 4195 commits before august 1st 2014 (20%). These numbers exclude merges, to avoid favouring people with commit access to the repository.

We were also involved in several improvements not directly related to Bitcoin Core code changes:

BIP66 fixed a potential forking risk from the network that was caused by an inconsistency across platforms between OpenSSL versions and opened the door to non-OpenSSL based validation.
BIP68, BIP112, and BIP113 were proposed and first implemented by Mark Friedenbach to introduce relative locktimes and enforcement thereof, which are necessary for more efficient payment channel systems like Lightning.
Several generic blockchain technology improvements were discovered by us and implemented in our first technology demo sidechain Elements Alpha, including segregated witness, confidential transactions, Schnorr signatures and key tree signatures. Segregated witness is currently being worked on as a soft-fork for Bitcoin (BIP141 through BIP144), and includes script versioning which makes introducing things like Schnorr signatures in future softforks much easier.
Other proposed BIPs: BIP99 (consensus change best practices) by Jorge Timon, BIP103 (block size increases following technological growth) by me, BIP111 (NODE_BLOOM flag) by Matt Corallo, BIP9 (Version bits with timeout and delay) by me, Greg Maxwell and Rusty Russell (as well as Peter Todd).
Matt Corallo implemented and operates the Bitcoin relay network, providing low latency block propagation to various parties.

This list is by no means exhaustive, and I'm probably focusing mostly on contributions I participated in myself.


Coinbase no longer supports any sort of wallet import (wonder why?). To quote Coinbase (June 2016 on https://support.coinbase.com/customer/en/portal/articles/2285419-how-do-i-import-an-existing-wallet-)

  Coinbase wallets currently do not support a wallet import feature. If you have paper wallets, private keys, wallet.dat files, or brain wallets, they can be imported into another wallet (Bitcoin QT, Electrum, Multibit, Armory, Blockchain.info, etc) before being sent to your Coinbase wallet.
  After you have imported your wallet, you can keep your bitcoin there, or send it to one of your Coinbase wallet addresses.


Python implementation for LND path finding algorithm

These implementations use some form of the Dijkstra algorithm which is implemented in the open source networkx python lib https://networkx.github.io/documentation/stable/reference/algorithms/shortest_paths.html also electrum wallet is working on lightning. I think they followed pretty much the lnd code base so one could check their pathfing implementation at https://github.com/spesmilo/electrum/blob/master/electrum/lnrouter.py


How can I get CGMiner to connect to mining_proxy.exe

you can use like this..

cgminer.exe --userpass usertes.worker1:123 --url stratum+tcp://stratum.bitcoin.cz:3333 --socks-proxy 127.0.0.1:1001

127.0.0.1:1001 is the proxy with port..
modify with ur own proxy


Is ViaBTC the only public Bitcoin Cash pool?

No, http://pool.Bitcoin.com also offers BCH mining as far as i'm concerned, see

https://news.bitcoin.com/bitcoin-com-pool-members-now-have-the-option-to-mine-bitcoin-cash/

Which is https://stratum.bcc.pool.bitcoin.com:3333/


Are usual raw BTC and BCH transactions differ? Can I make BCH transaction with bx?

Yes, they are different, because of replay protection.  BCH computes the transaction digest for signing in a different way.  A transaction signed with this method will appear to a BTC node to have an invalid signature, and vice versa.

The bx tool does not appear to have been updated to support this modification, so you currently won't be able to use it to validly sign BCH transactions.


Why the shell return the balance normal but php not?

I think this is more of a PHP question versus bitcoin, but that's how PHP handles a zero float. https://www.php.net/manual/en/language.types.type-juggling.php
$var = 0.00000000;
echo $var;

Returns:
0

If you want to force a zero value to eight decimals you can use number_format() https://www.php.net/manual/en/function.number-format
$var = 0.00000000;
$formatted = number_format($var, 8);
echo $formatted;

Returns:
0.00000000


What is the daily transaction limit for Bitinstant?

$2000 per day. Right above their captcha-like thing, it says the limits in small text.


How do I get my Bitcoin Core to rescan for a different wallet.dat file on OSX?

The QT terminal (RPC) rescan option will be available in 0.16 (not release by the time of writing). https://github.com/bitcoin/bitcoin/pull/7061

Manual rescans should generally not be required, though, if you are missing transactions in an old wallet, the rescan may help.

In Core < 0.16 you need to rescan either by startup argument or by a configuration option.

Startup (OSX)

Open up "Terminal.app" and enter /Applications/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt --rescan

bitcoin.conf (OSX)

Place a plain text file called bitcoin.conf in ~/Library/Application Support/Bitcoin/ and make sure the textfile contains the line "rescan=1".

Make sure you remove the rescan=1 line after you have successfully rescanned your wallet.dat.


Whose blockchains are all these ICOs using? Bitcoin's? Ethereum? Are they creating their own?

In your question statement you mentioned TON ICO, (telegram). Telegram never announced any ICO till the date. Though some scams were there cashing out the name of telegram.

Coming back to the Question, ICO may or may not have their own blockchain. Most of the ICOs issue ERC20 tokens that means they are powered by Ethereum blockchain. That means they are not actully creating their own blockchain from scratch. These tokens are backed by ETH blockchain and resources.

Few ICOs (for example electroneum) used their own platform and blockchain for raising funds.

Just like ethereum there are few other players like NEO, Tezos, Stellar, Waves etc having their own properties, advantages and disadvantages. There are many upcoming ICOs powered by Tezos as well.


Okay, so after investigating the provided restore tool (thanks Lohoris for pointing it out!), I arrived at the following answers to my questions:

The input key for the AES decryption is 32 bytes (256 bits)
The block size used is 16 bytes (MCRYPT_RIJNDAEL_128 for PHP mcrypt functions)
The initialization vector (IV) for the AES decryption is the first 16 bytes (one block size) of the encrypted string. The remaining encrypted string is the encrypted message.
The user's password is expanded by using 10 rounds of PBKDF2 hashing, using SHA1 hashing, and the IV as salt (the "No salt is used for single pass encryption" note seems to just mean no salt for the AES encryption. For the PBKDF2 hashing, there is a salt).

Note, if using PHP mcrypt extension functions (like I was trying to), you need to use the mdecrypt_generic() method rather than mcrypt_decrypt(), since Blockchain using ISO10126 padding, and the mcrypt extension will only use "zero padding". You then have to un-pad the result separately.


Where can I read the original Bitcoin script for verifying the transactions?

You should be able to find the source code on GitHub
e.g. https://github.com/trottier/original-bitcoin but I'd verify that before relying on it for anything important.

who controls the GitHub profile of bitcoin?

Some subset of
https://bitcoin.org/en/development#bitcoin-core-contributors
See https://github.com/bitcoin/bitcoin/blob/master/contrib/verify-commits/trusted-keys

See also:

Is there a list of core Bitcoin committers? (hat tip to Pieter Wuille for pointing this out)


With lightning network, my understanding is that we would be making a transaction on a "side chain"

The lightning network is not a ‘side chain’, that term is usually used to describe an entirely different piece of technology that can be built to work on top of/alongside bitcoin.

Does the lightning network also solve the problem of giving confidence to the cashier that I have the money required?

Yes, lightning payments can settle pretty much instantly, both the customer and cashier would see proof of this in their respective lightning wallet applications. There is no need to wait for an on-chain transaction to be confirmed.


"TL;DR: Bitcoin mining is virtually immune to someone attacking it with a supercomputer, because the mining market is already flooded with supercomputers custom tailored to the job at the hardware level."
(via Cort Ammon in comments)

First of all, the difficulty reset happens after 2016 blocks. That's only after about 14 days if the hashrate is stable. When there is a steep increase in mining power the difficulty will therefore adjust much more quickly. The difficulty change is limited to a factor of four, so e.g. if the hashrate increased by a factor ten (at the start of a difficulty period), the difficulty would increase by a factor four after 1.4 days, and then again by a factor of 2.5 after 5.6 days, so that it would have adjusted a factor of 10 after only one week. Since the adjustment is an exponential function, the network can similarly adjust to even bigger jumps. You are correct however, that if the hashpower left at that point, the network could get stuck.

Luckily, supercomputers are not effective at producing Bitcoin blocks. For Bitcoin blocks, the only operation that needs to be churned endlessly is a double SHA-256 hash. And that's exactly what Bitcoin ASIC miner hardware does, their chips have the necessary algorithm implemented in hardware and are therefore exclusively designed to calculate Bitcoin blocks. This is what makes even a single contemporary ASIC faster than thousands of computers.

The window for supercomputers to take over Bitcoin mining closed some time in 2012 or 2013. Today, the Bitcoin network produces about 10 exahashes/s. To my knowledge, the most cost effective miners come at about $100 per TH/s which translates to a magnitude of one billion USD invested in Bitcoin mining hardware alone.


Transfer bitcoins from an address to another

It sounds like you used a Bitcoin wallet to move money before. You need to know more about the account than just the address, in order to move the money out of that address. With the address, you can look at how much money the address has, and add more money to it, but you can't take money out.

If you had the private key, which should be kept by the Bitcoin wallet, or written down somewhere, you could spend this. A private key looks like 5SD8ak... .

Unfortunately, I don't know which program you used, so I can't tell you anything more specific. I can point you to this list of Bitcoin wallets. Maybe you used one from there.


Is there any paper wallet printing tools which can print many QR codes?

If you use bitaddress.org, click on paper wallets, you can hide art and generate and print 7 per page on standard paper or 3 per page with art - up to the amount you need.  You would then need to xfer btc to these new accounts AFTER printing though.  For extra security, you could also use this bitaddress.org solution on a computer with no internet.  Just save the entire webpage to a thumbdrive and run it from the non-connected computer. Hope this helps.


A full/multi nonce range search or just a partial range search?

1) In a single nonce range (0~2^32-1), the miner find a nonce which meets the requirement of the valid share, so the miner exits the nonce search for this work and submit the nonce instantly, and then get another work from the pool.

It doesn't, because the fact that you found a valid share doesn't mean that there's not another nonce that creates a share.

  Actually, my question implies another question, for a fixed work(except for the nonce), is it possible that more than one nonce can be found to get a valid diff 1 share?

Between 0 and 2^32 shares/blocks will be found for every nonce range.


How to put comment when use sendrawtransaction in bitcoincore?

data is meant for OP_RETURN outputs.

You cannot add comments using sendrawtransaction.


How to generate keypair completely offline?

Yes, it is possible to create such keypairs offline, but the calculations are long and complex. You would need to find out how to:

1) Create a secp256k1 public key from a private key

2) Perform SHA-256 hashing

3) Perform RIPEMD-160 hashing

4) Be able to convert the final value into Base 58

Generally, the calculations would be very tedious; this is what we have computers for.


How specifically is transaction history modeled in blockchain blocks?

-but how do you find that hash without looking into every block on the blockchain?

You can't. Of course, if you are smart, when you receive a block, you extract the data that you need and put it into a database where you store this information and can quickly look it up. So, starting from the beginning of the blockchain, you read through every block and every transaction, compute their hashes, and store in a separate database the hash and a pointer to where you can find the block or transaction (or something of that sort). So when you need to look up the outputs that a transaction spends, you can just lookup the txid in your database and be able to quickly find the transaction output that you need.

This is similar to what Bitcoin Core does. After it fully validates a block, it adds the UTXOs that are created to a separate database. That database contains the details for all of the UTXOs, so it has each UTXOs outpoint (txid + output index), the output value, and the output script. When a transaction spends a UTXO, it can be quickly found using the outpoint specified in the transaction and then the UTXO is removed from the database. The outputs of that transaction are then added to the database as new UTXOs.


Legacy blockchain after upgrade to SegWit

Indeed.

Bitcoin Core will, after upgrade to a SegWit-compatible version (0.13.1 and later), rewind to the latest non-SegWit block and then fetch the later blocks again.


Can two signed transactions be merged into one?

Potentially. It depends on how the transaction was signed.

If it was signed with a SIGHASH_ALL flag, you cannot combine it since the signature checks to make sure the inputs and outputs have not been changed.

If it was signed with an ANYONE_CAN_PAY flag, you can add additional inputs, and potentially more outputs depending on the rest of the signature.

All consumer wallets I'm aware of default to SIGHASH_ALL, so you're likely out of luck.

Your best bet would be to either send more BTC to that address and sign a new tx, or to import your private key into another wallet with more BTC, and create a tx spending from more than one address.


How would segwit help bitcoin services like, blockstream profit, and miners to loose?

Disclaimer: I'm a Blockstream co-founder and the primary author of the SegWit proposal.

I believe SegWit benefits everyone in the Bitcoin ecosystem. It solves several long-standing problems that hurt future evolution and scalability:

Transaction malleability complicates multi-transaction contracts
Lack of script versions makes introduction of new opcodes complicated
O(n^2) signature hashing makes worst-case block validation unnecessarily costly
Lack of input amounts in signature hashing complicates hardware wallet design.

As a side effect, it also gives a moderate capacity increase without forcing the whole ecosystem to adopt new consensus rules, and improves the incentives for UTXO growth going forward.

More information about the benefits can be found here

Of course there are costs as well. They are mostly related to the size of the change. However, it has been a community effort with dozens of contributors that reviewed and tested the changes over the course of several months, with deployments in several test networks, later the Bitcoin testnet, and eventually adopted in Litecoin. A large part of the ecosystem has indicated support or readiness for SegWit.

More information about the costs can be found here.

So to answer your questions:

  How would it affect miners except, asicboost?

I don't know. Given the level of industry support, I don't know why they would be opposed to it except for political reasons. The only thing I can come up with is that a sudden increase in capacity may temporarily reduce fee income, but that is expected for any kind of capacity increase.

  How would blockstream (other than miners) kind of companies benefit from it, in such a way that miners can't?

Blockstream has no direct business interest in seeing SegWit activated. All its own products (including Elements and Liquid) have had SegWit-like systems built in for years, and work fine with or without it being available on the main chain. Blockstream pays me and others to work on Bitcoin development, including SegWit and Lightning, because it believes that is valuable to the ecosystem we all depend on.

There are other companies that may have a direct interest in SegWit. This includes wallet providers who pay transaction fees for their users, especially multisig wallets, as the benefits of SegWit are largest for those. Hardware wallet creators may like SegWit because it simplifies proving the amount of fee paid to the hardware. Companies whose business model relies on payment channels (which doesn't include Blockstream) may depend on SegWit activating in the near future.


How many UTXOs have a marginal fee cost that's higher than its worth?

Here are the results at block 472236

Processed 41823253 P2PKH txouts

Fee is 0 satoshi/byte: 41823253 txouts are spendable having total value 12504138.52 BTC
Fee is 50 satoshi/byte: 28693175 txouts are spendable having total value 12503686.97 BTC
Fee is 100 satoshi/byte: 21753912 txouts are spendable having total value 12502819.35 BTC
Fee is 200 satoshi/byte: 16426255 txouts are spendable having total value 12501503.34 BTC
Fee is 300 satoshi/byte: 14808011 txouts are spendable having total value 12500784.29 BTC
Fee is 500 satoshi/byte: 13208366 txouts are spendable having total value 12499668.03 BTC
Fee is 1000 satoshi/byte: 10998782 txouts are spendable having total value 12496954.83 BTC

This output was generated using a fork of bitcointools. This script reads utxo from .bitcoin/chainstate directory of a bitcoin node. Feel free to fork/use the script to generate related data later.


Is it possible to rename & move a MultiBit wallet

Yes, they can be. But you will want to close MultiBit first, and then when you open MultiBit again you will need to tell it where you moved your wallet using File->Open Wallet.


Why does a thin node need to know if a transaction is present in specific block's merkle tree?

Why would a thin node want to know information like this ?

They quite possibly don't care about exactly which block the transaction was included in, but they most certainly care about knowing the transaction was included in the blockchain at all. It just so happens that there is no easy way to prove the latter without proving which block it is included in.
To illustrate a more concrete interaction (as used in BIP37, but other protocols like Electrum's client-server protocol are similar). F = full node (the server), L = light client. This is obviously not an actual protocol dump, but conceptually it's close.

L: Hi F, I'm a light client and am interested in transactions involving addresses A, B, and C. [filteradd]
F: Okay. [nothing]
L: I have synchronized blocks up to block hash H. [getheaders]
F: Oh dear, you're behind, there is also block I and J. Here are their headers! [headers]
L: Those headers look great, and their proof of work is valid. So eh... does I contain any transactions I care about? [getdata with MSG_FILTERED_BLOCK]
F: Nope. [empty merkleblock]
L: Okay... what about block J [getdata with MSG_FILTERED_BLOCK]
F: Oh yes, here is transaction T that involves one of your addresses! [merkleblock]
L: That looks like a transaction that indeed pays me... but can you prove it's actually been included in the chain? You know, I don't trust you really and you could be giving me an invalid transaction, or one that spends money that has already moved in the chain. [nothing]
F: Fine, here is a Merkle path that proves T is in fact included in block J. [part of the earlier merkleblock message, actually].

So the point is that without the proof, F could be claiming that L got paid, while the transaction is invalid. Having it included in the chain makes that very expensive, assuming other nodes in the network actually enforce validity of transactions in the chain.
There is a caveat of course. There is no way that F can prove to L that block I didn't include any interesting transactions. The solution to that is either trusting the server, or trying multiple - neither is very satisfying.


Byzantine Fault Tolerance Threshold of Bitcoin: 1/2 or 1/3? (Edited)

It depends on what you're actually asking. Bitcoin doesn't exist within the normal model of BFT consensus so in one sense the answer is mu.

Under conventional assumptions Bitcoin will converge on a stable history if honest participants have a majority hashpower. But the arguments given as to why you could expect this hashpower majority assumption to hold are essentially economic.

You can show under some models, at least, that if the behavior of hashpower is governed by short term profitability, that if attackers control more than a third then they can make it more profitable for the profit seeking rest to essentially cooperate. See selfish-mining for an example (the exact threshold for selfish-mining depends on the attacker's communication advantage, which is one of the reasons that block propagation and worst case block propagation speeds are a concern). This doesn't contradict the above because it requires that the miners be profit-maximizing rather than honest... but it is a fair argument in light of the economic arguments for the existence of hashpower to begin with.

Interestingly, if you assume that hashpower increases exponentially forever for both the defenders and the attackers ( e.g. you take Moore's law to be an actual physical law ) then any attacker that maintains any constant fraction of the hashpower will 'eventually' replace the chain with probability 1, including tiny fractions like 0.001%.  This isn't an actual weakness, however, because the resulting time that the attacker would have to persist while getting no income from their attack quickly turns into trillions of years for sensible numbers, but it's interesting to think about as just an example of how different from BFT consensus Bitcoin is.

See also PoW 51% attack vs. BFT 1/3 attack?


Difference between Byzantine Fault Tolerant Protocols and Byzantine Agreement protocol (i.e., BA*)?

There are many problems in the family of "Byzantine" questions with slightly different names and all related to each other in various ways. Generally, the problem concerns a network of nodes all connected with all, some of which are honest and some of which are adversarial, i.e., can behave arbitrarily, even maliciously and send different data to different peers or refuse to send data altogether. Each of these nodes have some "input", potentially different for each, and they want to agree on a common view. The "input" can be the set of new transactions to confirm in the case of bitcoin, for example.

The canonical problems in the space, which are equivalent (if you can solve one, you can solve the other), are formulated as follows:

The Byzantine Agreement Problem. A group of nodes needs to agree on some value. The protocol needs to (a) terminate within finite time, (b) have all honest nodes reach the same result, and (c) the result reached must match the input of one of the nodes.

The Byzantine Generals Problem. A group of nodes has a designated "leader" called a "general". The leader has an input value and the rest of the nodes need to agree on a value. The protocol needs to (a) terminate within finite time, (b) have all honest nodes reach the same result, and (c) if the leader is honest, then the value agreed by everyone should be the leader's value.

These problems were put forth by Lamport in his seminal paper.

These problems can be modified to allow for less connectivity or to allow for failures that are not byzantine (i.e., do not allow for malicious intelligence, just failure that isn't trying to subvert the system actively). You can also add digital signatures to the mix to make the problems easier.

In bitcoin's case, the problem solved is a harder variant; anonymous Byzantine agreement. In this case, the number of parties can change arbitrary and the parties do not know who is sending each message. The solution to this is to use Proof-of-Work.

To answer your original question about Byzantine Agreement versus Byzantine Fault Tolerance. Broadly, these titles refer to the same problem of agreement. However, more specifically, BA is used to refer to the specific problem of reaching consensus about a decision under byzantine settings; while BFT refers to designing any generic protocol (not necessarily requiring agreement), for example the Byzantine Generals protocol, for solving a problem under byzantine faults, i.e., faults that are malicious. The generic problem of BFT and the problem of BA are equivalent - if you have agreement, you can be fault-tolerant; and if you are fault-tolerant you can reach agreement.


What are the limitations for amortizing the interactive session setup of MuSig?

Nonces must not be reused! In particular, in MuSig, nonces can not be reused
for other combinations of public keys or messages (also if everyone uses the
same public nonces all the time). This would leak private keys.

You pre-share fresh nonces by running multiple signing rounds in parallel.
With the library you link to
(secp256k1-zkp) this is
secure as you long as you keep the session states in memory and don't copy it.
Serializing the state and storing it on a persistent medium is not supported by
secp256k1-zkp and difficult to get right because if you accidentally use the
wrong nonce, you leak the private key.

A straightforward way to eliminate the overhead of the first two interaction
rounds is by attaching the nonce commitment and nonce to already existing
messages in your protocol. That way you would only have two parallel signing
sessions.

There is research being done on deterministic nonces for MuSig which have
zero-knowledge proofs that the nonce is derived correctly. With such proofs
nonces can be derived on demand from the signer set, your private key and the
message and there is no state to keep track of.


The lower the hash has to be, the higher the difficulty. Finding a hash whose first 32 bits are zeroes is not as hard as finding a hash whose first 36 bits are zero.

If you have a relatively slow miner, you probably don't want your shares to be too difficult or you'll find them only rarely and the accuracy of your tracking will be poor. But if you have a very fast miner, you probably don't want your shares to be too easy or you'll be finding so many of them that reporting them to the pool can become a bottleneck.


I think this is a good summary: http://arstechnica.com/uncategorized/2012/05/bitcoins-worth-87000-plundered/

Even more summarised thanks to freesummarizer.com:

  More than $87,000 worth of the virtual currency known as Bitcoin was
  stolen after online bandits penetrated servers belonging to
  Bitcoinica, prompting its operators to temporarily shutter the trading
  platform to contain the damage.

  Friday's theft came after hackers accessed Bitcoinica's production
  servers and depleted its online wallet of 18,547 BTC, as individual
  Bitcoin units are called, company officials said in a blog post
  published on Friday.

  In early March, a security lapse at cloud services provider Linode
  allowed hackers to make off with about $210,000 worth of bitcoin after
  they gained unauthorized access to bitcoin wallets stored by
  Bitcoinica and seven other customers.

  Strong cryptographic controls ensure that once bitcoins are spent they
  can't be taken back, although a recently published research paper
  reports limitations that allow the same bitcoins to be double spent in
  certain cases (which Bitcoin developers say they've long warned users
  to avoid).

  The March heist that hit Bitcoinica also affected several other
  trading platforms that have also lamented the necessity of storing
  large amounts of the currency in liquid form in "hot wallets" to
  automatically cover payout requests made by customers.


In which ways is Earthcoin different from Bitcoin?

As mentioned in the BitcoinTalk thread.

  Our goal isn't to compete, as much as compliment, create balance, and
  not divert into launching 9 more coins because we can.

It doesn't look there is much difference. It may have a different block time, reward, and cap, but that is standard stuff to change for an altcoin. There appears to be absolutely no technological advance. It donates a percentage of coins to charity but that means nothing if it has no value.


Easiest way to set up non computer-literate person with Bitcoin

The easiest way would be to create an online wallet on blockchain.info, and use one of the easy deposit features it offers. This however is impractical both for traceability (his, not yours), and for fees (which might even be higher than the taxes AFAIK).

That said, bear in mind that usually you might convince people to use bitcoins when they have something to gain, not when you do: consider carefully why should they do it before asking them to.


Is the mnemonic passphrase enough to backup with deterministic wallets?

For all wallets, which support BIP-0039 (still draft status), the mnemonic passphrase is enough to completely backup your wallet. As I can read from the greenaddress.it website they support BIP-0039 (not tried), so all you need is the passphrase (seed).

Theoretically, you can import the seed into any other wallet implementation and manage your bitcoins from there. However e.g. the popular Electrum wallet doesn't comply with BIP-0039. So you have to take care if you want to switch wallets.

For a detailed understanding of deterministic wallets, I can only recommend you reading the section on wallets in the book "Mastering Bitcoin".


How are transaction fees collected in Bitcoin?

The coinbase transaction itself has the subsidy/coins for mine a block + all fees of the transactions of that block.


How can I recover my MultiBit HD wallet words?

If you have both your wallet file (named mbhd.wallet.aes for MultiBit HD) and its password, you can use this tool to extract its mnemonic sentence/seed.

Note that the terms "brute force" and "crack" weren't the right ones to use, you're simply decrypting the wallet file. David's answer is correct in that you can't brute force a seed from scratch, but luckily that's not what you need to do here.

(Also, be sure to write your seed down somewhere once you have it! If you had lost your wallet file, you would have been out of luck...)


There are some excellent papers by Aviv Zohar (Red balloons, GHOST etc.) which at least touch on game theory.

There's also a comprehensive list of papers at https://docs.google.com/spreadsheets/d/1VaWhbAj7hWNdiE73P-W-wrl5a0WNgzjofmZXe0Rh5sg/edit#gid=0, you can browse it to see if any could be relevant.


How to retrieve all addresses with non-zero balance and their balances?

This guy wanted to do the same thing. You can find a solution there.

in short:

get a Linux Box/VM with >=8GB RAM
download blockparser
compile it
run "./parser allBalances  -w 250000 >allBalances.txt"

the parser run take around 2 minutes on my vSphere VM (2x3Ghz Xeon, 16GB of RAM)
now you have a list of the top 250.000 adresses sorted by BTC amount.
add some sed/awk/cut magic to make a csv and you are done.


confusion about open/close values on 1800 seconds periods

For each period:

  The opening price is the price of the first trade that occurs within the period.
  The closing price is the price of the last trade that occurs within period.

Note that the last trade in the 1st period is not equal to the first trade in the 2nd period.
Since these trades are different, their prices can and usually are different.

In general the market price near the bid/ask spread can move around without having actual trades occur. The data feed is based on trades that occur within some period. This means there can be gaps between periods. Here is a video that covers the difference between the last price and the market price: Maket price vs Last price


Send coins from bitcoind full node to lnd without fee?

Your lnd node contains a regular Bitcoin wallet. In order to open a channel you currently need to do on chain transactions (which obviously require fees)

You need to send Bitcoins to your lnd wallet
You need to open a channel which is another on chain transaction.

Theoretically the first tx could be omitted if lnd would support the import of other private keys (I think no lightning wallet currently does this as it seems to be of lower priority at this time)

Also you could ask Simone to open a channel with you and use loop or a submarine swap to get your channel refilled in exchange for you sending your btc onchain. In that case it is still 2 tx but only one for which you pay on chain fees. The onchain fees for Opening the channel are paid by your channel partner.


When importing a wallet from private key or seed phrase, how do you guess the correct address format?

How do I determine the derivation path for the seed when importing it?

I don't think you can determine the derivation path from the seed phrase, you have to ask the user to choose one from a list or input it if not listed. You can build in a list of derivation paths for popular wallets, the user then has to know the name, and maybe version number, of the wallet that produced the seed they are importing.

or do i just do a wallet address lookup based on the supported derivation paths and keep searching for about 20 address if it has any transactions on the blockchain ?

That would work in many cases. It assumes you have access to a full copy of the blockchain indexed by all addresses with non-zero balance. It needn't be local but a non-local source might make your seed-importation take a long time.


Which mining software/script provides the greatest MHash/sec and power efficiency balance?

My experience with a 6990 rig is that m0mchil’s Python OpenCL GPU miner is the most efficient one for me.

But I would try them out on a 12 hour basis, and do a comparison. Maximum output might be very different between software/hardware combos. Would love to see the results.


It's down because it's hosted on the same server as bitcointalk.org (in a separate VM), and the bitcointalk.org server is down. Having them both on the same server has been convenient, but it's unnecessarily disruptive for both sites to go down at once when there are troubles with the host machine/OS/network, so the wiki is going to be moved elsewhere in the near future.

I own the domain name and handle some technical aspects of the wiki's operation, but I am not the best person to contact for most technical problems, and I am not responsible for dictating wiki policy. For both of these things, it's best to join #bitcoin-wiki on Freenode or post in the Wiki section of the forum.


Why bitcoin protocol does not use JSON instead of low level data structures?

It would:

Use significantly more CPU to parse the incoming data (and running a node is already intensive, especially when processing an incoming block).
Use significantly more bandwidth.

It would not:

Remove the need for nodes to know about the binary format, as that is used for defining the (protocol-defined) hashes of transactions, blocks, and other structures.

So if you're going to need to implement the binary format anyway for hashing, why bother implementing another more expensive, less efficient layer on top, and incur the complexity of the conversion?


Where is Double hashing performed in Bitcoin?

Bitcoin uses double hashing almost everywhere it hashes in one of two variants:

RIPEMD160(SHA256(x)) called Hash160 which produces a 160 bit output

hashing the public key to generate part of a Bitcoin addresses

SHA256(SHA256(x)) called Hash256 which produces a 256 bit output

generating the checksum in a Bitcoin address
hashing the block in a merkle tree
linking transaction outputs and inputs
hash of the block header (and thus the proof of work and the link to the previous block)

It seems like Satoshi chose Hash256 whenever collisions are a problem, and Hash160 when only (multi target) second pre-images matter. This is consistent with a goal of achieving 128 bits of security.

You need a 2*n bit hash to achieve n bit collision resistance, and you need a t*n bit hash to achieve n bit second pre-image resistance. If we assume a conservative 4 billion targets, and a 128 bit security level, this leads to 256 bit hashes for collision resistance and 160 bit hashes for multi-target second-preimages.

So why does he hash twice? I suspect it's in order to prevent length-extension attacks.

SHA-2, like all Merkle-Damgard hashes suffers from a property called "length-extension". This allows an attacker who knows H(x) to calculate H(x||y) without knowing x. This is usually not a problem, but there are some uses where it totally breaks the security. The most relevant example is using H(k||m) as MAC, where an attacker can easily calculate a MAC for m||m'. I don't think Bitcoin ever uses hashes in a way that would suffer from length extensions, but I guess Satoshi went with the safe choice of preventing it everywhere.

To avoid this property, Ferguson and Schneier suggested using SHA256d = SHA256(SHA256(x)) which avoids length-extension attacks. This construction has some minor weaknesses (not relevant to bitcoin), so I wouldn't recommend it for new protocols, and would use HMAC with constant key, or truncated SHA512 instead.

Some related reading:

Hashing or encrypting twice to increase security? on crypto.SE
Cryptographic reasoning for double-hash? on bitcointalk


Will skipping nonce enchance mining performance given there's more resourceful miner

The blocks you try to mine will have your block reward address in them. The blocks other people try to mine will have their reward address in them. Because the blocks are different, any correct nonces will also be different.

When you mine, you are not competing with other miners in the same search space. Whoever finds their own nonce first wins, but everybody is looking for a different nonce.


How does the Bitcoin client check for double spend?

Bitcoin-Qt marks outputs as spent in the database once they are spent. To check whether an input's prev-out is spent, Bitcoin just needs to look up the transaction and check whether the output is marked spent.

Other ways of doing it are to have a set of all unspent outputs and check whether the prev-out is in this set (future versions of Bitcoin will do something like this), or to index inputs by their prev-outs.


Why the message is need in verify function

Say you see a check for "$50,000 to Bob" that needs to be signed by Ed. What you want to know is whether the signature on the check came from Ed and signs the message "$50,000 to Bob". So the question a signature checker answers is, does the given signature attach the given credential to the given message. How would it check that without the message?

Checking a signature detached from a message would serve no purpose. Say you see that check for $50,000 to Bob. If Ed actually signed "$50 to Alice", the the signature check must fail -- since Ed didn't sign that message. So you can't check the signature without knowing the message.


Thanks to Nate, the quite possible reason is that since my bitcoin core is still synchronizing, it would not have seen the transaction.

Will await for this to complete. Thanks again, Nate!


That error means that either response or response['result'] is None which means that getrawtransaction is probably unable to find the transaction id that you are providing.

Before you try to read data from the response, make sure it isn't None and actually has a result.


Even though it is a C library, you could use Jansson in C++ apps, too. See: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#C


What is the incentive to use bitcoin due to transaction fees?

There are two scenarios we could see as the block subsidy (inflation) halves every ~4 years:

The number of fee-paying transactions increase per block whilst median next-block fee remains low/negligible
The fee per on-chain transaction increases

We are currently seeing scenario 2 play out, where most user transactions are expected to take place off-chain. Transactions that are made on-chain are expected to be settlements of many off-chain transactions, likely collecting a large number of smaller fees within.

Both scenarios are fueled mostly by adoption of the network, and until the subsidy is gone (zero inflation), increases in coin price will help to sustain miner incentive.


Why is there no decentralized Bitcoin trading API?

I'd say that's just because nobody programmed it. Bisq community for example is short on programmers so they concentrate on the essentials. Companies have no interest in the development or shy away from the legal risk, where they are increasingly forced to perform financial police duties similar like banks (KYC/AML). Hopefully the Bisq DAO brings enough funds to have developers paid for this kind of work.
Another concern is security. Successful replay or DOS attacks or any essential coding error might risk the whole Bisq project. Like with Bitcoin it's not easy to force the users to upgrade to latest version in case of malicious code.

Do you know the latest developments at the Bisq API? Have a look at this developer conference. There is as well a slack channel for the Bisq API interested.

Record of Bisq developers API discussion, Sept 2019


How does bitcoins power consumption compare to other financial institutions/exchanges? (ie banks, stock exchanges)

So many people have an opinion, but nobody is doing the calculation. I'll give a helping hand: an Antminer S9 can do 13TH/sec, and uses 1.2 kilowatt, if it runs one hour, it uses 1 kwh. I multiply this with 24 (for the day) and 365 (for the year). This is a bit less than 10'000 kwh.

Now I am looking at bitcoin.info, in the charts, how many terahashes are approximatly used. As of today (2018march05) I read 23mio TH/sec. I divide this 23mio TH/sec by the power of a single Antminer, to get an idea how many there might be in the world. This gives me 1.77mio Antminers. They consume all together per year 1.77mio * 10.000 = 17'700'000'000 kwh. Divided by 1000 for megawatthours, and another 1000 for gigawatthours and another 1000 for terawatt hours. 17,7 Terawatthours per year (well, it is growing at an enourmous speed...).
How many power supply units does this make? A huge carbon plant or atomic system provides 1000 Megawatt, equivalent to 350 wind turbines. 1.77 mio Antminers consume roughly (1.77mio * 1.2 kw) 2.124 Megawatt. This means, on the other side of the power plug must be roughly two atomic or carbon power plants.

Wikipedia says, that there are 3mio ATMs worldwide. I found different sources for ATM power supply, and found between 125Watts and 750 Watts. So lets only work with 125 Watts. This is 0.125 kW times 3mio installed systems gives me 375 Megawatts. So only the ATMs consume roughly one third of the Bitcoin miners.

I think this gives a good relation, and now the experts can extend this with the amount of power for printing dollars, distributing dollars, office space of the employees, transportation costs of the employees, and much much more. For sure this is still a naive comparison, cause the dollar reaches literally everyone, whereas bitcoin is still in its infancy (with constantly growing power demands).

Oh, on the power supply of Denmark: there are 5.75 mio inhabitants, and consumes per inhabitant 0.6kwh, so Denmark consumes 3450 Megawatt, which requires a bit more than three atomic or carbon power plants. But as Denmark is champion on windenergy per inhabitant, it is more like 1000 wind turbines :-) This gives an annual consumption of ~30 Terwatthours per year.


What is the formal code review process of the standard client?

According to the bitcoin.it wiki, as Stephen Gornick linked to in a comment, this should be the code review process:

  Pull requests are discussed on the forums and if there is consensus they're safe, tested, useful, well written, match coding style, etc. then they're merged into the 'master' branch.

Assuming the bitcointalk.org forums, I can't really find any pull request discussion. On Github it seems pull requests do get discussed though, for example: Bloom filter pull request.


Why do not all the coinbase texts have the block heigh in it?

All coinbase transactions do contain the block height, and have done so since block 227,835.  It's required by BIP 34.  Since all other miners enforce this rule, a block which broke it would get orphaned and would not become part of the block chain.

You're simply not looking at the right thing.   The height is encoded by a single byte giving the number of bytes to follow (currently 0x03) and then the height as a little-endian binary number.  Blockchain.info displays the coinbase transaction scriptsig both in hex and as characters, but not all bytes correspond to a printable ASCII character, so it displays a � character for such bytes (there seems to not be a one-to-one correspondence between bytes and characters, so it may be trying to parse it as Unicode or something).

Decimal 511329 is hex 0x07cd61, so its coinbase starts with the bytes 0x03 0x61 0xcd 0x07 (remember, little endian).  Now 0x03 is unprintable and 0x61 is a, so you see an a in that text.  Decimal 511330 is hex 0x08cd62, so you see 0x03 0x62 0xcd 0x07, and 0x62 is b.

But decimal 511426 is hex 0x07cdc2, so the coinbase starts 0x03 0xc2 0xcd 0x07.  None of these correspond to any printable character.  The transaction goes on as 03c2cd07ce46... and 0x46 is ASCII F.  This happens to be the first printable character in the coinbase transaction, but it isn't part of the block height at all; just part of whatever other data the miner felt like including.  You've ignored the bytes which were not printable, but you can't do that.

Likewise the coinbase for 511247 starts out 03c3cd07fabe6d6d...  Again, the block height is included exactly as it should be, since decimal 511427 is hex 0x07cdc3.  It so happens that the first printable character is 0x6d, ASCII m.  But again  that has nothing to do with the block height.


CreateRawTransaction and SendRawTransaction how to specify transaction fee?

The transaction fee is specified by the difference of the sum of inputs and the sum of outputs, i.e.

transaction fee = Σ(inputs) - Σ(outputs)

In other words, you set a transaction fee by sending more than you assign to the recipient.


How can I convert bitcoins to Indian rupees and vice-versa?

If someone will want to sell bitcoins for Rupees, they might list it on LocalBitcoins. It's a good start.


Possibility of fractions less than 1 satoshi in transaction fees

No, it's not possible. Transaction fees are not explicitly included in transactions: they are computed from the difference between the sum of the amounts of the outputs and the sum of the amount of the inputs [1]. Since the smallest value that can be represented in an output amount is a satoshi [2], it's not possible to generate fees less than that.

[1] http://chimera.labs.oreilly.com/books/1234000001802/ch05.html#tx_fees

[2] http://chimera.labs.oreilly.com/books/1234000001802/ch02.html#cup_of_coffee


How can I determine the reason for a failed routing on c-lightning

I believe if you c-lightning implementation does not tell you the out_channel it means that onion was sent to you. The local failure can be explained by you not knowing the payment hash. Most likely people send out onions with random payment hashes so that they can probe other peoples channels. You can set log level debug and check your logfile to confirm if it was missing preimages.
In general you cannot expect to successfully settle every forwarding. Even if you have been able to forward it there might be remote errors. In order to increase your reliability as a routing node you can do two thinks.

make sure that your channels have enough balance on either side so that they can support incoming or outgoing payments
activate JIT routing. In case your node cannot forward a payment along a channel it will not send an error back but try to rebalance your channels to provide yourself liquidity on the requested channel

Both options will probably cost you money to begin with and remember: even if - with these measures - you have been able to forward the payment it does not mean that you get paid because the next hops could yield local errors


Why is the relationship between tx and block many to many?

Within one chain of blocks, every transaction can only occur once. However, the data structure people frequently call "the block chain" is actually a tree structure, with one root (the genesis block) and different branches. The longest valid branch of this tree is called the active block chain, but occassionally, during a reorganisation, nodes switch to another branch (usually only the last 1-2 blocks change). Any transactions that were in the old branch but not in the new are then attempted to be mined again when possible. This results in one transaction being in several blocks within the tree - but not the same chain.

There existed another way. Early on, there was a possibility for two coinbase transactions to be identical. This occurred in blocks at height 91842 and 91880. It has since been made illegal and later impossible through BIP30 and BIP34.


How to use Bitaddress.org and Blockchain.info with Testnet coins?

In order to reach the testnet version of bitaddress you must append ?testnet=true to the url:

https://www.bitaddress.org/bitaddress.org-v2.9.3-SHA1-7d47ab312789b7b3c1792e4abdb8f2d95b726d64.html?testnet=true


After a bit of mocking about with this problem, I figured the certificate files were in a wrong folder. As I was running Bitcoin on testnet, the directory in which it looks for certificates is different, than on the main net. On the other hand, it loads the Bitcoin.conf from the same place...

The folder bitcoin looks for the certificate in is the folder containing wallet.dat, which for testnet is in .bitcoin/testnet/ folder


"Is there a problem with 0.9.3 that causes it to fall behind? That's a serious problem for the network, but I haven't heard anyone else report it.  If you debug it and discover that it's Bitcoin Core's fault, please report it.  However, here are a few common reasons for problems:

Insufficient resources: if you're running Bitcoin Core on an underpowered VPS, Raspberry Pi, or other marginal hardware, you'll get all sorts of strange problems.  I recommend a minimum of 1 gigabyte memory for a full node.
Hardware problems: bad memory, failing disks, and especially CPU overheating issues can cause your node to stop working or fail validation of a block.
Suspend/Hibernate issues: when restoring from suspend/hibernate on Linux, my nodes sometimes take a long time to reestablish connections and start downloading blocks, meaning my node looks like it has fallen behind for awhile.
Clock issues: if the clock on a computer falls behind real time by more than about 2 hours, it may not accept the most recent blocks.

"Do I need to update to 0.10.0?" Right now 0.10.0 is in the Release Candidate (RC) phase, which is the last testing phase.  If you'd like to help test, feel free to upgrade.  But if you're relying on Bitcoin Core behaving correctly, staying on most recent released version (0.9.3) is advised.
"When will 0.10.0 be released? When the developers think it has been well tested, and not a minute earlier.  I know major software companies often release software on a set schedule, but they do it by holding back (hopefully) release-quality software.  Open source doesn't work that way---everyone can see the source code, so you either release when it's ready or someone else releases it for you. :-)

Debugging Tips

I highly recommend that you try to find out what causes your nodes to behave incorrectly or you're likely to have the same problem on 0.10.0 that you have on 0.9.3.  Here are some quick tips:

Check $HOME/.bitcoin/debug.log for any warnings or errors.  If you can't figure out any messages using a web search, feel free to ask here.
Start bitcoind with -debug to log additional information.  Note, this will make your log file grow in size faster than normal, and it will inhibit shrinking the logfile on startup for as long as you use it.
If you only rarely check your nodes, scanning the whole log might be hard.  I suggest starting at the time indicated in the header of the old block you're stuck on.  For example, if you're stuck on block 330,000,

run bitcoin-cli getblockhash 3330000 to get the block's header hash;
run bitcoin-cli getblock <hash> to get the block.  Note the time field
run date -ud @<time> to convert the time into human readable UTC, the same as used in debug.log.

Use bitcoin-cli to run RPCs in an every-minute cron job to log additional information.  An example cron job might be, * * * * * { date -u ; bitcoin-cli getnetworkinfo ; } >> getnetworkinfo.log


What is/are the first proposal(s) of blockchain or alternatives?

In addition to "How to Time-Stamp a Digital Document", in 1992, Bayer, Haber and Stornetta incorporated Merkle trees to the design, which improved its efficiency by allowing several documents to be collected into one block in a book "Improving the Efficiency and Reliability of Digital Time-Stamping"


Why is Enjoy Sochi a malicious spam attack

The transactions will likely never be included in a block, as they do not meet the defacto bitcoin transactions rules for transactions sent without a fee, detailed here:

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

  It is smaller than 1,000 bytes.

  All outputs are 0.01 BTC or larger.

  Its priority is large enough (see the Technical Info section below)

  *Copied from https://en.bitcoin.it/wiki/Transaction_fees#Sending*

Since the transactions fail to meet the criteria to be included in a block for free (which is already getting rare), the transaction will likely be rejected on most/all mining pools, though may be rebroadcast by the sender or the receiver. The transactions may remain unconfirmed for a long time, unless the sender double spends his inputs, nullifying the transactions.

The attack is similar to a ddos on the bitcoin network, as the transactions propagate through the nodes which accept and relay the transactions. This does not cause issues with the '7 transactions per second rule' as the transactions will likely not get into a block, but may cause latency if enough of these transactions are broadcast.

It's more of a pester than a malicious attack.


Trading with oneself is commonly known as wash trading and is most commonly used to manipulate markets.

  I want to know is it a default protection practice, used all over the exchanges or only a GDAX innovation?

Other exchanges implement this feature. To discourage wash trading, some exchanges will cancel orders that wash, yet still charge commissions for the orders, despite the trades never hitting the market (showing on tickers, trade history or charts)

  What about stock markets and other legal trading platforms. Do they also implement this?

I will ignore the implication that bitcoin exchanges are not legal exchanges.

  used all over the exchanges or only a GDAX innovation?

NYSE/Euronext-Liffe and Eurex do not implement STPM (self-trade protection mechanism). However it's against exchange rules and you will receive nasty letters and/or fines, suspensions or bans for repeat offences.

ICE (Intercontinental Exchange) whose most popular products are oil futures are an example of a well established exchange that implements STPM.

A common use of wash-trading is to trigger stops, especially during periods of low liquidity.

Overall, wash trading is a nefarious activity and I don't know of a legitimate reason you would want to do it, hence exchanges attempt to obstruct traders engaging in the activity.

Defeating STPMs seems a trivial problem (traders can operate multiple accounts) or get their buddy to high/low tick something for them.  STPM can also be defeated in software.  Some trading software even has built in functionality for this, allowing traders to specify that orders should be pulled before when an order is submitted that would wash.


Can a merchant using Square Register accept bitcoins?

Bit-Pay has a mobile app that allows acceptance of mobile payments. It's not native for the iPad, but it should work, albeit at a lower resolution. There are a few other iPad apps, but none that implement any sort of payment functionality.


Could not detect boost libraries when configuring Bitcoin core - Apple M1 Mac Mini

Problem solved. Rosetta 2 was missing on the new system I set up. If anyone else runs into the same problem:
softwareupdate --install-rosetta

does the trick. Thanks to @AlgorithmicRisk on Twitter for pointing this out.


Exchanges whose websites use EV SSL certs?

I know one personally in Israel, https://bit2c.co.il it's Israeli bitcoin exchange.


Which operating system would work best with pushpool?

I use debian. But ubuntu or any other *nix OS would be fine.


Negative volumes returned from MtGox websocket api request

So I ran a test where I placed an order that I knew would be unique and then promptly canceled it, the whole time logging all depth objects to my terminal

The result was

{ price: '66',
  type: 2,
  type_str: 'bid',
  volume: '6.66',
  price_int: '6600000',
  volume_int: '666000000',
  item: 'BTC',
  currency: 'USD',
  now: '1370548662105838',
  total_volume_int: '37301280846' }

and

{ price: '66',
  type: 2,
  type_str: 'bid',
  volume: '-6.66',
  price_int: '6600000',
  volume_int: '-666000000',
  item: 'BTC',
  currency: 'USD',
  now: '1370548667379328',
  total_volume_int: '36635280846' }

Which leads me to conclude that negative volumes are in fact the result of a canceled trade


Yes. Bitcoin Core 0.16.0 introduced a multiwallet feature which is currently for the RPC interface only (the GUI part will come with the next major release). To have multiple wallets, start Bitcoin Core with the -wallet=<wallet name> option or add wallet=<wallet name> to your bitcoin.conf file. You must specify this option for each wallet you want to load.

For example, if you want to have two wallets named wallet1 and wallet2, you would start Bitcoin Core as:

bitcoin-qt -wallet=wallet1 -wallet=wallet2

or add the following to your bitcoin.conf file

wallet=wallet1
wallet=wallet2


Why does the wallet keep a pointer to the best chain

I think it is necessary. The wallet doesn't just contain addresses. It also contains transactions that are sent to you.

Suppose you generate a wallet, then back it up. You receive a bunch of money. You delete the wallet on your computer, and restore the old wallet. How does Bitcoin know that it should rescan the blockchain for transactions sent to you? I don't think it can, unless the wallet contains a field that represents the current best chaintip.

If you don't want Bitcoin to ever write to the wallet, you can compile it with --disable-wallet.


Best trader from an European perspective

One option is Bitstamp.net which is currently the exchange with the biggest trade volume world wide, operating out of UK. SEPA deposits valued in Euro are free and so is the withdrawal of Bitcoin. Deposits valued in USD and GBP have a minimal fee of 15$/15£ respectively.
They charge up to 0.5% commission on trades, less if you trade more.

I can't guarantee this is actually the best option, but they have a simple process in place and act as escrow. At least for small volumes of bitcoin the fees are better than Bitcoin.de, where they charge 1% commission and MtGox (up to 0.6%).

You can find a list of more exchange services on http://bitcoin.it.
However, at least some entries seem to be horribly outdated (e.g. Bitcoin24 was last updated in April 2013, yet there were some developments concerning their availability since then).


How to decode raw tx hex programmatically

This is specified thoroughly on the Bitcoin Wiki.

The first 4 bytes are the version number, the next 1-9 bytes are the number of inputs (almost never more than 1 byte) and so on.

Programitically, there are a ton of libraries that take the raw text and spit out the json as the bitcoin RPC call does in your example. They all use the same specification, though, so you can create the code yourself or use something already written.


If someone gets access to your private keys, they can create a transaction that spends your coins.  This transaction can be created and sent from any computer in the world.  There's no need for your computer to be involved, and it's irrelevant whether your wallet software is open or not.

It's possible that some person or malicious software had access to your computer at some  point during the last year (or before) and copied the file which contains your private keys.  If it was encrypted, they would need to decrypt it, but if your passphrase is simple enough, that may not be very difficult.  Their software may also have been running earlier and recorded your passphrase at some point when you typed it, or extracted the private keys from the computer's memory while the wallet software was running.  For whatever reason, they may have waited some time before spending them.

If there were other copies of your private keys somewhere else (such as in a backup, or on an old computer or phone that you gave away or had stolen), then that is another place they could have got them.  In that case your computer needn't have ever been involved.

But you should probably assume at this point that your computer is compromised.  The safest course of action is to back up all your data files (but not the operating system or application programs), wipe the system and reinstall it.


Trying to understand parent fingerprint in HD wallets

It's ripemd160(sha256(parentpriv)) also known as hash160(parentpriv) source. There is also a python implementation here


Organization to keep track of wrongfully obtained bitcoins

There are companies such as Chainalysis (no affiliation) and Elliptic (also no affiliation) that attempt to perform such analysis and group addresses into clusters based on the entity (exchange, scam, unknown, mining pool, gambling, payment services, etc.) that is believed to control them.

They offer their analysis to exchanges, governments, merchants, etc. for a price, as any other business.


Can someone help me find the private key for my bitcoin wallet?

By design, it is not possible to determine the private key for arbitrary addresses.

If you do not have a wallet file, seed phrase, or other form of keys that lead to that address, no one can help you.

If someone asked you to transfer Bitcoin to a watch only address claiming it will be accessible by you, you have been scammed.


Test (r,s) values for signature generation?


Can non mining full nodes prevent 51% attack? Does it actually strengthen the network? I am confused of its real purpose

Non-mining full nodes cannot prevent a 51% attack, but they are essential in preventing other attacks.

In particular, full nodes verify that the chain produced by miners is valid. This means that  no coins are transferred without proper authorization from their owner, that no new coins are being created out of thin air (except for those permitted by the inflation schedule), and a few other things.

Full nodes are what keeps miners honest. To anyone who verifies incoming transactions themselves using a full node ("economically relevant full node"), it guarantees that the chain is valid. Miners have no way to cheat those (apart from a 51% attack, see further), and as a result, they have no incentive to produce blocks that violate the rules, as such blocks will be dropped on the floor and ignored by full nodes. To anyone not running a node themselves, the knowledge that a sufficient number of other independent parties are running full nodes helps, because hopefully those parties are important enough that miners wouldn't want to waste their money creating an invalid block they would detect.

Bitcoin's security is based on auditability, not trust. You know the chain, in its entirety, is valid, because you're able to independently verify that it is.

Unfortunately, there is no way to verify which of two conflicting (but otherwise valid) transactions is the "real" one without a central clearinghouse that blesses one of the two. This is called the double spending problem, and it is the reason why we need miners: a decentralized clearinghouse that anyone with the right hardware, even anonymously, can join. Producing blocks costs money for them, and they're only paid if the network of full nodes accept their blocks. This is why they're incentivized (but not forced) to produce blocks that satisfy the rules, and build on top of each other's blocks.

But it is important to see that the 51% attack is the exception here. For almost every rule in Bitcoin, full nodes verify everything, and there is no way they can be fooled. The only thing that cannot be verified independently is double spends, which leads to a 51% attack if exploited (but the theory is that this would be expensive for miners so not economical; furthermore, if miners aren't doing their job well, others are incentivized to become a miner themselves).


Transaction fee's are a requirement whenever transferring Bitcoin on-chain. This is part of the reward that keeps miners mining bitcoin (the other reward is of course solving blocks and generating new coins). It is possible to set your own transaction fee/reward but the lower the fee the lower your chances that your transfer will be verified (miner including your transaction their block) and vice versa.

Most exchanges and wallets set standard fee's which pretty much guarantee verification at a reasonable rate. You can view most of their rates in the help section. Off chain transactions occur when a specific provider (or agreement between different providers) exchange Bitcoins and keep the record of the exchange between themselves (most likely a SQL database) and off the public chain.


Should I use Electrum Wallet OR Bitcoin Core as my website's payment gateway?

I use Coinbase commerce as a solution for Bitcoin payments on my website. I like them because the fees are very low and the API is very stable.


Coinotron wont show updates from cgminer

I found out why it didn't show. These mining pools out there just like coinotron arent running super servers and there are multiple people connected and it cant always pull that kind of strain on the server to request up to date/time of your local hash speed, so it displays what it can for everyone. Also After initialy starting your miner you have to wait atleast 5-10 minutes depending on your bandwidth for cgminer to officially connect and for your worker to show some kind of data. In cgminer look for where it shows A:# and HW:#  if these values are 0 then the connection hasnt been made yet. Just wait for 5-10 minutes and its value should keep going up. Once you see its values going up look to the right there should be something that says shares accepted , its value should be going up in time as well. If A:# or HW:# has not changed and stays and 0 then something is wrong ,you need to reconfigure your commands that you typed for it.

If you find this helpful upvote :p


If your wallet.dat back up is outdated, do you lose your coins since the back-up?

If you made more than 100 transactions and individual receiving addresses combined, yes.

Best way to find out is to try.


It is important to note that your Electrum wallets connect to Electrum servers which speak a different protocol than the Bitcoin P2P network. Electrum servers are full nodes with additional software running which provide the data and protocol that Electrum uses.

If you want to be strictly read only, as in you never send the node any data, then no, it is not possible with either the Electrum protocol or Bitcoin P2P protocol. Both protocols have a handshake at the beginning of the protocol where both nodes (or client and server for Electrum) exchange messages before the rest of the connection can continue.

Furthermore, both protocols have ping messages which have to be responded to. If a node (or client) doesn't respond to the ping, the other side will disconnect you. So if you have no send capabilities, you will not be able to maintain the connection for very long.

However if you just mean you aren't sending any blocks or transactions, then yes. You can most definitely connect to a node and never send it any blocks or transactions.


Bitcoin Protocol OP_RETURN + Omni USDT Tether + CoPay Multisig Help

I have solved my problem with a lot of debugging and help from the community on IRC irc.freenode.net #bitcoin-dev and also from people on the bitcointalk thread I started about this Topic.

I invite anyone having similar Copay Multisig Omni Colored Coins Recovery Issues to have a look at the bitcointalk thread here: https://bitcointalk.org/index.php?topic=2500531

The Problem is hereby solved, Details about how Copay derives keys can be found in the linked thread as well as more detail about what was implemented to apply the recovery (command line tool "omni:copay-recovery" on Github).


How does a wallet know how much Bitcoins belongs to a specific address?

A wallet is a private key which generates public keys. You can look those up in the blockchain to see if any of them have an open balance.

  In which block will the transaction for creating a block hash listed?

The first transaction in a block is generated by miners themselves, crediting themselves with the coinbase reward. then, the miner adds further transactions and starts looking for a hash that has the right difficulty target. If the miner finds one, the miner publishes the block. Miners thus credits themselves within their own block.

  Who hashes the merkle root?

The act of mining is finding a suitable hash for the merkle root and the block header.

  How do miners know that there is a new block?

The difficulty is updated every 2016 blocks. Because each block is timestamped, the difficulty adjustment knows how much time has passed, and can raise the difficulty in such a way that the next 2016 blocks will all take approximately 10min to find. Note that this assumes a steady hash rate.

  Is the difficulty only regulated by the leading zeroes in a hash?

Yup.

  What if no nounce is found for a block?

If so, you swap two transactions in the merkle tree that are unrelated. You can look for a new nonce for the corresponding tree.


Is it technically possible to change the total amount of Bitcoin?

Technically, yes, yes, and yes.  However, I'm not sure if we'd still call it "Bitcoin" at that point.

Any of these changes would require a hard fork, which means that the underlying rules of the system are changing in a non-backwards-compatible way.  It means that blocks/transactions from after the fork are not guaranteed to be considered valid to nodes running software for pre-fork.

So, to change Bitcoin like this in practice would require convincing the entire rest of the world to agree with the changes.  Anything less, and you will end up with two versions: the original and the one with your changes.  Which one gets the title "Bitcoin"?  I don't know.  That's a non-technical question, and a point of contention.

For an example of this in practice, see Bitcoin Cash.


Most efficient way to calculate fee from getrawtransaction?

To calculate fees.
Take sum of all vouts.For every vin there will be prev txid and outputindex,
Get this txid with getrawtransaction or some other way,go to vouts of this new tx at index, here you will get amount,
Repeat this for every vin.
Take sum of this vins.
Take difference between vin and vout you will get fees.

To avoid calling ever time you need to store txids somewhere or user something like insight.


Using the bitcoind -testnet test network and automatically creating test wallets

Each instance of bitcoind running with the testnet option creates its own wallet.  You cannot spoof wallet balances, but you can mine coins on testnet with minimal hardware as the difficulty resets to zero (or 1) on a regular basis.  You can also get testnet coins from faucets online.  You create payments and addresses on testnet the very same way you would with the non-testnet version of bitcoin (either via the JSON RPC interface or CLI commands).  Also blockexplorer for testnet is located here http://blockexplorer.com/testnet


How can I install Electrum on 32-bit Windows?

Electrum is an elaborate python script.  It uses the same bitwidth as your python interpreter.  If you have Py32 installed it is 32 bit, if you have Py64 it is 64 bit.

For windows users

The standalone EXE is 32-bit.  If you need to run 64-bit in PE or some other non WoW environment, simple grab the python libraries from the site and run the python sources at 64 bit.

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
             14C machine (x86)
               6 number of sections
        597F4AD5 time date stamp Mon Jul 31 10:20:53 2017
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
             122 characteristics
                   Executable
                   Application can handle large (>2GB) addresses
                   32 bit word machine

For more on windows EXE bitwidth, check this answer by Richard


Hyperledger fabric vs Sawtooth lake which platform is appropriate for Supply chain management?

There is not a definitive right answer here. Fabric and Sawtooth both designed towards a similar end goal: building a general-purpose, enterprise-level, permissioned blockchain. As a result, many of the core features are pretty similar, and there is no reason you couldn't build a supply chain on either of them.

That said, there are some reasons you might want to choose Sawtooth over Fabric in general (full disclosure, I am a Sawtooth maintainer, and might be a bit biased):

You can develop for Sawtooth in a variety of languages, including Ethereum's Solidity smart contracts (with Fabric you must develop in Go)
If you need Byzantine Fault Tolerance, Sawtooth offers PoET consensus which is hardware assisted resulting in trivial CPU usage (Fabric does not yet have any BFT solution)
I would argue that Sawtooth does a better job of isolating application logic from the core blockchain logic, making development easier
As Ferg mentioned, there is already a supply chain implementation on Sawtooth, which you could use as a starting point: https://github.com/hyperledger/sawtooth-supply-chain

As for reasons to use Fabric . . . you may find there are more external tools available. For example, Hyperledger Composer is pretty nifty, and though there has been some talk of porting it to Sawtooth, currently it only works with Fabric. That's all I can really think of, but obviously I am much more familiar with Sawtooth, so I might ask around before making a decision.

UPDATE: Sawtooth now offers PBFT consensus in addition to PoET, RAFT, and PoET-simulator. This is a BFT algorithm which does not have hardware dependencies.


How can I explain the meaning of Bitcoin to my grandma?

The one I use, at least for adults, is to make an analogy to a bank. When you write a check for some amount of money to another person and that person deposits the check, the bank does not physically take the amount of money and put it from your bin to another, they use a ledger to keep track of who has how much and they make sure the books balance. Bitcoin is essentially the same type of money in that there's a central ledger, but instead of only the bank having access to it, everyone has access to it. And much like signing over a check with your signature, you sign bitcoin transactions digitally.

As far as mining, the analogy there is that once a month or so, you get a bank statement that tells you your new balance along with all the transactions that happened on your account. If, for example, you overdrafted on your account, they'll tell you exactly what that cost and put fees on and so forth. As an aside, with bitcoin, you can't have a negative balance, so overdrafted transactions just simply don't go through. In any case, bitcoin creates a statement of not just your transactions, but everyone's transactions about every 10 minutes.

Usually, that's enough for people to understand what's going on. I avoid stuff like proof-of-work, mining reward, fixed money supply unless they're perceptive enough to ask those questions.


Push notification of incoming transaction

A transaction can only be confirmed by a new block being added to the chain. And since that happens on average every ten minutes, it would work just as well to be notified when a block is discovered (and/or the chain is reorganized). You can then check any transactions you care about.

One way to be notified if the chain is changed in any way is with my native long polling patch. This should apply pretty cleanly to any recent version of the client (but is based on 0.4.0):

diff -u orig/init.cpp new/init.cpp
--- orig/init.cpp   2011-09-25 08:29:53.935505617 -0700
+++ new/init.cpp    2011-09-25 08:48:13.667215990 -0700
@@ -199,6 +200,7 @@
             "  -rpcport=<port>  \t\t  " + _("Listen for JSON-RPC connections on <port> (default: 8332)\n") +
             "  -rpcallowip=<ip> \t\t  " + _("Allow JSON-RPC connections from specified IP address\n") +
             "  -rpcconnect=<ip> \t  "   + _("Send commands to node running on <ip> (default: 127.0.0.1)\n") +
+            "  -pollpidfile=<f> \t  "   + _("Support long polling\n") +
             "  -keypool=<n>     \t  "   + _("Set key pool size to <n> (default: 100)\n") +
             "  -rescan          \t  "   + _("Rescan the block chain for missing wallet transactions\n");

diff -u orig/main.cpp new/main.cpp
--- orig/main.cpp   2011-09-25 08:29:53.937505613 -0700
+++ new/main.cpp    2011-09-25 08:48:13.667215990 -0700
@@ -1118,6 +1118,7 @@
 bool CBlock::SetBestChain(CTxDB& txdb, CBlockIndex* pindexNew)
 {
     uint256 hash = GetHash();
+    bool lp = false;

     txdb.TxnBegin();
     if (pindexGenesisBlock == NULL && hash == hashGenesisBlock)
@@ -1160,6 +1161,7 @@
     // Update best block in wallet (so we can detect restored wallets)
     if (!IsInitialBlockDownload())
     {
+        lp = true;
         const CBlockLocator locator(pindexNew);
         ::SetBestChain(locator);
     }
@@ -1173,6 +1175,23 @@
     nTransactionsUpdated++;
     printf("SetBestChain: new best=%s  height=%d  work=%s\n", hashBestChain.ToString().substr(0,20).c_str(), nBest

+    if (lp)
+    {
+        // Support long polling
+        string lp_pid = mapArgs["-pollpidfile"];
+        if(lp_pid != "")
+        {
+            FILE *pidFile = fopen(lp_pid.c_str(), "r");
+            if(pidFile!=NULL)
+            {
+                int pid=0;
+                if ((fscanf(pidFile, "%d", &pid) == 1) && (pid > 1))
+                    kill((pid_t) pid, SIGUSR1);
+                fclose(pidFile);
+            }
+        }
+    }
+
     return true;
 }

To use it, just start bitcoin or bitcoind with a command line argument of-pollpidfile=/path/to/some/file. Then write your monitor process' PID to that file. You will receive a SIGUSR1 on any block chain change.


That's just reality. IOUs will be valued differently depending on who you got them from.

You probably value $100 in cash higher than the fact that your friend Joe owes you $100. You can use the cash right away while you have to wait for Joe to pay you back or you could transfer that debt to some common friend of you and Joe's (a friend who is fine with Joe owing him $100).

Now compare it to having $100 in a bank account at your local bank (i.e your local bank owes you $100). You'll probably value that a bit higher than having Joe owe you $100 since it is easier to instantly transfer it to your friends that have accounts at the same bank.


how to concat our website url in our bit coin transaction in blockchain send api

Address Tag

There are two ways I know of to tag an address on blockchain.info but both require a captcha so I don't think you can do it in an automated way. But the tag applies to the whole address, not a specific transaction. So if you have a small number of addresses, you can tag them all so that all your transactions will have the link. If you are automatically generating addresses, that would be hard.

The first way is with a signed message. You sign their specific message and send it to them. That means only you can tag your address this way.

The second way is if an address is viewable on a website, then anyone can come along and tag the address so it links to that page.

These will allow you to make it look like the "DPR Seized Coins 2" in your example.

Public Note

A separate thing is to use a public note like this message in your example:

  WTF??? What is it??? Is this guy CAN CLONE BTC? OR COPY BTC? Is it real? WTF??? Somebody can explain??? WTF!! I found this: http://sharma.binhoster.com

A note applies to a specific transaction, not an entire address. Also it does not require a captcha so it can be automated. But it can't have clickable links. Here's information on how to do that.


Bitcoin adder or bitcoin generator or bitcoin hacker software

AFAIK no such thing is possible. Could you please describe where this balance is supposed to be created?

You could obviously change your local record of the blockchain to reflect added balance, however, no other Bitcoin node would accept payments funded from that balance.


Why is the reward decreasing while the difficulty of mining is increasing?

Early adopters or miners make more profit. One could call this unfair, but that's life. Why does it need to be fair?

The reward is decreasing because the total amount if bitcoins is limited of time and the idea is that the incentive for mining should shift over time from the reward bitcoins gained when creating a block (aka. the coinbase transaction) to the transaction fees of the transaction included in that block.


How do I get all the latest transactions from Bitcoin network using Python?

Blockchain.info uses a special system that doesn't involve Python (as far as we know), they're most likely using a modifed node that notifies them of transactions.

The easy way

Just use Blockchain.info's transaction notification service. Their websockets api lets anyone subscribe to any bitcoin address.

The hard way

If you want to listen to all latest transactions, and not to addresses you own, you're going to need more in depth control. Otherwise use Bitcoind and its walletnotify parameter. Check out PyNode, a Bitcoin node implementation in Python.


So I mined a block, but why would other nodes accept my mined block?

The incentive to mine on the currently longest chain is that there is a risk to the dishonest miner that honest, non-mining nodes may have already propagated the first block and hence reject and not propagate the second block found at an equal block height.

As Proof of Work is not reusable this leads the dishonest miner to waste resources.


Different balances in API block explorers for BTC

Just check on our explorer
https://bitaps.com/1FLDCfr9iG7n6bAdGsqBXmhaLgC4aSze72

Correct balance is 1.41297880BTC

You can also turn timeline mode and check balance change after each transaction


Balance doesn't show up after import in multibit

What version of Multibit and on what platform ie OS?

There were issues with importing Blockchain wallets (a Reddit or BCT thread detailed lost BTC from a supposed lost imported Blockchain private key) so I believe recent Multibit versions have had Blockchain wallet imports disabled.

A couple threads to check:

http://www.reddit.com/r/Bitcoin/comments/1rop3t/bitcoins_showing_up_on_blockchain_but_not_in/
http://www.reddit.com/r/Bitcoin/comments/26fymy/multibit_has_removed_imports_from_blockchaininfo/

There's nothing stopping you from using Blockchain's export unencrypted keys in either base58 or Bitcoin-QT formats and pasting the private keys for import (PRIVKEY will either be 5H,5J,5K or K,L)


What is the best way to get notified of new payments received

Bitcoin New transactions can be discovered by polling using the listsinceblock API command with the Bitcoin.org client.

Beginning with v0.8.2 of the Bitcoin-Qt/bitcoind client is -walletnotify option that can run a process when a transaction that affects the wallet is seen.

The BitsOfProof supernode will offer this as well I believe.

[Update: Thanks to Pelle's answer to a related question,

You can do this using BitcoinJ by implementing the PeerEventListener interface.

The OnTransaction will be called every time a new Transaction is broadcast out and received from a Peer ]


If anybody is searching this in the future: CoiniumServ can be self-compiled from the github source and runs on windows.


BTC - Block Index - Reading the flag values in Level DB

I assumed that Block Index record will have details of the file (blk000????.dat) where to look for the block but it doesn't have anything

As described in the answer by a Bitcoin Core developer, the Block Index database contains all the information of the block and where the block is located (in which file blk). This is required because the is no order of the blocks received from the bitcoin network.

I tried fetching value for all below but its NULL always. Am I doing something wrong?

Read the information from the level DB is a little bit tricky because there is a special format as described in the link post. However, with your example, there is no way to find the problem in your code, because there is no code posted.


Where can I find RPC_User and RPC_Password for my Python Script?

To use this library you need an instance of Bitcoin core!
If you start with Bitcoin I suggest you to run an instance of bitcoin core and understand how the config it. You can find a good start here!
In addition, to use the lib inside your question you can following the steps below:

Download Bitcoin core and run an instance of it, I suggest you to run Bitcoin core on testnet, because it is not a small instance of "real" bitcoin network
Config Bitcoin core with a conf that accepts the connection on RPC!
With the RPC username and RPC password, use your code to connect to the Bitcoin code RPC interface.

Good hacking!


What does Bitpay's {"error": "Invalid token"} mean?

The error was my client connected to the wrong endpoint. This feature was undocumented at the time, but is now clearly documented. Kudos to Bitpay!


What is the purpose of submit header relative to submit block?

The `submitheader RPC checks the header against the candidate chain tip to check if it is valid(i.e has sufficient PoW).

Is that a legacy function? Or can it still be used?

This can still be used today. It's primary use in quickly checking if a certain header is valid without actually checking the entire block (compared to submit block). This is computationally much cheaper than checking the entireblock which involves checking the double spends, transaction signature verification, Merkel root calculations etc.
For example, you can implement the chain sync logic using headers-first outside bitcoind using this RPC. And according to the submitheaders PR, it was required for implementation of BetterHash protocol.


What does a bitcoin transaction contain?

Transactions consist of a version number, a list of inputs, a list of outputs, and a lock time.

Each input contains a reference to the output it is spending. This reference is the hash of the transaction containing the output followed by the 0-based index of the output's position in list of outputs. Then there is the input script which contains whatever data is necessary to satisfy the conditions of the output script. Lastly there is a sequence number.

Each output contains the amount of Bitcoin in satoshis and an output script that defines the conditions necessary to spend that output.

It is important to note that addresses are not included anywhere; rather they encode data that is then used to construct the output script. It is also important to note that output scripts are not just public keys (although a public key can be included in the output script) and input scripts are not just signatures (although signatures can be included in the input script).

A description of the actual transaction format can be found on bitcoin.org.


How can I extract the values of all UTXO for a specific section of the blockchain?

Peter Wuille describes exactly how the UTXO data is stored in the chainstate directory of your locally-running full node:

What are the keys used in the blockchain levelDB (ie what are the key:value pairs)?

You'll want to scroll down to "Inside the chain state database".

You can grab the unspent amounts, transaction hashes and indices. The exact format specification can be found here:

https://github.com/bitcoin/bitcoin/blob/d4a42334d447cad48fb3996cad0fd5c945b75571/src/coins.h#L19


Electrum: Transaction Error with Restored Wallet

you need to set fee manually. goto preferences and check edit fee manually.


Is it technically possible to solo mine bitcoin using cpu without a pool? How? Ubuntu

For development it's often helpful to start both nodes in regression test mode (regtest mode). The developer has his own private blockchain and can choose when to create a new block. You can use bitcoin-cli -regtest generate 1 to generate a new block.

For more information see Developer Examples - Regtest Mode.


Trying CashApp to add funds and purchase Bitcoin immediately but not working, Have done all banking requirements, IS THERE ALTERNATIVE

Buy bitcoin through Simplex using the Abra app. You could also make an arrangement with a Bitcoin seller on LocalBitcoin.com.

If you can connect with a miner directly you can get around these fees, verification, and BS waiting periods when purchasing Bitcoin. Reaching out on online mining communities could go a long way.


How is a locking script reliably detected as a P2PKH script?

The secret is that it is being interpreted as an opcode.
Opcodes 0x01 through 0x4b (decimal 1 to 75) are opcodes that specify the length of the data being pushed after them, as their own numerical value. That is to say, 0x01 means it is followed by 1 byte of data, 0x02 means 2 bytes, and so on.
This lets you push up to 75 bytes of data using a single op code to specify the length.
Additionally, we also have 0x4c, 0x4d, and 0x4e. These specify:
0x4c - The next byte specifies the length of the data
0x4d - The next two bytes specify the length of the data in little endian order
0x4e - The next four bytes specify the length of the data in little endian order
Between these opcodes, you can push up to 4294967296 bytes of data via 0x4e. Unfortunately, you'll run out of block space a little bit before that, so I would advise against it.


How are keys for lightning channels currently created?

While I have experienced the same situation as the person described in the video the information is only partially true.

It is very well described in BOLT 03 how keys are being derived. The general derivation of the keys you are looking fore is described in this formula:

  privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)

so what you can see is that your secret is added with a per_commitment_point which contains information about the channel state. This is done to increase your privacy and is the reason why lightning nodes need the channel state in order to derive the keys from your seed.


There are several mining profitability calculators available.  In order to obtain useful data from these, you'll need to predict how the price of bitcoins and the mining difficulty factor will change.  Price charts are available at bitcoincharts.com, and difficulty charts are available at bitcoin.sipa.be.  There are also charts of the price to difficulty ratio available at bitcoinx.com.