What is an «open Ponzi scheme»? I recently read that Nassim N. Taleb thinks that Bitcoin is an open Ponzi scheme. An influental and intelligent person like him surely doesn't say something without thinking about it first. Therefore I asked myself what he means with that term.
In my view the key ingredient of a Ponzi scheme is deception - deception of investors about the real source of their revenue. In order to keep this deception from becoming public knowledge, a Ponzi scheme must remain «closed» in that regard. An «open Ponzi scheme» would mean that there is no deception because «the secret» of the revenue is known to everyone. Isn't «openness» exactly the necessary ingredient which would legitimize even a Ponzi scheme by making it possible to investors to «add» fair value to it, which would most possibly be Zero?
Wouldn't any asset be an open Ponzi scheme by Nassim N. Talebs logic?
I mean every investor tries to make money by selling his investment to others for a higher price at some point.
I feel that following his Logic even gold, diamonds, company shares, etc.  are «open Ponzi schemes» - our whole economy would be an «open Ponzi scheme».
If my logic would be right, this term has no meaning and someone just added a total useless term to the vocabulary.
(I don't ask if Bitcoin is a Ponzi-Scheme - I'm interested in the logic behind the idea of «open ponzi sheme»)

It's commonplace that when there's an investment or monetary instrument someone doesn't like, they call it a "ponzi scheme".
For example, gold (ie gold bullion) is indeed often called a "ponzi scheme". Diamonds and gems certainly are.
Some folks think that conventional stock market shares in the current historical era .. ie "Apple shares" or "Ford shares" are a "ponzi scheme".
So, people buy APPL at a higher and higher price, there's no intrinsic value at all (they argue), and the one and only way to make money is to sell to the "greater fool."
Note that I do not know, do not care, and don't have an opinion either way on whether or not these things are indeed ponzi schemes.  The point is, it's completely commonplace to label things like gold, or even shares as "ponzi schemes".
You can find endless discussions where certian folks think government money ("fiat money!") is just a ponzi scheme.
(Just the other day someone commented that real estate in a certain city is "just a ponzi scheme"; ie they believe the prices are un-real and the only reason to buy is to sell to a "greater fool" - until someone is left holding the bag.)
So it's completely normal and commonplace to describe something as a "ponzi scheme"
Note that the term is now used very generally (to mean "a scam" or "something with no real value"). It is NOT used CAREFULLY in an exact sense of how "the original ponzi scheme" operated.
(If you object to "the exact meaning of words changing" - whatever, would have to go live on another planet. You can immediately list huge numbers of words in English that have no connection to their "older, precise" meaning.)
Regarding the talking head's appending the trendy word "open".
It's: an attempt to be clever and attract publicity, more TV appearances, and more book sales.
It would be wildly reading too much in to it, to try to tease out the exact "meaning" of adding "open".
Here are a few other clever! phrases in the same vein:

"it's a prime based ponzi!"

"ponzi mining!"

"a ponzi scheme that's listed on major indexes!"

and so on.

An influental and intelligent person like Nassim N. Taleb

Football players make money via: creating television programming which generates tv ad income.
Bakers make money via selling buns.
"Talking heads" like Taleb make money via: catchy soundbites which generate more interviews and book sales.
It's exactly like being a tiktok'er or youtuber and generating views with shlock.

"It's commonplace that when there's an investment or monetary instrument someone doesn't like, they call it a 'ponzi scheme'."
Everything you write is an excellent answer... until you specifically mention Taleb. At this point in your answer it becomes clear you know nothing of his work.
When Taleb uses the phrase "open Ponzi scheme" he does so accurately and advisedly, not flippantly nor facetiously. It's "open" in the sense that it can be seen by all to have no basis in value—everyone knows it's a pyramid built in the clouds.
One can argue that shares in Apple are overvalued, that the prices for gold or tulips are too high.  One cannot argue iPhones are imaginary, that Dutch tulips do not exist. There's real stuff you can reach out and touch.
This is not the case with Bitcoin. Ethereum has SmartContracts and Distributed Applications, the Weimar Republic had wheelbarrows of money burnable for heat, but what real thing of some actual value does Bitcoin offer? At best, one could argue Bitcoin is a ledger of past energy consumption, but that's about it.
I can see Bitcoin hitting $100k late 2021, early 2022 before the masses start to realize the truth of Bitcoin: There's no "there" there.


Can I use Electrum seed as a paper wallet? Based on what I've read so far I'm pretty sure that what I want to do should work, but I'd like to get some confirmation to make sure I won't be causing myself  issues by screwing something up if I'm wrong.

This is what I'd to do:
1. setup an Electrum wallet in offline mode
2. write down the seed on paper
3. send the coins I want to secure from my normal wallet to one of the generated addresses
4. delete the newly setup Electrum wallet from the hard drive
5. Voila, I should be left with a paper wallet, right? With the wallet deleted from the hard drive, the only access point to the coins is through that paper with the seed written down. And whenever I want to use them, I just open Electrum, type in the seed and it'll grant me full access.

Is my thinking correct? I want to be sure I'm not missing something silly that would result in my finding out that I can't actually access the coins further down the line...

You should create your wallet from a pc that will never connect to the internet again if you want to secure your bitcoins 99.99%

If you don't have another PC, use Ubuntu Live CD/USB.

Boot from Ubuntu live cd/usb.
Install Electram, Bitcoin core, or any tools that enable you to generate wallet and create transactions.
Generate your wallet.
Write the seed (or private keys) on a paper.
Re-boot your pc.

But, in this way, you need to install Electram each time you need to sign a transaction.

DON'T USE THE EXACT EXAMPLE BELOW FOR SECURITY REASONS.

Information synthesized below should be performed on an offline computer. Address below is an example of an address of where to deposit funds. Used source code from Monero's Electrum capabilities to write a short C++ program below called inverse_mnemonics, bitcoin-explorer, and the sed command below:

256-bit hexadecimal Private Key from 25 Electrum words:

% echo "civilian dapper fully enforce tedious deodorant lava cigar shuffled wobbly when juicy hubcaps onto thwart obliged ajar trendy safety exhale cactus pheasants upright jazz onto" | ./inverse_mnemonics

5356ac2233e3ea59af8e1c9ff3c3ce7c9f67053d128b7dd75ff6cedd8682ef86

Compressed WIF Private Key:

% echo "civilian dapper fully enforce tedious deodorant lava cigar shuffled wobbly when juicy hubcaps onto thwart obliged ajar trendy safety exhale cactus pheasants upright jazz onto" | ./inverse_mnemonics | sed 's/$/01/' | bx base58check-encode -v 128

Kz1i9EK6MTd6T9PUeYwDMj2x4Rr5N8vcVWUTTG8JLK3bScGZeyGm

Associated Public Address to deposit funds:

% echo "civilian dapper fully enforce tedious deodorant lava cigar shuffled wobbly when juicy hubcaps onto thwart obliged ajar trendy safety exhale cactus pheasants upright jazz onto" | ./inverse_mnemonics | bx ec-to-public | bx ec-to-address -v 0

186EdXhyoa7EC1X33nLhQNebbreYLrccVB

It is worth noting that https://xmr.llcoins.net/ has a JavaScript that can confirm portions of the results above offline, and may be additionally applied to create an encrypted Electrum seed words in case someone has unauthorized access to your paper wallet. This is a countermeasure that behaves analogously to a portion of the BIP 38 Standard, but instead uses Electrum technology.


Where is Double hashing performed in Bitcoin? where in the Bitcoin Protocol is SHA256(SHA256(x)) performed and why?

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

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

hashing the public key to generate part of a Bitcoin addresses

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

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

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

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

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

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

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

Some related reading:

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

Senders specify a locking script and recipients specify an unlocking script. These stacked hashes confirm proof of work by the sending UTXO and legitimatecy of the recipient to receive the transaction.


What is a likely solution to Bitcoin's energy consumption problem? If the price of Bitcoin continues to climb, the total energy consumption of the system will increase proportionally at least until 2020 when block reward halves. It is not unlikely that at this point the price of Bitcoin will have increased so much that energy consumption will be unsustainable in a way that Bitcoin will be opposed by a large proportion of global society (we are still below 1% of total electricity consumption but a 10-fold price increase could change that quickly).

I see the same options that are laid out in this article:

Bitcoin will be abandoned and people just use something else
the protocol is changed to reduce the block reward earlier than 2020
the protocol is changed to exchange Proof-of-Work for something else (maybe Delegated Proof-of-Stake?)

since 2 and 3 will almost certainly result in a fork, they are related to 1. I feel that a solution will have to be found, I'm just wondering if I missed another option and which of the options is most likely.

I feel that a solution will have to be found

I'm not sure I agree there is a 'problem' that needs to be explicitly fixed. The article you linked explains the relationship between price and electricity usage, now remember that price is a measure of the demand (since the supply is fixed and known).

So the market acts as a naturally regulating force: as people pay more and more to buy and use bitcoin, the network's power consumption will increase (and vice versa). So to say "bitcoin uses too much energy!" is to say "bitcoin is worth less than the current market value!". The article linked supports this point, but you kind of have to 'read between the lines' to realize it is true.

Consider gold mining: if the price of gold were to rise, then it would become profitable to start mining gold in places where a more expensive  processes will be needed to extract the gold from the earth. Is it a problem that companies will spend a lot of energy to get this extra supply that is now worth while?

Interestingly, consider what happens if the demand for bitcoin continues to increase, to the point that the network is in direct competition with all other use cases for power. In that case, for the btc price to increase, electricity prices would have to be increased, effectively spreading the cost of mining across all of the world's energy usage (because if the demand for bitcoin did not exist, everyone would be paying less to power their home appliances, etc).

I think it is easy to say "this is a problem!!", but the less obvious realization is "bitcoin is using this much energy because the market considers it useful enough to be worth the cost"

  I'm just wondering if I missed another option and which of the options is most likely.

I don't think any of the three options you listed are likely to happen.

Another 'option' to consider is this: once mining chips become commodity (more easily and readily available from multiple suppliers), I think the nature of the mining competition will change. If everyone has access to good ASIC chips, then there will be immense competition to develop and utilize the cheapest sources of power available. What if bitcoin miners must help fund the development of ultra-efficient solar panels in order to maintain a competitive advantage? This is how ASIC miners were developed, why can't the same happen for another variable in the mining industry?

