How do you make a good choice of server host to run an exchange on?

First of all, don't even consider using VPSes for these things. As long as there's a layer above the OS that can be hacked, the data cannot be safe.

Also, if things are going to be safe, you're going to need at least several machines. The machine that stores the bitcoin wallet information shouldn't be connected directly to the internet, and should not run on the machine that also handles the website.

As long as your server is an actual physical server at a company you can trust, you should be fine hardware-wise, as long as you don't run out of resources.

Of course, software is a far more important factor here. VPSes should be considered untrusted, as there's software running on the machine that you cannot control. As I already mentioned, don't run the webserver on the same machine where the wallets are stored, because a programming error can probably allow attackers to access those wallets.

Don't assume that network traffic between your servers is safe: a routing error or packet interception can cause a lot of trouble for you. Always encrypt traffic between the machines.

Don't trust closed-source software, and don't use beta quality software. They tend to contain more bug than open source software used by lots of people.

Always assume that your own code sucks. This is a very important part. Even if you're an extremely good software developer who has ten years of experience with security, you're going to make mistakes in your code. These things can be code injections that allow attackers to steal password, exploits that allow attackers to view the source code, etc.

But the most important part is that if you read this answer and learn new things about security, you shouldn't be starting a bitcoin exchange. You are dealing with people's money here, and if this answer taught you anything new, you definitely don't know enough about security to start a bitcoin exchange.


Bitcoin has a network protocol that all nodes use to communicate with each other. So long as a software can speak that protocol, it can join the network. Since Bitcoin Core is open source, the protocol details are freely available for anyone to see and implement themselves elsewhere. The protocol details are also described on bitcoin.org.


Is mining something specific of Bitcoin?

Earlier cryptocurrency systems (which predated Botcoin) relied on a central clearinghouse to prevent fraudulent transactions, such as double-spending.  One of the objectives of Bitcoin was decentralization.  To prevent double-spending without a central clearninghouse, blocks of transactions need to be mined.  The process of mining requires a significant amount of computational effort to be expended by the miner.  Other nodes on the network will not recognize a mined block of transactions without this proof of work.


How to fully decode a coinbase transaction?

coinbase, scriptPubKey, scriptSig - they are all scripts. You can read in wiki about how to decode script https://en.bitcoin.it/wiki/Script.

Coinbase can contain any data, even invalid script. But typically, it contains valid scripts. Examples of decoding:

coinbase: 038abd07062f503253482f048725ee5208083865a409000000092f7374726174756d2f
03 - length opcode
8abd07 - data with length 03
06 - length opcode
2f503253482f - data with length 06
04 - length opcode
8725ee52 - data with length 04
08 - length opcode
083865a409000000 - data with length 08
09 - length opcode
2f7374726174756d2f - data with length 09

scriptPubKey: 76a914975efcba1e058667594dc57146022ec46560a63c88ac
76 - OP_DUP opcode
a9 - HASH160 opcode
14 - length opcode
975efcba1e058667594dc57146022ec46560a63c - data with length 14 (20 in dec)
88 - OP_EQUALVERIFY opcode
ac - OP_CHECKSIG opcode


tl;dr You should use rounded values of ZEC when unshielding, and even then you will have less privacy than if you only use z-addrs.

We address this exact question in this blog post (images from which I reproduce below).

Transactions using the Bitcoin-inherited t-addresses are obviously traceable. However, the zero-knowledge property associated with the use of z-addresses means that when you send ZEC to a z-address (creating a "note", the private equivalent of a TXO), and then use that note in a subsequent transaction, the two transactions are not directly linked on the block chain (that is, the second transaction does not contain a prevout field referencing the first one, like would happen with t-addresses).

This means that if you send ZEC from a t-address to a z-address (a "shielding" transaction) and then from the z-address to a different t-address, you end up with transaction chain (b) below:

This "breaks" the link between Alice's and Carol's t-addresses (for this transaction; other transparent payments could still link those addresses, so the same care should be taken as with Bitcoin). Considered more widely, you can imagine "islands" of t-address activity, separated from each other by murky z-address transaction "seas" (see this blog post for related ecosystem discussion).

Now for the caveat! The z-address hides all details (recipients, values, and memo fields) of the output notes in the shielding transaction, and the corresponding properties of the input notes in the unshielding transaction. But the ZEC values are still public, because they are visible in the transparent halves of the transactions! This means you can run into problems when you send the full balance of a t-address with no change:

The full value is visible in the first transaction, and then later a second transaction appears with an output value equal to the original input value minus two transaction fees. Timing data is also available (because the transactions are inherently ordered and timestamped in the block chain), meaning that it can be possible to statistically link the two transactions based on those values alone [0].

The solution to this is pretty simple: use "rounded" amounts when unshielding (with the change going back to the z-address). That way, there is no value link between the shielding and unshielding transactions.

EDIT: Note that the particular rounding strategy you use can itself leak information! For example, if you always round down to the nearest whole ZEC, and someone else always rounds down to the nearest 10 ZEC, then over time, your unshielding transactions will look markedly different to theirs, and someone who is looking for patterns in the block chain can start separating your unshielding transactions from the rest. In general, the larger and more standard the buckets you use are, the less information is leaked; additionally, you want everyone else to be using the same buckets as you too!

The upshot is, if you want to minimize the amount of information you leak, the simplest way to do so is to minimize your usage of t-addrs.

[0] It's a little more complex that this. The shielded part of an unshielding transaction still has the same two output notes as any other shielded transaction part (they just contain dummy notes for a z->t transaction), and those parts could be filled (ie. using a z-address to pay both z-addresses and t-addresses). So while matching values is a strong link, it is not a definitive link, and in fact can be intentionally subverted by wallets choosing vpub_new values for their unshielding transactions from the set of vpub_old values that have been seen on the block chain. Rounding the values is effectively a social consensus mechanism for achieving this.


Bitcoin Gold was announced to have strong replay protection, a unique address format and a proof-of-work change. You will not need to do anything special to make sure that you're protected against replay attacks.

You may be interested in Jimmy Song's analysis here: Bitcoin Gold: What you need to know


Extract sender ID and recipient ID of a bitcoin transaction

Transaction data in the blockchain does not include any ID for a "sender" or "recipient".

Transaction data includes scripts used to spend cryptocurrency amounts listed in the transaction data. The most common of these scripts specify what is commonly called an "address" but that is derived from a public key and is nowadays usually unique to a transaction. It is designed to be difficult or impossible to identify a sender or recipient from these "addresses".

  sites where you enter ID of the wallet

There are no sites (in general) that do that because cryptocurrency wallets don't have wallet-IDs. Certainly none that are part of transaction data in the blockchain.

The only really significant data in a wallet is the private-keys it contains. Recovery-phrases or seed-phrases may be used to re-create these private keys. A wallet's data may be protected by being encrypted on disk using a password or pass-phrase. None of these constitute a wallet-ID.

Blockchain explorer websites generally allow you to examine blockchain data associated with one of

address
transaction-ID
block number (height)
block hash

None of those really constitute a sender-ID a recipient-ID or a wallet-ID.

Decoding Transaction Data

A good explanation of the structure of a Bitcoin transaction in a blockchain block can be found at https://en.bitcoin.it/wiki/Transaction

This gets more complex as time goes on and new features are added (SegWit, Bech32, ...) or when you need to fully decode lesser-used types of transactions (n of m multisig?).

Search for Code to parse a Bitcoin transaction

A few unintuitive aspects of Bitcoin and similar cryptocurrencies:

Wallets don't contain bitcoins.
The blockchain does not contain bitcoins.
Bitcoins are not really sent or transmitted through the Internet.
Bitcoins don't really exist anywhere - they are more a unit of measure.
The blockchain is not really a ledger (it is a journal).
Bitcoin addresses don't label places or people or wallets.
Bitcoin addresses are not used to deliver transactions or bitcoins somewhere.
Bitcoin transactions don't have to include any addresses.


Your question indicates certain misconceptions about what Bitcoin is. I would advice you to take an afternoon to read the Bitcoin whitepaper, learn from other sources and understand as much as possible. It is possible to know what Bitcoins truly are without great technical knowledge. (Bitcoin transactions can only be made with the owner's private key. A "theft" usually means performing a transaction towards a thief's address, by manipulation of software or persons or obtaining other people's private keys.)

They can be spent just like any other Bitcoin. The only thing is that you can trace every Bitcoin, and therefore know it has been partially stolen Bitcoin. This is called "Taint".

A tainted Bitcoin could be considered less valuable as it would not be accepted everywhere and spending them at "legal" institutions would give a lead towards the thief. Buying stolen goods is illegal in most countries, stolen Bitcoin would count too.

If the Bitcoin community agrees on no longer accepting stolen coins they could even become practically worthless, the risk of arrest for theft and the low value or spendability of coins would be complicating.

The problem is that "theft" is a political issue, just like ownership. Some nations might not consider a hack a theft, and certain Bitcoiners definitely think so too ;). Who would be the judge in discriminating a stolen from an unstolen Bitcoin?

Then there's the fact that someone might have accepted Bitcoins not knowing they were stolen, or even whom they're really from. Or accepting them before it was decided they were stolen. Similarly to counterfeit money. This means that Bitcoins once stolen, are not per definition "stolen" or "illegally accepted" now. Certain Bitcoin laundry services are available to attempt to disturb the usual tracebility.

Overall I would say that a thief would have to be very careful not to expose him/her self. An effective laundry service could help him/her with that. But the coin is still the coin, and can still be spent.

Please let me know if this answered your question. Comment if you are unsure of something.


contact CEX and explain to them, they should be able to give you the money since they control the private key.


You can see when is your transaction with : https://blockchain.info

If your wallet is out of sync don't worry, it's normal that you don't see the transaction.
If you sent BTC from A to B, B will see the transaction when he's synced.


After sending some bitcoins, why do I have zero available to spend when I clearly didn't send my entire balance?

