LTC source code cloning to a new cryptocurrency?

You will want to familiarize yourself with the code that you have downloaded, which should give you an idea of what you will need to change.

How many coins should already be on the market?:
People often refer to how 'fairly' a cryptocurrency was launched. Most people consider a fair launch to be a launch where the creator or anyone else does not own a significant amount of the currency before it is publicly released. If a large amount of the currency was pre-mined, there is an argument to be made that the creator only launched the project in order to net themselves a profit by selling off their coins once they are worth a decent amount.

Do websites have their own special wallet when they sell some currencies for dollars?: I assume you are asking about the wallet used to store the new cryptocurrency, in which case this would likely be a modified version of existing software wallets that transacts with the new coin type.

Do they sell the total tokens that they own as a company? Would they ever run out of tokens? How do they supply them?: How many of the tokens that they hold are sold is up to them. How the new token is introduced into the economy is dependent on how the protocol functions. It could be the case that one specific key pair that belongs to the creator of the currency is allowed by the protocol to generate new coins at any time, in which case supply would not be an issue, and the creator could generate new coins as needed. If the token was able to be mined, then the creator could mine a large amount of the token to be sold before launching it.

When I make my own cryptocurrency, I want people to be able to sell them for fiat currency: If your token was listed on an exchange that deals specifically in fiat currency instead of only Bitcoin, users would be able to sell it that way, otherwise, you'd be looking at setting up your own exchange or platform where users can buy and sell the token, though there would likely be a great deal of legal licensing that would need to be taken care of for each jurisdiction where customers would be able to transact from.

When the coins first get published, what are the factors which will be effective on deciding its price in the first place?: If you had a pre-sale or Initial Coin Offering, then you would decide the initial sale price. If you launched the currency publicly without selling amounts of it, then the laws of supply & demand and other market forces would determine the price, as was the case with Bitcoin and Litecoin.


A blockchain is a chain.

Each block is a link in this chain, that depends on the previous link (block) by definition.

If to change block N, all blocks from N until now must be mined again as well.

Moreover, if you want to alter a specific transaction, you are limited to only removing it if you do not hold the key(s) used to sign the transaction. If you wish to perform an alteration that changes where the BTC is sent, you must not only mine the entire section of the chain again, but also hold the private key(s) involved in that transaction to produce an alternative, valid tx.


Bootstrap.dat incorrect or no genesis block found

I don't remember exactly but i think all you need to do is put the bootstrap file in the data directory of bitcoin and then just start bitcoind.

However note that bootstrap is obsolete as of version 0.10 and downloading is faster and (disk usage lower) without it.

Don't waste too much time trying to get it to work if bandwidth is not costly for you.


Is there another wallet that can restore from MultiBit's seed words?

As far as I know, no wallet uses the same derivation path as Multibit HD so a Multibit HD wallet cannot be restored to another wallet. However, using a site like https://iancoleman.github.io/bip39/, you can get the private keys for your addresses and import them into another wallet.

To use https://iancoleman.github.io/bip39/ to get your keys, first download the page and run it locally, don't actually use the website. See the Offline Usage section of the page for instructions to get it offline. Once the page is loaded into your browser offline, enter your Multibit HD wallet words into the box labeled "BIP 39 Mnemonic". Then scroll down and choose the tab labeled "BIP 32". Click the dropdown box labeled "Client" and choose the "Multibit HD" option. Scroll down to the section labeled "Derived addresses".

These addresses are all of the addresses that belong to your Multibit HD wallet. You can increase the number of addresses generated so that you actually get all of the addresses that you have used. The private keys are available in the rightmost column. You can then import/sweep those private keys into another wallet.


What's the best way to integrate bitcoin API's into a wordpress site?

You can integrate Shapeshift plugin in your website. Build something like this. That's a good way to start with. You can see an example here http://radelcorp.in/shp


Unique hashes are not something that we are likely to run out of in the near-to-medium term future, unless huge advancements in computation are made (in which case we'd have other issues to worry about).

When Bitcoin adds a zero to the front of the target, it is not a zero in hexadecimal (how hashes are usually visualized), it is adding it in binary.  The difference is huge:

0FFF -> 00FF

means this in binary:

0000111111111111 -> 0000000011111111

What really happens is this:

0000111111111111 -> 0000011111111111

Or in hex:

0FFF -> 07FF

This means it will take 4 times as long to reach your point of concern as you thought.  Also, let's look at the block hash you posted:

000000000000000000bbfa2afceac352a16db934867103aa85e6a83dc0fb6dfb

There are currently 18 leading hex zeros, which translates to 72 leading binary zeros.  This leaves 184 bits (256 - 72) for a unique hash value, or 2^184 unique hashes.  So right now, if the difficulty never increased and assuming a 10 minute block time, that still leaves us with 4.66*10^50 years worth of hashes (which is roughly 5 time the age of the universe).  When the difficulty doubles, we now only have 183 bits of hash space.  This means it's about 4.66*10^25 years, or about 2.5 times the age of the universe of hash space left.  As you can see, it will take some time for the difficulty to reach a point where hash space is a reasonable issue.

However, the real problem is not with total hash space, but with probable collisions.  Let's say that we have gotten to the point where there are only 56 bits available for hash space.  First, this would take a truly massive hashing increase in the Bitcoin network to ever come about (difficulty would have to double 128 times), but we'll ignore that for this example.  While 2^56 may seem like a small hash in modern cryptography, for this use case, it's not.  We still have enough hashes left to cover the entire age of the universe, but again, we are concerned with someone finding a block with a hash that matches an existing block (or competing block).

So what would we do?  I'm sure there'd be some debate if this ever came up, but I think the simple solution would be to reject that hash, just as if it were above the target difficulty.  Miners would be forced to continue hashing until another block was found.  After all, there is still plenty of room in the hash space, even when reduced to 56 bits (which is currently preposterous). Such a change to the protocol would only be a soft fork.

To summarize, even with our best estimates of future computing technology the remaining time for Bitcoin hashes is best measured in multiples of the age of the universe.  Even if this became an issue, a simple soft fork could fix it.  There's really not much to worry about here.


What prevents somebody from "re-mining" an already existing Bitcoin?

But if a computer once guessed the right private key for that coin, why can't another computer do it again?

It wasn't guessed the first time. It was generated randomly from a set of 115792089237316195423570985008687907852837564279074904382605163141518161494336 valid keys (that's the actual number).
Generating the same one a second time is so astronomically unlikely that it's not worth talking about.

Basically, isn't it possible that all the Bitcoins that are currently mined and in possession of somebody, could be "re-mined"?

What you're talking about is guessing, or otherwise retrieving, the private keys to existing public keys that hold coins. It has nothing to do with mining.

Is it just "extremely unlikely"?

Beyond extremely. Even if every computer on earth would generate 100 million keys per second, and there are 2 billion computers, they'd take several billion times the age of the universe before they have anything resembling a feasible change of randomly hitting any key that holds a balance currency.

And you cannot "target" a specific existing private key/receive address/Bitcoin?

You can. There are algorithms to find the private key for a given public key faster than just brute force, but the numbers are still astronomical, and believed infeasible with humanity's current technology.


This is explained in Satoshi's original paper:

Basically, the block hash does not contain the hashes of the individual transactions, rather it contains the root of the Merkle tree of the hashes. Once all the bitcoin outputs of a transaction have been fully spent, then there is no need for the original transaction, and hence its branch is chopped off from the Merkle tree. As time passes, all the branches get chopped off and one is left with just the root.

So, let's say someone gives you 1 BTC in transaction A (which has no other outputs). You give it away in transaction B to someone else. After a few more blocks have been generated, I have no reason to doubt that transaction B is valid and since A cannot be referenced anywhere else (it is already spent), it is safe for me to remove A from my blockchain.

Of course, some entities may keep the entire chain but this is not strictly necessary for bitcoin to work.


Profit possibility for colluding with 51% attacker

The Bitcoin Wiki states "A profit-seeking person will always gain more by just following the rules, and even someone trying to destroy the system will probably find other attacks more attractive."

The statement from the wiki has since been proven false. If a pool has a large enough percentage of the mining power, then it can follow 'selfish mining' procedures to earn more than it's fair share of the block rewards. This was introduced in this paper: http://arxiv.org/abs/1311.0243.

That is one reason your doubt in the wiki's claim is justified. The reason you cite, the two nations taking a bet on the price of a BTC, may be another possible case, but it doesn't seem very realistic to me. I'm not sure why any nation would take part in such a bet, and I think there would probably be more cost effective ways to lower the price of a BTC rather than engaging in a 51% attack.


How do I run my own testnet? What's testnet-in-a-box?

Checkout the updated Testnet in a box.  You will need bitcoind already installed in your system.

The "Testnet in a box" linked above is just like the world-wide bitcoin network except the only members are the 2 running on your computer. There should be no difference except that it's easier to generate coins.


Need help recovering lost bitcoins from a crashed computer's wallet file

Is there anyway I could find the wallet I used?

Well, if you do not know the name and dont have your history from that device, your screwed.

  I want to know if there is any way to recover them or if they are lost forever.

Well, from what I have seen of this post, you do not have any information of the wallet whatsoever, you may have lost them forever if you dont have a backup.

However, if you have any of your old computers files, we may be able to recover it. If not, sorry mate.


Version bits: Why did BitcoinXT choose to set THREE bits to 1 (0x20000007) to flag BIP101?

Bitcoin XT versions 0.11A through 0.11D supported the withdrawn BIP101, which set version = 0x20000007 as a best-guess nod toward the developing versionbits standard, while trying to maximize backward compatibility with the ways nodes might check for compatible versions.

Bitcoin XT version 0.11E supports BIP109, identical to Bitcoin Classic.


A transaction with 44.8 sat/B should probably confirm most weekends, the fees had been dropping down to 5-10 in the last weekends. Sometimes even 1 sat/B transactions confirmed. This weekend the mempool seems pretty full, though.

AFAIK, MultiBit has an option to export private keys. However, MultiBit uses compressed private keys, while Electrum uses uncompressed private keys. Bitcoin Core understands either, so if you don't want to wait for the transaction to confirm, you could install Bitcoin Core to doublespend them. This comes with a wait time though, as you'd have to wait for Bitcoin Core to synchronize with the Bitcoin network which can take a few days. If you're time-pressed, I think Blockchain.info does allow importing keys also, although I would just use it then to send your money to electrum, so that you only relinquish control of your own funds as briefly as possible.