If this occurs, rather than the energy consumption of the network being a problem, it becomes an incentive for finding a solution to the larger issue of 'needing to develop green sources of power'.

Lightning network could be answer but if is not we can always do fork on bitcoin to upgrade to different system, so we can keep Bitcoin name, users and amount of each address. I also see no reason why in the future they could not make one joint fork on the top 5 cryptocurrencies with migration to one "multicurrency" coin and keep it old max supply of each coin (This is just a suggestion that could be developed). Only consensus is needed.


16 word recovery phrase for blockchain wallet not working I downloaded my blockchain wallet but now i forget the password and my recovery phrase is 16 word, so I tried them but they are not working. Can somebody please help me?

Above answers regarding seedrecover.py and BIP39 are wrong.
Blockchain.info legacy wallets can use any number of words from 15 to 21 or more. The number of words changes depending on your password length.
The words are NOT a part of the BIP39 seed words and seedrecover.py will NOT be able to find the missing words as it is based on a completly different algorithm.
Blockchain.info used their own wordlist composed of over 50000 words not compatible with the BIP39 wordlist pre 2016. From 2016 they started to use 12 word seeds compatible with BIP39.
Your seed is either missing a word or you have entered a wrong word.
The seed does not contain your private key like the BIP39 seed words, instead it has your wallet ID to login to blockchain.com and your password. In rare instances the seed only contains your username and pass, that is if it was created pre 2013.

You had to chose a password and write down the seed to make it secure. You can't access your wallet without password or seed. Otherwise, someone could easily steal the coins. So your only possibilities are

(1) remembering the password.

(2) You said that your seed (16 words) did not work. Maybe you wrote them down incorrectly. If your wallet supports the default BIP-0039, you could look up the words and check them here: https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt
Maybe you wrote "odd" instead of "add" or smth. like this down.


Does there exist any cryptocurrency that doesn't tend to centralization? All PoW schemes tend to concentrate miners in pools to have a more steady income for the miners, while the major PoS coins, such as NXT, also end up concentrating the stake because of leasing. But, does there exist any cryptocurrency that doesn't tend to centralization?

With P2Pool there's no central pool authority so it's as decentralized as it gets. The problem is that miners don't like to use it because it requires a copy of the entire blockchain. I hope this gets fixed with new bitcoind version that allows to prune and delete some history, and would therefore allow to run full nodes with less effort.

No. It is impossible. People always want to have more money/power than others.


Is it possible to send bitcoins without paying a fee? I am using the 0.4.0 release. Is it possible to send bitcoins without paying a fee?
Who gets the fee ? Is it only miners discovering new blocks?

It is possible to send Bitcoins without paying any fee. The easiest way is if your transaction meets the following requirements:

The transaction only sends coins to one address, plus the return of change. (No more than two 'out' scripts.)
The transaction doesn't need to gather a large number of small transaction outputs. (You are spending funds you received in a sensible way, not as a large number of micro-transactions.)
The funds are stable. That is, you aren't spending funds you recently received.

Otherwise, the transaction fee goes to the miner who includes your transaction in a block.

Currently, it is possible to get any valid, standard transaction into a block without paying a fee if you are willing to be sufficiently patient. You may need to specifically configure your client to connect to a client known to accept such transactions and known to relay them to miners. (Luke Dash Jr. runs one such node, with IP address 173.242.112.53.)

Sometimes Services provides Something that just work…

https://pro.coinbase.com/ pays miners fees for you.


Is there a way to identify number of wallets opened by an exchange This is precursor to a data science question.
Essentially, I am trying to map bitcoin's price to the number of wallets opened today on an exchange.
It's quite common that the users would put in a buy request tomorrow, so a time series can be applied.

You won't be able to see the number of wallets, but you could get quite an idea by looking at the number of adresses an exchange generated.

( Exchanges such as poloniex only have 1 wallet for all their customers. )

See https://www.walletexplorer.com/wallet/Poloniex.com/addresses

I'm not entirely sure if walletexplorer also tracks coinbase adresses, but in the case it doesn't, you can use http://matbea.net

They currently track over (28.500.000+) coinbase adresses.

https://blockonomi.com/matbea-trace-bitcoin-address/

^^ (I wouldn't recommend using their webwallet though, and i'm also not saying that this is 100% indexing all adresses.)

For example, using matbea.net, i was able to identify 1DUiLkf34q7MVxtRkMAXVtP42UNGRrbftY  as a coinbase adress.

https://www.walletexplorer.com/wallet/000001e522b362b7?from_address=1DUiLkf34q7MVxtRkMAXVtP42UNGRrbftY

No.

No one ever creates Bitcoin wallets, they instead just use an empty one. The process of starting a new Bitcoin wallet is by cryptographically generating a private key. From the private key, you can derive a public key and a public address which you then distribute as the recipient of a potential Bitcoin transaction. These keys are generated randomly, so there is a chance, despite its minimal possibilities, that the key your wallet produced ends up the being the same key that someone is using today. This key could have funds that are spendable, and you just got access to the private key to their wallet. Now, the chances that someone ends up generating a private key that is, or was, being used at all is 1/(2^160).

Imagine every bitcoin private key was a grain of sand. There are, approximately, 2^63 grains of sand on earth. Now replace each grain of sand on earth with the earth itself, making there be 2^63 grains of sand in place of each grain of sand there already existed. Now, if you add up all this sand, you will have 2^126 grains of sand, which is still 0.0000000058% of 2^160, being the total amount of possible addresses.

Now with all this information, try and find out which of these addresses Coinbase has chosen. It's impossible.


What's the easiest way to someone to double-spend 0-confirmation transactions? I heard there is a desktop app today that 'easily double spends 0-conf tx'. Which is it? Is anyone working on a mobile version of this app?

Peter Todd wrote [Replace-By-Fee Tools](https://github.com/petertodd/replace-by-fee-tools
)

  Basic usage:

  ./double-spend.py <address> <amount>

  Creates two transactions in succession. The first pays the specified
  amount to the specified address. The second double-spends that
  transaction with a transaction with higher fees, paying only the
  change address. In addition you can optionally specify that the first
  transaction additional OP-RETURN, multisig, and "blacklisted" address
  outputs. Some miners won't accept transactions with these output
  types; those miners will accept the second double-spend transaction,
  helping you achieve a succesful double-spend.

Nonsense. You need the private key to send coins from an address, only the owner of that key can attempt to spend the same coins twice.


Blockchain Address gap limit solution I want to use blockchain API for my store but the wallet only monitoring last 20 generated address.

Quote from https://blockchain.info/api/api_receive:

  As defined in BIP 44, wallet software will not scan past 20 unused
  addresses. Given enough requests from this API that don't have a
  matching payment, you could generate addresses past this horizon,
  which would make spending funds paid to those addresses quite
  difficult. For this reason, this API will return an error and refuse
  to generate new addresses if it detects it would create a gap of over
  20 unused addresses. If you encounter this error, you will either need
  to switch to a new xPub (within the same wallet is fine), or receive a
  payment to one of the previous 20 created addresses

I googled about this problem and found some solutions such as:

Solutions that I found

Check gap with blockchain checkgap API and don't generate new address until they have been paid.
Increase gap limit on the receive api.
Send money to the last unused address.

Problems with these Solutions

If I have 20 unpaid address and they never been paid, solution #1 can not solve the problem. it just say I have 20 unpaid address.
Solution #2 can not solve the main problem. Even I set the gap limit to the 100, How about the time that 101 curious users only want to see the checkout page and close it. I will get 100 unused address again.
Solution #3 is not a nice solution to me. It seems like a bad practice to me and this is a solution that solved by spending money.

My Solution

If I get it right, when Blockchain generating the address, It will be there until it's getting paid. Correct me if I'm wrong, Blockchain will not callback until the user pay the amount. so I do this to solve the problem:

Check the gap by API. If gap>19 goto #3 else #2.
Generate the address and store it inside unpaid_address table based on the "index number" that blockchain returns with address. set expiration time for 30 minutes and go to the #4.
Get the first expired unpaid address from unpaid_address table. If there isn't anything, show sorry server is busy, else goto #4.
show the address to the user and say you have 15 minutes to pay to this address. (15 minutes less than expire time to avoid problems).
If blockchain callback my URL and It has been paid before the expire time, I remove the address from unpaid_address else the address has been there for the next request by other user. I will give that address to the next user for paying.

Question

This solution give me the ability to never exceed gap limit. But I don't know if it's safe to give the address to a user and if he didn't pay on 30 minutes, give it to another user.

What do you think? Is it safe? or is there better solution?

About giving the address to multiple users

First user see the checkout page in 8:20AM and send the amount to the address. but there is no confirmation in 15 minutes. the confirmation come in 11:00AM.
Second user see the checkout page in 9:00AM and send the amount to the same address. there is confirmation in 9:10AM so I will return callback result as paid.

What about the first user confirmation on 11:00AM?

Blockchian.info is not really qualified to provide Bitcoin API's for business, 20 empty addresses are really cool and enough as a personal wallet but for business, it's not.

I suggest you find an alternative or use some payment gateways, or you can do the following but it's not really recommended.

Increase 20 address limit by getting more than blockchain wallet, When some user create an address check gap if it's over 18 change the xPub to the next xpub and go on.
15 min time limit, if the user didn't pay within 15 min, give it to another user. Note: You don't have to wait for confirmations. Once you receive a transaction mark those addresses so you don't give them to another user.
Before you reach address number 20, pay a small amount automatically to that address so you get another 20 address.

UPDATE:

You can't create an xpub Programmatically (using blockchain.info api), but a new wallet

https://blockchain.info/api/create_wallet

You don't really want to do that, you can create like 5 xpub's keys and store them in your database, and just sweep between them.

Settings --> Addresses --> + ADD. Click To create a new xpub key.

Manage --> Show xPub. To get your extended public key (xpub).

I use Electrum and update grap limit to 100 then use blockonomics,

I tested blockonomics and it works great fixing gap limit problems.