In this scenario, neither address A nor address B had a sufficient balance to pay 0.5 BTC by itself. The two together did have enough. So, the clients are intelligent enough combine the amounts of two addresses together in order to meet the desired transaction amount.

Unfortunately, the combination has the effect of sending bitcoins to yourself as "change" in the transaction. In this scenario, all of the available balance was split between address A and address B. In combining those in order to satisfy the payment to C, some was consolidated as "change" into address B.

Think of it mathematically, as well. This shows the equilibrium, from the point of view of the accounts you control.

balance(A) + balance(B) = payment_to(B) + payment_to(C) + transaction_fee(0.0005)

This is the transaction.

balance(A) + balance(B) - payment_to(C) - transaction_fee(0.0005) = payment_to(B)

That payment_to(B) is the change.

Unfortunately, because of the number of confirmations the clients wait before allowing one to spend incoming transactions, the balance is present but unavailable to spend for several minutes, or as much as hour or more.

Clients should handle this better by warning if transaction about to be sent will create this confusing situation.


Does GDAX have weekl buy and sell limits?

No.

From the GDAX support page (source):

  Deposit (BTC, ETH, LTC): Unlimited

  Deposit (ACH or SEPA): Varies

  Deposit (USD via wire): Unlimited

  Trade: Unlimited

  Balance: Unlimited

  Withdrawal: $10,000/day for individual accounts and $50,000/day for
  institutional accounts. To be considered for higher withdrawal limits,
  please go to your Settings within GDAX and click "Increase Limits."


How do bonds in Secure Multi‐Party Lotteries work as described in Bitcoin and Cryptocurrency Technologies book

The transactions for revealing commitments are separate from the transactions for the lottery. Timed hash commitments only force parties to reveal preimage x of H(x). The lottery logic is carried in a separate transaction


From what I can gather, it doesn't seem like there is a way to know your "inputs" upfront. The inputs are the various addresses the different chunks of bitcoin are coming from... I think? So the inputs, as I understand, will depend on the source.

Your wallet's balance is comprised of the various 'unspent transaction outputs' (UTXOs) it controls. These UTXOs can be used as inputs for new transactions (which will create new UTXOs). Some software will allow you to manually manage your UTXOs ('coin control'), which means you can pick specific UTXOs to be used as inputs for a new transaction.

This page appears to have a walkthrough of the process when using electrum: https://bitcoinelectrum.com/how-to-spend-specific-utxos-in-electrum/ (disclaimer: I am not affiliated with that site and have not verified its legitimacy, but at a very quick glance it appears it may be helpful to you).

  Is there any way that I can assume 1 input for my calculations? Or find another way to get a more accurate fee calculation?

Assuming 1-input for all your transactions will probably not work well in real life. Any transactions you send that have multiple inputs will end up with fees that are lower than intended, which will likely result in long confirmation times (or, a transaction that never confirms).

The most accurate method is to simply first determine the size of the transaction you are sending (vbytes), as well as the fee-rate you would like to send it with (sats/vbyte), and then multiply the two numbers to determine the total fee (sats).

  I can't have a fixed fee of, for example, 0.0005, because that will probably work fine for small amounts, but if someone sends a large amount, the fee could easily be more than this.

This is a misunderstanding of how fees work, it does not matter what the value being sent is, only the number of bytes for the transaction.

But otherwise, in general a fixed fee is not a good solution at all.

  Is there a way to know what the worst case cost could be for sending 0.01 BTC versus sending 20,000 BTC? Is there a maximum or "worst-case" formula I could use to work out what the absolute highest a fee could be for a specific scenario?

You can set the fee-rate as high as you'd like. 'Worst case' would be sending 100% of the transaction value to miner fees.


Cryptofinance plugin pulling wrong data for KNC

There are over 60 coins out there that share the same symbol. You would have to use the full name of the coin to pull the data instead of ticker. According to the documentation:

  To find the coin full name, simply go to its CoinMarketCap page and copy its name from the URL. For instance Cosmos URL is https://coinmarketcap.com/currencies/cosmos/ so we’ll copy cosmos

However, you need to keep the quote currency in symbol. So if you are getting the data of Kyber Network in terms of bitcoin, you will have to use =CRYPTOFINANCE("kyber-network/btc")


When will FPGAs and ASICs 'replace' GPUs for mining?

Currently the hash rate is around 25 TH/sec.  It is expected that when the ASIC hit the market in Dec 2012, the new hash rate will be about 250 TH/sec.  The difficulty is directly proportional to the hash rate, so it should also increase 10x.  This would reduce the profitability of existing GPU miners by 10x.  Plus about the same time the block reward will be halved from 50 BTC to 25 BTC, again halving the profitability.

The expectation is that once ASIC takes hold most of the GPU and FPGA mining will bleed out of the network.  You should expect to see an initial influx of ASIC and then a steady growth as mininers reach for their larger share of the market.


Why do my transactions show I received 1 satoshi?

That particular transaction is an attempt at something that has become known as "dust spam". The idea is that the sender sends a very small amount of bitcoin to many different addresses, hoping that people will notice and investigate further. It's possible to find out who sent this if you look hard enough, but most people won't bother. The effectiveness of this kind of spam is clearly limited.

For more information, see the Reddit thread PSA: Did you receive a "dust" amount of BTC from "Enjoy" and "Sochi"? Here's why.


Do "the official bitcoin developers" control Bitcoin?

At the moment in my opinion, Gavin does indeed control Bitcoin Project to some extent. He is widely recognised as the main developer behind it and could probably push his authority on a lot of subjects if he so desired. However, I am under the impression that he would not perform such actions - they would undermine the credibility of Bitcoin and be bad for everyone.

He does appear to have a lot of influence over a lot of aspects of the Standard Client, the Protocol and overall behaviour exhibited by Bitcoin. He will most likely have the final say for example on the subject of block size limit. However, if he would change any more major aspect of Bitcoin that would undermine a lot of other people's work, say by changing the mining algorithm hard coded into the ASICs, it wouldn't be long before he would lose his position of authority and possibly create a hard fork.

So to sum up, at the moment Gavin is de facto the person who controls Bitcoin on its most basic level, and he will most likely hold that position of authority only as long as he remains a "benevolent tyrant" so to speak.


This question seems borderline off-topic, as tax laws are localized to each country, but I think a generalized answer could be of interest nonetheless:

Bitcoin is money that grants the user of it full financial sovereignty. No third party needs to be involved for the user to hold, or use bitcoin. This means that there is the possibility of the user avoiding their tax liabilities.

However, this is not much different from cash, which is used to transact anonymously and without record, all around the world, every single day.

So I suspect that many jurisdictions will approach Bitcoin taxation in the same way that they do other things: voluntary reporting, with stiff penalties for those that make fraudulent claims.


Trying to understand the mempool and how transactions are picked

Solo Miners

Is one transaction only picked by one miner or is it possible, that more miners can pick the same transaction?

Each miner is free to pick whichever transactions they want. They have no knowledge of what other miners are working on. Miners might pick different transactions, some the same and some different or all the same. There is no explicit coordination.
Only when the rate of new transactions is low, it is likely that each miner will have the same set, or nearly the same set, of transactions to work with.

If only one miner can pick a transaction, [...]

Not applicable.

If more miners can pick a transaction, what happens to the other miners(that couldnt calculate the hash first).

When they see another miner has produced a new block, the others stop their work and start on the next block based on the new block produced by the other miner. They first remove from their mempool any transactions included in the other miner's new block.

Mining Pools
Things are a little more complicated for mining pools. Members of a pool coordinate their work cooperatively. But you can think of each separate pool as a separate miner and the above applies.
Stratum v1: Pools and solo miners are the only entities that are constructing block templates. Regular miners cannot because they don’t have the transaction sets to build the blocks.
Stratum v2: Every miner (who has it implemented in their firmware & a pool that supports it) will have the option to prioritize transactions however they want without impacting the other miners in the pool.

Further reading

Slides about basics of Bitcoin Mining by Daniela Brozzoni
What exactly is Mining?
What are bitcoin miners really solving?


IP Addresses of inbound connections in bitcoin full node (TOR) looking as a localhost (127.0.0.1)

Those are incoming connections coming through the proxy, which have no other possible identifier than coming from localhost (where the proxy daemon is running). The "sending" port number is effectively irrelevant for this situation. If you don't want incoming connections through the proxy, don't configure them to be allowed.


Copay wallet transaction history unavailable?

Top search result on Google says

  Refresh the transaction cache

  Select your wallet > Tap on the icon in the upper right corner of the screen > Choose "Transaction History" > Choose "Clear Cache" to reset your transaction list.
  Note: Your wallet will say 'Updating Wallet' until the list has been retrieved.

  Refresh the server's cache.

  Select your wallet > Tap on the icon in the upper right corner of the screen > Go to "Wallet Addresses" > Choose Scan addresses for funds
  Note: Your wallet will say 'Scanning Funds' until the addresses have been scanned.

  Please do not uninstall the app or delete the wallet if you did not back it up properly, in such case, please do so. The wallet backup is the only way to recover your wallet.

Maybe that helps?


Have there been any examples of people manipulating transactions in a way that waiting for more than 1 confirmation would avoid?

What you are referring to is likely a preventative measure for the possibility of a double-spend attack. Due to the nature of the Proof-of-Work algorithm in Bitcoin, the likelihood of such event on a transaction with 6+ confirmations is very low due to probability and the cost implications of re-calculating X amount of blocks.

  Is there any evidence that this actually does anything?

Suppose you have a large transaction that is very attractive to an attacker or someone looking to perform a double-spend attack. Once the transaction is included into its first block, it is considered to have 1 confirmation. Each block built on top of this chain adds to the number of confirmations of the transaction. This makes it increasingly difficult for a double-spend attack because the attacker would have to complete the same amount of computation (proof-of-work) to become the larger chain. In our example, 6 confirmations would require the attacker to mine 7 valid blocks to become large enough to be considered the valid chain. For example, having 20% of the total hash power of the network with 6 confirmations would yield a 1.42% probability of a successful attack. This number becomes exponentially smaller as the number of confirmations increases.

  is this just to stop a theoretical attack from happening?