Distinguishing Lightning channels on-chain

A lightning funding transaction is a P2WSH transaction, which appears on chain as paying to some random-looking script hash, but the redeemScript which can unlock and spend the money is not revealed on chain until the transaction gets spent (which is when the channel gets closed in Lightning's case).

You can recreate the redeemScript if you know the funding public keys used for it, which are broadcast over Lightning's gossip network as part of a channel_announcement message. If you take the two funding public keys, where the first key is the lexicographically lesser of the two, the redeemScript is simply:

OP_2 <pubKey1> <pubKey2> OP_2 OP_CHECKMULTISIG

By hashing this and comparing it to the hash the unspent P2WSH transaction spends to, you can verify that the transaction is a Lightning channel.

But without knowledge of those funding public keys (private channels or non-lightning txs), you cannot know the content of the redeemScript until the transaction is spent.


Error while send transaction: Data push larger than necessary

Your scriptSig uses a data push to push 0x01 onto the stack. It could use OP_1 instead.


I lost bitcoin in core bitcoin account, pls help

If you moved the Bitcoin Core data directory without telling Bitcoin Core that you had done so, then Bitcoin Core will not use the files that you moved and instead just make new ones. This means that it synced the blockchain entirely from scratch and generated a new wallet file. In order to access your Bitcoin, you need to move your wallet.dat file back to the data directory or tell Bitcoin Core that the data directory has changed by setting the -datadir=<path> option in its startup command.


How does a double spend get resolved when two miners find conflicting blocks at the same time?

Blocks form a chain; each block contains a prev field containing the hash of the block that "precedes" it.  The two blocks Ma and Mb are incompatible (the block chain is not allowed to contain two conflicting transactions), so neither can precede the other.  Hence they must be a "fork"; two different blocks with the same common ancestor.  All other miners will have to decide which fork they want to mine on; e.g. whether they want to create a block whose prev field points to Ma or Mb's block.  It doesn't really matter in this case.

Say the next block is found by Mc and points to the Ma block.  Then the chain ending in Mc is longer, and the next miner will prefer to mine on that side of the fork.    After a few more iterations, it should be clear that the chain including Ma (which has transaction Ta) is longer, and will be preferred by miners from then on.  This means transaction Tb is now dead.  (Moreover, Mb doesn't get to collect their 12.5 BTC block reward, because the block that awards it only exists on a side chain which is dead.)


What happened to the nonce distribution between blocks 24480-69120?

The only logical explanations to me are thus:

Some technical limitation meant that the miners at the time (there weren't many) weren't searching some nonces as they should. Everybody was using the built in miner then, so it's probably easy to check if there's an old enough SVN around.
The miners at the time intentionally binned certain nonces to avoid hoarding all the coins, keeping the difficulty low. The difficulty was barely 1 at that point, so I don't think this is an unreasonable assumption.


Installation of Bitcoin Core 0.18.0 on Ubuntu 18.04.2 error

From the command line, I typed '/snap/bin/bitcoin-core.qt' and now Bitcoin Core is synchronizing with the network. Problem solved.

I still don't know how to repair the shortcut but that is because I'm a Linux newbie.


The listen option is for the P2P network connection, not the RPC service.

The option you want is rpcallowip=<ip>. To allow all IP addresses to connect to your node's RPC port, you can use rpcallowip=0.0.0.0. Note that doing so is not recommended as it is insecure.

Don't set rpcconnect as that will make it impossible for bitcoin-cli to interact with Bitcoin Core.


How to find/view derivation path in Bitcoin Core

See Default derivation paths

  so that i can import my bitcoin wallet to my electrum wallet

I've read this cannot be done in Electrum.

  18 words seed which i had got from bitsblock.io while initial download.

That's not Bitcoin core!

The bitsblock.io website copied the visual style of Bitcoin.org -- which seems a bit suspicious?

It is a recently created domain

Domain Name: BITSBLOCK.IO
Creation Date: 2019-10-23T15:24:40Z


How does SatoshiDice operate with 0 confirmations?

This is oversimplified, but here's one sequence showing a serie of payment transactions:

Miner --> You -->  Me -->  SatoshiDice --> Me

So you send half a bitcoin to me and I use a client that lets me send it instantly to SatoshiDICE.   SatoshiDICE then includes at least part of that payment in their win or loss return payout.

Once your payment to me confirms, then mine to SatoshiDICE can confirm.  Once my payment to SatoshiDICE is confirmed, then their payout back to me can confirm.

So if you cheated me and your payment to me was a double spend it will then never confirm (reaching 6 confirmations).  And in turn, my transaction to SatoshiDICE will never confirm.  And in turn, the SatoshiDICE payout transaction back to me will never confirm.

So it doesn't matter that I saw a payout transaction from SatoshiDICE right away, I can't spend it anywhere until it confirms.

Because even a transaction with one or two transactions can get orphaned due to a block reorg and a double spend attack, even if you see a confirmation that doesn't mean the transaction will clear.  That is why, unless there is recourse, only six transactions is the recommended number of confirmations to require.

Here's an example of the transactions for a losing 0.02041833 BTC bet:

http://satoshidice.com/lookup.php?tx=0419fdcbc82add4b46b6fe11e362561d0a3d18329770b36a637a2b60a881cf1e
http://blockchain.info/tx-index/16106266/0419fdcbc82add4b46b6fe11e362561d0a3d18329770b36a637a2b60a881cf1e
http://blockchain.info/tx-index/16106269/e69d7d733d4de5eee6fae0d402fe0db0fdd2544e9ece0f169922d143a8eaf850

You can see the flow visually here:

http://blockchain.info/tree/16104343  (click on the orange dot for the 0.01569037 BTC payment, which was one of the two inputs that paid for the bet.)


Crypto currencies and internet dependence

On the contrary! Computer security is necessary, even without cryptocurrencies. The current economy is very much dependent on the internet, nothing can reverse that. Besides, you can receive the bitcoin blockchain from satellite, so strictly speaking, internet is not needed for bitcoin, it is just a medium of distribution. You could, for example use a mesh network.

If you sum up all the code used for VISA/Stripe/etc, it will probably be mode code that what Bitcoin contains. Assuming a similar bug count per line, you would then have more security issues with fiat infrastructure! And Bitcoin is open source, which has been proven to improve code quality. So in reality, you have less code, and you have less bugs per line.

What cryptocurrencies do, is that they replace authentication based on fuzzy methods like your bank asking your social security number on the phone with authentication based on cryptography. If you can't keep your data secret, you will lose your Bitcoin very quickly, while it might take some time with the fiat systems.

Do you want a world in which you are dependent on broken methods of authentication? I would encourage you just to understand how to keep your data safe, instead.

So while Bitcoin users may lose money often because of lacking security, that is not the fault of Bitcoin. Bitcoin is an incentive to learn about security, therefore it is good.


Is BitCoin still uncontrolled with all those mining pools?

To an extent yes. It's bad that mining pools are so big and fairly concentrated. Work is being done to try to alleviate this.

A few points limit the threat though:

The amount of harm miners can do is limited. They can't outright steal money, or create more money out of thin air. The damage would be in the order of double spending (resolution: wait for more confirmations) or censoring transactions (which a miner doesn't really have an incentive to do unless paid a lot by someone else or forced by law).
Individual miners can switch (they have in the past) to other pools if the pool operator goes rogue.
Pool operators would be digging their own graves if they do evil things: the Bitcoin price would plummet, costing them a lot of money and lost investment.
As a final resolve, when things turn really ugly, Bitcoin could change the proof of work algorithm, making ALL mining equipment obsolete. Miners are basically hired by the Bitcoin network to do some work, if they perform poorly they can get fired.

So, although far from ideal, there still are incentives to keep miners honest and rules that limit their dishonesty.


Are there any Bitcoin wallets with native I2P integration?

C++ may be viewed by some as more suitable for Bitcoin use than Java which I2P currently heavily relies upon

https://github.com/monero-project/kovri

Kovri:

To cover, veil, wrap (Esperanto).
A secure, private, untraceable C++ implementation of the I2P anonymous network.

Once complete this project should ease of integrating Bitcoin in both a private and secure manner.


Can one send one payment to two private keys through 1 QR code?

You will need to do some post processing.
A QR code can encode only one address.
But once you receive the funds you can split them up however you want between however many addresses you want (this would mean another transaction of course).
You could do this manually if your volume is low, or automate it via a script that talks to the receiving wallet.


There is a part of game theory that was designed for protecting bitcoin, if some whales want to spend 10 000 satoshis per bytes spamming transactions for 1 month it is gonna cost them a lot of money, and nothing prevent someone from paying 10 001 satoshis per bytes so that its transaction is mined allowing him to dump forcing the other whales to now spam 10 002 satoshis per bytes and more.
It is also worth noting that whales have an incentive to protect the bitcoin network because they depend on it and anything rendering the network suspicious will lower the price.


BFGMINER error while loading shared libraries


Where is the actual data stored in blockchain?

where is the actual data stored?

Each full node on the network will download and validate the blockchain history, it will request and receive this data from other full node peers. Each node does not necessarily have to keep that data after validating it though, it can choose to 'prune' data that is not relevant to the user's wallet.

For e.g. bitcoin as of today is ~270GB, meaning that every node requires this much amount of storage. But the problem here is that the data is an ever increasing entity.

By running a pruned node, you needn't keep the entire blockchain history on file, though you will still need to download and validate it in the first place. So while the blockchain will continue to increase in size, it is through careful engineering that we can hope to limit the rate of increase, hopefully such that technological capacity will increase at a comparable rate (ie, faster and cheaper CPUs for validation, faster and cheaper storage, etc). This is important, because the health of the network depends on there being a sufficiently large number of nodes online.

Many links on google say that blockchain is not an ideal solution for large data, but then any solution will eventually produce an ever increasing amount of data.

The key point with this is that not all types of data usage are equal. It is preferable to get the most utility you can per byte of data stored. Compressing a ton of economic happenings into a bitcoin transaction (eg the opening/closing of a lightning network channel) represents a ton of utility per byte. Storing your favourite funny-cat-video on a blockchain is the opposite, and there already exist far more efficient ways to store and transmit that sort of data.


Why is a library's signature of a segwit tx different from Bitcoin Core signature?

This is unrelated to segregated witness.

Since Bitcoin Core version v0.17, signatures have low R signatures. The signing operating is repeated until an R value is constructed that's below 2255. On average this only takes 2 attempts, but it makes all signatures equally long (71 bytes; rather than 50% 71 bytes and 50% 72 bytes), making them more predictable and slightly cheaper on the network.


The obvious one would be side chains, the idea being that the transactions on the side chain would be off the main chain. Most other scaling solutions are either on-chain or centralized. For example, segwit and block size increases are on-chain and using a service like coinbase to move coins off-chain are clearly centralized.


Question about retarget system bitcoin, add hardcodet block to exist blockchain

if (nActualTimespan < params.nPowTargetTimespan/4)
        nActualTimespan = params.nPowTargetTimespan/4;
    if (nActualTimespan > params.nPowTargetTimespan*2)
        nActualTimespan = params.nPowTargetTimespan*2;

This does the opposite of what you want. It increases the difficulty quickly, but decreases the difficulty slowly.

Here's what you meant to do:

    if (nActualTimespan < params.nPowTargetTimespan/2)
        nActualTimespan = params.nPowTargetTimespan/2;
    if (nActualTimespan > params.nPowTargetTimespan*4)
        nActualTimespan = params.nPowTargetTimespan*4;


Is bitcoin vulnerable to a DOS/spam attack?

That's what transaction fees are for. You have to pay a fee for every transaction you want to have included in the block chain, especially if your transaction is for a small amount or if there are many transactions already waiting in the transaction pool.

Also, the size of Bitcoin blocks is limited. There is also a limit on the number of signature operations in a block. The most an attacker can do is to raise transaction fees.


Is it possible to retrieve bitcoin address?

All you need to do is to extract the private keys for the addresses that hold any balances into your wallet and then import these keys back to your fresh installation.


The simple answer is you have a keypair for each bitcoin address, public key & private key, you can think of this as a username (public key) and password (private key). You can share your username/public key with as many people as you'd like, whether you know/trust them or not, of course you must keep your private key to yourself. The interesting part is that the public key is derived from the private key, and you sign messages with your private key to prove that you know it without giving away what the private key actually is (this is verified by comparing your public key with the message you signed).

The technical way that you create a private key can be found at the offical bitcoin wiki here: https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses

This wiki has a LOT of information, and is the most accurate source on bitcoin related information I have found to date.


I would add two points to those already mentioned: First, if you cannot accept inbound connections (because you are behind NAT or have specifically disabled them) you won't really be helping the network. Second, if you are running any version earlier than 0.3.24, you could actually be harming the network, due to a bug in those versions.

For some reason that isn't well-understood, the Bitcoin peer-to-peer network is consistently short of available inbound connection slots. This makes it more difficult for newly-started clients to establish a resilient connection to the Bitcoin network. If you can accept inbound connections, leaving your client running helps reduce this problem.


What if a transaction is made to a wallet that doesn't exist?

This seems to be a few related questions in one, so I will try to rephrase them individually and answer each one separately.

First it is important to understand that a wallet is just a place to keep bitcoin addresses, in the same way that a leather wallet is just a place to keep cards and notes. Bitcoin amounts are sent to an address, not to a wallet. A wallet may contain many addresses, but a transaction output sends to one specific address. So all my answers will refer to an address, not a wallet.

The questions raised:

1. Can an amount be sent to an address that the network is unaware of?

Yes. An amount can be sent to any address, regardless of whether that address has been seen before. A transaction tells the network which address to take an amount from, and which address to send it to. The address to take an amount from must contain at least that amount, or the transaction will be rejected. There is no requirement on the destination address. Even if it has never before been seen by the network the transaction will still be confirmed.

2. What if the destination address has not been created?

If the address has not been created the network will have no way of knowing this. The amount will still be moved. However, since no one has a private key for this address, no one can ever spend the amount held at this address. The amount is lost forever.

3. What if the sender misspelled the destination address?

This is unlikely to happen due to a typo, since a bitcoin address has built in error checking. Changing one letter or number in a valid bitcoin address will not give a different valid bitcoin address. The mistyped address will be invalid and your wallet software should recognise this and refuse to send the transaction.

4. Bitcoin is probably too awesome for the above to happen, so what really happens?

Built in error checking makes it very unlikely that someone would accidentally send an amount to the wrong destination due to a typo. However, it is perfectly possible to lose money through other types of accident. If you accidentally type in the valid bitcoin address of the wrong person, the amount will be sent successfully but not to where you intended. Bitcoin transactions are not reversible. Sending to the wrong person cannot be undone. If they choose to they may return the amount to you, but you cannot force this. It is also possible to send an amount to an address that you thought you had the private key for, only to later realise the private key has been lost. Sending to an address for which the private key has been lost means the amount is permanently lost.

For more technical detail please see Meni's answer.


Ardor configuration settings to connect to remote node without downloading entire blockchain locally

You can install and Ardor node then choose the light client option during installation or later set the following property to true in your nxt.properties file:

nxt.isLightClient=true


Ludicrous transaction fees from Coinbase?

Coinbase likely calculates the fees dynamically based on the current fees being included in recent blocks. This is to keep your transaction competitive so it makes it into a block. One of the worst feelings is when your transaction is sitting there for days unable to make it into a block because the site you sent from didn't use high enough fees.

Is the fee you're reference the fee you actually paid, like your 0.16BTC ended up only having 0.1583BTC? My guess is your looking at the total batch fee on the transaction your BTC was included in rather than what you personally paid. I haven't seen my bitcoind fees as low as 0.00017 in a long time, 0.0005 is more like it at the moment, but like you say 0.0017 does seem high, especially if it that was paid entirely by you.

Its possible recent blocks contained significantly higher fees that caused Coinbase to jump their tx fees as well. As we know with the 1MB block limit, transactions have been experiencing high competition to get included in a block. But my suspicion is you're looking at the total fee for the tx that Coinbase sent out (which would include other peoples addresses).

From Coinbase: https://support.coinbase.com/customer/en/portal/articles/815435-does-coinbase-pay-bitcoin-miner-fees-?b_id=13521

  Yes, Coinbase pays the miner fees (typically 0.0003 BTC) on external
  transactions in order to ensure these transactions propagate
  throughout the bitcoin network quickly. For very small transaction
  amounts you may be prompted to pay the transaction / miner fee.

This claims you shouldn't have paid a fee at all. Is it possible you're just looking at the TX fee that Coinbase paid for your transaction?


What are the political and environmental implications of growing Bitcoin electricity consumption?

It seems to me that since block reward and mining industry gross margins are reasonably steady in the short term, that if Bitcoin were to (say) rise ten fold in price similar to previous rises eg. at the end of 2013, this would encourage a near-proportionate rise in the hash rate and electricity consumption.

Essentially. However, that rise wouldn't happen immediately. There would probably be an immediate rise of ten to twenty percent, as previously marginal or unprofitable mining devices get switched on. A rise higher than that would have to wait for new mining chips to be fabricated, unless someone happens to be sitting on a hoard of mining ASICs.

  Am I wrong in concluding that a massive short term jump in the price simply won't be politically or environmentally feasible?

I don't think that's true. Let's say that the price rises. The various governments agree to limit Bitcoin mining, either by preventing any new miners from being switched on, or by implementing a cap-and-trade system for electricity used for Bitcoin mining. That doesn't reduce the price - it just means that there's less mining capacity securing the system, in terms of hashes per second per unit of total value. A change in hashrate doesn't cause a change in price - it's the other way around.


Can two bitcoin-qt share the same blockchain data

It's not a documented feature, but Bitcoin Core and its derivatives only write to the last blk*.dat file, and only read the others.  So you can create symlinks to have them share older files.  I've done this (for testnet) and it worked fine.


Generating differnet addresses from same public key?

For some reason you came to the conclusion that you can just derive multiple addresses from a single public key, but the quoted text doesn't say that. It says that the public key is uniquely generated from the private key (by multiplying the curve generator G by a random 256-bit number which is the private key). It also says that the address is derived from the public key by hashing it (RIPEMD160 & SHA256). Finally it says that it's a good idea to use a different address every time.

That doesn't mean you generate multiple addresses from the same public key. Each time you have to generate a new private key, then public key from that private key and finally the address from the public key.


Minimal but profitable miner setup with solar energy

While there were a few USB stick miners very early in the game, rigs have rather gotten bigger than smaller since then.

According to Mining Hardware Comparison the smallest rig that is still shipping,  Antminer U3 Batch 2, needs 63W.

Its energy efficiency is only one tenth of the current best equipment though, and you'd have to invest at least $40 which you likely would never make back:
In the ASIC-age, is it worth starting mining Bitcoin at home?


Is there a mobile wallet that works with a Trezor?

Is there a mobile wallet that support using a Trezor hardware wallet to spend coins?

You first need an OTG cable and a phone that supports acting as a USB host.

Trezor has not released a mobile version of their wallet.  However they have a Wallet Manager that can be used on your mobile (for Android). This allows you to manage the Trezor (but not spend money).

For wallet functionality they recommend using Mycelium (Android) with your Trezor which has support for this. Mycellium has an iOS client but it doesn't support Trezor.

  Is there an online resource that tracks features like this for thin-clients?

The only resource that I'm aware of is the Trezor documentation.

Trezor currently doesn't work with Apple iOS devices; it doesn't have MFi certification.


Block chain api support - Im unable to seperate the credit and debit transactions using blockchain api

You can check if transaction is incoming or outcoming if you check "spent" boolean value:

{"spent":false,"tx_index":64117670,"type":0,"addr":"18TXxNNt5qQWiNsCb6vLhUud8wjqehHWYN","value":496364,"n":29,"script":"76a91451cd88fd726d2f2085e86fd242873c6ab6f5485d88ac"},
{"spent":true,"tx_index":64117670,"type":0,"addr":"1FvfNCiqGF9sCFoJqcNCExv34UM1KfpXiu","value":464214,"n":30,"script":"76a914a3b7d538dac93dd995e01069e44be13bdebd7baa88ac"}


What is the relationship of the Lightning Network and the Bitcoin protocol?

Is lightning running on the bitcoin protocol or another blockchain?

The Lightning Network operates on the Bitcoin blockchain. However it has its own network protocols and protocols with transactions. It merely uses Bitcoin transactions.

The Lightning Network can be ported to different blockchains so long as they support a similar feature set to the Bitcoin blockchain. For example, the Lightning Network has been successfully used on Litecoin too.

  Is is something like Sidechain?

The Lightning Network is not a sidechain.

  Where bitcoins in network are stored?

They are in transactions, just like everywhere else. There is no such an object as a Bitcoin. Rather a "Bitcoin" is just a value in an unspent transaction output. Those exist on the blockchain. When using the Lightning Network, the Unspent Transaction Outputs for your Bitcoin are still on the blockchain. The main concept of the Lightning Network is that the transactions that spend those UTXOs are not broadcast to the Bitcoin network immediately but rather kept private between two parties who are transacting with each other. It is only broadcast when the two parties no longer wish to transact with each other.


How could a bot purchase bitcoins without paying for them?

Isn't the purpose of the blockchain to avoid issues with transaction integrity, such as duplicate transactions?

Trades on an exchange do not happen on the blockchain. Those transactions are not Bitcoin transactions; they are internal to the exchange and are just updates to the exchange's internal database. Because of this, duplicate transactions could happen without anyone really knowing.

  How would duplication of a transaction lead to the seller not getting paid?

The balance in an exchange account is just a number in a database and is not necessarily backed by that amount of actual currency. I believe what the authors are saying here is that the buyers and sellers would have their balances updated to say that they had X amount of money, but if they tried to withdraw, the funds wouldn't actually be there so that they could withdraw.


Channel balances on the Lightning Network are denominated in millisatoshis. $5 correspond today to roughly 0.001 BTC or 100,000 satoshis, so even a channel funded with only $5 could facilitate a number of small payments back and forth.


Have the Bitcoin developers resigned to the idea of changing the mining algorithm to an ASIC-resistant one?

Aside from the forking problems that arise from trying to change the mining algorithm, ASICs are gaining a longer shelf life, allowing for more time to distribute mining equipment, ultimately helping decentralization.


Shouldn't Market Cap increase when price increases?

It depends. MarketCap = circulating supply x unit price

Giving : MC=10, CS=10, UP=1

Example of an increase in MC : MC=20, CS=10, UP=2

Example of steady MC : MC=10, CS=20, UP=0.5

Example of a decrease in MC : MC=5, CS=10, UP=0.5

  Can circulating supply decrease?

Yes circulating supply decrease, especially in centralized coins(controlled by individuals or corporations)

Example : Ripple decided to lock a huge number for XRP in mid 2017 which lead to unit price increase


You should take a look at Abe:

Abe: a free block chain browser for Bitcoin-based currencies.

Abe reads the Bitcoin block file, transforms and loads the data into a database, and presents a web interface similar to Bitcoin Block Explorer or Blockchain.io.

Not to mention it was written in Python.


[ANSWER PART #1/2]

  To calculate the multisig address I can use bitcoind to decode the raw
  tx [...] But this took over 6 seconds to complete.

May be the daemon was too busy processing other things?

The transaction has very simple and easy-to-parse format. You can parse it without bitcoind. It is possible to do it even manually. Look here! Lets take your raw data

01000000 // version id
01       // inputs count
47759651f76ec0dbc7c248337d791afa7363636da4af0006fbafb77b9ac8214f // prev tx hash
07000000  // prev tx output index
8b        // scripSig len
48        // push signature + type
3045022100b980b3bf9b20d1dc98a6cc8c76e19c67c9c24a23fc44a3f6baf1020fb7b6b9ce022029bd5fda88553f1dac92b12c404f65cd2ed97b481244d45558129698e43595ce01
41        // push pubkey
040ab4a6619b82e1555f6c3ac9bd9b62c17433f3fb502d054dce9474ae6639777454b2509aae137c9048adb8491d28710c785b86aee766110d6aa0bcd3b07860a9
ffffffff  // sequence
02        // outputs count
a086010000000000 // value1
17        // scriptPubkey len
a914f815b036d9bbbce5e9f2a00abd1bf3dc91e9551087 // scriptPubkey
d0e8960000000000 // value2
19        // scriptpubkey len
76a9149d07acef34e0ad5a54f92aae65f49e2f3a24dd3988ac // scriptPubkey
00000000 // lock

OK, I've spent more than 6 seconds, but I parsed it with hands :)

take first output script a9 14 f815b036d9bbbce5e9f2a00abd1bf3dc91e95510 87

it is p2sh script - OP_HASH160 f815b036d9bbbce5e9f2a00abd1bf3dc91e95510 OP_EQUAL

convert these 20 bytes to p2sh address and you will get 3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC

[ANSWER PART #2/2]

  A standard address is
  Base58Check(f815b036d9bbbce5e9f2a00abd1bf3dc91e95510)

#define NET_BYTE  0x00
#define P2SH_BYTE 0x05  // https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki
//--------------------------------------------------------------
const QString MyKey20::toStringP2SH ( ) const
{
  quint8 tmp1 [21];                           // buffer
  tmp1 [0] = P2SH_BYTE;                       // first byte = 0x05 for p2sh addr
  memcpy ( tmp1 + 1, constData ( ), 20 );     // next 20 bytes
  const MyKey32 key ( tmp1, 21 );             // sha256 ( sha256 ( buffer ) )
  quint8 tmp2 [25];                           // another buffer
  memcpy ( tmp2, tmp1, sizeof ( tmp1 ) );     // copy 21 bytes
  memcpy ( tmp2 + 21, key.constData ( ), 4 ); // and concat with checksum
  char addr [40];                             // buffer for human-readable string
  memset ( addr, 0, sizeof ( addr ) );        // clear it and base58 encode data
  BASE58::encodeBase58 ( tmp2, sizeof ( tmp2 ), addr, sizeof ( addr ) - 1 );
  return QString ( addr );
}

and a method for creating "classic" addresses (to compare the diffs)

const QString MyKey20::toString ( ) const
{
  quint8 tmp1 [21];
  tmp1 [0] = NET_BYTE;
  memcpy ( tmp1 + 1, constData ( ), 20 );
  const MyKey32 key ( tmp1, 21 );
  quint8 tmp2 [25];
  memcpy ( tmp2, tmp1, sizeof ( tmp1 ) );
  memcpy ( tmp2 + 21, key.constData ( ), 4 );
  char addr [40];
  memset ( addr, 0, sizeof ( addr ) );
  BASE58::encodeBase58 ( tmp2, sizeof ( tmp2 ), addr, sizeof ( addr ) - 1 );
  return QString ( addr );
}


Why does Bitcoin-Qt use hidden private addresses?

This is done so as to ensure you have all of your keys backed up. BitcoinQT uses a new address for each transaction - taking them from the pool of unused addresses. However, as there is a pool of those addresses always kept in the file, even if you back it up every 100 transactions, you can still recover all of your money. If you would only be keeping the addresses you use and geenrate new ones on the fly, you would need to back them up each time you send coins.

The main client does not reuse the same addresses to increase your privacy - one would not be able to tell who you would be sending money to, and which address you would own. It's privacy by default, rather than on demand.


How will bitcoin stay decentralized when mining becomes extremely expensive?

This is a valid concern and I think nobody can give you a clear answer here. We'll just have to wait how it evolves and how people react; it is an unclear future.

There are some ideas about changing the proof-of-work algorithm to make mining pools not that profitable, but the effects of such implementations could be various.

I highly recommend this article from Vitalik Buterin, where he walks through the history of Bitcoin mining, explains problems and solutions encountered in the past and describes the situation today. He also dares to predict the future development and provides some ideas to keep the mining decentralized.

It seems there's still a long path in the future of Bitcoin development.


Why are blocks in a permissioned blockchain linked together?

I think you're mistaking PoW for a mechanism that guarantees the chain's correctness, rather than just a means for finding consensus.

A blockchain (without PoW) is just an ordered list of batched updates to a database.

PoW is one mechanism to guarantee that everyone eventually ends up on the same chain, but it doesn't guarantee that this chain is valid. Validity is enforced because non-miner full nodes actually validate all the operations in the chain to determine correctness.

If you remove PoW, you need another mechanism to obtain consensus. One way of doing that is having the block by signed by a trusted set of nodes. This means you're trusting those nodes to not sign multiple conflicting chains. However, it does not necessarily mean you trust them to assert validity of that chain. You can still have full nodes that verify that the chain being created is valid. In order to do that, your set of updates must be identifiable. A hash chain is one way of doing that.

If you're going to fully trust whatever your trusted parties sign without any validation, just use a replicated database instead. What a blockchain adds is simply a mechanism for identifying and auditing updates.

To be clear, I don't think there are all that many uses for permissioned blockchain technology, and a lot of the claimed advantages are hype. However, some of them will likely turn out to be a modern instantiation of BFT systems with auditability, and be boring but quite useful.


Any non wavecrest issuer euro zone debit cards?

I'm using this one
Low fees, they accept BTC, BCH, ETH, LTC and BTG
Also, they have very cool app for iOS & Android

https://cryptoanteg.com/blogs/reviews/epayments-your-new-crypto-currency-debit-mastercard


Can anyone give an explaination of what exactly a Bitcoin is and where it derives its value from?

Proof of work plus utility, and scarcity.

The Bitcoin mining process is what creates new coins in the Bitcoin economy. To add a new block to the network the miner must produce a hash below a specific target. The only way this can be done is through trial-and-error (bruteforce) so miners are constantly competing to produce as many of these hashes per second as possible so that they earn the newly created bitcoins.

This competition requires hardware and electricity, both which cost money. This is the Proof of Work (POW), the only way to create new blocks and thereby new bitcoins is by spending money on the mining process. This is also where the scarcity part comes in. Today, every block created produces 12.5 new bitcoins. Every 210,000 blocks (~ 4 years) this reward is cut in half thereby constricting the supply. We've already had two halving events so far. It started at 50 new bitcoin per block.

Lastly utility gives it value. Bitcoins are useful. They can be used to transfer value across the globe almost instantly, for very little cost, and without censorship. Whether it's used for international remittance or gambling doesn't matter - bitcoins have utility.

So it's not just random string of characters. What appears to be random strings actually represent and mean something. They can be validated by others that can prove that this string of characters represents the money and energy spent creating a valid block.


Why bitcoin faucets pay different amount depending on user's location?

Some faucets may pay based upon the ad revenue that they will earn from the user. A site may earn more ad revenue from someone visiting from the US because their advertisers are willing to pay more for US traffic than Indian traffic. Thus the faucet owner may opt to pay US visitors more in proportion to the additional ad revenue which they are bringing.


Extract the tag list from blockchain.info

You can select the text and paste it directly into Calc, Excel or whatever spreadsheet-program you use.
They recognize the tabs as seperators.


Bitcoin at the protocol level, the Bitcoin Core implementation and its wallet implementation do not have a concept of "address balance". The protocol only has a notion of unspent transaction outputs ("coins") with a particular value and script to limit who can spend it. You can reasonably define the balance of an address as the sum of the values of all unspent transaction outputs with a script that can be spent using the key corresponding to that address, but the core implementation has no need for this.

The wallet doesn't track address balances either - it considers the pool of coins the entire wallet can spend, and keeps track of their total value. As for privacy of the system (not just yours) the recommendation is to simply use a different address for every incoming transaction, there is little use for per-address tracking either. The next release (0.10) will likely have support for watch-only wallets, which allow adding addresses to the wallet without the corresponding private key, allowing tracking of arbitrary sets of coins, but still not aggregated by address.

There are external tools that can do efficient querying of such aggregated data from the blockchain, like ABE and Insight.


The exchange needs to have custody of the assets (tokens for a sell, money for a buy) before an order can be placed.  That's the only way they can guarantee that the order will execute as soon as it is matched, and that both parties will receive their assets, without the ability to back out.

So the correct order of your steps is:

  3, 4, 1, 2, 5, 9, 6, 7, 8, 10.

Of course, variations are possible: 9 could happen earlier, for instance.  The buy order could be placed before the sell.  Or the buyer could wait to withdraw the token they bought.

This doesn't account for the possibility of things like margin orders, where the exchange might allow someone to buy using money that's borrowed instead of deposited.


How is OP_CHECKTEMPLATEVERIFY a scaling solution

A bit of a meandering answer to the question, and to answer a side question: fundamentally what is a scaling solution?

OP_CTV does not increase the block space. Transactions using generally will use more block space actually (although it need not be a large amount), and relay can be optimized to equivalent.

But scaling is more than just a block size increase. The lightning network shows this -- not just because of eliding intermediate states from the chain, and routing, but also because of latency. It matters for lightning that confirmations can come faster than 1 block. This is not a minor point; if there were another way that you could get sub-block confirmations but use more total chainspace, people would probably still want it. Important to note that redeeming a channel still takes a long time potentially -- you're trading less latency now for more latency later (HTLC timeouts are longer than a single transaction confirm).

So, that said, what does OP_CTV do?

OP_CTV lets you more efficiently use block space over time. Imagine if you have a block that is almost full, and there's space for just a few inputs and outputs (let's say 2 outputs). Previously, this would mean that space would go to confirming a payment to one person -- one change address, one payment.

This isn't very efficient because we're only paying one person!

With OP_CTV, a single marginal output can confirm payment to an unlimited number of recipients. So that means the efficiency for confirming a payment on-chain is now much better.

However, at some time in the future those still must be claimed on-chain, which means that overall average demand isn't reduced (maybe, in fact, increased).

But if you look at trends, not all blocks are full. Sometimes they are, sometimes they aren't. A not full block represents "wasted" bandwidth for confirming transactions. All blocks should be full.

By splitting the market, we create two different "fee bands", the fee band for confirming a spend and the fee band for redeeming a CTV output. This creates a much healthier backlog for Bitcoin.

This is indeed similar to P2SH -- before p2sh, you pay for data on spend, when you should only need to pay for it on redeem. p2sh is bytes-wise less efficient than non-p2sh. And p2sh can't emulate it because p2sh operates at the script level, not the transaction level.

So what are the core benefits?

Improved confirmation throughput
Lower Fees paid
Lower fee-rate for top of mempool
Business operators abstracted away from "chain weather"

CTV also jives well with protocols like LN by increasing the number of HTLCs a channel can hold, which has been shown in some research (citation needed) that the number of HTLCs increasing is critical to LN working well. CTV also makes it easier to bulk-open channels, which decreases costs for opening channels & can increase LN routing viability.

CTV also enables new kinds of non-interactive protocols, which can eliminate a transaction between "withdraw from coinbase" and "open lightning channel". This meets the "classical" decreased block space usage criteria. This includes a case where, With Schnorr signatures/taproot, it's also possible to have the sub-tree be elided in favor of a new transaction.

See https://utxos.org/analysis/bip_simulation/

Oh, and it does enable similar covenants to the MES Covenants, see https://utxos.org/uses/ for more on vaults, non-interactive protocols, etc.

To close, a different definition of a scaling solution:

A blockchain scaling solution is a technology which decreases how aware users are of the fundamental limitations of the underlying blockchain, assuming they have proper wallet software (e.g., lightning support, ctv, etc).

CTV eliminates a large class of cases where a user bumps up against chain limitations, and is therefore a scaling solution.


An accepted share represents work that your miner did towards a round in a mining pool.

When the pool finds a block, it distributes the block reward (i.e. 25BTC) to the miners according to how many shares they have contributed during that round. The more shares you contributed, the more payback you get.

It is simply a way to keep score, and to attribute the reward proportionally to the amount of computing power that each miner contributed to the pool.

Edit: "accepted share" is one which is valid at the time the pool receives the work from the miner, but sometimes the work arrives too late and a new block has replaced the previous one. In these cases you will have some "invalid shares" which don't count towards the revenue share.


Are two factor authentication enabled wallets at mtgox or blockchain.info safe even with weak passwords?

Blockchain.info does not use 2FA for encrypting the wallet and instead uses it only for limiting access via the web interface.  If your system is compromised with a keylogger, and the attacker has access to the blockchain.info wallet (e.g., the backups sent via e-mail), for instance, then the attacker can perform a replay attack and spend the funds from the wallet.

Also, if your system is compromised the attacker might be able to obtain the password and OTP code and use that for login by simply being first to login with those credentials.  Mt. Gox implemented 2FA correctly, by requiring the OTP for each withdrawal request so that is less of an issue with them.  Not all exchanges and EWallets with 2FA require that.

So there still is better protection when when accessing your account only from a secure system, but those who live a little more dangerously can probably still keep their funds safe thanks to 2FA.

Also, the 2FA device should always be separate from the device where the wallet is being accessed from.  So accessing Blockchain for Android from a mobile in which the 2FA client is also running is not a secure configuration.


Anyone know of an API for RSI and other indicators?

I had the same problem, couldn’t seem to find a good API that supported most of the popular indicators, and at the same time covered all the exchanges. So I decided to start up a project for this. So check out https://taapi.io . We cover 200+ indicators, pattern recognitions etc… I’m a big fan of free products myself, so taapi.io is free as well.

If your indicator isn’t there, then shoot us message, and we’ll get it added!


MultiBit: I clicked on Close Wallet and now i don't find a wallet

Have a read of the support topic that describes where your wallet is, which is here:

https://multibit.org/en/help/v0.5/help_support_missingWallets.html


Where does Bitcoin Core store DB_LAST_BLOCK?

It depends on your specific data directory. Bitcoin Core uses a LevelDB database for the index and LevelDB handles the exact storage format and files of the database. This can be different for every data directory. There is no particular file that that record is stored in that Bitcoin Core knows.


What is the point of including the scriptCode of the input in the transaction digest of segwit?

What problems could arise if the scriptCode of the input were not included in the digest?

Almost certainly nothing.

The reason for doing this is a very intentional design choice to limit the number of changes SegWit makes. Given that it has script versioning, it would be easy to introduce different sighashing schemes later if desired, we had the option of only making intended changes, as opposed to redesigning it from scratch. The intentional changes to the sighash algorithm are:

Use shared precomputed per-transaction hashes to avoid O(n^2)
Commit to amounts spent

So the hash structure remains the same, and contains all the same data. The sighash flags still have the same effect. The only thing that changes in BIP143 is that some data is now organized under precomputed hashes, and the input amounts go into it. Everything else is the same, which includes a commitment to the scriptCode - even though there is no good reason for that anymore.

EDIT: Do see Russell O'Connor's answer below for a minor use case.


Crypto-currencies are not simple things.  They are a combination of various cryptographic primitives constructed in such a way as to create decentralized trust in a shared ledger.  The trust in the system depends on aligning the incentives of the participants so that game theory can predict their actions as rational actors.  If you are looking for simplicity...look elsewhere.

Most crytpo-currencies out there have been forked from Bitcoin.  From a technical perspective, it's probably best to think "Bitcoin" whenever you hear "blockchain technology", at least so far as the source code is concerned.  Most likely, you are dealing with a codebase that was originally forked from Bitcoin, but with changes made on top of it.  With that in mind, you could argue that Bitcoin is the simplest.

There are exceptions (like Ripple and CryptoNote) which have not been forked from Bitcoin, but I find it hard to say that any of these systems are simpler than Bitcoin.  They are different, less used, and therefore often considered less trustworthy.  There are probably some university projects out there which re-implement a blockchain with the minimal required complexity (such as with transaction scripts stripped out, which contribute a great deal to the complexity), but I am unaware of any.


Should I validate transactions using the rules in BIP62?

Yes, you should.

BIP62 is currently not being pursued as a consensus rule on the network.

However, all its rules (including the ones that are only applied to new style transactions according to BIP62, specifically the lower-S rule) - are currently being enforced as a standardness rule since Bitcoin Core 0.11.1 and 0.10.3.

The reason for this is that at the time BIP62 was written, requiring lower-S was not feasible due to the large amount of wallets that were still creating high-S signatures. In recent times, a large fraction of them switched to lower-S, making it viable to just unconditionally apply that rule. If a significant amount of network nodes (and specifically, miners) upgrade to versions that enforce this, wallets that do not enforce lower-S will gradually stop working and need upgrading.

If that process completes and we end up in a state where near-0% of blocks still contain high-S signatures, people may want to propose unconditionally applying it as a consensus rule.


Hardened extended private keys break the extended public key derivation path, which is why unhardened key generation is still valuable.

I can provide an xpub key M/44’/0’/0’ to a webapp, which can then create fresh addresses without having access to any private keys.

For example, the following receiving keys (and related addresses) can be derived from M/44’/0’/0’

M/44’/0’/0’/0/0
M/44’/0’/0’/0/1
M/44’/0’/0’/0/2

or following change keys (and addresses)

M/44’/0’/0’/1/0
M/44’/0’/0’/1/1
M/44’/0’/0’/1/2

The backend which has  m/44’/0’/0’ can derive all private xpriv keys to spend funds sent to addresses above, thereby never exposing any privatekeys to the userfacing webapp. However, a xpub key m/44’/0’ (hardened or not) cannot derive a hardened child xpub key m/44’/0’/0’.

The leak of a child private key does not expose parent keys. This would also require the xpub of the parent key pair and child index. Hardening prevents this exposure scenario. So for BIP44 the tradeoff is made at the account level (m/44’/0’/0’/) where the account parents are hardened but subsequent receiving and change keys are not.

Edited: Correction from Abdussamad (See comments)


rpcallowip=192.168.0.* ?? invalid configuration

You want to use 192.168.0.0/24. That's CIDR notation for 192.168.0.*.


In NXT monetary system, how do you transfer the coins complete control to another account?

The only way is to delete the coin in the old account using the API and for that you must possess all the coins. Then, create the coin in the new account.


After halving, the reward goes down by 1/2. Some miners may find it unprofitable to mine and thus shut down their mining operation. However, the network difficulty remains the same until the next difficulty adjustment, which is every 2016 blocks (14 days approximately). Thus, the block time will increase to > 10 mins per block until the next difficulty adjustment.


Transfer coins to a paper wallet created before the fork

Considering that you are transferring the new purchased BTC to the same paper wallet as you stored the earlier BTC, there won't be a problem at all.

Example:

You had 10 BTC before the fork in paper wallet with address 'abcd'

After fork you have 10 BTC in 'abcd' wallet in BTC Chain

And 10 BCC in 'abcd' wallet in BCC Chain

Now you buy 5 BTC after the fork and transfer it to 'abcd' wallet

So, now your final balance will be:

BTC: 15

BCC: 10

You can use these two balances separately depending on the chain you select.


As per BIP 21, Bitcoin URIs are only allowed to contain a single address.

You are free to develop your own format that supports multiple outputs, but it won't get very far unless you can convince other wallets to adopt it.


How can a single person operation keep a collection of online wallets secure?

This is a great goal, which many people will assume just can't be done.  But remarkable strides are being made in the field of secure cloud computing via homomorphic encryption.

These schemes allow servers in the cloud to perform computing tasks (currently only a limited set of arithmetic) on encrypted values without decrypting them.  See more at In what ways does Full or Partial Homomorphic Encryption benefit the cloud? - IT Security - Stack Exchange

A question about applying this to Bitcoin clients on Less Wrong is here: Homomorphic encryption and Bitcoin but they seem to be confusing homomorphic encryption with a form of secret splitting between two computers, which would not meet the goal outlined here.

I'm guessing that current homomorphic techniques are inadequate or too slow or both for bitcoin, but I'm not sure.  But further research may make it practical.


Will my wallet be extended or replaced when I recover another wallet in Breadwallet?

If you start or recover a wallet it is completely isolated from your old one, the balance will not be combined. You don't need to empty it first, but it will be awkward to keep swapping backwards and forwards between two wallets if you choose to do so (you'll need to re-sync each time).


Double Spend Behavior on First Network Propagation

Bitcoin is a gossip network and relays transaction or blocks on a best effort basis. Hence you cannot determine the probability of one transaction being seen by the network versus the other.

Now in terms of mining the transactions in a block there are a couple of cases that needs to be considered. For assumption sake let us assume that we are considering a miner's node that first receives T1 and then after a few seconds receives T2.

Default case: Most miners still manage their mempool on a first seen basis. That means if a miner sees T1 first, it might reject T2 even if the fees provided by T2 are higher than that of T1.
Replace by Fee (RBF) is signaled: If T1 had opt-in RBF signaled (nSequence in any one its input is less than 0xFFFFFFFE) then the miner may replace T1 with T2 from its mempool.

Now the only remaining conflict can be if there are two blocks mined at the same time and at the same height, one containing T1 and the other containing T2. The chain version on which the next block gets mined will finally determine which transaction will attain practical finality.


Protecting against bitcoin thieves as a casual user

What other measures can a new, non-power user take in order to protect from this type of significant theft, within reason?

For money stored long term, move the coins to a hardware wallet or some form of offline wallet (cold storage).
Use a transaction (rather than importing keys or using an existing seed-phrase) to move the money to a wallet with fresh keys that have never been on any network-connected device.
Theft is not the only risk. Make backups of the wallet and/or seed phrase or keys. Test recovery from those backups. Educate heirs about recovery.
See What kinds of wallets are there?


OpenSSL's RNG is considered secure, so there should be no problem with this method. I don't think you need to use -rand /dev/urandom since OpenSSL already uses /dev/urandom for seeding the RNG.


How I should pay tax if I buy Bitcoin from an overseas friend

The $1 is a Capital Gain (it's not income except perhaps if you're a professional trader). So, if there's tax to be paid, it will be Capital Gains Tax, not Income Tax. When you declare your total Capital Gains and your total Capital Losses to your tax authority, they will tax you on any net gain over and above your personal allowance (which will depend on your personal circumstances). See https://www.irs.gov/taxtopics/tc409.html


The best way you can do is one of the below:

Check your computer for the wallet file of the BTC address if it was a desktop wallet
Check your home for any paper/computer for the private key/seed of that BTC address if it was a desktop wallet
Check your browser history for any exchange login and try to login and check for that balance.

With just the BTC address, you cannot find the info of the BTC wallet.


Would a normalized, hashed, protected chainstate reduce miner storage costs?

You don't actually need to commit to the chainstate in blocks - just compute it the normal way, but throw away the block data after validation.

In fact, that's exactly what the pruned mode in Bitcoin Core 0.11 does, and it supports mining.

Storing the hash of the chainstate into blocks does have other advantages, like being able to skip processing historical blocks entirely if you're willing to trust a miner majority to commit to a correct one. However, it comes at a very significant cost for validation, as this hash would have to be recomputed and verified with the entry inside every block.


NBitcoin -- How do I just check the balance of my wallet from my seed phrase?

Use var key = mnemoObj.DeriveExtKey(); then you can derive addresses as explained in this chapter (https://programmingblockchain.gitbook.io/programmingblockchain/key_generation).
mnemo = new Mnemonic("minute put grant neglect anxiety case globe win famous correct turn link",
                Wordlist.English);
hdRoot = mnemo.DeriveExtKey("my password");


WalletAppKit creates an address every time Bitcoinj gets initialized

According to the documentation:

  getImportedKeys() returns a list of the non-deterministic keys that
  have been imported into the wallet, or the empty list if none.

Try to change:

if (wallet().getImportedKeys().size() < 1)
    wallet().importKey(new ECKey());

to:

if (wallet().getIssuedReceiveKeys().size() < 1)
    wallet().freshReceiveKey();

To get the first address in your wallet, you can use:

wallet.getIssuedReceiveKeys().get(0).toAddress(TestNet3Params.get()).toBase58().toString();


What are the limitations of a Client connecting to the Network through TOR?

The Bitcoin client is designed as a peer-to-peer network. To join the network, you need to make a connection to a node that accepts incoming connections. To protect against certain types of Sybil attacks, a client tries to make 8 outbound connections to geographically diverse nodes.

If you connect to the network through tor, you cannot accept inbound connections. You will consume 8 inbound connection slots that were available on the network (with the outbound connections you make), but you will not add any yourself. This can cause the network to run out of inbound connection slots, reducing the reliability of the network. The Bitcoin network, in the past, has had problems with shortages of available inbound connection slots. It's not clear exactly why, but one possibility is intentional malicious consumption of those slots.

The reason you can't fully trust clients that connect inbound to you is that an attacker can trivially consume all your inbound connection slots and all those connections can be from conspiring nodes operated by the same user. However, you have complete control over who you make outbound connections to.

In general, so long as at least one of your connections goes to a well-connected node that is not conspiring with all the other nodes you are connected to, you should be safe.


Noob questions about transfering and offline security

Transaction fees occur for each individual transaction and .04 btc is far too large for one transaction fee. You should open a ticket with Coinbase in order to receive an answer that will not sacrifice your privacy (by linking your transaction ID here).

Look up "change addresses" to understand why you are seeing multiple destination addresses for each transaction.

You offline wallet will remain safe unless you expose your private keys to the internet.


Are coin minting and difficulty level related?

You're basically correct.  The rate at which block reward and thus inflation (or lack there of) is determined is by block height alone.  That is, starting from a maximum of 50 new bitcoins generated per block at height 1, and halving that amount every time 210000 blocks have been generated, the maximum amount of new bitcoins that are allowed to be generated by a generation transaction in a block eventually becomes less than one satoshi, which is the smallest unit of amount of in a coin, at which point generation of new bitcoins stop.

On the other hand, the difficulty, or technically the "Target" that a block header hash must be below (it's just a big number) is only determined by the rate at which blocks were generated during the previous 2016 blocks re-target period, starting from the very first and highest target which is also the lowest difficulty (difficulty 1) onward.
This means that difficulty (or target) can change and does go up and down as hashrate enters and leaves the network.


Does one need to have a bitcoin wallet to buy/sell bitcoins?

They don't sell nor buy anything they are in the middle of a transaction. Check this out, Active buy orders are people who want to buy, and active sell orders are people who want to sell. The exchange is the place where all that people meet.

If you have Bitcoins and want to sell them for real money you have two options, you can sell it to the first buy order for the specified price and the transaction will be finished in that exact moment (if the buy order is for the exact or more amount of Bitcoins that you are selling) and you will be credited with real money that you can withdraw to your bank. Or you can set your own price and wait to see if someone wants to buy it for that price. Depending on the price you set it may take little time, longer or forever.

For every acount a wallet is created where you transfer your Bitcoins, real money is deposited in real banks and transfered to and from those banks.


Who approves my public key in Bitcoin network?

Public keys do not need approval.

In the regular PKI setup, such as for SSL, trust is granted by Certificate Authorities. The implicit understanding is that if you have been endorsed by a known CA, they have verified you within certain parameters to be worthy of that endorsement. Similarly, in PGP's web of trust, the endorsements come from people, who have in turn been endorsed by other people.

In Bitcoin, such kinds of endorsements are not required. Bitcoin only uses public keys to lock coins, and to verify that they are being spent by the entity or person they were locked to. Thus, as long as you are able to prove you hold the private key corresponding to the public key, you can participate in the network.

There is little harm to a user generating multiple keys, so there are no controls to prevent it. It is simply not required.

Keys are generated over the secp256k1 curve using elliptic curve operations.


How do exchanges keep relatively similar price on coins?

If I could buy a bitcoin on Exchange A for $2,000, turn around and immediately sell it on Exchange B for $2,500, and make an immediate profit of $500, I would do that all day long, and get rich!

But if even a small price discrepancy exists between two exchanges, many people will find it, and start buying on one/selling on the other.

All that one-sided buying in one market and selling in the other market moves the price back to equilibrium.


How can I extract my bitcoin public address from my bitcoin private key using PHP for Nodejs?

Private Key is a 32 bytes data
Apply ECDSA or Elliptic Curve Digital Signature Algorithm to the private key.
The above step dervies the public key,.
(Legacy)Now append 0x04 to the start of the public key.
(Current Practise)  Take X from derived public key. Now add  byte 0x03 if the last byte of Y is odd or 0x02 if the last byte is even.
Now, apply SHA-256 to the above public key, and then apply RIPEMD-160.
Add Network Byte at the start of key:
Mainnet : 0x00
Testnet: 0x6f
Calculate the checksum: Apply SHA-256 twice and then take starting 4 bytes of the result.
Finally to get the address concatenate the key from Step7 and checksum.


How does the Bitcoin network checks if the miner has changed the mining reward?

It's possible you mean 1 of 2 things by "mining reward":

Coinbase transaction.

Currently this reward is 25 bitcoins per block. If a miner changes this to be higher, it is an invalid block and other nodes will not accept this as a valid block. If the block is not accepted by other nodes, it doesn't go into the blockchain and the miner will not get any bitcoins.

The miner can change the reward to be lower than 25 bitcoins currently. This is potentially a way to slow down bitcoins coming into existence, but is otherwise not harmful. There is an economic disincentive for a miner to do this, but it is possible.

Transaction fee.

This is the difference between the sum of the inputs and sum of the outputs in any given transaction. As the transaction is signed by a private key, any changes to either inputs or outputs will cause the signature embedded in the transaction to be invalid. If this transaction is included in a block, the block itself is invalid and will result in other nodes not accepting this block. Similarly as (1) the block being invalid will cause the block to not get into the blockchain causing the miner to not get any bitcoins.

Basically, the miner is heavily incentivized to act honestly as that's the only way a miner can get bitcoins.


Is it possible to spend the unspent outputs of a burn address?

not possible to create a transaction which would spend the utxos since there is no private key to sign the transaction?

Yes. That's the whole point of a burn address - to have an address where no one is able to spend the coins.

Of course, in theory, someone could find a private key that corresponds to a burn address, but the probability is so small that it is effectively 0.


A bitcoin transaction takes a number of inputs and spends those input to the specified outputs. If the value of inputs exceeds outputs the network treats that as a miner's fee.

vout is the list of output transactions.

scriptSig is only useful if you're trying to do some non-standard stuff.

See https://en.bitcoin.it/wiki/Transactions for more information on what's in a transaction.


Full list of RPCs - including hidden RPCs

Found this in the source code which should answer your question: https://github.com/bitcoin/bitcoin/blob/b05a89b2def301704df8f22f05a45ccf891c2b83/src/rpcserver.cpp#L268-380

It's the internal register of RPC commands that bitcoind should serve, and even includes which ought to be hidden from the help command.  invalidateblock is in the hidden section with three others.


How can one earn some Bitcoins with minimal skill requirements?

The most popular way to earn a bit of Bitcoins without any much skill is mining. The amount of coins one could earn is pretty small even with higher-end graphic cards, but through the use of mining pools and alt-coin mining one could get a small start in the Bitcoin world.

A website that offers small Bitcoin rewards for mechanical-turk-esque small tasks is CoinWorker. The skill requirement is minimal and the service provides value to people paying for the task.


Besides mining Bitcoin what is another good use for an Antminer S1?

There are many other SHA256 coins. Whether they are "worth mining" will depend on their difficulty, market value, the cost of your electricity, and the value of the time it takes you to  set them up. As all these things are constantly changing, your first question cannot really be answered in a way that will have any lasting usefulness; such questions are discouraged on Stack Exchange.

For your second question: this is an ASIC device that is capable of running SHA256 and nothing else. You cannot use it to mine scrypt coins.


Where does the mining reward in regtest go?

To you, but with a delay.

What you're observing is the maturity period: the coins generated by a block can only be moved after there are another 100 blocks on top.

If you generate another 100, your balance will start increasing.


How does offer creation impact fund requirement of an account?

Every entry in the state tree of the ledger requires 12.5 XRP reserve, it doesn't matter if it's a trade offer or a trust-line. When the entry disappears from the ledger (by getting filled or being canceled), the reserves can be moved again.

The only exception is the account entry, which requires 50 XRP instead of 12.5 XRP and is perpetual (because accounts cannot be deleted).

See https://ripple.com/wiki/Reserves for details and the current reserve requirements (they can and have changed).

It is not related with the field TakerGets of the message OfferCreate.


Type these commands inside bitcoin source root folder:

1) ./autogen.sh

2) ./configure

3) make

4) make install