-SOLVED- I was Making a new genesis block and i got this error following this guide i solved my problem
my psztime was so long so i had to make it short and all were solved :) it successfully compiled and run pretty well

I was making a new genesis block, all was successfully but when I launch the new

 main.cpp:2747: bool LoadBlockIndex(bool): Assertion
 `block.CheckBlock()' failed. Aborted

I don't know what that means. I replaced the block.GetHash(), the hashMerkleRoot and also the block.nNonce in to the corresponding files but it won't work.

Anyone knows what is wrong?

This is my dump

CBlock(hash=000008d24b2b4473cf5ceb4c858b31dbd4d812c20cb5a6d60002e55a88cf6bf3, ver=1, hashPrevBlock=0000000000000000000000000000000000000000000000000000000000000000, hashMerkleRoot=00a51fca8509df84304bc58ee4da87b67552829d83c19faaea3358dc9a582cc6, nTime=1508815578, nBits=1e0fffff, nNonce=80207, vtx=1, vchBlockSig=)
  Coinbase(hash=00a51fca85, nTime=1508815578, ver=1, vin.size=1, vout.size=1, nLockTime=0)
    CTxIn(COutPoint(0000000000, 4294967295), coinbase 00012a4c8a4f6e65206772657920656c657068616e742062616c616e63696e6720537465702062792073746570206f6e2061207069656365206f6620737472696e672048652074686f75676874206974207761732073756368206120776f6e64657266756c207374756e7420546861742068652063616c6c656420666f7220616e6f7468657220656c657068616e74)
    CTxOut(empty)
  vMerkleTree: 00a51fca85
block.GetHash() == 000008d24b2b4473cf5ceb4c858b31dbd4d812c20cb5a6d60002e55a88cf6bf3
block.hashMerkleRoot == 00a51fca8509df84304bc58ee4da87b67552829d83c19faaea3358dc9a582cc6
block.nTime = 1508815578
block.nNonce = 80207

What to do?

Following this guide solved my problem my psztime was so long, so I had to make it short and they all were solved :) It successfully compiled and ran pretty well.


What is the most optimal way to parse a raw bitcoin block with python? Let's say one is connected to a zmq socket and listening for rawblock. How you'd parse the block header is as follows:

block_header = raw[:80]
version = block_header[:4]
prev_merkle_root = block_header[4:36]
merkle_root = block_header[36:68]
timestamp = block_header[68:72]
bits = block_header[72:76]
nonce = blockheader[76:80]

But, what is the best way to parse all the transactions in the block? Converting a rawtx to a tx object is easy, plenty of libraries do it. But what is the best way to parse a variable length block of txs?

We will compare modern libraries with segwit and bech32 support.

First will be pybtc from bitaps.com, second will be btcpy from chainside.net

Our test code:

import time
import pybtc

f = open('raw_block.txt')
fc = f.readline()
qt = time.time()
block_hex = fc[:-1]
bt = pybtc.Block(block_hex, format="decoded")
print("pybtc library parsed block in decoded format", time.time() - qt )

qt = time.time()
bt = pybtc.Block(block_hex, format="raw")
print("pybtc library parsed block in raw format", time.time() - qt )

from btcpy.structs.block import Block as btcpy_block

qt = time.time()
block = btcpy_block.unhexlify(block_hex)
print("btcpy library parsed block", time.time() - qt )

Raw block that used you can download here

Test results:

pybtc library parsed block in decoded format 0.3380300998687744
pybtc library parsed block in raw format 0.0953378677368164
btcpy library parsed block 0.6518878936767578

You can see that pybtc block parse performance is better. Decoded mode means that all bytes converted to hex and addresses to base58 or bech32. Raw mode faster, but all objects in raw bytes, addresses stored as hashes.

Check this library pybtc

Class to decode raw block
https://github.com/bitaps-com/pybtc/blob/master/pybtc/block.py#L5


Why does this transaction use the same address for multiple inputs? Why does this transaction include the same address multiple times? Was this done to "hide" the two other addresses where funds originated?

It is hard to guess on "intention" of the sender. But let's say I collected many small payments (some Satoshis) in my system. Similiar like many small pennies or cents in a FIAT wallet. Then I have for each payment a UTXO. Now I want to transfer all these little payments (or pennies and cents). The wallet has to collect all UTXOs from that address, and create one output for it. This makes then appear many small amounts from the originating address.

Further detail: I had collected many small amounts at the beginning via  bitcoin faucets, then had many, many small amounts in my wallet, and then transferred it. E.g.: https://blockchain.info/de/tx/c9908124e59a2794f3807b366be7d235ff7654251adcdf396e209236341b3c32

you've got a misunderstanding here because you have no Idea how a transaction actually works in the blockchain, there is no such thing as address balances, all an address has is references to prior addresses that have sent funds to it,hence when an address wants to spend its received funds,it uses the 'inputs' section to refer to their parent transaction outputs,for each one it creates a signature signed by the private key plus the public key.
30440220140048ae789901e73f0644433858de76d762fb37d904e3ad07cfd25bf81255700220545518ea9ed0f866e8088a369d061d068ac5c0644f6782770d6004d8bc39a23b01(signature)
0224e4d74883713b9f6170adf3f8224eabfaacf082b126022827002efdc74aeb02 (public key)


Is there a secret number that is only known by the sender and the receiver after making a transaction? After making a transaction and receiving all the hashes and ids, is there a number that is secret and only the two people involved in the transaction know?

Yes. You can view a transaction as being a public link between a number of public keys. If different people have the secret keys for those public keys then they have all the necessary information to calculate shared Diffie-Helman elliptic curve points. So in the simple case that you transfer all the bitcoins in an address to someone else's address then you can use his address and your private key to calculate a point which will be the same as the point calculated by him using his private key and your address. Nobody else can calculate these points.

No.

This is because the receiver does not play any role in the transaction. They don't even have to know about it. The transaction actually takes place between the sender and the bitcoin network, and the sender needs to have a private key which (hopefully) is secret.


What site should I use to create a Bitcoin wallet? I wanted to create Bitcoin wallet but I saw there are a lot of websites or software to create it. It's not like paypal.
I am thinking to chose Blockchain. Is it good? How to check if it's legal in my country?

I wouldn't recommend Jaxx wallet since, several weeks ago, it was found exploitable, giving an attacker the possibility to retrive your 12 words seed .
Usually, you choose a service that gives you the full control and ownership of keys. Blockchain.info doesn't give you this option.
Some service I would recommend are GreenAddress and Samurai Wallet.

I am using Jaxx! I think it is good, because is platform agnostic and handle different digital currencies.

https://jaxx.io


What Bitcoin wallet will allow me to participate in an ICO? I have bitcoins stored in an online Coinbase wallet. I've read this wallet should not be used for investing in an ICO as this will be Coinbase's wallet (not mine) and I won't have access to the private keys.

Is this true?

I looked into creating a multi-sig Coinbase vault as this seems like a good and safe middle ground. However, I noticed the vault has a 48 hour waiting period which is not desirable for buying into an ICO.

I'm running Mac OS X. Is Electrum wallet this best way to go about this?

What do people recommend?

Coinbase is mostly used to buy Bitcoins and hold your bitcoins, It is indeed YOUR WALLET, the vault portion of it is actually the best feature they have. You are required to confirm removing the coins often via your phone, and two email address and it gives you 48 hours to cancel on any of the devices.

In my book, this is what a vault means to me, multiple check points before they even move anything out.

Then once they are out they can be moved to any address of your choosing.  Including exchanges like HitBTC which is one I like to sale BTC / BUY ETH for instance, or to another coin or ICO. Most coins I mine can be sold, to purchase BTC and return the funds to Coin Base, and added to the vault for long term.


How does the network know my current balance? Maybe I haven't yet fully understood how transactions work. And if so, please forgive me my stupid question.
But I assume it to be "just" a digitally signed message like "send 1 BTC to Bob" where Bob is identified by its public key (of course obeying to some protocol). The transaction is then signed with my private key which prevents later modification and then sent to the network for hashing and block-building...
I'm not sure how Bob is notified of the transaction.
Does his client software really have to parse the block chain to find the transaction where his public key is listed?
And even more interesting is the question how the sender of the money is restricted to only send as much money as they have? Is this all managed by the Bitcoin client?
If so, I could write my own software which just uses the (or: any) amount of (Bitcoin) money together with the recipient's public key and build the transaction ASN specified somewhere in the protocol.
Who checks the balance and when is it checked?
Does my Bitcoin client fully dive into the block chain and calculates the balance?
Is this then trusted by the network?
Or does the network (e.g. when building and hashing the block) also a verification of all the public keys from their first transactions on?

The network doesn't know your current balance.

The bitcoin network doesn't use the concept of "balances".  Instead the Bitcoin ledger tracks assignments of value.  So every bitcoin that exists was initially claimed by a miner, and then there have been assignments of value ever since.

Now a bitcoin client can show a "balance" for an address but that balance is simply the result of looking at all the transactions for an address and determining which payment assignments made to that address remain unspent.

An unspent transaction is referred to as an UTXO (unspent transaction output).

So a balance for an address is simply all the UTXOs for that address.   This can be determined from the blockchain.  This is a huge amount of transaction data but that's why the Bitcoin-Qt/bitcoind client uses LevelDB which is very efficient at retrieving from a dataset like the blockchain.

Let me explain the balance calculation in terms of implementation.

Balance is nothing but the summation of all outputs amounts, this user has gotten so far(right from the beginning of chain). And to calculate this value, we have to iterate over all the transactions-outputs objects which belong to this user and add them all. This simply means that all amounts that this particular user has gotten so far.

But while calculating the balance, we also have to keep in mind that, the user have spent some money or not. If he has then, we only have to add up those outputs which he got after his latest spent transaction.

So these are the steps to calculate balance:

Fetch all transactions from block, right from the block 0 by iterating over Blockchain.
Get the timestamp and amount at that timestamp of his latest spent transactions.

To get latest spent tx, first get all transactions that were created by this wallet i.e txs whose inputs is his public key.
Now get the most latest tx done by him.
Get the timestamp of that latest tx.
Also record the balance at time point of time.

Get all the outputs to his address after this timestamp and add them all along with the recorded balance to get the whole balance.


Is there a user-friendly tool for creating and signing raw transactions? The title stands for itself.

The only tool for doing so I know of is the bitcoind daemon, but it is for from user-friendly.

A web-tool in JS would be ideal or a simple CLI tool with clear documentation.

Electrum has a gui form for just that. Also I think brainwallet.org has a web form that works offline and runs off github source directly so you can verify privacy concerns.

Edit: also see:
http://bitcointalk.org/index.php?topic=40264.msg851062#msg851062

As referenced in Transaction signature generation

maybe it is a little bit too late, but brainwallet worked the best and I have just quickly uploaded the version I had to some file hoster:
http://s000.tinyupload.com/?file_id=05407254289290446372

(I dont remember exactly, but I think this is the original zip-file I downloaded in April of 2013)


Can sendtoaddress use account other than ""? sendtoaddress is using the "" account by default. Is it possible to make it use any other account name?

Accounts are deprecated and labels are the alternative for accounts.
I'd recommend using latest Bitcoin 0.17.0 which has multi wallet features which can isolate each user, further read:

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)#Multi-wallet_RPC_calls
https://github.com/bitcoin/bitcoin/pull/13058

First do move command to move bitcoins from custom account to "", for example

bitcoin-cli move "account_with_bitcoins" "" amount_to_send

And then use sendtoaddress

bitcoin-cli sendtoaddress "address" amount_to_send


What exactly is XBTC? What is xbtc? I saw many articles refered xbtc,just like "btc to xbtc". But there's no material telling what it exactly is.

XBTC is an asset representation of BTC in Counterparty.
Apparently, you could send Bitcoin to a Counterparty gateway, and get the same amount of XBTC back in turn. These could then be traded for other Counterparty assets. The operator of that gateway claimed that it was cheaper to trade thusly than on Bitcoin exchanges.

I've found an announcement for a XBTC gateway here: XBTC Gateway released. It appears to me that the service has since been shut down due to regulatory concerns.

XBTC is the combination of  ISO 4217 currency code XBT and the name BTC, which is also commonly used to represent one bitcoin, but it violates ISO 4217 because it begins with "BT", the country code of Bhutan.

This is what is known as a blended word, which Lewis Carroll called portmanteaus, naming them after a suitcase that unfolds into two equal parts.


What are the options available to convert Bitcoin to Paypal USD? I have, recently, started earning some Bitcoins from CoinURL.com. I want to know all the options available for converting these earned Bitcoins to Paypal USD.

The factors that matter for any cash-out decision are:

Where are you located (country)?
How much are you looking to trade?
What type of cash are you looking to receive?
How soon do you need access to the proceeds?
Is privacy important?

Specifically for cash-out to PayPal, options include:

http://snapswap.us/#/paypal (You'ld need to do BTC -> XRP first though. http://Shapeshift.io lets you do that.)
http://www.VirWoX.com  (BTC --> SLL, SLL --> USD)

Other ones that are not as widely known -- proceed at your own risk:

http://www.btctopp.com
http://www.exchangemycoins.com/pages/sell-bitcoin-paypal
http://order.payexchanger.com/index.php?a=add (You Give="Bitcoin", You Want="PayPal")
http://24pay.me

What might exist is a service that lets you pay for charges with Bitcoin and then the recipient gets to withdraw the proceeds of the sale using PayPal. So you would simply need to sell to yourself.

For example, I see that Fiverr accepts BItcoin for payment: http://blog.fiverr.com/fiverr-now-accepting-bitcoins and I believe they offer withdrawal via PayPal http://www.youtube.com/watch?v=px_eYHCgGZ4. So you simply would create two accounts, list a task, and transact with yourself. Obviously the account for buying (and paying with Bitcoin) would need to be something that you wouldn't want associated with your real identity. Additionally, you probably want to do the listing with one IP address and the buying on another just in case they check for that kind of stuff.

Maybe when PayPal is a cash-out method for Amazon (coming, apparently http://recode.net/2015/04/09/paypals-big-change-it-can-work-with-amazon-after-ebay-split/ ) then maybe you can sell to yourself (buy Amazon gift cards to pay, then cash out to PayPal from the proceeds of the sale to yourself.)

BitLanders is another service that lets you trade with yourself, paying with Bitcoin and withdrawing in PayPal. Also, apparently if your sales aren't enough to cover your withdrawal amount you can make up the difference with Bitcoin.

You should try using localbitcoins. they have an option to sell bitcoin for paypal and vise versa and the sellers are legit. There are limits and there is a commision % but the sellers have high reputation and are reliable. For a detailed tutorial how you can visit this blog: http://www.btcfeed.net/tutorials/convert-paypal-to-bitcoin/


How can Bitcoin work with Ven? Bitcoin and Ven seem to have very different properties, so are there any complementary ways for them to interact? Maybe with Ven acting as a universal fiat representative?

At present I'm not aware of any ways that Bitcoin and Ven interact, but from what little I know of Ven there's no reason they couldn't interact in the same ways as any traditional currency. I see no compelling reason why a Bitcoin<->Ven exchange couldn't be opened, though I don't know if Ven allows chargebacks. Ven might also be useful as an analysis tool, since it essentially represents a "basket of currencies" and therefore the price of Bitcoin in Ven might be a better indicator of Bitcoin's actual worldwide value since differences in value of local fiat currencies would have less of an effect on the BTC/VEN price than say BTC/USD or BTC/PLN.

Update: Apparently, Ven is a private, local currency which cannot be converted back into other currencies, so the above may be inaccurate. Ven does allow private exchanges, though, so it may still be possible to build an exchange.

Ven does allow person-to-person (P2P) transfers, so just like how over-the-counter (OTC) transfers occur enabling the conversion from PayPal to BTC, anyone wishing to give up their bitcoins in exchange for Ven, or vice-versa, can do so as long as they find a counterparty willing to trade.

I might have been the first to offer to exchange my Ven for BTCs.  At one time I had an open listing on the #bitcoin-otc marketplace.  I've never known of anyone holding Ven nor have I seen anyone wishing to exchange the Ven currency.

I currently have 15.0 Ven available.  The exchange rate is about 1 Ven = $0.10 USD.  At about $4.50 BTC/USD that means the BTC/Ven is about 45.0.  I'll even double that -- and give up my 15.0 Ven for just 0.15 BTC.  Any takers?

The Hub online store has goods and services you can purchase using Ven, but the prices are not competitve from what I've seen.  e.g., if you were to convert the price in Ven to dollars using the exchange rate, the listed price is much much higher for the same item than the price from other merchants.

I suppose if there was a distressed sale by someone who held a fairly large enough amount of Ven then the buyer could use the Ven to exchange it for something like bullion sold through the Hub Culture online store and then make a profit doing that kind of trade.

But if you'ld like my 15 Ven, make me an offer. :-)

I'm on the #bitcoin-otc marketplace (IRC channel).


Can multiple small graphic card memory collect more mining hash rate If I set multiple 3GB GTX 1060 , It can generate more hash rate than single GTX 1070 6GB.
Can I still mining ETH by this 3 Gb cards when the bloCk size of eth is over 3 Gb.
EXPLAIN ME.

Currently you can not do that.
DAG should be loaded to card's memory to mine. Current miner software do not support this kind of cross-card memory management


Can anyone intersept & redirect? Be kind! It was my first time!
Is there anyone out there that can intercept this transaction? Or redirect it to just return to the wallet it came from? It was my first transaction and I sent BCH to BTC. Expensive lesson!
1edfdf8e76e8e46fe5c1034ee129efd92b4b5d8f15004ae5acf1b961a176a809

Your only hope would be getting that private key for your bitcoin address! Once you get that then import it into bitcoin cash wallet. You should be able to see your money and send it accordingly


Scenario: disaster splits the Internet into dozens unconnected fragments Major US cities restore connectivity locally for a couple of days, but the internet islands are separated (or have very poor interconnectivity).  Two days later, connectivity is restored resulting in, say 50 separate blockchains full of transactions.  NYC leads the pack with 5% of all transactions and is the dominant chain.  How do we reconcile 95% of the transactions (from 49 chains, less than 5% each) ?  Would anyone in their right mind use bitcoin in times of trouble?

Most merchants accepting Bitcoin transactions require six confirmations, so if there is no connectivity then, of course, there would not be any confirmations.

So while continuous connectivity isn't required to use bitcoin in commerce, at least sporadic connectivity is.

For merchants who accept on 0/unconfirmed (e.g., retail), the rely on protection from the network to know of a race attack.  Without connectivity, that protection is gone and the merchant is vulnerable.  If the customer can be trusted, then a transaction on 0/unconfirmed can be accepted even without continuous connectivity.

For when extended outages occur, there wouldn't be multiple blockchains as there's no chance some isolated node (or region of connected nodes) would have the hashing capacity to make it to even one or two confirmations nonetheless six confirmations.  So there's no isolated forking issues to be concerned about.

Futher discussion on the suitability of bitcoin on an "disconnected island" occurs here:

http://bitcointalk.org/index.php?topic=106302.0

I can see a close system being very helpful for local businesses. Imagine I want to go to dinner. After eating I pay for it through a terminal connected to the rest of the offline system the restaurant uses as they do now when inputting order, discount's etc. Go to the grocery store and pay for your food at the checkout, (closed system) Yeah, it does nothing for purchasing online, but would it be that difficult to go down to the municipal building to pay your water bill?


Can Bitcoin Help with a devalued currency? I worked in Canada, in the Oil industry, CAD took a big hit in the exchange versus USD, can anybody advice me if transferring my money to Bitcoin can help me increase the value of my savings again?

Since I do not live in Canada anymore and I need USD.

See the comments above, but the answer to your question is that the exchange will happen at the "instant" exchange rate.

So, whatever value CAD is at when you do any kind of exchange, that is the value you will get.

In terms of increasing savings, all you can do it make sure you exchange it for one that is rising.

I had made an investment into DAO tokens, via Etherium, when it was $12.xx about 11 months ago. Then the DAO was hacked (lol) but the community made a concerted effort to fairly allow all depositors a full refund, along with a 3% premium to be paid out in ETC (ethercoin classic).  Lo and behold, my $700 U$D is now running ~$3500+ in just under a year!

You must find a crypto-currency that is rising against your CAD inputs. BTC is a good vehicle, but the ETH and ETC have a bit higher upside at times. My $700 U$D, had it been left in BTC would be roughly worth $2100 today. I got the DAO tip from a friend (free) who is now a Crypto-Currency Investment Adviser.

If you study the situation yourself for a bit, you can likely make a good choice. Some people play the DOGE Coin cycles, but you have to watch it close!


bitcoind sync time incredibly slow I am currently running bitcoind v0.16.0.0 on my macbook (osx 10.12.6) and the initial sync time is really slow. I'm syncing at roughly 88 blocks per hour which would mean it would take another 2 months to sync up..
In the activity monitor it looks like bitcoind is using only 3% of the CPU time.
Could this be the issue? Is there any way to speed it up?

Yes there is. The bottleneck is I/O speed and normal HD drives are really slow. You can move the chainstate directory (around 3GB) to an SSD. If your laptop doesn't have an SSD you can use an SSD thumb drive.

There are instruction how to do that in the wiki. I did that using an usb stick SSD and the whole chain synced in a liitle less than 12 hours.

So I changed the location of the directory to my own HD instead of my external HD and increased the database cache. Now it runs like a charm.
Thanks guys


What technical reasons exist for off-chain transactions? I'm trying to get a grasp on off-chain transactions, as they seem more common than I initially realized but they are not the way that I originally perceived bitcoin being used as an outsider looking in. What technical advantages exist for off-chain transactions?

Speed
An off-chain transaction can complete instantly, without waiting for confirmation.

Naming
With off-chain transactions, you can send Bitcoins to another user by referencing their username, rather than typing in an address.

Possibly lower transaction fees, possibly fewer on-chain transactions
Depending on how many transactions happen off-chain, it can save space on the blockchain. However, if there's only one off-chain transaction, it will end up consuming more space. (The coins will travel from User A -> Off-chain transaction provider -> User B instead of User A -> User B)

(Related to #3) It makes it feasible to have lots of very small transactions. For example, you might use off-chain transactions to pay someone a microfee for every minute that you use their wifi.

Virtually nothing... once blockchain trimming and instant transactions built directly into the coin are implemented, which are much better ways to deal with the issue.


parameters for bitcoin QRCode im reading up on this page ==> https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki

I am currently trying to incorporate a message in the qr code but when i proceessed the qrcode it pulled the amount address and amount correctly. but the label didnt seem to appear or the message at all anywhere. i am using blockchain.info and block.io.

I decoded the image and the string is what it should be.

Where is the message stored so customers can view it at a later time?

Issue resolved. I chose to exclude it as it was no real purpose.


What would a new exchange need to be better than the rest? If a new crypto v crypto exchange were to be built and launched. What would tempt you to use it rather than what you currently use? Or what improvements would you like to see from the way things work now.

A popular opinion in the Bitcoin space is that transparency is key for Bitcoin businesses. Bitcoin and it's pseudonymous nature make it very suitable for scams and corruption.

Competitive fees or additional payment options are no longer the key to the success of an exchange. There are so many exchanges that you can almost certainly find what you need feature-wise. However the important question that remains is whether the exchange you found can be trusted with your money.

Proof of Reserve

Fortunately, the nature if Bitcoin's technology also has a positive side with regard to transparency: the Bitcoin block chain is public and everyone can verify it.

This allows for the possibility of exchanges to verifiably proof that they hold all the money of their customers. CoinDesk explains this here. Some exchanges like Kraken have recently published such proof of reserve.

An ideal situation would be for an exchange to provide a method that allows users to constantly verify of their money is still there. F.e. by keeping every customer's coins at a fixed address (this could be quite costly) or publishing a proof of reserve on a weekly or daily basis (this could be done automatically).

It's time to reach the mass with all media attention so Safe, Secured, and Easy to trade should do it. Now you're looking at the average Joe not innovators or early adopters!


Increase a transaction fee in bitcoin core I marked my transaction with "Request replace-By-Fee"* in my bitcoin core wallet, and now while I can increase the transaction fee, I can only increase it by a tiny bit, and I can't set it to what I really need. (forcing me to increase the fees 15 times in a row)

Is there any simple way for me to increase the fee more significantly without creating all of these intermediate transactions?

* By the way, a very bad name for "allow future fees increase"

The bumpfee RPC command takes a "totalFee" argument. When passed, this is the total fee that will be used for the replacing transaction.

Instead, what I did was to run the wallet again and make it forget unconfirmed transactions using:

C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe --zapwallettxes=1

And removed my local copy of the mempool. (A file called mempool.dat in bitcoin's data folder)

(Took about an hour to rescan)

And then making another transaction to the same destination with higher fees (Made from the same source node, so only one of these transactions could occur, nullifying the other)


Correlation between Ripple and Bitcoin Is there a correlation between the value of Ripple (XRP) and Bitcoin (BTC)?

Bitcoin and Ripple's past 90 days prices somewhat correlated

Using price charts of the last 90 days in XRP/USD and BTC/USD, the daily prices of Ripple and Bitcoin appear to be somewhat correlated: Their correlation coefficient comes out as 0.741.

Correlations in Coingecko's Top Ten

I've proceeded to check the past 90 days correlations of the top ten cryptocurrencies as listed on Coingecko.com:

In the past ninety days:

Litecoin and Bitshares had a correlation of 0.93, as had Litecoin and NXT.
Bitcoin appears to be most correlated with Ripple and Litecoin, both 0.74.
Bitcoin appears to be least correlated with Stellar, at -0.19
The least correlation appears to be between Dogecoin and Monero at -0.05.

Procedure

All data was taken from Coingecko's last 90 days pricecharts on 2015-06-08. Therafter, I plugged them into LibreOffice, and ran Correl(A;B) on each pair.

In general, when bitcoin is rising, all the others cryptos do, and vice versa. You can say that bitcoin is leading the crypto in general, so any upthread in bitcoins rate usually leads to the raise of most of the alts


How can one download the bitcoin client securely? What is the correct procedure to download the official bitcoin client, and validate it was signed by the developers, and not infected with any malware by a man in the middle?

Jeff Garzik signs every release with his GPG key (also here). You can find release announcements (such as this one) on the SourceForge.net Bitcoin development list.

To verify the signature on a release, obtain the key from the link above. Obtain the release announcement from the link above. Obtain the download from any source. Then point GPG at the release annoucement (or the signature block from it, including the BEGIN and END lines). GPG will ask what file you want to verify, pick any of the ones listed in the signature certificate. It will then tell you if the release is identical to the release Jeff Garzik signed.

Generally if you want it really secure you go to the official source, download it, inspect the code, then compile it yourself.

Otherwise just check it versus the md5 hash or sha hash.


How to use "lockunspent" in bitcoin core wallet console? Try to use the Lockunspend RPC in bitcoin core wallet console. But always get wrong, and google it can't find answer.

My input is:

lockunspent false "[{"txid":"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c","vout":0}]"

Is anyone can teach me where I am wrong? Thanks

The problem is, you should to escape the inner quotes:

lockunspent false "[{\"txid\":\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\",\"vout\":0}]"

Try double quoting

lockunspent false '[{"\"txid\"":"\"c3fa34606ae3ea416ff640d97414ef6a0a8afcebfbe2c60403ad60c0d961f04c\"","\"vout\"":"0"}]'


Import wallet.dat into a new Bitcoin-Qt client I had Bitcoin-Qt on my computer with several bitcoins in my wallet, using Vista. Then my computer crashed.  Finally I was able to get my computer fixed and download a new version of Bitcoin-Qt.  Now I would like to import my original wallet.dat from the old client which was encrypted into an new version of Bitcoin-Qt.  How do I do that?

First, close the Bitcoin-Qt client.
Then you have to locate your Bitcoin folder. For Windows, it should be here:
%APPDATA%\Bitcoin
and for Linux:
~/.bitcoin
In that folder, there should be a wallet.dat file.

If you currently have no bitcoins in your wallet, you can just delete that file and replace it with your backup.
If you have some bitcoins in this wallet as well, backup that wallet file as well, or send all the coins to an address from your backed up wallet.

When you placed the other wallet.dat file in place, you should run Bitcoin-Qt with the -rescan option. Here's how to do that in Windows:

Go to C:\Program Files (x86)\Bitcoin using Windows Explorer.

In that folder, hold shift and right-click and select Open command window here (picture).

In the command prompt, type bitcoin-qt.exe -rescan and hit enter (picture).

Now Bitcoin-Qt should start and rescan the blockchain to calculate the balances of the addresses in your wallet.dat file.
(Source for pictures: cant see bitcoin after restore of backup)

I think the above answer is good, but I have typically restored a few times with

1. ShutDown BitCoin Client
2. Find your wallet location  (%APPDATA%\Bitcoin)   OR for example :  C:\Users\UserName\AppData\Roaming\Bitcoin
3. Backup, verify, then delete that wallet.dat file
4. Paste your other wallet.dat file into the folder.
5. Open BitCoin Client  , blocks get checked and updated, and you should see your amount.
6. I'm not sure that you need to do command prompt with the -rescan...   I didn't have to..


How can I make GUIMiner use the CPU for mining? I am trying to setup GUIMiner together with mining.bitcoin.cz. As I am working on a laptop with an Intel graphic card I am (probably?) unable to use GPU mining. So, just for a test, I tried to run GUIMiner without GPU support, that is as a CPU miner (if this is the correct word).

Clicking the start mining button doesn't seem to make anything run. I might be mistaken, but the lower right corner of the application keeps saying stopped.

The console tab says:

  2013-04-03 17:51:51: Running command: poclbm.exe :@api2.bitcoin.cz:8332 --device=0 --platform=0 --verbose -r1`