One important aspect of Bitcoin is that nodes will always favor the blockchain with the most amount of proof-of-work (longer chain), this is critical to preventing double-spending.

  Has someone ever before manipulated a transaction on the bitcoin ledger

This is a slightly controversial question, and I would recommend reading this thread for various attack specifics.

The Bitcoin Wiki also has several charts and calculators that can be used to determine theoretical attack probabilities.


How to remove private keys from wallet.dat and create "receive only" wallet?

You're right, storing your private keys on a server is a bad idea - it means you're liable to lose all of your funds in the case of a hack.

But as you aren't storing them, do you need to install the bitcoin daemon on your server? You could use an API from one of the online blockchains to monitor transactions from your server, and maintain your encrypted wallet.dat on your own computer.


If pruning is so safe, why aren't 100% of the Bitcoin nodes pruning? Why keep the unnecessary data?

There are three things pruned Bitcoin Core nodes (as of version 0.21.0) cannot do:

Serve historical blocks to new nodes that are trying to bootstrap.
Rescan for old wallet transactions after importing more addresses.
The getrawtransaction RPC for retrieving arbitrary transactions.

Validation (and security in general) are unaffected.


You are the victim of a scam. Please don't send anymore money to the scammers and in future read about how bitcoin works before you put your money into it.


Is it possible to build pay to script without destination address?

Addresses are a human-convenience feature, and have little bearing on the underlying Bitcoin transaction.

Common types of addresses rely on sending coins to scripts that allow spending by signatures from certain private keys. However, you can have scripts that allow spending as long as any given locking requirement is met.

Unfortunately, the script must be self contained, and you will not be able to enforce a burn requirement, as there is no way to check if the coins have actually been burned on-chain. Your best bet would be to lock the coins to a key, and have an off chain way to share that key with someone who burns the required amount of coins.


Why Bitcoinchain.info Ticker API is not stable?

There's nothing wrong with your PHP syntax or blockchain.info. The Bitcoin value is always changing. It is traded 365 days a year, 24 hours a day on a multiple exchanges around the globe.


What are the categories of a transaction, and what do they mean?

What you are seeing is not an inherent property of a transaction but how the transaction looks to you at the current time and how your Bitcoin client wants to display it.

A transaction contains inputs and outputs; if the transaction is considered a "send" or "receive" (or "transfer") depends on which of the input and output addresses are in your wallet and considered to be owned by yourself.

An "unconfirmed" transaction is one which is recent enough to not be considered a canonical part of the block chain.  Once enough blocks have been added to the block chain after the one in which your transaction is recorded it will be considered confirmed.  The number of blocks depends on your Bitcoin client.

An "immature" transaction is a generation transaction which is not old enough to be made available for spending.  Under the current specification a generation transaction must have at least 100 confirmations before it can be spent.


What block numbers & hashes were discarded by the March 2013 blockchain fork?

The following blocks were abandoned (along with a few more along that chain as the quickly dwindling set of 0.8.0 miners plugs along) when the 0.7 blockchain caught up with the 0.8.0 blockchain at 2013-03-12 06:19:32.  Thankfully, you can see that the 0.8.0 chain has slowed down to just one block in the two hours after 03:28:41 UTC.

Also note that, as I understand it, most transactions are showing up in both blockchains.

Source: https://blockchain.info/blocks/1363065244022  (where the ones to abandoned were labeled "Main Chain" until the current "Orphaned" chain caught up, at which point the labels swapped)

Update: I added 7 more blocks since the 0.8.0 chain was abandoned, up to 225461.  The rate of continued mining there is a bit less than one block per hour.

Update 2: As of another day later, there haven't been any more blocks in the orphaned chain.  There is only one block at height 225462 (http://blockchain.info/block-height/225462) so the orphaned chain may end at a record 32 blocks.

Height  Time (UTC)             Hash

225461  2013-03-12 16:21:02  00000000000002d74c31d9c9f8e4768c0b51c3f145be07be7e77af0146144c30
225460  2013-03-12 15:05:56  00000000000002afb9088485b05a2b8a1dfa6b82e3e915fa0765879a05061461
225459  2013-03-12 14:36:39  000000000000036e459f26b1dc02683c9beeb061eedf18689995143354467245
225458  2013-03-12 12:18:23  00000000000000620d78c08bd345aa489b02a52c5f823f0324d3c42212577c24
225457  2013-03-12 09:48:00  0000000000000067fa40b890799ef9814e1e427abd5fc9f4751ffb3ef6512d14
225456  2013-03-12 07:59:29  000000000000031ce5f5c447dbe06ebd62f988c6718e1a17d14b9dcd8ff9605c
225455  2013-03-12 07:14:21  000000000000009d2dee89c7732b5bc912845d96a6bee38cab815949cfa60d23
225454  2013-03-12 05:17:11  00000000000000df96f272c3b1e9dd15272b55750966cbd239219b94756c73ec
225453  2013-03-12 03:28:41  000000000000031803e492a0103154d243c9945ef78dbdba42a1ecfdb5bc5dbb
225452  2013-03-12 03:05:29  0000000000000190f5944e56c52600e9d8d4d5416432e03b324bc85c51629bcd
225451  2013-03-12 02:06:07  00000000000003bdcc4424dea94de83e9f54ca158ae3eac59c2e97c2f90a32ad
225450  2013-03-12 02:01:28  000000000000026a105de544bfbe71bca0820ac3963ba132c75ec40411b5f162
225449  2013-03-12 01:50:05  00000000000001f15726ea57dc7702407a3ebc097ed801cb3d7b0e8a450807cb
225448  2013-03-12 01:38:10  00000000000001f9fd0b0cab82deca5f53030911b33ba7dd7ce3fd77ad2c5a55
225447  2013-03-12 01:34:55  00000000000000ec24f812807f81aadb7a665ef4ab8b8aa49df5ef789cdc13ff
225446  2013-03-12 01:30:40  00000000000000757de9173ee2f01c9f957c8aa3b4f71b901b0fa19683ab1fa1
225445  2013-03-12 01:14:54  00000000000000ec0df675972dddf0c2bdb1d436064672a6f0b79ce65ffcade6
225444  2013-03-12 01:07:00  00000000000003381ed79de2fa810c0e4f0e9c0cd5d307380b779e2b5ffa982e
225443  2013-03-12 01:05:42  0000000000000213874009d269b90be16ea5c1f6a83a79ae2be3813d8972a2a3
225442  2013-03-12 00:50:25  0000000000000229cd059490b7607ca4c191c52bb40405fa052c48d72bfda8b0
225441  2013-03-12 00:39:25  0000000000000372a4c37e27587255ca77a6377391c1974f13ea55ec1d3bc01b
225440  2013-03-12 00:20:11  00000000000003264ac7a6a74ca779997ee637b30f84debcb6ba6c26e2d09f4b
225439  2013-03-11 23:49:08  000000000000015aab28064a4c521d6a5325ff6e251e8ca2edfdfe6cb5bf832c
225438  2013-03-11 23:47:25  000000000000019881625f04eac2046512fa1e1bd7193f56f39595d802bbbd04
225437  2013-03-11 23:34:58  000000000000000016b3a292d63f9eea6b8177b8ba8dfd621d36fd828e5cb187
225436  2013-03-11 23:34:35  00000000000001a23b3f38106f210493795a1ef6b21dd559f87ada8dfc84181b
225435  2013-03-11 23:22:47  00000000000000947452b814ed008f750023e64c8fd03bb19b3865716eeb243d
225434  2013-03-11 23:08:53  00000000000002528688a366a9f42c07089268cd8a474961c49f787cb385807e
225433  2013-03-11 23:07:54  00000000000001b3c862fd66689712bc1cdd44fc004c008ada6c1b51367686f2
225432  2013-03-11 22:56:44  00000000000002c9e42c23f6eed2b9f9152a440610dcfaf992357c3cbff3689c
225431  2013-03-11 22:46:35  00000000000002d2012cc1b3fc0cceb8c156f0e698db40bf4413a210eca056c3
225430  2013-03-11 22:39:09  000000000000015c50b165fcdd33556f8b44800c5298943ac70b112df480c023


On Bitcoin's Blockchain, how is information transmitted instantly to all other nodes and do nodes 'talk to each other' through an API?

Information is not instantly transmitted. It takes time, nothing is instant.

The Bitcoin network has a network protocol which nodes using it speak. This network protocol allows a node to send and receive data to and from a node that it is connected to. A node will connect to multiple other nodes on the network.

This network protocol uses TCP connections and Bitcoin specific network messages.

  Do Blockchain nodes communicate with each other through HTTP requests?

No. That would be inefficient.

  Or is there a delay until the full blockchain information reaches all nodes?

Of course there is a delay, the speed of light is only so fast. Data takes time to transmit due to the capabilities of physical connections and the distances that information has to travel. There is always a latency due to physics. Furthermore, Bitcoin nodes will have random delays between each of their announcements of transactions in order to better preserve privacy.


Provably fair unknown event time for Bitcoin gambling

You could leverage the blockchain itself and use something based on the hash of the current block. For example, the block hash will end in a 0 bit roughly half the time. It will end in 00 bits roughly 25% of the time, etc. This is exactly the same idea as the bitcoin "difficulty" parameter, you would be using the hashes as a roughly constant rate stream of unpredictable random bits.

I think everybody who participates would agree that the block hashes are not predictable in advance.


Why does the first bitcoin client only supported windows

If you want a definitive answer, you'll need to ask him I'm afraid.
My best guess is that Windows development was the thing he was most familiar with (or even only familiar with). The coding style was also similar to one commonly used in the 90's by Windows developers.


https://openexchangerates.org/ is a great API for forex rates.


Is there only one method? for miner and pool communication?