Then you can call Bitcoin-qt simply typing the command bitcoin-qt from your terminal. If you provide the make install command as suggested in step 4 you can run both Qt and daemon from any path.


Regardless of how the password got enabled, once it is set, there is no way to access your coins without it, except by restoring the wallet using your backup phrase.  So if you have your backup phrase, you can create a new wallet to access your coins.  Choose the + button to create a new wallet and select "Import Wallet", and use the "Recovery Phrase" tab.

If you don't have the backup phrase, you are out of luck unless you can find the password.  You might try to figure out how it got set:

Perhaps you set it and then forgot?  Think about what password you might have chosen, or how you usually choose passwords.
Perhaps someone got access to your phone or computer, and set a password?  Try to figure out who that might be, and ask them.  Of course, it's possible they already spent all your coins.
Perhaps there's a bug in the Copay software that set a password without asking you.  If you've ruled out all other possibilities, you could report it as a bug.  But if so, it's hard to guess what the password might be, and I suspect you won't be able to recover your funds in this case.

Reference: https://support.bitpay.com/hc/en-us/articles/115003004403-I-forgot-my-wallet-spending-password-What-can-I-do-


It is now telling me that it is over 10% done and that are "XYZ" blocks remaining. What does this mean?

The bitcoin network works by continuously adding new blocks onto the blockchain. Each block is full of transactions, and each transaction can be traced back to earlier transactions, creating a verifiable record of ownership for all coins in the system.