But no error message, either.

So, I go to cmd.exe and copy poclbm.exe ***:***@api2.bitcoin.cz:8332 --device=0 --platform=0 --verbose -r1. This results in

No PyOpenCL
Not using OpenCL
Nothing to mine on, exiting

which can be taken as an error message. I believe that "OpenCL" indicates that the program wants to use a GPU (although) I am not sure. I just want to test the mining functionality and see if I can particiapte in the mining pool, at the moment without graphic card, only the CPU. Is this somehow possible?

If you start the bitcoin-qt client from the command line with the bitcoin-qt.exe -gen 1 command, then it will generate bitcoins using your CPU. Alternately, use cpuminer. (Builds)

Install Intel SDK for OpenCL* Applications. I'm gussing it's a framework for OpenCL. It worked for me.


Bitcoin wallet on smart phone drains battery a lot? I downloaded Android Bitcoin Wallet (version 6.17) on my android phone, and realized that the app drains battery a lot. The system showed 40% of battery was used to the wallet.

Does anyone have same issue?
Or is this happen to other different Bitcoin wallets?
Or should I kill the process after I open the app?

If Bitcoin Wallet drains battery a lot compared to other apps like Whatsapp, Facebook that run background, the wallet is not suitable to smart phone...

I never tried the android version but from my experience from the desktop version, when you run the core, the bitcoin core will attempt to connect to another peer, when it received it, it will verify the transaction using your CPU which causes more power draw