JSON-RPC as a protocol does not specify other protocols that use it. Rather it just defines the general structure that protocols using JSON-RPC should use. JSON-RPC does not define any methods; login is a method that is offered by protocols using JSON-RPC.

GBT, stratum, and getwork use JSON-RPC. They themselves are not JSON-RPC or some subset of JSON-RPC. Furthermore, none of those have a login method.

There is no guarantee that all coins use the same protocol (GBT, stratum, or getwork) nor that they use JSON-RPC. Typically coins will use one of those or something similar because they simply copy existing code, but there is no guarantee.


Best similar and alternative is Bitwasp for PHP, with a few lines you can create much more than addresses and keys.

Presently supported:

Bloom filters
Blocks, headers, and Merkle blocks
P2SH & Segregated witness scripts
An adaptable elliptic-curve library, using [PhpEcc] by default, or libsecp256k1 if the bindings are found
Support for building, parsing, signing/validating transactions
Deterministic signatures (RFC6979)
BIP32 and electrum (older type I) deterministic key algorithms
ScriptFactory for common input/output types, parser, interpreter, and classifiers
Supports bindings to libbitcoinconsensus
RPC bindings to Bitcoin Core's RPC
Bindings to Stratum (electrum) servers
Easy serialization to binary representation of most classes
SIGHASH types when creating transactions
Payment Protocol (BIP70)

Take a look bitcoin-php


Can I first open an account on an exchange then later on transfer to my wallet?