So to show your balance, the wallet needs to synchronize with the blockchain, so that it can accurately determine what (if any) coins you own.

  And will my wallet be updated only when the synchronization is complete?

Yes, though if you want to find out your address balance more quickly, you could look up the addresses controlled by the wallet, and then use a block explorer website to check the balance of each individual address. Note that if your wallet has a large list of addresses, this may be a hassle to do.

  Also, at towards the top of the wallet is there is a message "alert key comprised, upgrade required"

This message relates to the retirement of an alert messaging system that was built into the original clients, it is meant to alert you to the fact that the key that allows alert messages to be sent is now publicly known. This is not critical to the function or safety of the wallet.

If you upgrade to a newer version of the client, your sync time may improve greatly (depending on how old the software you're using is). If you post info about what version of the software you're using, someone may be able to provide more help in regards to this.


What does allowhighfees in sendrawtransaction actually does?

The fee is whatever you define in the raw transaction, based on the difference between inputs and outputs.  sendrawtransaction never changes it.  However, as a safety measure, it will normally reject your transaction if the fee exceeds a certain "absurd" threshold, so that you don't accidentally lose a lot of coins by miscalculating your raw transaction.  If you set the allowhighfees parameter, this check is disabled, and you can send a transaction with fees as high as you wish.

The threshold value can be set with the maxtxfee command line / config file option.


Negative time estimation from estimatefees + mempool data

Fee estimation is mostly progress free, in the same way as waiting for Bitcoin blocks, that is the estimate for how long it will take to get confirmed from now is unrelated to how long you have been waiting.  I say mostly, because there are clearly daily and weekly cycles in transaction activity that result in the fact that overnight or over the weekend there are greater chances of getting confirmed.

Aside from that, fee estimation in Core is purely backwards looking, and can only tell you what happened in the recent past to transactions of a certain fee rate.  It can not predict the future.  If 2/3 of the hash rate disappears as is the case with the transaction you presented, then it is to be expected that it could take many more blocks than the estimate had previously predicted.

Also, Core fee estimation tries to give a fairly conservative estimate, so in theory you should most of the time be confirmed in less than the target number of blocks. So you could ask for current estimates until you find one which is lower than the fee rate in question and this should give you some guess as to how much longer you might need to wait, but again it can't predict the future.

About only the definitive thing you might be able to get, is if you know you placed the transaction X blocks ago and if you ask for a fee estimate for X/2 blocks now and the answer is less than the fee rate you put on the transaction then it is reasonable to question why your transaction has not been confirmed yet.


Transaction overriding in lightning network

Lightning payment channels are established by two parties Alice and Bob paying into a 2-of-2 multisignature address. Concurrently, they create two "exit-transactions", one for each participant which pay out the current allotment of the payment channel, txAliceExit_1 and txBobExit_1. These exit transactions lock the fund of the executing party for some blocks.

When a payment is performed between Alice and Bob, they update the balance, create two new "exit-transactions", txAliceExit_2 and txBobExit_2.

To invalidate the previous "exit-transactions" each party gives the counterparty another transaction that builds on the previous exit transaction by spending the party's output to the counterparty if the old "exit-transaction" were broadcast to the network, txAliceExit_1-TakeAll and txBobExit_1-TakeAll. I.e. if Bob executes txBobExit_1 the funds are time-locked for a little bit, meanwhile txAliceExit_1-TakeAll would become valid and Alice could take them before he can spend them.


Is there any reasonable way to short-sell Bitcoin

Even though I would strongly advise against it doing a search turns up:

https://icbit.se/
http://mpex.co/

There are probably others but do take into consideration that the majority of these "exchanges" have statements like the one listed bellow (taken from https://btct.co/faq):

  Is it legal for this exchange to operate?   (...)

  No assets on the site are to be considered real.
  The use of this site is for educational and entertainment purposes only.
  If an asset issuer on this site defaults, you have ZERO RECOURSE. (not like you have any recourse in most international BTC situations
  anyway.)


Is there a scientific survey on the number of Cryptocurrency fails / scams?

Bitcoin.com

  Having completed an extensive study into last year’s crowdsales, news.Bitcoin.com can report that 46% of them are effectively dead already – despite raising over $104 million.

Satis Group's Cryptocurrency Research

  On the basis of the above classification, we found that approximately 81% of ICO’s were Scams, ~6% Failed, ~5% had Gone Dead, and ~8% went on to trade on a exchange.

Lastly, Bitcoin.com also mentions that in an MIT-authored research paper, Initial Coin Offerings and the Value of Crypto Tokens, it was "found [that] only between 5% to 25% of ICOs are frauds." However, I couldn't find evidence of this claim in the paper mentioned.


Is it possible to mine using Asics on AWS?

AWS does not offer any ASICs, so no.

ASICs are special machines, with specialized hardware. You would need to physically buy one to use it. Anyone offering any form of cloud mining is trying to scam you.


Version field in transactions, blocks, etc

The format of messages occasionally needs to change. This is done in a backward-compatible way by exchanging versions in version messages and communicating in the "language" of the client with the lowest version. Through this mechanism, clients running version 0.1 should still be able to talk to the latest clients.

Blocks and transactions are special. When these formats are updated, nodes can't modify old messages to use the new format because this breaks the crypto. So version 2 nodes have to store and communicate both version 1 and version 2 blocks, and special version numbers are necessary to distinguish them.

Block/transaction versions other than 1 are not accepted.

In version messages, use the same version as the client version that you're trying to be compatible with.


Troubleshooting "access is denied" error when running cgminer

You have to replace the part "-u username -p pass" with the actual username and password of your worker.
Log into coinotron and create a new worker in the "Add Worker" section. The worker will appear in the table below. Use the displayed name and password of your worker in the command and you should be fine.


Any idea how to download a small part of the chain for testing purposes?

As far as I know, there is no way to download arbitrary blocks (although I suspect it's not too hard to do if you implement your own client).

If you just want blocks for testing, you won't have much trouble finding bootstrap.dats that contain a few hundred thousand blocks. Alternatively, you could just run bitcoin core for half an hour or so and get a few thousand blocks from the start of the chain - The early blocks are mostly empty and download pretty quick.


Bitcoin transaction has three important parts:

from address A
to address B
amount of bitcoins

If Bitcoin client broadcasts correctly formed transaction then the network knows that certain amount of bitcoins were sent from address A to address B.

If the owner of address B wants to send bitcoins to someone else he formes transaction that looks like this:

from address B
to address C
amount of bitcoins

You can have as many addresses as you want, but newly created address has zero bitcoins. You can buy bitcoins from someone e.g. Bitinstant or MtGox, and ask to send them to the newly created address. Once you have the bitcoins you can sell them or exchange for goods and services.

Label is just a description of an address that you can enter to help you remember, it won't be broadcasted to the network. For example, if you plan to receive bitcoins from MtGox and created a new address for that, then in label field you can enter "Bitcoins from MtGox".


I would approach this using JSON-RPC with the programming language of your choice and the walletpassphrase command.
walletpassphrase "12345" 60
The 60 at the end is number of seconds before the passphrase times out and needs to be entered again. Now all you need to do is create a loop that iterates through all number combinations.
If the guess is wrong the bitcoin client will return
Error: The wallet passphrase entered was incorrect. (code -14)
If the guess is correct the bitcoin client will return
null
So all you would need to do is check for the response and if null then the guess is correct and you can stop your loop.


How does the scriptPubKey for this test vector work?

The scriptPubKey, decoded:

02085c6600657566acc2d6382a47bc3f324008d2aa10940dd7705a48aa2a5a5e33 OP_CHECKSIG OP_SWAP 03f5d0fb955f95dd6be6115ce85661db412ec6a08abcbfce7da0ba8297c6cc0ec4 OP_CHECKSIG OP_SWAP OP_3 OP_PICK OP_SHA256 d68df9e32a147cffa36193c6f7c43a1c8c69cda530e1c6db354bfabdcfefaf3c OP_EQUAL OP_3 OP_PICK OP_SHA256 f531f3041d3136701ea09067c53e7159c8f9b2746a56c3d82966c54bbc553226 OP_EQUAL OP_BOOLAND OP_4 OP_PICK OP_SIZE OP_NIP 20 22 OP_WITHIN OP_BOOLAND OP_3 OP_PICK OP_SIZE OP_NIP 20 22 OP_WITHIN OP_BOOLAND OP_IF OP_3 OP_PICK OP_SIZE OP_NIP OP_3 OP_PICK OP_SIZE OP_NIP OP_EQUAL OP_PICK OP_ELSE OP_BOOLAND OP_ENDIF

The scriptSig that spends the output, decoded:

ca42095840735e89283fec298e62ac2ddea9b5f34a8cbb7097ad965b87568100 1b1b01dc829177da4a14551d2fc96a9db00c6501edfa12f22cd9cefd335c227f 3045022100a9df60536df5733dd0de6bc921fab0b3eee6426501b43a228afa2c90072eb5ca02201c78b74266fac7d1db5deff080d8a403743203f109fbcabf6d5a760bf87386d201 OP_FALSE

So they're combined, which results in:

ca42095840735e89283fec298e62ac2ddea9b5f34a8cbb7097ad965b87568100 1b1b01dc829177da4a14551d2fc96a9db00c6501edfa12f22cd9cefd335c227f 3045022100a9df60536df5733dd0de6bc921fab0b3eee6426501b43a228afa2c90072eb5ca02201c78b74266fac7d1db5deff080d8a403743203f109fbcabf6d5a760bf87386d201 OP_FALSE 02085c6600657566acc2d6382a47bc3f324008d2aa10940dd7705a48aa2a5a5e33 OP_CHECKSIG OP_SWAP 03f5d0fb955f95dd6be6115ce85661db412ec6a08abcbfce7da0ba8297c6cc0ec4 OP_CHECKSIG OP_SWAP OP_3 OP_PICK OP_SHA256 d68df9e32a147cffa36193c6f7c43a1c8c69cda530e1c6db354bfabdcfefaf3c OP_EQUAL OP_3 OP_PICK OP_SHA256 f531f3041d3136701ea09067c53e7159c8f9b2746a56c3d82966c54bbc553226 OP_EQUAL OP_BOOLAND OP_4 OP_PICK OP_SIZE OP_NIP 20 22 OP_WITHIN OP_BOOLAND OP_3 OP_PICK OP_SIZE OP_NIP 20 22 OP_WITHIN OP_BOOLAND OP_IF OP_3 OP_PICK OP_SIZE OP_NIP OP_3 OP_PICK OP_SIZE OP_NIP OP_EQUAL OP_PICK OP_ELSE OP_BOOLAND OP_ENDIF

It checks a signature of zero-length OP_FALSE against the pubkey 02085c6600657566acc2d6382a47bc3f324008d2aa10940dd7705a48aa2a5a5e33 Obviously, that returns false. But it doesn't actually cause an error, because CHECKSIGVERIFY wasn't used. The rest of the script executes, and finally a non-zero value is left on the stack. Therefore, the transaction is valid.

Since the transaction is now in the blockchain, other clients must understand it too.

So what was this guy doing? Beats me.


Is there a lightweight blockchain parser library/server?

There are a couple available:

https://github.com/znort987/blockparser
Which is c++ based and has some basic analysis functions already written.

http://codesuppository.blogspot.com/2014/01/how-to-parse-bitcoin-blockchain.html
describes the basics of parsing the block chain and links to code written by the author of the post.

It looks like most projects don't parse it directly and use the RPC interface of the main bitcoin client.


Yes, it is possible.
This is "hard-fork" (bitcoin with other rules) or "alt-coin" (any crypto-currency with its own rules)


Is there an easy-to-use tool for creating and signing offline transactions?

You can do this using Bitcoin Core, and it'll be even easier with Bitcoin Core 0.10's watch-only wallet support.

With the current Bitcoin Core, you create a wallet on your offline machine.  Using it, you get one or more addresses (saving them, for example, to a text file).  You copy those addresses to your online computer and give them to people to pay you.  When you want to spend those payments, you create the transaction on the online computer in an unsigned form, copy it to your offline computer, verify it, sign it, copy the signed transaction back to the online computer, and send it.

Core dev Greg Maxwell has instructions for all this on his site: Offline Signing Demo.  There's another example aimed at developers on Bitcoin.org: Offline Signing Example.

The problem with both methods is that you need to know the TXID of any payments made to the addresses corresponding to your offline keys, and current (December 2014) versions of Bitcoin Core don't make that easy.  However, the next version of Bitcoin Core (0.10.0) will include watch-only address support.  So you'll take that list of addresses you generated and use the new importadddress RPC command to add them to your wallet.  The private keys will still be offline, but your online Bitcoin Core will track those addresses as if they were regular parts of the wallet.  Then you'll be able to use the listunspent RPC to get the TXIDs and vouts for incoming payments without any extra work.


What qualifies as proof of residency for AML in the USA?

There is not. You will not find a definitive list of allowable documents, endorsed by a government, regulatory body, trade group etc. You may find lists of generally accepted documents, however there is no guarantee that their acceptance is either uniform or universal.

Documents typically considered acceptable for the purposes of establishing residency at a given dress i.e. rental agreements, mortgage documentation and utility bills (such as gas, electric, water) are generally utilized (and accepted) by the financial institution as they tie the individual directly to the address thereby satisfying elements of AML/CFT, specifically the Know Your Customer and Customer Identification Programs.

Your only option is to await a response from the specific institution (in this case exchange) and inquire as to what documents they will accept in lieu of the aforementioned, if you are unable to provide them.


This won't work. Multiple instances of Bitcoin Core cannot use the same datadir. Furthermore, LevelDB does not usually work well with network storage so you probably can't even get the datadir to actually be stored on a NAS and still have Bitcoin Core work properly.

You could have multiple Bitcoin Core instances running behind a load balancer, but it probably won't be as useful as you think it will be.