What can an attacker who controls majority or all of the full nodes do? What happens when a strong attacker has control of majority or all of the full nodes?

What damage can he do and would they be reversible?

Here is an additional answer about what you can do if you control all fully validating nodes (but not necessarily all nodes that don't validate):

Anything

Bitcoin's security rests on auditing by full nodes. It is directly what prevents them from accepting fraudulent payments, and indirectly what makes it uneconomical for miners to produce invalid blocks (which in turn could be used to defraud non-validating clients).

If you have control over all fully validating nodes, you can effectively set the protocol rules at will. Including but not limited to theft and printing money out of thin air (beyond what the subsidy schedule currently permits).

What can an attacker who controls majority or all of the full nodes
  do?

TL;DR Nothing dangerous.


Is it possible to convert Bitcoin Miner to Litecoin Miner? I have 90Gh/s Bitcoin Miner and its almost useless for Bitcoin Mining with current difficulty. By changing the Linux software installed in it can I convert this Bitcoin Miner to Litecoin Miner? I am capable on uninstalling/flashing the current operating system and re-install a new one but I am wondering is it just software that decides to mine only Bitcoin or hardware too supports only Bitcoin Mining?

If not possible with Litecoin Miner can I use this miner for mining any other crypto-currency?

No, you can't. And this has nothing to do with the operating system. Your hardware has a bitcoin ASIC chip made only for doing Sha-256 calculations. Litecoin uses the Scrypt algorithm. Sha-256 and Scrypt are not the same, so what you are suggesting is impossible.

You can mine other Sha-256 coins instead of Bitcoin.

It is hardware bound. The above answer is correct. Another option is to rent out your hash-power and receive other cryptocoins.


Is the idea of color coins/open assets still alive? Are there any interesting projects ahead on this way? Since Ethereum has taken the way for smart contracts, it seems to me that the color coins projects have been abandoned in favour of the Ethereum ecosystem. But I might be wrong. Are there any interesting projects still for this approach?

There are at least 5 different colored coins implementations on bitcoin that I'm aware of. The ones in active development include:

Colu - They recently showed how their implementation can be used with the lightning network. https://www.colu.com/
Chromaway - They've been running a lot of pilots with various banks and whatnot. http://chromaway.com/

There's also a slack channel for colored coins as well, which you can see here: http://coloredcoins.org/

So no, it's not dead and there's still plenty of development going on.

Here is a recent update you can check:
https://medium.com/colu/announcing-colored-coins-and-lightning-integration-8e54d5dbfd0e#.7nnuw98ne

Problem:
[...]
Colored Coins assets have the same TPS, Transaction fees, and verification times as Bitcoin.
[...]
Solution:
[...]
Colu has built a version of Lightning Labs’s code that is Colored Coins compatible. It uses Lightning technology transfer digital assets in payment channels and using the bitcoin blockchain as a settlement layer and a dispute resolution mechanism that secures the assets.


What is the formula to calculate the length of a merkle tree? What is the formula to calculate the length of a merkle tree, given the length of the leaf vector?

The length of a merkle tree is the sum of a series starting with the number of leaves, halving (rounded up) on every step and ending with 1.

Here is the algorithm for calculating the length of a merkle tree from the number of leaves in JavaScript.

function getMerkleLength(leafCount) {
  // Input must be a positive integer or zero
  leafCount = Math.abs(parseInt(leafCount));

  var merkleLength = 0, currentLevel = leafCount;

  // Most merkle tree implementations return a null hash for empty lists, so the
  // length in that case would still be one.
  if (leafCount <= 1) return 1;

  // Loop
  for (;;) {
    // Add the current level to the length
    merkleLength += currentLevel;

    // If the current level is the root, we are done
    if (currentLevel == 1) return merkleLength;

    // Each level contains half the hashes of the last one and if there is an
    // odd number of leafs, the last hash is duplicated
    currentLevel = Math.ceil(currentLevel / 2);
  }
  return merkleLength;
}

Edit: I like readable code, but just for fun, here's the equivalent short version:

function getMerkleLength(leafCount) {
  for (var len = 0, i = ~~leafCount; i > 1; i = ~~(i/2+.5)) len += i;
  return len >= 2 ? ++len : 1;
}

Edit 2: And a C version for good measure.

typedef unsigned int uint;

uint getMerkleLength(uint leafCount)
{
  uint len = 0, i;
  for (i = leafCount; i > 1; i = (i+1)>>1) {
    len += i;
  }
  return len >= 2 ? ++len : 1;
}

void main() {
  uint i;
  for (i = 0; i <= 100; i++) {
    printf("%u: %u\n", i, getMerkleLength(i));
  }
  printf("%u: %u\n", 5000, getMerkleLength(5000));
  printf("%u: %u\n", 99999999, getMerkleLength(99999999));
}

It's not clear exactly what you're asking. The 'Merkle Tree' is a notional structure consisting of a number of different objects used in the process of generating a hash. It's not an object with a standard binary format whose length is well-defined.

In other words, the Merkle Tree is an algorithm. You put in an ordered list of N 256-bit hashes, and you get out a single 256-bit hash. There really is no "Merkle Tree" itself that has any length. To reconstruct the entire process, you need all and only the input hashes in order.


What prevents miners from mining more bitcoin after 21million btc? What prevents miners from mining more bitcoin after 21million btc was mined?

The Bitcoin protocol allows block authors to create a limited amount of new bitcoins in the outputs of the coinbase-transaction (which also collects the transactions fees) in each block. The amount of the so called block subsidy is limited by the consensus rules.1 Creating more than the allowed amount makes a block invalid to other Bitcoin nodes.

Each full node unilaterally enforces the consensus rules. This means that while a miner would be able to create a block that breaks the consensus rules, every other full node in the network would recognize it as invalid, drop the block, and ban the peer that sent it to them.

A change in the consensus rules that allows blocks that were previously considered invalid is called a hardfork. Hard forks require social consensus of the complete ecosystem or will cause a split of the network as each node operator determines for themselves which software to run. Even if a majority of the hashrate and a majority of the network's nodes hardforked to a new version of the Bitcoin protocol that allowed blocks with a higher block reward, the remaining nodes enforcing the original consensus rules would consider it invalid and continue to follow their own rules. Therefore, an intolerant minority may be able to veto a hardfork, especially if this minority has a significant share of the economic weight. If the economic majority prefers the original rules, miners following the hardforked chain may find it difficult to sell their mining reward. This is essentially what happened in the case of the SegWit2x hardfork attempt.

In the case that both protocol versions have some economic support, a persistent fork may be calved in the form of an airdropped altcoin. This is essentially what happened in the cases of Bitcoin Cash spinning out from Bitcoin, and Bitcoin Cash calving Bitcoin SV.

1
The block subsidy started at 50 bitcoin per block and halves every 210,000 blocks. We're currently in the third era where miners are allowed to create 12.5 bitcoin per block. Having recently passed block 600,000, more than 18,000,000 bitcoins have been found already, and the next halving to 6.25 bitcoins per block is coming up at block 630,000 in spring 2020.

Bitcoin block reward gets cut in half, mathematically limiting the reward. This happens every 4 years, roughly speaking. The block reward hits 0 when the amount mined is 21 million. The reward keeps declining until this happens.


building bitcoin-qt.exe using Visual Studio 2017 I know there is a project libbitcoin-qt.vcxproj, but I have issues with building it. Is there another solution how to build bitcoin-qt.exe (only VS)?

There is documentation about how to build with visual studio
 on this link. It works fine for me.

Independently of how you go about doing this, building with VS is not a recommended or supported configuration (beyond testing reasons).  If you run a system built that way you lose the advantage of the enormous amount of testing put in by users and developers on the supported builds.

At a minimum you should make sure that all the functional tests pass on your build, though this is generally good advice for any build.


bitcoin-cli failed with error: incorrect rpcuser or rpcpassword When I run this command

bitcoind -testnet -printtoconsole -rpcuser=123456 -rpcpassword=123456

After bitcoind is up. I run this on the same Ubuntu 17.10

bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=123456 getbalance

I get this result:
error: incorrect rpcuser or rpcpassword (authorization failed)
The second day I tried exactly the same way. I get the correct result. It is really weird.

I try to put these two lines in /home/user/.bitcoin/bitcoin.conf

rpcuser=123456
rpcpassword=123456

And I run this command

bitcoind -testnet -printtoconsole -conf=/home/gogogo237/.bitcoin/bitcoin.conf

And this

bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=1234564 getbalance

notice that I intentionally changed -rpcpassword to a wrong password. But I still can get a correct result.
This is really unpredictable and obviously a mistake. Anyone can explain this error? Thanks!

re-compiled on an Ubuntu system, fresh from github.com:

$ uname -a
Linux ubuntu-ae 4.10.0-19-generic

$ bitcoind -version
Bitcoin Core Daemon version v0.15.99.0-g96ac26e5662

$ bitcoind -testnet -printtoconsole -rpcuser=123456 -rpcpassword=123456

$ bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=123456 getaccountaddress "myaccount"
n2r1aQiA37LLgy4qWjuLHXqA9ZhtcX4KG6

$ bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=123456 getbalance
0.00000000

and with wrong password:

$ bitcoin-cli -testnet -rpcuser=123456 -rpcpassword=1234564 getbalance
error: incorrect rpcuser or rpcpassword (authorization failed)

so s.th. is wrong with the sources? Or with Ubuntu setup. What kernel do you have (uname -a) ?

In case you changed your /etc/systemd/system/bitcoind.service make sure you run
 sudo systemctl stop bitcoind
 sudo systemctl daemon-reload
 sudo systemctl start bitcoind

to apply the changes.
The error from the question could (and did in my case) arise because I did not use daemon-reload to load the new config.


Best way to mix bitcoins? mixer, coin join (shared send), dark wallet, stealth addresses? When you want to anonymize a few hundred BTC, what would be the best (safest) way?

I can think of these alternatives:

Deposit to and withdraw from exchange (like Kraken, Bitstamp, etc)Pros: reasonably safe (especially when using a solid, trusted exchange).Cons: not really anonymous, major exchanges must subject to KYC laws and have strict identification rules.
Mixing service (like bitmixer.io)Pros: very anonymous.Cons: can't really estimate the risk, you have to trust some anonymous 3rd party who can decide to disappear with your coins. Also, it can be expensive (depends on circumstances and requirements, but I'd consider 3 BTC fee to mix 300 BTC kind of expensive).
Coin JoinPros: pretty much risk-free (don't have to trust anyone).Cons: is there a steady, easy, accessible way to setup large coin join transactions? The shared send feature of blockchain.info/wallet? Sharedcoin.com?
Dark Wallet / Stealth AddressesPros: as far as I understand, this offers high anonimity without the need no trust anyone, although I'm not 100% sure of how this works technically.Cons: To my knowledge it's still in development, unstable, not suitable for usage with large sums of money?

What your take on this? Any other options?

I would say connect to tor, create a blockchain.info account, send you bitcoin there, then send the bitcoin to https://shapeshift.io to another currency which you have a wallet setup, then back to a second blockchain account, then to wherever you want.

This is pretty much 100% untraceable, as it goes via anonymous wallet - anonymouswallet - converted to another blockchain, sent to anonymous wallet, then converted back to bitcoin through another anonymous wallet! You can't track that transaction on the blockchain.

Enjoy :)