If I open an account on, say, mtgox, can I immediately buy bitcoins and if I can, can I then transfer the very bitcoins I just bought to my own personal wallet (the one that I'll generate later on offline and put its private part in a safe).

Yes, that's a basic Bitcoin withdrawal.

  As a side-question: where are the bitcoins that I buy on mtgox stored? In a wallet belonging to mtgox?

Yes, exactly.


What is a share? Can I find it while mining solo, or only when pool mining?

A share is a hash smaller than the target for difficulty of 1* (see clarification at end).  Every hash created has a 1 in ~4 billion (2^32) chance of being a valid share.  In comparison if the difficulty of network is 2,000,000 then a share is 2 million times "easier" to find than a valid hash for the block, and on average it will take 2 million shares (8 quadrillion hashes) to find a valid hash for the block.

Shares have no actual "value".  To the bitcoin network they are worthless.  The only hash with any value is the one that is smaller than the target (determined by difficulty).

Since a miner has no control over when he will generate a share (they occur randomly roughly once per 2^32 hashes) he can't cheat the pool.  When one miner in the pool finds the solution hash (the only hash worth anything) rewards can then be split by number of shares submitted.  There are multiple reward methods (Proportional, PPLNS, SMPSS, PPS, etc) that calculate the "fair share" of the reward but all use a share as a proxy for work completed by the miner.

It is important to emphasize that a share has no actual value.  The only hash with value is the one that solves a block.  A share is merely an accounting method to keep the miners honest and fairly divide any rewards earned by the pool.

There is no need to keep track of shares in solo mining because you will not split the reward and can't cheat yourself.

Usually pools use a difficulty of 1 as the target for a share.  Technically any difficulty (less than network difficulty) could be used.  Each miner's share of the reward would remain the same regardless of what difficulty is used.


Multibit password error: Could not decrypt bits

It means literally that the decryption operation of the wallet failed.

If the password you enter is different in any way from the password you entered when you encrypted your wallet with "File | Add Password" you will get this error.

I would check things like:

Are you definitely entering the same password you used to encrypt this wallet.
CAPS lock key
If you use an Input Method Editor, are you entering exactly the same characters.

There is also another copy of your private keys on your disk if you need to use them:
When MultiBit encrypts the wallet it writes out the private keys to an export file, encrypted with the wallet password. As long as you have the correct password you can create a new wallet and import the private keys into the new wallet. You will then have access to your bitcoin.

There are more details about this in the help (https://multibit.org/en/help/v0.5/help_contents.html) in the topics:

Help on specific tabs | Importing private keys
More technical details | File descriptions


How to generate a private key to create wallet through api in Block chain

First create an account
https://blockchain.info/api/api_create_code
you will receive api code in email.
with which u can create ur wallet

https://blockchain.info/api/v2/create_wallet?password=wallet-password&email=email-for-wallet&api_code=this-will-be-in-your-email


Can you help with Bitcoin block hashing algorithm ( PHP, C, Python, Javascript)?

for a sample Bitcoin hashing in JS you could have a look at this:
https://github.com/KaSt/Jilaku
It's a repo I first forked and then modified to have a "web miner" on top of GAE.
I started the thing as a toy and then dropped the idea... Because...

Well, before the "because", I still don't know your actual purpose. In case it's to experiment and learn the basics of how a miner works... Then any language will do.

In case your aim is to produce a fully functional and efficient miner, then I'll continue with the "because".

I dropped the idea of developing a Javascript miner because there is no way that any interpreted code can be as fast as modern ways of mining, which include ASIC chips and the lot. Your computer will be running for ages, might find a good hash but by the time it found it, other miners might be 10 blocks ahead.
That Javascript miner achieves a few thousands hashes per second.
A single ASIC USB thingy will achieve 300 million hashes per second.

In case your aim is actually to experiment, then that JS piece of code could be of help.

Have fun!


How to get new address on bitcoin core through extended public key

There are php libraries that you can use. For example the ones in my plugin bitcoin address in the includes/libs directory. These libraries were originally created by the authors of the bitcoin payments for woocommerce plugin.

There is also the bitwasp php library but it is a lot larger and does more things than merely deriving addresses from xpubs.


How to restore wallet from 15-word seed mnemonic?

Mnemonic phrase from 2015 or earlier, and not an Electrum seed?
Then there is a high probability it is blockchain.info's legacy wallet recovery mnemonic.
Which can be recovered here https://blockchain.info/wallet/forgot-password
Correction:
This is a blockchain.info mnemonic. It contains your WALLET ID and Password (pre 2013 contains only Password and/or password plus alias)
You can decrypt the mnemonic using blockchain.com webpage they have a legacy (HD is only 12 words) page which changes from time to time.
With that you can login to your account and access your coins.


Any pool that value those who mine during low difficulty more?

I would disagree with Murch's answer.

According to https://arxiv.org/pdf/1112.4980.pdf

Only 2 kind of pools do that. PPS pool. And certain variants of PPLNS pool.

I got to ask the guy that author this.


What does blockchain.address.listunspent exactly return?

Is it safe to assume that every output script is going to be the standard pay-to-hash '76a914' + addr_hash + '88ac' ??

Usually.

For your example the full scriptPubKey looks like  OP_DUP OP_HASH160 PUSH_20 0x9C1185A5C5E9FC54612808977EE8F548B2258D31 OP_DUP OP_CHECKSIG, but this can also be encoded non-canonically as OP_DUP OP_HASH160 OP_PUSHDATA1 0x14 0x9C1185A5C5E9FC54612808977EE8F548B2258D31 OP_DUP OP_CHECKSIG using a OP_PUSHDATA1 in place of the direct push opcode. There's no functional difference to this and the script will be longer as a result, but there are outputs like this in the unspent outputs database that fit this pattern.

In total there's 4 valid permutations for each P2PKH script, direct push, OP_PUSHDATA1, OP_PUSHDATA2 and OP_PUSHDATA4. Different software either sees these as valid, or simply ignores, it's undefined exactly what people should be doing with them. They are spendable and technically the same as the most obvious permutation, but it's not clear on the outset that this behavior is even permissible.


By design, Bitcoin Core is a fully validating Bitcoin node and does not have an SPV client mode.

If disk space is your primary concern, you can run Bitcoin Core with pruning active. This will delete old blocks from disk but maintain a full UTXO set which is sufficient for full blockchain validation.

Bitcoin Core can serve SPV clients, although there has been discussion to deprecate this service or at least switch the service off by default. Before using an SPV wallet yourself, you should understand the tradeoffs for both security and privacy.

There are other software libraries capable of running a bitcoin wallet with Simple Payment Verification. One such library is bcoin which is written in nodejs:

https://GitHub.com/bcoin-org/bcoin


How to obtain the content of the field "addr_tag_link" and "addr_tag" without using the api of blockchain.info?

No, the addr_tags are specific to blockchain.info - they are not kept on the Bitcoin blockchain, but rather on blockchain.info's servers.


Making Bitcoin Core 0.12.0 maximize by bandwidth

The new option is called maxuploadtarget. It joins maxconnections and listen in the list of things that can be used to control the bandwidth and resource usage of your Bitcoin client. maxuploadtarget controls the bandwidth used in a much more precise way than was previously possible without external tools.

maxuploadtarget is off by default. You don't need to do anything. More documentation is available here.


how many blocks you mined and how many wallets are connected?Mining is how the wallets get synced and if no one mines..there will be no syncing between the wallets.


Transactions are not guaranted to be validated

When you broadcast a transaction, to get a confirmation you're bidding for blockchain space, a limited good. Since blocks currently supply only one megabyte of space, miners maximize their profit by selecting transaction in order of fee rate, i.e. the number of satoshis offered to the miners per byte of transaction size. (Unless there is an additional out-of-band payment that skews selection.) The amount of value transferred has no direct influence on the selection, and there is no guarantee for inclusion, the transaction selection is the miner's prerogative.

It is however your prerogative to increase your bid by updating and re-broadcasting your transaction.

Yes, this is a problem to some degree which is why there are protocol upgrades (e.g. SegWit, Schnorr Signatures, Signature Aggregation, Lightning Network)  waiting to be activated (or in the making) that will provide a larger throughput.


Spending transaction output with only xpriv key

No, you need the private key that the address in question was derived from.
There is no mechanism for the wider network to determine that an address was derived from a private key, that was derived from a specific xpriv. The transaction signature must be created using the private key that is related to the address in question.


Does blockchain.info show all transactions?

Blockchain.info should have all the transaction information for any and all transaction that were included in blocks. It usually also has a lot of information about transactions that are not a part of the block yet, but due to the nature of message propagation in the Bitcoin network, it is possible that they might not see some of them before they are a part of the blockchain.

So, if your transactions are really fresh, blockchain.info should see them, but it's not a guarantee. If they are older, it should display them correctly. And as is always the case, some errors can occur on the software side of things.


Can can I identify my deposits to a wallet on a BTC (or LTC) blockchain (using the blockcypher api)

An old post, but why not.
1st, the example address is MDUsWPcdJ2onP9bU5xxzdygqL1R51aAvva. It has 31 total transactions:
https://longhorn.bullpay.com/?gateway=6&data=MDUsWPcdJ2onP9bU5xxzdygqL1R51aAvva

The first transaction is this one:
https://longhorn.bullpay.com/?gateway=6&data=b9ed3bbf129307b0a36fbb723e3a11d40959b4e109c01983a8ee2f0589cf52e5+

45 LTC was taken from the given address and bundled with 16 other inputs. 48 LTC was snet to LSd8c9iv8JuyFbi3ejEAdpqPcdRyhsiF4H and the remaining .02873313 LTC was returned to the MDU address.

What you are likely seeing here is change. To send that 48 from MDU it had to bundle together enough to cover the 48 along with the ~0.68 fee. The remainder was returned to MDU as change.

In your second example,
https://longhorn.bullpay.com/?gateway=6&data=2440d14ba777ac204b332f2e2043f415cb0d10670b4ca4f4b38284d3c8bbf9ef+

This transaction took multiple inputs from the MDU address along with a few others to cover what looks like the Lgam transaction of 10.7 LTC. This seems like a sloppy way of handling the inputs as the change resulted in more than one of the MDU inputs. Seems like juggling the inputs for no reason only to have it come back to the same address. Waste of gas in my opinion. The 3.09299- MDU input could have been dropped completely and this transaction would have still been fine.

I could go through the remainder but at this point i'd prefer more information.

Which exchange are you using?
What does the exchange say are you deposits/withdrawals (line by line)?
What is your actual exchange "deposit" address?

I'm not sure you want to tell me exactly what your wallet is, if it is indeed this one. Ultimately exchanges in most cases don't let you "own" your wallet. You don't have the private key to it, it's shared among many other accounts. You "own" the number next to "LTC" and they juggle everything else as they see fit.


bitcoins can use different algorithm, how and implications

The only way to do this would be to announce a new version of the protocol well in advance. It would need to co-exist in the same blockchain with the existing keys and transactions and be adopted over time.

First, the client software with support for the new scheme needs to see widespread adoption before anyone can use the new algorithm
Once that has happened, early adopters (probably mining pools) can start creating keys in the new format and the blockchain will accept them.
If that worked well, the standard client will default to making new keys
Some more time down the road, everyone can agree that transactions can only be done to new keys, forcing the "old money" out of the system eventually

  Bitcoin could in theory switch to use the SCrypt Litecoin algorithm. (hence there is no reason for Litecoin to exist)

I don't think that would be a good move. If people decided that the Litecoin algorithm is better, they can just use Litecoin. Bitcoin should stick with its algorithm, but make adjustments to parameters such as key length when those become necessary.

Choice of algorithm should be choice of blockchain (Bitcoin vs Litecoin) and can be left to the "market" to decide.


Is there any way to experiment with the Bitcoin technology without having to buy actual bitcoins for use on the larger bitcoin network?

Yes. You can run bitcoind in regtest mode. In that mode, you can produce your own "bitcoins" for testing purposes.


What Bitcoin exchange is the real bitcoin value?

There is no such thing as a the "real" value.

The value of Bitcoin as denoted in another currency (USD, EUR, etc...) is based on how many people are buying and selling, and in what quantities.  On different exchanges, there are different numbers of people buying and selling different amounts of bitcoin.  Each exchange calculates its current posted value based on the quantity and amount of the bid and ask orders currently on the exchange.  The results will be different from exchange to exchange, because people are buying and selling differently on these exchanges.


Is there some way to add a third party authorizer to (or by) a lightning network transaction?

I think you ask about escrow services in lightning. Generally there is a good opportunity to work with preimages. For example if we would move away from sha256 and would use ecdsa public private key encryption or a homomorphic hash function. Several parties could collaborative create a payment hash Wo sich they could only together generate the preimage. Stuff like this would also be possible with scriptless scripts. Also multiparty channels and channel factories could yield such functionality. So yes generally it is possible with lightning to go down this road but currently nothing of that is implemented to the protocol.


How does tx fee calculation work when txin and txout are similar amounts?

Obviously, the example is erroneous. They also neglect to consider that you could send 2.999 XBT and designate all of the remainder of 0.001 XBT as fee.


Electrum: 2 Wallets showing same Transactions

The only important thing is the seed (the seed words). With it, you can create copies of the Electrum-wallet with or without password. So you could have the same wallet on a PC desktop without password and on an Android phone with a password. (Note that the Android-client also forces you to enter a PIN code.)

I assume you created a new Electrum-wallet, password-protected it and then imported the same Electrum-wallet again (using the seed), without password. You can safely delete the one with password as long as you are very sure they are indeed the same. Perhaps double-check the different Addresses (both Receiving and Change) before you do this. (But this might be hard since you forgot the password?) As long as you are sure you only have one seed that you used for both wallets, you can safely delete one of them. They are surely the same wallet.


Trying to receive a payment. Signed up for Bitcoin I don't know if I signed up for the right one

I think I just signed up for Bitcoin correctly.

  I'm trying to receive payments from an online casino that pays in Bitcoin. What do I need to do and what kind of wallet do I need to open, so I can receive my payment?

To receive payment in Bitcoin what you need is a Bitcoin wallet.

There are several types of wallet available. Wallets are available as desktop software (full node and, SPV wallets) and, as a web service from certain sites.

For desktop wallets you can make your own choice, the official download of the software is on bitcoin.org. I have liked Bitcoin Core (which is a full node and requires to synchronize with the Bitcoin network before it will show all transactions) and Electrum (an SPV client wallet that is setup in seconds but, is not a full node).

Personally, I would always avoid web wallets since you must trust their security and it is a big, attractive target. Online services have been hacked in the past and much Bitcoin stolen.

A Bitcoin wallet on your computer is as secure as your computer, be sure to also keep a secure, private and, up to date backup of your Bitcoin wallet or passphrase. If you lose your wallet all of your BTC are gone and cannot be recovered. When using a web wallet it is not only the security of your computer at question, it is also theirs.

  Also, is Bitcoin used like a bank where I can spend money out of it?

A Bitcoin wallet allows you to spend Bitcoin. It is more like a wallet than a bank. Online web wallet services are a bit more like a bank since you are trusting a third-party to hold your Bitcoin.

Note: If you are downloading software from other than bitcoin.org it might not be Bitcoin software or, it may be modified so that it is not trustworthy.


How to estimate/get network fees via blockchain.info API?

i need to know that what will I be charged by the network.

The network doesn't charge you, you decide what to pay the miners, and the miners determine if your transaction fee is high enough to include in the next block or not (since they get the transaction fees).

It doesn't look like Blockchain.info has an API for estimating the fee (it is an estimate, since it is primarily based on transaction volume, it varies). But, you can use another api such as earn.com to estimate a fee rate (in satoshi/B):

Get Market Fee Rate

Recommended Transaction Fees
https://bitcoinfees.earn.com/api/v1/fees/recommended

Example response:

{ "fastestFee": 40, "halfHourFee": 20, "hourFee": 10 }

fastestFee: The lowest fee (in satoshis per byte) that will currently result in the fastest transaction confirmations (usually 0 to 1 block delay).
halfHourFee: The lowest fee (in satoshis per byte) that will confirm transactions within half an hour (with 90% probability).
hourFee: The lowest fee (in satoshis per byte) that will confirm transactions within an hour (with 90% probability).

Estimate Fee

Without knowing the transaction size, you might have to guess. Something with 1 input, and 2 outputs (one for change) might be around 250B.

fee = feerate * tx_size

Make Payment

Then, you can set the fee property when you make a payment.

Making Outgoing Payments

Send bitcoin from your wallet to another bitcoin address. All transactions include a 0.0001 BTC miners fee.

All bitcoin values are in Satoshi i.e. divide by 100000000 to get the amount in BTC. The Base URL for all requests: https://blockchain.info/merchant/$guid/. $guid should be replaced with your Blockchain Wallet identifier (found on the login page).

http://localhost:3000/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$address&amount=$amount&from=$from&fee=$fee

$main_password Your Main Blockchain Wallet password
$second_password Your second Blockchain Wallet password if double encryption is enabled.
$to Recipient Bitcoin Address.
$amount Amount to send in satoshi.
$from Send from a specific Bitcoin Address (Optional)
$fee Transaction fee value in satoshi (Must be greater than default fee) (Optional)

Response: 200 OK, application/json

{ "message" : "Response Message" , "tx_hash": "Transaction Hash", "notice" : "Additional Message" }

{ "message" : "Sent 0.1 BTC to 1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq" , "tx_hash" : "f322d01ad784e5deeb25464a5781c3b20971c1863679ca506e702e3e33c18e9c" , "notice" : "Some funds are pending confirmation and cannot be spent yet (Value 0.001 BTC)" }


Safely transferring bitcoins from wallet.dat to cold storage

The problem here is that creating a transaction requires 2 things:

The utxo (unspent transaction output) set of your addresses. This is basically a record of all bitcoins sent to the addresses in your wallet.dat file.
The private keys to actually sign the transaction.

Generally, when you use an offline computer to store the private keys, you will be using an internet connected computer to do (1) and the offline computer to do (2).

Unfortunately, the bitcoin-qt client does not have the concept of watching-only wallets for (1) which would be required for you to create such a transaction. That said, there are some ways you can achieve this, but it's definitely not going to be easy.

Here are some options:

Manually grab the utxo set for your addresses using a block explorer (like blockchain.info), then manually create a transaction spending those bitcoins to the paper wallet address, then sign the transaction on your offline computer and finally broadcast the transaction online.
Download the blockchain on an online computer (about 50 gb), then transfer that over to your offline computer, then create the transaction you need on your offline computer and broadcast the transaction online.
Dump the private keys of the addresses on your offline computer and create paper wallets of the private keys that have any bitcoins in them. (This can be achieved using something like bitcoinpaperwallet.com and entering your own private key)

1 is going to require some programming experience. 2 is going to take a while to download the blockchain and transfer it. 3 is probably your easiest option depending on the number of addresses you have. The nice thing about bitcoinpaperwallet.com is that you can download the source and use it on your offline computer.


Block Hash and Nonce generated by GenesisH0 python script is incorrect

You need to add -v option putting the coin reward value and multiply it with * 100000000. Example you have a block reward of 50 it would be -v 5000000000.

python genesis.py -a scrypt -z "Yahooo 02/Feb/2018 SUV's accelerator sticks at speeds up to 100 mph" -p "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f" -t 1518480000 -n 0 -v 5000000000 -b 0x1e0ffff0

Try this and it will give you the correct Genesis hash. Note I replaced the nonce with zero, you can put another nonce on it or just let it be.


It sounds like you are trying the right approach.
There is a support note here:
https://multibit.org/en/help/v0.5/help_support_sentBitcoinToMultibitButTheyNeverArrived.html

You can try it again safely.
Check all the details like the address is what you expect etc.

edit: And if that fails, you might want to try:

1) Exporting the private key (unencrypted)

2) Importing it into a blockchain.info wallet you create. You should then gain access your bitcoin.