You could try this site:

http://silentvault.com/tiki-index.php?page=SBC

It looks like a good option. They're geared toward privacy. Simple mixing of coins is free. They're also based in Panama, which will make it more difficult for anyone from elsewhere to access their records.


Is there a Bitcoin Cash explorer that supports Xpub addresses? As the title says... I've been unable to find a block explorer that supports Xpub for Bitcoin Cash.  Anyone know of any?  In particular and preferably, one that will allow for fetching via GET (so I can import the data into a Google Spreadsheet).

Blockonomics supports lookup of xpubs and multiple addresses. They recently announced support for BCH

I just found this app. Looks good but it's quite new so maybe give it a try https://play.google.com/store/apps/details?id=com.valcourgames.walletwatch.android


Is there any centralized cryptocurreny? Is there any centralized cryptocurrency? Is cryptocurrency a Bitcoin oriented concept only? From what i read almost all of the cryptocurrencies are derivatives of Bitcoin.

I think you are correct that almost all of the cryptocurrencies are derivatives of Bitcoin.  From that fact it would follow that they would all be decentralized.

That being said, there are centralized aspects of cryptocurrencies, including Bitcoin.  For example, online wallets, exchanges and mining pools are all centralized.

As others have pointed out, crypto-currencies are not a new thing and have been around for decades.