If you do have to resort to exporting the private key please post that that is what you have done. (I am the lead dev for MultiBit so would want to follow up on it with you).


Miners, did Catalyst version 11.9 fix CPU usage issue for you?

Catalyst 11.9 resolved the issue for those mining on single GPUs but not multiple GPUs (including single cards which contain multiple GPUs like the 6990 and 5970). You can try setting the -f flag to higher numbers until CPU usage is reduced or try setting -aggression to 10 or lower. Note that these settings might reduce your hashrate significantly depending on how aggressively you change them from defaults.

The bug in question was introduced in Catalyst version 11.5 and at the time affected only multi-GPU setups. It remained in place for version 11.6 and in 11.7 actually began affecting single-GPU systems as well. In 11.9 the single-GPU bug was fixed, but the multi-GPU bug is still in place. There is a beta release of 11.10 available but I've not heard anything about whether it fixes the 100% bug or not.

A quick search shows that the 11.4 drivers are still available for 32 and 64 bit systems. Assuming you don't need anything that the newer drivers offer for non-mining purposes, 11.4 is probably your best bet. If you're running dedicated rigs it's definitely your best bet.

Edit: It appears that 11.10 did not fix the multi-GPU bug so 11.4 is still your best bet.


Find the midstate of an already mined block

A useful link on the subject.

Target is computed from a value called "Bits". A Bits value of 0x1b0404cb is equivalent to Target of 0x0404cb * 2^(8*(0x1b - 3)) = 0x00000000000404CB000000000000000000000000000000000000000000000000 . A Pool usually specifies the Target to be just shy of Difficulty 1 Target (a typical Target for a Share), which is equal to 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF .
Calculating a midstate is a big pain. Basically, you need to get an internal state of the SHA-256 function that will be used in calculating the block hash. Also, you have to be mindful that Bitcoin's endianness is all over the board and you have to be swapping bytes around for no apparent reason every now and then.
Data is just a padded block header.

Hopefully with this general explanation and links to examples of the calculations you will be able to compute all the required data as needed.


How can I run an Electrum console command from outside Electrum (in Linux)?

You might find it easier to just query an electrum server directly. Stratum is a nice protocol in that it's easy to use in an ad-hoc fashion.

If you're using python3 this is almost certainly the easier solution, too.

def get_from_electrum(method, params=[]):
    params = [params] if type(params) is not list else params
    s = socket.create_connection(('ecdsa.net', 50001))
    s.send(json.dumps({"id": 0, "method": method, "params": params}).encode() + b'\n')
    return json.loads(s.recv(99999)[:-1].decode())

get_from_electrum('blockchain.address.get_balance', '1MaxKayeQg4YhFkzFz4x6NDeeNv1bwKKVA')

Result:

{
    "result": {
        "unconfirmed": 0,
        "confirmed": 237093847
    },
    "id": 0
}

Documentation: https://electrum.orain.org/wiki/Stratum_protocol_specification


To clarify: CoPay has no relation to Bitcoin.SE, it was CoPay that issued that statement regarding the vulnerability. Bitcoin is a decentralized cryptocurrency, and Bitcoin.SE is a technical Q/A help site.

The statement released by CoPay/BitPay says the following:

  A security update version (5.2.0) has been released and will be available for all Copay and BitPay wallet users in the app stores momentarily.

If you do not see the v5.2.0 app available yet, I would suspect it will be available shortly. In the meantime, according to the statement above, do not open or run the old version of the app. Wait until the updated app is published, and then upgrade your app and follow any instructions provided by CoPay/Bitpay.


No one can determine the effect certain threats will cause, but some "popular" threats are:

Extreme government regulation.
Bitcoin losing to a competitor coin.
Technical attacks, including attacks on protocol (51% attack) or attacks on cryptography.
Intentional market manipulation to crash the price.

Some factors that can drive these events to be more likely to occur or enable them are:

Unresolved technical issues, such as blockchain bloat, or transaction limits within blocks.
End of or diminishing block rewards causing people to abandon mining.
Increased centralization for whatever reason (advanced technology, zero power costs, etc.)


How is a miner prevented from adding transactions without signatures to their block?

No, you're not the only one who checks signatures.

Before a block is submitted, every signature / transaction is checked/verified by other nodes.

I believe the SHA256 hash is the first thing which they check, which contains all/most headers for the block.Then every tranasaction hash +/signature is checked.

If they can't confirm a transaction hash / block hash i believe your block will be rejected.

This might help you out a bit, -> https://en.bitcoin.it/wiki/Protocol_rules#Explanation_of_Some_Rules


looking at this particular example, there is many, many multisig tx, one after another. These multisigs require more signatures, and extend the space. Now one can try to be speculative, and say it is spam - as we don't know the real use case. The advantage would be, that you fill the block of "low level fee tx" (see here: https://core.jochen-hoenicke.de/queue/#30d), so that following tx need higher fees, which pays better off for the miner(s).

Another approach for a use case is cold storage. To reduce the risk, I separate the funds of my exchange users in a hot wallet, and a cold wallet. Every now and then the users will want to move funds around, which might create such huge tx. I haven't followed the addresses though.

A third use case could be mixers. Many people would contribute their initial bitcoins, and then mix it between many different addresses, and bring it out again... In an overall tx, with 10$ fee, you could "wash" +170 US$ of current value.


How to generate signed_transaction, base_transaction?

Firstly, the signed transaction and the base_transaction will not be identical, the base_transaction will not have the signature in it. But yes they will look very similar apart from that.

What you are looking at is a hex-encoded transaction. You can decode it to see what information it contains using the decoderawtransaction API https://chainquery.com/bitcoin-api/decoderawtransaction


I like this question1 - we don't get many big picture questions.

  How could Bitcoin change the world?

A mature digital cryptocurrency could reduce trade barriers and thus
increase the rate of productivity dispersion throughout society. As
money is a form of fungible authenticated information2,
non-proprietary digital money gets to take advantage of the
information age to rapidly democratise trade with lower
transactional friction.
It could encourage governments to move towards a more rational global
currency or currency basket for sovereign wealth reserves, trade
imbalances and protection from commodity price shocks. In effect the
phenomena of democratised digital currencies, if not Bitcoin
specifically, could accelerate global cooperation and democracy in
macroeconomic practices badly in need of an overhaul.
It could provide an excellent educational opportunity for teaching
and learning macroeconomics. As the cryptocurrencies are moving
though the stages of currency development so fast as to eliminate
most of the confounding factors of studying more mature currencies
that evolved over several centuries of political and socio-economic
change.
It could enrich a very small minority of early adopters. Depending on
what these early adopters do with their new found wealth, they could
bootstrap other social improvements.
It will probably not result in increased (effective) tax evasion due
to the wide range of levers available to collect tax revenue.
Although an increased informal sector may result in governments
shifting towards regressive taxation such as consumption taxes to
offset the evasion of progressive taxation.
It will probably not result in a cap on the money supply due to the
ability to establish fractional reserve banking on top on any specie
currency if legally permitted. Off-block chain Bitcoin clearing
houses may evolve into fractional reserve banks to avoid on-block
chain costs. In either case, it will not provide an economic solution
to a political problem (deficit spending).
It will not create a libertarian or objectivist paradise. Such a
shift in socio-economic paradigm will require both economic and
social consensus. Cyptocurrencies can provide an economic consensus
only.

  What about its impact on the global economy?

Probable impact: Low to Medium. Possible impact: High.

It really depends on how willing various cryptocurrencies are to absorb certain "bad" aspects of fiat currencies in order to grow into a major currency with global volume. At current, I don't know what level of actual impact is likely - since you have to predict not just technology but the behaviour of people: Both of those that use or might use Bitcoin and the adaptations of its traditional and contemporary competitors and their mindshare.

  Is a "deflationary" currency better for the world?

A qualified no3.

  Is quantitative easing really that bad?

A qualified no3.

1. In case people think I'm a curmudgeon.
2. Each coin I have is information that the world currently owes me X amount of    goods and services.
3. I can't do these questions justice in an answer primarily about how Bitcoin might change the world. Suffice to say we are currently trapped within a "growth" orientated socio-economic model which is incompatible with non-inflating money supply. The lack of true democratic control over the objectives and priorities of these federalised economic levers is a problem.


Is Coinbase transaction required to be signed?

The coinbase transaction is constructed by the miner/mining pool operator and is not a transaction which can be broadcast to the mempool.

The amount of the coinbase output is strictly according to the block height, which begins with 50 BTC and halves every 150 blocks in regtest mode. When you create a new block in regtest mode, it will automatically generate a coinbase transaction, with the output spending to your specified coinbase wallet.

The input script of the coinbase has the [blockheight (4B)] and additional data, totally a maximum of 100B.

Input:

Previous TX hash: 00..00
Previous output index: max_value(ff..ff)
Input script: [blockheight (4B)] [additional arbitrary data]

The input is not signed because it does not spend from a UTXO. There are no locking conditions other than to be committed to a header with valid POW.


Why is the Litecoin blockchain smaller than the Bitcoin one?

Up until 2017, both BTC and LTC had 1 MB block limit. When SegWit was soft-forked into both protocols, the capacity increased to a hypothetical 4 MB blockweight limit.

But the limit doesn't mean every block that's produced is 1 MB.  All it means is that it can not exceed 1 MB.  What determines the size of the block is the size of the transactions in the block.

Let's say, the data size of a "one in" and "one out" transaction is about 200 bytes.  Now let's pretend, there are 100 transactions like this that are included in a single block.  That means the total size of this block would be about 2 kB.  This is significantly smaller than 1 MB.

This is one of the reasons why LTC's blocksize is smaller than BTC's even though it blocks 4 times as fast. The actual blocks submitted and recorded were significantly smaller than 1 MB because there hasn't been as much activity on the network.  Another reason, like D Nguyen mentioned, is that LTC was started 2 years after BTC.


I have one computer with windows 8.1 13.11 driver and a 280x which
  gets 720KHS and another computer with the same setup which gets
  620KHS.

  They have a different cpu ram and psu (both have quality ones).

  How can this be?

It's because they have a different ram. With scrypt mining RAM is of up most importance. The faster/higher quality the ram, the faster you can mine.

Scrypt was made to require ram so it would slow down the over all hashing power and to resist asics.


Can Litecoin mining be bottle-necked by motherboard/cpu?

I highly doubt it. Even the PCI-e connectors do not really matter. I've got less CPU power and RAM than you and my rig is controlling 4x 7950s at full potential. The CPU/Motherboard is essentially calling functions. The functions themselves are what cost so much, and those are computed by the GPUs.


Where is the block reward system coded in Bitcoin core?

The coinbase transaction is added to a block template by a miner:

https://github.com/bitcoin/bitcoin/blob/4af01b37d40246cd1fdb54719855927e36a36b46/src/miner.cpp#L157-L167

When the block is solved, the entire block is broadcast to the network.

Outside of a new block, you'll never see a subsidy transaction being broadcast on their own. Here's the logic that rejects subsidy transactions from mempool acceptance:

https://github.com/bitcoin/bitcoin/blob/4af01b37d40246cd1fdb54719855927e36a36b46/src/validation.cpp#L575-L577


When was block 210000 generated and who solved it?

According to blockchain.info, the block 210000 was solved on 2012-11-28 15:24:38 GMT, and was relayed by Slush's Pool. The pool's Stats page also claims to have solved that block. It has also been stated that the block was solved by pool's user by the nickname of laughingbear.


Electrum servers are simply not compatible with Bitcoin Core on a development or operational level. They require a vast amount of indexes created which the node does not have, and must be created by an external tool. With the state of the art electrs Electrum server, it needs upwards of a day of time to create these indexes, and more than 50GB of additional data stored on disk. For the server to be performant, forks of the software use over 1TB of additional storage for these indexes.


What are the downsides of proof of stake?

Vanilla proof-of-stake doesn't achieve consensus, unfortunately. People staking their coin can vote for both forks of the blockchain, and can even mine effortlessly in secret. In PoW this is impossible, as you are literally wasting energy by mining both sides of a fork.

To mitigate this, most modern PoS schemes use a mixture of PoS and PoW to ensure that someone will finally decide the chain.

http://www.reddit.com/r/Bitcoin/comments/1oi7su/criticisms_of_proofofstake/ for more discussion.


Can I actually profit from bitcoin mining on my PC?

You definitely will not make any kind of profit, even if you had free electricity. The chances of bitcoin mining frying your computer are higher than the chances you make enough bitcoin to pay back a new one.

Bitcoin mining used to be done on CPUs and GPUs (6-8 years ago, not sure on the exact time range), and later was done on Field-Programmable Gate Array (FPGA) miners, which are more powerful than CPU and GPU mining. In 2013 the first Application-Specific Integrated Circuit (ASIC) miners were created, and these are created for specifically mining bitcoin. I would highly recommend against mining with your CPU, as you can't compete with the ASIC miners. I wrote a bitcoin mining guide here (archived) which explains a bit more about mining and discusses why you shouldn't mine with a PC. However, as I lay out in the article, I definitely think you should buy a small, inexpensive ASIC miner to learn more about bitcoin and mine a few bits because I think it's a fun and informative hobby.


How hard is it for an exchange to adopt native segwit? Is it not as simple as updating the address regex checker on the front-end?

Adopting any deposit change at all is not as simple as "just change regex".
There are a few considerations:

Addresses must be generated, and generated properly. All generated addresses that are passed to the frontend must be valid otherwise you have now black-holed future user deposits.
Can your signing process sign for those new address types? Signing security may use HSMs or other special-purpose signers which may reject the new format for whatever reason.
1+2: you should never credit deposits you can't reasonably spend. It's a one-way ticket to insolvency.
Companies with lots of funds under management will inherently be slower to adopt newer technology because of the associated risks. "Will users think they're hacked? Can the customer wallet support sending to it? What it not?" etc.
Larger firms have many teams, which means coordination at all these layers to get anything done. Effort bandwidth is limited.
At larger trading firms they're often busy putting out other fires, such as scaling their trading engine, hiring, client management, compliance, comms, etc. Being wasteful on block weight usage is embarrassing, but unlikely to bankrupt an exchange seeing 200% YoY growth and puts them at no regulatory risk.


Does NBitcoin use hardened private derivation?

Am I using hardened private derivation function?

No. You're using nonhardened derivation. That's the only kind of derivation that you can use when you only have the public key.

Hardened derivation looks like this:

BitcoinAddress address = privateKey.Derive(orderID, true).Key.PubKey.GetAddress(Network.Main);

It requires the private key. It also doesn't matter if the parent is hardened or not.

I would recommend using nonhardened keys for most applications.


Unconfirmed transaction, fees paid, seem to be two payments

1) confirmed

2) change

I do not know what else to say. Why don't you read the basic docs before using this technology?


Unconfirmed transaction / double spend warning

if the fee is not below 0.0001BTC/KB.    you can accelerate the transaction using viabtc accelerator.
https://pool.viabtc.com/tools/txaccelerator/


Are there any Python modules that decode raw transaction data?

Yes, Pybitcointools (or this fork which has BIP39, file embedding and mk_opreturn) can do this.

Install either version of pybitcointools using setup.py install, as usual.

Then, with a raw hex transaction, rawtx, simply use txo = deserialize(rawtx). rawtx can be either a signed or unsigned hex transaction. The returned txo is deserialized as a dict object. Use serialize(txo) to get back to rawtx.

You can fetch TxIDs using fetchtx(hex_txid, source="blockr") and send signed Txs with pushtx(signed_hex_tx, source="bci").


destination_tag best practices when integrating Ripple

I will make my answer a little longer than necesary and mention some things you obviously already know in the hopes that the expanded answer will be useful to others as well:

The destination tag should be something that allows the receiving account to perform things like implement "for further credit to..." or to determine which invoice (or other event) a transaction corresponds to without knowing the payer's Ripple address before the payment is made.

As such, it's only meaningful for the receiving wallet. When someone wants to pay using Ripple, you would tell them something along the lines of:

  Send payment to
  rrrrrrrrrrrrrrrrrrrrBZbvji
  and use destination tag 1313426242

In other words, the destination tag is something that you must create and give to the user, who will then use it when making the payment.

So how to choose a destination tag? Well, there are many ways. Here are a few options:

Just give out an incrementing number, so the first transaction gets tag 1, the second tag 2, etc.
Use the invoice number generated by the commerce system you are integrating with.

You can read more destination tags and requiring them at the Ripple Wiki.

Now, your question is what to do about conflicting destination tags. Obviously if you're the only one generating tags for a wallet, then you don't have to worry about that - simply don't generate conflicting tags.

My personal recommendation is to require/mandate that a vendor create a new  Ripple wallet, to be used exclusively by your system. This is certainly not unrealistic. In fact, it's a good idea™.


How did Nakamoto untraceably pay for registering bitcoin.org?

Nobody knows for certain apart from Nakamoto and the businesses involved.
Nakamoto was (and remains) notably secretive and their true identity is not reliably known† and they no longer communicate with the world using that name in any verifiable manner.
All the businesses involved in the alleged registration process protect the identity and other confidential information associated with their customers. As they should. Therefore the details sought are not public knowledge.

first registered in 2008 ...

That certainly appears to be the case.
The domain registry information currently includes the following information:
Domain Name: BITCOIN.ORG
Registry Domain ID: D153621148-LROR
Registrar WHOIS Server: whois.namecheap.com
Registrar URL: http://www.namecheap.com
Creation Date: 2008-08-18T13:19:55Z
Registrar: NameCheap, Inc.

...via anonymousspeech.com,

The website of AnonymousSpeech.org says

Any inquiries  regarding the identity of our subscribers are ignored. We do not respond to any of them.

We are committed to the privacy of our users, and will absolutely not release any kind of data to any foreign governments.

archive.org shows bitcoin.org was an actual hosted site at least by January 31, 2009. Where was it hosted, and how and to whom was that hosting paid for?

That information is not available.
We know a couple of important things about Nakamoto:

They were extremely protective of the secrecy of their identity.
Though their work was not without flaws, they were competent in the field of online privacy and encryption.