One currency that might meet your criteria is litecoin.

Litecoin is still an opensource, community driven currency,  it's not quite a "centralized" currency.

That being said, the company developing Litecoin is taking a more hands on approach and trying to offer a bit more support for the currency. Whether that's a good or bad thing, only time will tell.


Where could I sell micro BTC and is it possible? I would like to know if is it ok to sell micro BTC? Like a few decimal places like 0.01 BTC? And where would I sell it to exchange for other currencies? And how do I get the exchange safely?

The smallest part of a bitcoin is (currently) called 1 satoshi, and it is equal to 0.00000001 BTC. So selling 0.01 BTC is no problem on any exchange, you only have to take into account the fees which are asked by the exchange. If it's a percentage (as it usually is) you're fine.

If you want to sell you can use big sites like bitstamp, coinbase etc.
To trade for other cryptocurrencies you can use btc-e, kraken, cryptsy, ...

If all you want to do is trade for altcoins, I've found that Crypsy is pretty good.


What is Proof of Burn? Can someone explain me:

What is Proof of Burn
What is the difference between Proof of Burn and Proof of Work
How Proof of burn works
Which virtual currency uses Proof of burn technology instead of Proof of Work

Can someone explain these things to me in a understandable manner? I can't understand anything in the (Wiki article on it). Highly appreciate if someone can explain this to me.

Proof of burn simply means you have provably destroyed coins. The only way to destroy coins in a proven way is to send them to an address which is improbable to have been generated from a private key, and thus can not be spent.

Chancecoin is the first I've seen to use this way to generate their coins. The announcement for Chancecoin can be found here: https://bitcointalk.org/index.php?topic=528023.0

In here, they instruct people can burn bitcoins for a certain period by sending them to 1ChancecoinXXXXXXXXXXXXXXXXXZELUFD. The reason why we believe that this is a burn address and not a vanity address is that all but 6 characters seem to have been predetermined. The way you would find an address like this which you could send coins to is by running a loop.

Start with 1ChancecoinXXXXXXXXXXXXXXXXXXXXXXX
Ask bitcoin if that's a valid address
If it's not valid, increment the last character by one and try again

After a billion or so tries (not too much in terms of 'mining') address 1ChancecoinXXXXXXXXXXXXXXXXXZELUFD is found which passes the validity check. For more info on address validity see: https://bitcointalk.org/index.php?topic=1026.0

This address is very unlikely to have been generated with a private key, or if so, it would show a big weakness in bitcoin and many other security practices. So we assume that the nobody has access to this private key.

Proof-of-Burn addresses are pretty easy to generate. Assuming a cryptocurrency is derived from bitcoin, and uses the base58 protocol, one can generate an address that is obviously a burn address visually. I just generated this: zCoinBurnAddressDestroyedXXXVyY865 -
/z CoinBurnAddressDestroyedXXX / VyY865. The last part "VyY865", is a Python Base58 and Base58Check implementation template and is the safeguard, and no private key was generated by the Base58Check. See Python Software Foundation

You have to combine that with your own simple template, though.


How to know if a transaction is valid? I understand there are a couple things that need to be checked for a transaction to be valid - the previous transaction had to be correct, no OP can invalidate the transaction, etc, but is there a complete list on what one needs to check in order to know if a transaction is valid?

For example, does the transaction need to have a specific structure in order to be spent, like the script from TxIn needs to compile to the encoded message, and the TxOut script needs to properly run OP_Checksig on that particular message? If not, one could simply drop the message from TxIn, push their own malicious message and run OP_Checksig on that.

What steps does the protocol require a client to go through to check if the transaction is valid?

On the bitcoin wiki, there is rather complete list of validation checks that are done by the Satoshi client: Protocol_rules.

There is a section specifically about transaction checking as well.

I understand there are a couple things that need to be checked for a transaction to be valid - the previous transaction had to be correct, no OP can invalidate the transaction, etc, but is there a complete list on what one needs to check in order to know if a transaction is valid?

You check the chain, if it goes all the way back to a generation, it is valid. You must wait for a confirmation to get it set in stone.

  What steps does the protocol require a client to go through to check if the transaction is valid?

https://github.com/bitcoin/bitcoin/tree/master/src


Where is Bitcoin information (wallet.dat) stored on OS X? Is there a wallet.dat for OSX? Where is it located?

Taken from https://github.com/bitcoin/bitcoin/issues/544

The Bitcoin wallet on Mac OS X is located in ~/Library/Application Support/Bitcoin/wallet.dat.

Mac OS X v10.7 (Lion) came out, and it has the ~/Library folder hidden, see the answer from chilled35 to access it with Finder.

  In order to see hidden folders, such as ~/Library from Finder, simply hit shift + ⌘ (command) + G which will GO to a folder, then paste in this location:

~/Library/Application Support/Bitcoin

  From there, you will see all the files associated with your wallet.

Take a look at ~/Library/Application Support


Is it possible to brute force bitcoin address creation in order to steal money? Bitcoin users frequently generate new addresses for each transaction they make, which greatly increases the number of bitcoin addresses being used to receive money.

Would it be possible (and profitable) for someone to find collisions in the bitcoin address space in order to steal money?

It is possible to brute force some Bitcoin addresses, because some people generate their private keys in an insecure manner.  Any (non-zero) 32 bytes can be a private key.  So running sha256 over a passphrase gives an apparently random, but brute force-able private key.

Take sha256("sausage") for instance:

$ echo -n 'sausage' | sha256sum
30caae2fcb7c34ecadfddc45e0a27e9103bd7cfc87730d7818cc096b1266a683  -

Load up bitaddress and paste that private key into the 'wallet details' tab to get the corresponding Bitcoin address, then look it up on blockexplorer:

$ GET http://blockexplorer.com/q/getreceivedbyaddress/1TnnhMEgic5g4ttrCQyDopwqTs4hheuNZ; echo
0.01000000

and you'll see that the address held one bitcent for about 2 days in February 2012.

See also: "fuckyou", which held 2.5 bitcents for 12 festive days at the turn of last year.

So in practice it's possible to brute force bitcoin address creation, but only for poorly chosen passphrases.  These were probably just people playing around with the idea of "storing bitcoins in their head" which is why they are for such small amounts, and why they weren't left funded for long.

No address balances were harmed in the making of this answer.

Yes, following technology progression, once equipment is available that can do 1Thash/sec and above then it becomes feasible to start finding collisions with a reasonable success rate. I'd estimate in circa 2-3 years this will be viable, as to whether anybody attempting it lucks out to get an address which has a decent quantity of BTC associated with it is another thing, and the question as to whether it'd even be profitable is further still.

I'm quite sure that the odds are much less than the basic math indicates.. if you find a match which is circa 20 chars long, the odds are rather high that the full address will match due to the process involved in generating the key pair.