We should therefore not expect to easily find any information they specifically sought to hide from the public.
Nakamoto's main aim was to create a cash system that did not rely on trusting third parties - their aim was not to teach us how to anonymously register DNS domains. This should shape our expectations of available information.

Footnotes
† So far as I know, the people claiming to be Nakamoto have failed to provide proof or have provided evidence subsequently shown to be false. We cannot ask Nakamoto and if we could, they would not an answer if their behaviour is consistent with their past behaviour.


Can I buy/sell a lot of bitcoins without moving the price?

It won't work, no matter how you do it. If you acquire a lot of Bitcoins, that will mean that a lot of people who wanted to get rid of their Bitcoins no longer want to get rid of their Bitcoins. Thus, they will stop supplying them. The reduction in supply will move the bid/ask prices. It's fundamental economics and you can't change it.


What if same transaction is added in more than one block of different miners?

No, the blocks from M2 and M3 will most likely end up being discarded. The reason being that as soon as M1 broadcasts its block most miners will drop their current block and start trying to solve the next one.

There's nothing to stop M2 and M3 broadcasting their blocks after M1 in the hope that they will also be able to generate the next block and take over the longest chain. The problem is that these days the cost of generating a block is in the 10's of thousands of dollars in electricity so it's an expensive gamble to try and solve two blocks in a row.

And in answer to your main question if a transaction that's already included in a block appears in a subsequent block then the new block will be rejected as invalid by full nodes and other miners.


Do the keys that are derived from a BIP-32 HD wallet depend on an initial seed?

The short answer is yes.

A real example is provided below that applies bitcoin-explorer (bx) client on a UNIX command line interface to synthesize a very simple "low entropy" Bitcoin brain wallet seed that is 256 bits in length:

% echo “Hello its me” | bx base16-encode | bx sha256
cc64b0cb02990d2a17ba0f4274df3e38448454da4fb22a9ca8d23944be144e1d

The $seed above feeds the synthesis process of BIP 32 m/0/12d/4 private extended key below:

% echo $seed | bx hd-new | bx hd-private -i 0 | bx hd-private -d -i 12 | bx hd-private -i 4
xprv9yimFehUHrTzsGso7fg1yXqzGgAAbYJxubKbgZWzVYvf2tSNcQvbReku1xEiqmoHhhHzRsedx2a4YVQ5qf4TtkdP5DMV7dqhnK1ihKZA5Cj

Different seeds feeding the "bx hd-new" command will yield different xprv* extended private keys.

The $pvt_ext_key above can be converted into a traditional elliptic curve WIF key  below:

% echo $pvt_ext_key | bx hd-to-wif
KzWMQhXEz1Z8s5s16ArUvUEgUmX6rFahacnaMi8HMEUKFDSQ6Pks

The $pvt_ec_WIF_key above can also be directly converted into a Bitcoin address with below:

% echo $pvt_ext_key | bx hd-to-address

1ATcSQCeuQB8xNvCH7XSksNUs8SHU1dfEe


Stopping the internet would be easier for your government than blocking bitcoin servers IP's.

You have not to download the blockchain to start using bitcoin or receiving bitcoin, download some wallet offline and use it or use blockchian.info since they support tor network so your government will not be able to block it.

Wallets are not connected to each other, simply its just a software doing some math to give you a new address, existing address or creating a new transaction, then they broadcast that transaction to the bitcoin network (blockchain).


Using CryptoCurrencies as a transfer method throughout Australia and Europe

The most "profitable" way i can think of doing this is:

1) Your cousin buy BTC with AUD in Australia in some local exchange (preferrable) or at LocalBitcoins.com

2) You sell the BTC in Europe using LocalBitcoins (your cousin will give you the password for his LBC account or transfer the BTCs to your account there). They have a 1% fee for sellers, but you could just advertise with a 1% profit, or even more, because prices in LBC are usually higher than at local exchanges. In my country i can easily sell with up to 3% profit.

No expensive international bank fees
You receive the money directly in your bank account

I don't know if using Stable coins would be a good idea, as you'd probably have to pay some convertion fee to redeem them in Europe.

Anyways, it will mostly depend on the volume you're dealing with and the time you've available.

For example, i don't think it will be easy to sell ~300 BTC in LocalBitcoins.

I think the most sensitive part is selling the coins (it's the part the fees are usually higher). If you're dealing with higher volumes you should probably look for a local OTC desk (exchanges have that and the fees are negotiable).


Would a hardware wallet be hacked in this case

Your hardware wallet is only used to sign (approve) a transaction.
Therefore, unless someone gets direct access to your seed phrase(which will allow him to confirm transactions on your behalf) nobody can do anything with your funds.
The thing to remember is to always keep your seed phrase somewhere safe and OFFLINE.
The reason I like Trezor One is that it has a touchscreen feature. Meaning that even if your computer or phone is keylogged hacker still can't find out what your seed phrase is.
If you're interested, I have written an ultra descriptive guide about hardware wallets and Trezor vs Ledger comparison you can check out.


To deal with WebRTC u need to understand SIP which is big deal already.
Once u understand SIP u know then that u need server. Many servers.
Read more here https://bloggeek.me/webrtc-not-p2p/
Sounds like totally away from Crypto.


how a system based on a blockchain would deal with exponential growth of informations carried in it?

Bitcoin's blockchain grows currently at the rate of one block every ten minutes on average, according to consensus parameters. That's not an exponential growth, but a linear one. At present this is well below the growth in storage capacity allowed for by Moore's-law.

If in future the consensus parameters were to change, either to make blocks more frequent or, larger, then the storage requirements are one consideration that would have to be taken in hand.

In 2009 we had the first 2.0 terabyte hard drive, by early 2018 it is expected that a 14TB HDD should be available.[1] The cost per Gigabyte has reduced from nearly $0.12 per GB in 2009 almost down to $0.02 per GB in 2017.[2]

If the cost in whatever terms of running a full node becomes too onerous then we would expect to see more SPV nodes and, SPV nodes connecting to full node servers i.e. Electrum.

  "Bitcoin wallets like Electrum have been using SPV successfully for years without any problems, and they save users the hassles of maintaining a full network node."[3]

SPV was discussed in section 8 of the original Bitcoin whitepaper.

rel:
[1] Wikipedia - History of hard disk drives - https://en.wikipedia.org/wiki/History_of_hard_disk_drives

[2] BackBlaze - Hard Drive Cost Per Gigabyte - https://www.backblaze.com/blog/hard-drive-cost-per-gigabyte/

[3] medium.com - Why Every Bitcoin User Should Understand “SPV Security” - https://medium.com/@jonaldfyookball/why-every-bitcoin-user-should-understand-spv-security-520d1d45e0b9


How can I view the current blockchain size?

If you have the bitcoin client running in server mode, you can pass it the getblockchaininfo command. This is the current output:

{
  "chain": "main",
  "blocks": 525329,
  "headers": 525329,
  "bestblockhash": "000000000000000000192cf4d557fb2265855713b0fd208a6490bca81137bce4",
  "difficulty": 4306949573981.513,
  "mediantime": 1527792344,
  "verificationprogress": 0.9999976722383654,
  "chainwork": "000000000000000000000000000000000000000001e6cf0d64537cc800fc54f8",
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": true
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": true
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "active",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 419328
    },
    "segwit": {
      "status": "active",
      "startTime": 1479168000,
      "timeout": 1510704000,
      "since": 481824
    }
  }
}

The blocks field is the current number of blocks in the block chain. You can also get this information from BlockExplorer or use the Direct Link to the block count.

If you want the size in bytes, look at the size of your blk0001.dat file, currently 528Mb.


Difference between bitcoin-tx, bitcoin-cli, and bitcoind?


Bitcoin wallet balance doesn't add up to what my addresses have

I struggled with this too. There are many other addresses created when you send/receive funds from bitcoin.

Don't just run dumpprivkey with your receiving BTC addresses; run dumpwallet to a file instead and import all keys (left-hand side of the dump file) prior to 1 Aug 2014 to Electrum.cash wallet.


Litecoin - how to calculate the difficulty from 2^-N

First of all, actual difficulty is defined as the number d such that the probability of a random hash being valid is 1/(d*2^32). In other words, the hash needs to have at least 32 + log_2(d) zeros in front of it to be valid. (This is not exactly the case if d is not a power of 2, but you get the general idea.)

In that article, a difficulty of 2^-12 means that the probability of a random share being valid is 1/(2^-12 * 2^32) = 2^-20. Note that typically, pool difficulty, is measured in multiples of 2^-16 for reasons discussed in the article, so a difficulty of 2^-12 would be a pool difficulty of 2^4 = 16.


How does the variable length integer work?

From the Bitcoin forum:

  The way the variable length integer works is:

  Look at the first byte
  If that first byte is less than 253, use the byte literally
  If that first byte is 253, read the next two bytes as a little endian 16-bit number (total bytes read = 3)
  If that first byte is 254, read the next four bytes as a little endian 32-bit number (total bytes read = 5)
  If that first byte is 255, read the next eight bytes as a little endian 64-bit number (total bytes read = 9)


How to get Bittrex trading data for 10 different coins?

Pull the data from
https://bittrex.com/api/v1.1/public/getmarketsummaries

You will get a dictionary including all markets volume data (and a lot other data ).
Just pick the 10 market you need.


C++ code for traverse though all the blocks in blockchain?

If you are intent on doing it with c++, there is a blockchain parsing library that may help you here https://code.google.com/p/blockchain/.

Depending on your application, though, I might recommend just writing a terminal script to use the daemon. It probably won't be as fast, but I bet it would be easier to get up quickly. These commands can be called to get you the info you need:

// Gets the block at index index
./bitcoin-cli getblockhash {index}

// Gets the block using the result of the first statement
./bitcoind-cli getblock {hash}

// The block has an array of transactions in it
for (Tx tx : block.tx) {
    ./bitcoind-cli getrawtransaction {tx} 1
}