Skip forward a decade, and this will be far more of a realistic worry, or at the point Thash becomes normal, and Phash is on the cards.. just as GPUs are now dormant and looking for a use, so will mining equipment that hasn't even been invented yet be in a few years.


Does IBB make money? Where does its earning come from? Slightly off topic, but perhaps it is still marginally on topic because it's about a Bitcoin-oriented business:

IBB is an "Islamic bank, acting according to the Sharia (Islamic law), charging 0% interest on BTC loans".

Is it a profit-oriented business? A charity? Does it make money? Where do its budget come from? (I saw they're advertising on the Bitcoin forum today)

I know they issued some GLBSE stocks, that might explain the source of the money - are Muslims effectively "donating" to this bank by purchasing stocks?

As stated by what appears to be the founder (or a key person) in this thread in the bitcointalk forums, calling himself senbonzakura: "profit from the bank must be halal (permissible). So if the bank lends at interest, the interest then is profit for the bank, and that would mean muslims(or jews/christians) cannot buy shares in the company as the bank deals with interest, which makes it non-permissible/haram."

The motivation for running the IBB seems to be somewhat charitable, with this (edited) comment from the same person: "The problem that those 3 religions is trying to solve is human greed. Under that philosophy it does rightly condemn interest, for the reason that interest places the 'haves' infront of the 'have nots'.... From a humanitarian-philosophical perspective [the IBB] makes perfect sense, from a capitalist perspective it doesn't".

However, it is being run as a business. The IBB website says it's listed on the GLBSE, and it has asset, revenue, and dividend figures. The website doesn't go into much detail about what the bank does, but if you were to read the above linked forum thread you'd probably learn a lot more about it. Since the bank is paying out dividends, I doubt that those purchasing stock in IBB are doing it purely as a donation.

So, to summarise:

The IBB is profit based, but doesn't earn money from interest.
If you assume their revenue chart is accurate, it earns money
Their revenue stream includes (complete list so far): Shares/Dividends, Arbitrage, Gratuity
Even though IBB doesn't charge interest, they accept donations from borrowers. Depending on the culture of the customers, this could be considered to be like making optional interest payments.

usury is forbidden in muslim religion/as it was in christianity as this creates wealth based on accumulating interest paying 3 fold or more if you default and % can change..muslims believe if i lend you 10$ i expect back 10$ no interest for the loan.but trade is encouraged i.e you buy an item and sell to me at a profit this encourages trade and society and the amount you pay back is known,fixed.i think IBB are trying to follow this model..but they seem to follow the base rate as a refference point


What software should I use to open the .dat flles I've just downloaded the Bitcoin Core for Windows.

I can see several .dat file. What can I use to open them. i.e. Is there a way to view them in plaintext?

Also, which file is the blockchain file?

Thanks!

The .dat files are opened by Bitcoin Core, they are not supposed to be opened in plaintext. The blockchain will be in the blocks/ subdirectory. You can see a list of the files bitcoin core uses here:
https://github.com/bitcoin/bitcoin/blob/master/doc/files.md

These files are in binary format, so not intended for a human reader. To have a look at the content, get a "hex reader" program, google for that.

Do you want to get the private keys to your Bitcoin adresses? If so, you will use the "debug window" in Bitcoin Core. See this answer for how to do that: https://bitcoin.stackexchange.com/a/5933/63522


What is relation between scriptSig and scriptPubKey? Scenario: A is sending 1 BTC to B.

scriptSig appears in the Input Script.

scriptSig = <sig> <pubKey>

Here, public key is the Public Key of the sender, A. (this is the public key corresponding to his Bitcoin Address which has some unspent transaction).

What is the sig part of scriptSig?

scriptPubKey

scriptPubKey = OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

pubKeyHash = Hash of the Public Key of Recipient (in our case, B).

The sender (A) only has the Bitcoin Address of the recipient (B), so how does he get the pubKeyHash from his Bitcoin Address?

Now, this is my understanding so far:

Input Script carries information about the "previous transaction" of the sender and points to the appropriate "output" part of "previous transaction" using an index. The output of the previous transaction is the total available balance for the sender (A) which can be claimed to send Bitcoins to the recipient (B).
This Input Script is also used to verify that the sender (A) is the actual owner of the Bitcoins held in the referenced output of previous transaction.
Output Script tells us, how many bitcoins the Sender wants to Transfer to the Recipient and it also mentions the Bitcoin Address of recipient.

Questions:

The public Key in scriptSig is different from the public Key in scriptPubKey?
How can the signed information of the Sender be verified by the recipient, if they don't share the same Public Key?
I have tried understanding the example given on wiki which shows how the script is executed in a stack based manner but could not understand it.

I have some more questions, but I think I will ask them in a different question instead of putting it altogether here.

Thanks.

First of all two matching scripts are used in two different transactions, one that transfers funds to an address (Transaction A) and one that spends those funds (Transaction B). The scriptPubKey is created by the user that creates Transaction A. It basically adds a claiming condition to the output that is being created. A user may only claim and thus spend the bitcoins associated with the output if he can prove that he owns the output.

This is where Transaction B and the scriptSig comes into play. Assuming a user wants to send some funds somewhere. He creates a new transaction, and adds outputs to it until he has enough to cover the desired amount. Now he has to prove that he owns those outputs, which he does by providing the output that is needed to claim them, i.e., the public key matching the address and the signatures with the matching private key.

The sender of Transaction A does not yet know the public key, but does know a hash of the public key, because he knows the address he wants to send to. The address is nothing more than the hash of the public key. So the sender now knows all he needs to be able to send the funds to the receiver.

When the receiver wants to spend the funds again he provides the input to the scriptPubKey. As you can see the scriptPubKey consists of taking the public key that was pushed on the stack, duplicating it, hashing it and comparing it to the hash of the public key the output was destined for. If they match we still have both the signature and the public key on the stack, which are used by OP_CHECKSIG to see whether the input had a valid signature attached.

Take this transaction for example. It claims one output, by providing the public key and the matching signature. It then creates two new outputs and specifies the conditions for the next user to claim them.

Let there be 2 transactions, Transaction A(coinbase) & Transaction B.
ScriptPubkey - To lock Transaction A to a Public Key.
ScriptSig - Used in Transaction B to unlock Transaction A

Since Transaction A is coinbase (mined by a miner), there will be no ScriptSig. ScriptPubkey of Transaction A is the miner's Public Key script( ie locked to miner's Public Key, so in future he can unlock using his Private Key[ie ScriptSig])

The miner can spend this Bitcoin Transaction to Alice by providing ScriptSig(signed with the miner's Private Key) in the input of Transaction B. Remember Public Key of the miner is generated from his Private Key, it is possible for the Bitcoin program to verify ScriptPubkey of Transaction A from ScriptSig of Transaction B, then if valid the Transaction B will be added to the Blockchain.

The ScriptPubkey of the Transaction B will be the Alice's Public Key, so in future only Alice can spend this Bitcoin using ScriptSig in Transaction C.


What are some good ways of marketing a Bitcoin related service to Bitcoin users? What is a brief summary of some good ways of promoting a Bitcoin related service? This could include:

Bitcoin Service Directories
Forums
Advertising
Mailing Lists
???

The target audience is people who have bitcoin and know how to use it.

To avoid this question being too broad and requiring answers that are too long, I suggest keeping any summary of each item brief.

The folks at bitcoin.it run a moderated listing, https://en.bitcoin.it/wiki/Trade, which you can list at.  Another way is to work directly on reddit (r/bitcoin) and http://www.bitcointalk.org/.

Post your website on Paid To Click websites dedicated to Bitcoin and select a good time for viewing your ads.

Example: On BitcoBoom (http://bitcoboom.com), you can start a campaign of 1000 users view for $1. Selecting 20-30 seconds to view your website will increase interest in your website ;)


How should you backup your wallet? How often? Is backing it up once enough?
Any best practices to storing the backup?

The file you'll need to back up is wallet.dat which can be found in %appdata%\roaming\bitcoin on Windows or ~/.bitcoin on Linux/MacOSX.

By default a pool of 100 pre-generated, unused addresses is maintained in your wallet, and so it is safe to use 100 new addresses without backing up your wallet.  New addresses are used most times you send bitcoins and used as a "change" address, and also when you request a new receiving address. As you use new addresses, more are generated and added to the end of the pool.  Once you've used 100 since backing up, you'll start using addresses which aren't in the backup. To this end, the frequency of your backups is largely determined by the frequency of your transactions and this is largely a personal decision. If you absolutely cannot manage a backup every 100 transactions (why?) or are comfortable with a more aggressive schedule (and smaller wallet) there is a -keypool option to change the number of addresses pre-generated.

Best practices for storing wallet backups almost always include encryption. Most folks in the community swear by tools like TrueCrypt for such purposes, though there are countless alternatives. Storage of the backup depends largely on how long-term the storage is intended to be and the security levels necessary. For small amounts of coin and short-term backups, online services like DropBox or Mozy might be adequate, assuming the wallet is encrypted before uploading. For longer-term or higher security backup, coins might be sent to an offline wallet stored in paper form at a physically secured location or any variation between.

Regardless of your wallet backup methodology and schedule, it is ALWAYS a good idea to take some basic measures to secure your wallet.

Encrypted; to more than one place convenient to you: hard drive, pendrive, cloud. Some store it on paper but that's another school.


When joining the bitcoin network, why aren't we connected to the most geographically closest nodes? Is this a safety/security reason or is it just convenience?

There isn't any reason that I'm aware of to think that this would be desirable. I'm not aware of any way that it would improve things and it would make the network highly prone to partitioning. E.g. why would the nodes in north america ever have any connectivity to the nodes in europe?

Making some number of additional connections to nodes on your LAN would probably be useful, but it isn't that often that there are multiple nodes on a LAN.

My take on this is that there is no deterministic way that is reliable to even know what is closest. Furthermore, it is not even optimal for the network to do that. If you think about it, an attacker clustering miners to do a Sybil-type attack would have trouble if the network encourages miners to go out and seek connections with nodes on the other side of the planet. Bitcoin is also confirming things so slowly that connection speed is simply not a relevant issue right now.