What does blockchain.info wallet need your email for? This question is related to the specific software product, but comments on the need for usage of an e-mail address in similar software products are welcomed.

I installed blockchain.info wallet to my mobile device and it is all good, but it says in settings that I have unconfirmed e-mail. OK, I confirmed my e-mail, but now I'd like to know what it will be used for.

I can see 3 options:

Notifications
MFA
Password restoring

AFAIU, it is used for login to the web interface and notifications. Would like to be sure if I am right about this.

From the wallet settings in mobile app:

  Your verified email address is used to send login codes when suspicious or unusual activity is detected, to remind you of your wallet login ID, and to send bitcoin payment alerts when you receive funds.


Getting keys from multibit to export for electrum I want to switch from Multibit to electrum. I can't figure out how to make use of the key multibit exports when it does a backup. Electrum and blockchain.info both seem to want something I can paste in but multibit exports in a binary format. I can't figure out how to use pywallet either.

You need to export the private keys from Multibit in text format using the 'Export Private Keys' option.  You can then copy and paste the private key strings into your new wallet.


Schnorr's batch validation In the recent BIP about Schnorr's standardization, Pieter Wuille presents an algorithm for batch validation. In my understanding the most heavy operation is the multiplication by a scalar: to make batch validation secure we need to multiply each public nonce by a random factor, thus we get back to two multiplications per signature (plus one). I don't understand why there is the speed up presented in the figure at the beginning of the BIP. Could someone help?

Thanks in advance for your answers!

You're right that the elliptic curve multiplication is indeed the most expensive operation in the validation algorithm. And as both single signature validation and batch validation require two EC multiplication per signature, it would seem that no speedup can be gained from batching.

However, several algorithms are known for computing the sum of multiple EC multiplications faster than summing the individual multiplications. Straus's algorithm (also known as Shamir's trick), Bos-Coster's algorithm, and Pippenger's algorithm all provide speedups, and are applicable in different scenarios. In the graph in our BIP draft Straus and Pippenger are used (depending on the size of the batch; Pippenger only wins for batches over ~100 keys). For sufficiently large batches, Bos-Coster and Pippenger are O(log n) times faster than individual multiplications.

To give you an intuition for how this is possible, here is a summary of Bos-Coster's algorithm (while in practice it's not the fastest, it's the easiest to explain):

Start with a list of pairs (a1, P1), (a2, P2), ..., (an, Pn).
Sort this list from large to small ai (and renumber it so that a1 is now the largest number, ...).
While the list has length larger than 1:

Replace the top two elements (a1, P1) and (a2, P2) with the two elements (a1 - a2, P1), (a2, P1 + P2). Note that a1P1 + a2P2 = (a1 - a2)P1 + a2(P1 + P2).
If this results in an element with coefficient 0, remove it (this happens when a1 = a2).
Sort the list again.

When only one element remains, it will be of the form (a, P), where a is the GCD of all inputs. For a sufficiently large n, that GCD will be almost certainly be 1, in which case the solution is just P. Otherwise a will be a small number, and the solution is just aP.

The intuition here is that when you have say 100 multiplications to perform, a1 - a2 will on average be 100 times smaller than the number it replaces (a1), so in every step we're dividing one of the coefficients by 100, while only doing a single EC addition. This is in contrast with naive EC multiplication where you generally need to perform one addition for each bit in the input.


What if I receive bitcoins when my device is powered off? What happens if I receive bitcoins when my computer or smartphone is not online or powered off?

Solution

This works fine.

The bitcoins will appear next time I start my wallet application. (Read tuxcanfly answer)

Bitcoins are not actually received by the software (wallet) on my computer, they are appended to a public ledger that is shared between all the devices on the Bitcoin network. (Read SPRBRN comment)

If someone sent bitcoins when my wallet client program is not running and I launch it later, it will download all blocks and catch up with any transactions it did not already know about, and the bitcoins will eventually appear as if they were just received in real time.

My wallet is only needed when I wish to spend bitcoins!

Helpful resources

https://bitcoin.org/en/faq#what-if-i-receive-a-bitcoin-when-my-computer-is-powered-off
https://www.weusecoins.com/en/questions/#what-if-i-receive-a-bitcoin-when-my-computer-is-powered-off


Fees too high best course of action When I try to spend about 4.7 mbtc I get an error message  : "Balance not enough". I deduce that network fees should be around 4mbtc, which is kind of high. My balance formed from around 15 faucet inputs 0,5 mbtc each on single adress, so I think that is the source of my problem.

What  should I do now?
1. Does "economical" transfer of these inputs on new address gives me lower fees after that or not?
2. Should I move my balance to other app, or this is not BitcoinWallet problem and any other app give me same fees?

So, In my case most easy way out was - make a payment from my adress on my adress of all balance with economical fee, which was small enough, and transaction took an hour and half. Then payment for external adress gone with reasonable enough fees.


Compiled version of bitcoind 0.18.1. "Could not connect to the server 127.0.0.1:8332" When I use the official installed bitcoind 0.18.1 everything works fine. I can use the bitcoin-cli with any comands and don't get any errors.
After that when I compiled 0.18.1 myself I can't use any bitcoin-cli comands and I get:

  error: Could not connect to the server 127.0.0.1:8332
  Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

I use bitcoin-cli without any options, just a: bitcoin-cli.exe getbalance or bitcoin-cli.exe stop

Here is my simple bitcoin.conf which I use with the both versions:

server=1
rpcuser=username
rpcpassword=password
rpcallowip=127.0.0.1
rpcport=8332
datadir=F:\BitcoinData

I compile it with MinGW-w64-i686-posix-sjlj on Win7 target platform and with boost 1.57, libdb 4.8.30, openssl 1.0.1, libevent 2.0.22 as a dependent libs. I tried to compile 0.16.1 verion with the same stack but error is a similar:

  error : couldn't connect to server : unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)

What is wrong with compiled version? I can't realise what I missed. The compilation went without any errors. May be I missed some ./configure options?

The problem was in libevent 2.0.22. It spoiled HTTP response from bitcoind every time. libevent 2.1.11 fixed this issue.


What is proof-of-work? Please explain the proof-of-work concept.

And how does it relate to Bitcoin mining in general, and to the proofs of work (aka shares) of mining pools?

Bitcoin miners find a random number (called a "Nonce") that when inserted into the current block makes the hash be below the current target. They then send that current block around the network and everyone checks their work (the proof-of-work) by hashing the block and checking if the result is below the current target. In mining pools, miners do the same thing, but the current target is much higher (so it's easier). When they find one of these, it's called "mining a share". A small percentage of the "shares" will actually have a hash below the actual target, and the pool will make it's 25BTC profit, then distribute it out to the miners who found a share (normally using some über-complicated method to prevent cheating/pool hopping)


GetAddr message structure My question is if getaddr consists of message header and if it has some payload, possibly an addr_recv and addr_from like version message. Wiki is pretty basic on this spot.

It isnt clear what exactly you're asking, but wiki is pretty clear on the structure of the response to a getaddr message.

https://en.bitcoin.it/wiki/Protocol_specification#getaddr

The response to receiving this message is to transmit one or more addr messages with one
or more peers from a database of known active peers.

So the payload of the response will be a bunch of addrs:

https://en.bitcoin.it/wiki/Protocol_specification#addr

Provide information on known nodes of the network. Non-advertised nodes should be forgotten
after typically 3 hours

Payload:
Field Size  Description     Data type               Comments
1+          count           var_int                 Number of address entries (max: 1000)
30x?        addr_list       (uint32_t + net_addr)[] Address of other nodes on the network.
                                                    version < 209 will only read the first
                                                    one. The uint32_t is a timestamp (see
                                                    note below).
Note: Starting version 31402, addresses are prefixed with a timestamp. If no timestamp is
present, the addresses should not be relayed to other peers, unless it is indeed confirmed
they are up.

And it even provides sample data:

Payload:
01                                              - 1 address in this message
Address:
E2 15 10 4D                                     - Mon Dec 20 21:50:10 EST 2010 (only when version is >= 31402)
01 00 00 00 00 00 00 00                         - 1 (NODE_NETWORK service - see version message)
00 00 00 00 00 00 00 00 00 00 FF FF 0A 00 00 01 - IPv4: 10.0.0.1, IPv6: ::ffff:10.0.0.1 (IPv4-mapped IPv6 address)
20 8D                                           - port 8333


Deterministic wallet audit ability Deterministic wallet described in BIP 32 has an auditing functionality by sharing the public parent key.

https://bitcoin.org/en/developer-guide#hierarchical-deterministic-key-creation

But if I use the variant if the Hardened Keys the generation of the chain code depend also by the private parent key.
With this type of key the auditing functionalities fail?

Yes, the auditing functionality relies on the non-hardened derivation.


Will Segwit embedded inside P2SH save fee compared to P2PKH? How much transaction fee will Segwit embedded inside P2SH save fee compared to P2PKH?

Update 1

I found a similar question.

  or they can be nested in a legacy P2SH 3... address which are backwards-compatible (although less efficient)

He said less efficient. I want to know how much? Transaction size will be smaller than normal...?

How do transaction costs compare between Bech32 addresses and legacy Bitcoin addresses?

Update 2

I found another one. I'm reading it.

SegWit transaction fee/byte

Update 3

The following page describes block weight. P2SH is used in the example. I think P2SH-wrapped segwit addresses has benefit for cheaper transaction.

Block weight

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

Someone posted the following table. I don't know if it is correct or not. But seems segwit(p2sh) has benefit than I expected.

Quick table. Sizes in bytes (virtual bytes for segwit, including the segwit discount)

How do I calculate my fees for a transaction sent from a Segwit address?

https://www.reddit.com/r/Bitcoin/comments/7m8ald/how_do_i_calculate_my_fees_for_a_transaction_sent/

Spending a P2PKH output in an input of a transaction requires 4 * (36 + 1 + 1 + 33 + 1 + 72 + 4) = 592 weight units. Spending a P2SH-P2WPKH in an input of a transaction requires 4 * (36 + 1 + 1 + 22 + 4) + 1 + 33 + 1 + 72 = 363 weight units. Thus, given the same fee rate in BTC per weight unit, it will be cheaper to spend from a P2SH-P2WPKH output than it is to spend from a P2PKH output.

  He said less efficient. I want to know how much? Transaction size will be smaller than normal...?

P2SH-P2WPKH (P2SH nested segwit) is not less efficient than P2PKH (non-segwit). It is less efficient than P2WPKH (native segwit).


Can I get a Bitcoin credit card? I saw a video on youtube about a card for Bitcoin, is there a legit card service?

(I am a complete noob in bitcoin so please mention links in the answers)

Two card services that I know of are xapo and e-coin (debit) cards. I know people that used them successfully and as far as I can tell are legit.


RippleAPI Prepare Payment Paths object When using ripple API Prepare Payment method.

GET /v1/accounts/{:source_address}/payments/paths/{:destination_address}/{:amount}

I am struggling with how should I understand paths part of response?

"paths": "[[{\"currency\":\"USD\",\"issuer\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"type\":48,\"type_hex\":\"0000000000000030\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"type\":1,\"type_hex\":\"0000000000000001\"}],[{\"currency\":\"USD\",\"issuer\":\"rpDMez6pm6dBve2TJsmDpv7Yae6V5Pyvy2\",\"type\":48,\"type_hex\":\"0000000000000030\"},{\"account\":\"rpDMez6pm6dBve2TJsmDpv7Yae6V5Pyvy2\",\"type\":1,\"type_hex\":\"0000000000000001\"},{\"account\":\"rHAwwozJw6FHfnJfRQaFXrkGHocGoaNYSy\",\"type\":1,\"type_hex\":\"0000000000000001\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"type\":1,\"type_hex\":\"0000000000000001\"}],[{\"currency\":\"USD\",\"issuer\":\"rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc\",\"type\":48,\"type_hex\":\"0000000000000030\"},{\"account\":\"rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc\",\"type\":1,\"type_hex\":\"0000000000000001\"},{\"account\":\"rEtr3Kzh5MmhPbeNu6PDtQZsKBpgFEEEo5\",\"type\":1,\"type_hex\":\"0000000000000001\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"type\":1,\"type_hex\":\"0000000000000001\"}],[{\"currency\":\"USD\",\"issuer\":\"rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc\",\"type\":48,\"type_hex\":\"0000000000000030\"},{\"account\":\"rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc\",\"type\":1,\"type_hex\":\"0000000000000001\"},{\"account\":\"rKvPTQrD8ap1Y8TSmKjcK6G7q7Kvx7RAqQ\",\"type\":1,\"type_hex\":\"0000000000000001\"},{\"account\":\"rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q\",\"type\":1,\"type_hex\":\"0000000000000001\"}]]",

I know how to read JSON and understand that currencies are being transferred between accounts, what I don't get is in what order? from which to which in what amounts and currencies?

Also what does type stand for (1 or 48 in example), where can I get list of all types?

I believe that type is a bitfield, defined by the following C++ code:

class STPathElement
{
public:
    enum Type
    {
        typeNone        = 0x00,
        typeAccount     = 0x01, // Rippling through an account (vs taking an offer).
        typeCurrency    = 0x10, // Currency follows.
        typeIssuer      = 0x20, // Issuer follows.
        typeBoundary    = 0xFF, // Boundary between alternate paths.
        typeAll = typeAccount | typeCurrency | typeIssuer,
                                // Combination of all types.
    };
[snipped]

So 48 (or 0x30) would mean that typeCurrency and typeAccount are both set. I think this means that it's currency issued by someone.

1 (0x01) means typeAccount is set. I think this means that it's an account that contains XRP.

As for the rest of it, I have no clue.


Do any of the Android-based wallets support cold storage? Specifically I'm looking for Armory-like functionality where the transaction can be generated on an online system, transported to an offline android tablet or netbook via USB or QR code where it can be signed, then transported back to an online system where it can be broadcast.

Its not exactly what you want, http://mycelium.com/ for Android does it the other way around.

You keep your private keys safe in QR-code format on a paper or a offline device, then you scan it when you want to make a transaction. Mycelium signs the transaction and forgets about the key.

I tried to scan with my Android device offline, but it does not work. To be able to select previous outputs to send in the transaction, you need to be online.

I don't know of any Android app that can take a raw transaction (by QR-code, SD-card, OTG, Bluetooth, NFC or Chirp.io) and sign it offline.

I hope this feature will be implemented soon.


Should I be using the "encrypt wallet" feature in Bitcoin Core? All my wallet.dats have no password. However, the internal hard disk where the "live" one is located is encrypted, and so are the offline storage devices where I have my "cold" wallet.dat.
I have known about the feature to encrypt your wallet.dat in Bitcoin Core for a long time, but never dared to do it. It feels like I will become one of those who forgot their password, even if I store it in multiple text documents on those redundant, encrypted, offline backups. I've had text files randomly get garbled many times for seemingly no reason. And it just makes my skin crawl to think of the possibility that I will one day have a wallet.dat but not be able to ever access it!
Plus, if I encrypt the "live" one, I can say "good bye" to any automation through the RPC API, which is obviously a requirement to run a Bitcoin-accepting service.
But the cold one? I feel extremely scared of it flying through my network cable away from my control. I wish I would dare to encrypt it, but I just don't. It's too scary. I'm already more than scared enough that my backup disks will fail or that I will forget the password to decrypt those! Or that they are all seized and broken into with their quantum computers.
I've spent a ridiculous amount of time worrying and thinking about my security, especially as the Bitcoin value has increased so much. Still, it feels like I'm not at all safe enough and that it's not even possible to be secure without going to such ridiculous lengths that life becomes one long ordeal.
And I don't even own lots of BTC. I can imagine how paranoid people with like 100 or 1,000 BTC feel now...

If the computer that holds your wallet.dat file is ever connected to the internet (which it surely must be) then every second that it is turned on it is being probed by thieves attempting to break into it. If any succeed, your wallet.dat file is unprotected and will be copied and used.
If you use email or a web-browser on that same computer then every message you look at, every page you read, creates a very real additional risk that your wallet.dat will be copied and used.
You could buy a cheap letter-punch and stamp your password into a sheet of metal and store it in a very safe place. Don't store important passwords in tiny weak magnetic fields.


How to reset bitcoin testnet I'm running a private bitcoin network and would like to reset the bitcoin blockchain data back to the genesis block.

I've tried deleting all the files in ~/.bitcoin/blocks and ~/.bitcoin/wallets but bitcoin-cli -testnet getblockchaininfo still shows existing blocks.

$ bitcoin-cli -testnet getblockchaininfo
{
  "chain": "test",
  "blocks": 10,
  "headers": 10,
  "bestblockhash": "000000008668c111d16fd895919969836292a61919c6150a0f9a1dd5cc41aa55",
  "difficulty": 1,
  "mediantime": 1526598651,
  "verificationprogress": 6.116528714283428e-07,
  "initialblockdownload": false,
  "chainwork": "0000000000000000000000000000000000000000000000000000000b000b000b",
  "size_on_disk": 2573,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "defined",
      "startTime": 1456790400,
      "timeout": 1493596800,
      "since": 0
    },
    "segwit": {
      "status": "defined",
      "startTime": 1462060800,
      "timeout": 1493596800,
      "since": 0
    }
  },
  "warnings": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
}

The testnet data directory is not ~/.bitcoin but rather ~/.bitcoin/testnet3. ~/.bitcoin holds the data for the main Bitcoin blockchain.


Keeping track of unique deposit Bitcoin Addresses per user I'm trying to setup a bitcoin service for my users. How do other sites or exchanges keep track of each users unique Bitcoin deposit address? And how does the application alert the admin/user when a deposit is made successfully after 2 confirmations?

Which applications can do this? I was thinking of using electrum as it didnt require downloading the entire blockchain. What other apps are there that can do something like to manage users btc.

Just run bitcoind on your server and then connect via API to it, here is the reference:
https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)

There are also ready (open source) libs in several languages, which you can integrate in your own apps.

Some examples:

https://github.com/Bit-Wasp/bitcoin-php
https://github.com/Bit-Wasp/bitcoin-lib-php
https://pypi.python.org/pypi/python-bitcoinlib

But your question is too broad to give you a more specific answer, since you have to consider, if you want to hold user funds in one wallet and just identify them by different deposit addresses or a separate wallet with it's own keys for every single user.

In general: If you don't know exactly what you are doing, don't store any private keys on the server, especially if you want to hold someone's funds.


How does the Chinese Bitcoin ecosystem differ from the European/North American ones? What is the background of the whole Bitcoin ecosystem in China? Their market has been growing insanely in the last days... but I guess it can be very specific (different mentality of people, the Yuan, infrastructure etc.). How is their market different from the European/North American ones?

The Chinese are intense savers and frugal. Their interest in Bitcoin will involve relatively small price corrections.

    Do you want to say the will be resistent to price drops (in the bubbles for example)?

Yes. Bubbles will still happen, but the correction would be less severe because Chinese investors tend to buy-and-hold through the ups and downs. They save a little at a time and don't spend anything until the need to (and the price is high). Being frugal would mean that they'd buy bitcoins when the price goes down rather than panic sell on a momentum trade. Last evening was an excellent example. The bitcoin price should have had a major correction last night, but it was only a minor dip. China investment is increasingly moving the prices.

Chinese people have modest incomes but they save everything. They are limited by law to only having two homes, so you sometimes find children owning homes. They are modest homes, but often the land they sit on (like in Beijing) can be worth millions for new building construction. They invest in family, businesses, real estate, metals, and increasingly bitcoin. China is like America used to be when people were more interested in producing and achieving than consuming and taking.

Lawyers and regulations rule the US. There is no liberty because someone might get hurt. China has little of that. People are free there in many ways that the US is no longer. People are happy and enjoy life there. The bad side of China is well hidden, and is diminished through increasing prosperity.


Comment-to in the API Sendfrom en senttoaddress both have [comment] and [comment-to] as arguments. Comment uses the script to put in a message, thus in a semi-standardized manner. Does comment-to encrypt the message with that public key? I'm kind of guessing in the dark without any explanation. (I'd suggest the tags API, RPC or JSON-RPC but I've no reputation)

comment and comment-to are both just stored as text with the transaction. The intent is that comment be used to store what the transaction is for, and comment-to be used to store the name of the person or organization to which you're sending the transaction.

Neither are stored anywhere besides your wallet (they're not sent with transactions), and neither are encrypted in any way.


blockchain.info api (Balance Updates [POST]) confirmations not received I'm trying to use "Balance Updates [POST] Monitor addresses for received and spent payments" from https://blockchain.info/api/api_receive

I subscribe to an address and get the response:

{
  "id": 15108,
  "addr": "1P9RQEr2XeE3PEb44ZE35sfZRRW1JHU8qx",
  "op": "ALL",
  "confs": 3,
  "callback": "https://d83bb66d.ngrok.io/bitcoin/confirmations",
  "onNotification": "DELETE"
}

then with each new transaction I get a notification with 0 confirmations, that looks like this:

{
   "address" : "1P9RQEr2XeE3PEb44ZE35sfZRRW1JHU8qx",
   "confirmations" : 0,
   "transaction_hash" : "38dbb8083a8c3006eae6c1194789941943cb60201ebfb03963188d4eb1d01d23",
   "value" : -9030800
 }

but I never get a notification with the 3rd confirmation

  confs - Optional (Default 3). The number of confirmations the transaction needs to have before a notification is sent.

I tried setting confs to 1, 2 and leaving it as default, but I never get any confirmations, I have tried with different addresses, right now the transaction in this message has 5 confirmations but I didn't get any notification.

https://btc.com/38dbb8083a8c3006eae6c1194789941943cb60201ebfb03963188d4eb1d01d23

does any one know what's wrong ?

thanks

You need to set onNotification to KEEP, otherwise all future notifications such as those for confirmation number will not be sent.

From the docs:

  You are required to specify the request's notification behaviour. Setting the behaviour to 'DELETE' will delete the request after the first relelvant notification is sent to your callback address. Setting the behaviour to 'KEEP' will send additional notifications every time a transaction with the specified confirmations and operation type is sent to or from the address in the request.


How can I send Bitcoins via SMS? I am considering working on giving Africans access to trade using Bitcoins.

In many ways, parts of Africa is more developed when it comes to mobile payments than the west. The success of M-PESA confirms this. Their security is based upon a special SIM card (see Step 1 in this getting-started guide).

My question

Would it be possible to set up a service where one could send and receive Bitcoins securely via SMS? An additional condition to this question is that the SMS could be sent from a good old crowbar mobile phone without any access to a computer to perform encryption. One should also notice that postal services in these countries should be considered insecure.

Motivation

My motivation for this project is the heavy costs involved with making an overseas transaction to an individual in Kenya, because M-PESA only accepts transactions from oversees using Western Union. This is important because I know that there are huge flows of money going from Africans (and more so Asians) in Western countries to their family-members at home.

Additional points

It should be noted that one can send SMS for free amongst others to Kenya via Google SMS. Their only condition is that the receiver responds to the SMS occasionally in order to avoid it getting used for spam.

Currencies in some African countries are very unstable (for example in Zimbabwe), so the Bitcoin currency could maybe be considered a "hard currency" compared to the local ones.

Just an account on http://phoneco.in/  because thats exactly what the service does.  [Update: Phoneco.in is defunct.]

Update: A new service as well to check out. http://dialcoin.com/ [DialCoin's site is up yet but has suspending service.]


Why do my 'sign message' not work on Bitcoin core If I choose a freshly generated address in Core, and I then choose to sign a message with it, it returns the error message "The entered address does not refer to a key".

Why is this? There should definitely be a key considering that it's an address generated by my seed. It is also the correct address as I checked it multiple times.

Addresses that start with bc1, called Bech32 addresses, can't be used to sign messages, at least for now. It might change in the future.


How to mergemine all SHA-256 altcoins? Let's say I implemented AuxPOW to all of the alt coin wallet.
Would it let me merge mine them with Bitcoin or the developer would have to implement them?

The Altcoin blockchain network itself needs to accept AuxPOW. Peers on the network which don't have a node which understands AuxPOW (so, all of the peers on any network) will reject your merge-mined blocks.

Effectively, you'll be creating your own private fork of the Altcoin blockchain which allows AuxPOW diverging from the original blockchain at the first AuxPOW block, and you'll be the only miner. The developer(s) need to implement AuxPOW, and the community needs to adopt the update. AuxPOW solutions aren't valid on a blockchain network which doesn't acknowledge AuxPOW.


What is a 130 hex character public key? I went onto https://www.bitaddress.org and the last tab there is a place to enter a private key and it shows the various formats of public and private keys.
It is strange to me that the public key can either be 33 Base58 or 130 Base16.  It doesn't seem right, especially since the private key is 51 Base58 or 64 Base16 which makes sense.

So what gives?   Here is a printscreen:

Bitcoin Address (33 or 34 characters, starts with a '1'):
1EHNa6Q4Jz2uvNExL497mE43ikXhwF6kZm

Public Key (130 characters [0-9A-F]):
0479BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F8179
8483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8

Private Key Hexadecimal Format (64 characters [0-9A-F]):
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Bitcoin private keys are 32 bytes, but are often stored in their full OpenSSL-serialized form of 279 bytes. They are serialized as 51 base58 characters, or 64 hex characters.

Bitcoin public keys (traditionally) are 65 bytes (the first of which is 0x04). They are typically encoded as 130 hex characters.

Bitcoin compressed public keys (as of 0.6.0) are 33 bytes (the first of which is 0x02 or 0x03). They are typically encoded as 66 hex characters.

Bitcoin addresses are RIPEMD160(SHA256(pubkey)), 20 bytes. They are typically encoded as 34 base58 characters.


Can a Lightning channel's initial BTC value be updated? When an LN channel is created, it is funded with an initial BTC amount by at least one one peer. But given that most of the whole idea of LN is the existence of long running channels, I wonder if this means that it's possible for a channel to be "emptied", thus making "long running" a bit of a misnomer. Is it therefore possible for the channel's creator to "top up" the channel?

Currently the capacity of a channel stays the same. However on the Lightning Developer Summit in Australia in November 2018 it was agreed that Splicing should be added to lightning. With splicing you can increase or decrease the capacity of a channel (and your balance)

If you don't care about capacity but just about the balance and you want to refill the channel of your channel there are four things you can do:

You can receive a lightning payment by selling some good (:
If you just fund to fill up capacity you could use a submarine swap which works by sending bitcoin in order to pay for a lightning invoice.
You can also use exchange services like zigzag.io in order to send money from your channel to a bitcoin address.
You can route a payment to yourself in order to rebalance 2 of your channels.


How is address recognized between wallets Lets assume I create a wallet in Jaxx and Bittrex for ETH token which in turn creates public & private key pair. I am able to transfer coins between different wallets.

How is the address generated by Jaxx recognized by Bittrex wallet ? Is it because the underlying process of (PGP) generation of public key is same ?

How different is this process from PGP ?

Addresses are a standard encoding of data used by Bitcoin and other altcoins. When you enter an address into a wallet, it will decode it in the specific way that all wallets know to decode an address.

  How different is this process from PGP ?

PGP has nothing to do with Bitcoin (or cryptocurrencies) at all whatsoever.


moonliteco.in Transacions I have 5 Transactions sent by moonlite.in fausit but none ever show any bitcoin and they should. Here is the latest for you to have a look for me.Thank you. Isdaan.
http://ltc.blockr.io/tx/info/f553aa1275908e6e95d89d1454b0f4ba571cf4fdbb9412d7c73917bb51a94bc7

The block explorer says the transaction has been confirmed by block 1173986 which was mined several days before you posted your question. This means you received the money but your wallet software doesn't show it to you.

Make sure your wallet is connected to the internet. If you use a client which downloads the entire blockchain, wait for that process to finish. If you use a client which doesn't download the entire blockchain, make sure you are connected to other nodes / a server (depending on the kind of wallet). Possibly change the server your wallet connects to.


How bitcoin network appends new block in its Block-chain Well, According to my research, After solving the cryptographic hash, when the multiple nodes broadcast the block at the same time as a suggestion to be the next block in the chain. Bitcoin network adds all those blocks to the chain.
Suppose three miners had successfully added blocks (a group of transactions). Means, now there are 3 chains. So, Now the next block will append which Block-chain 1st, 2nd or third? Please explain, How future blocks will append the Block-chain. Moreover, How the network will handle this situation?

Please let me know if my concept is wrong. I will appreciate your guidance. Thanks

The math makes it rare for boxes to be solved at the same time. However, Yes it's true. If more than one miner solves the cryptographic hash at the same time can add a block (a group of transactions) which as a result, leads to multiple branches. In this case, you simply build on the top of the first one you received.
Solution The tie gets broken when someone solved the next block. Because The general rule is that you always immediately switch to the longest branch available. The end result is that the blockchain quickly stabilizes.
So, the transactions of an ignored block of a small chain, go back to the unconfirmed transaction pool and be included in a later block.


Is 3D acceleration needed for GPU mining I'm new to the mining world and want to start with a typical mining motherboard + GPUs rig setup. I plan to use a 100% FLOSS, GNU/Linux based, operating system (Parabola, from which I'm a dev). The thing is that I'm not sure if the convenient GPUs I may use will work with 3D acceleration (due to the lack of free and open source firmware/drivers), although the rest of the features will. AFAIK, the GPUs are used for computing, calculations, etc., but nothing that would require 3D hardware acceleration, right? I think that's only needed for games and 3D modeling, although I'm not very sure about it. Is it necessary for mining?
Thanks in advanced.

First of all, let's make costs clear. If power is extremely cheap for you (perhaps you make your own or have surplus from self-generated solar/wind), and you properly cool your GPU so that it does not burn itself out, then you MIGHT get a tiny amount of BTC from mining with a rig.
Nice Hash gives you about $1.78 per day for renting out an Nvidia 1080 Ti, so you would get $1.78 per day if your electricity costs are zero. A 1080 Ti is about $1125 and uses 250W. (2190 kWh per year, if ran 24h/day). IF you have free electricity, and given that the Bitcoin difficulty does not go up, this means you get about a 57% yearly RoI, and from this you must pay the 22MWh of electricity.
Now that the return rate is clear, the vast majority of GPU miners use a GPGPU language such as CUDA or OpenCL. You do not need 3D acceleration, "only" GPGPU.
But GPGPUs allow accelerating more general computation than 3D, so chances are it's a more difficult challenge to implement as free software. If you don't have drivers for 3D acceleration, it's even harder to have GPGPU drivers.
Here is the Nouveau feature matrix for reverse-engineered nVidia drivers. Note the "WIP" in the last row - the "Compute" one. That is GPGPU support.
I share your frustration, I wish to sometime use GPUs as neural network accelerators, but I refuse to use nVidia's proprietary drivers which offer me little control. I could not even get the temperature of the GPU from the proprietary driver, let alone throttle the card to prevent it from melting itself.


Detecting stolen bitcoins? Is it possible to detect stolen bitcoins?

With so many coins being stolen these days, for the more "ethically conscious" bitcoin users, is it somehow possible to check if the coins (you're about to receive) are from stolen coins?

If it is possible, what's the quickest and easiest way to do this?

Generally, this is not possible.

Since all transactions are public, one could imagine a registry of sorts where a person could report a particular transaction as unauthorized.  You could then consider any coins traceable back to that transaction to be "tainted".  However, there are several problems:

There would be no way to verify the truth of a claim that a transaction was unauthorized.  Even if you required a signature to confirm that the claimant held the private key for the address from which the coins were "stolen", the claimant could have made the transaction intentionally and then reported it unauthorized to defraud the payee.
A Bitcoin thief would likely immediately send the stolen coins to a mixing service to disguise their origin.  Then every other innocent party who used the mixing service around the same time would also have their coins tainted.
There's no way of checking coins that you are "about to receive".  You have no information about the source of coins until the transaction is made.  At this point the coins belong to you.  What are you going to do?  Give them back?


Bread wallet iOS app I am new to bit coin and the bread wallet app, so please excuse me if this is a really obvious question.

I have read a lot of information saying that it is vital to use a new address every time I receive a payment. (https://en.bitcoin.it/wiki/Address_reuse)
The bread app presents me with a qr code with my address below it to receive money, but no apparent way to create a new address.

Am I missing something really obvious, or is it ok to use this same qr/address over and over?

Breadwallet creates a new address every time you use the one displayed.

There is no manual way of creating a new one manually.


Did I just get defrauded by Coinbase? I bought 10 bitcoins, 4.5, and .4 on Oct 18/19 @ around $150-160.  On Oct 24, within almost the hour that the coins were supposed to arrive, I receive the following email for all 3 transactions:

  On Oct 18, 2013 you purchased 10.00 BTC via bank transfer for
  $1,556.76.

  Unfortunately, we have decided to cancel this order because it appears
  to be high risk. We do not send out any bitcoins on high risk
  transactions, and you will receive a refund to your bank account in
  3-4 business days.

  Please understand that we do this to keep the community safe and avoid
  fraudulent transactions. Apologies if you are one of the good users
  who gets caught up in this preventitive measure - we don't get it
  right 100% of the time, but we need to be cautious when it comes to
  preventing fraud.

  You may have more luck trying again in a few weeks. Best of luck and
  thank you for trying Coinbase.

  Kind regards, The Coinbase Team

I didn't think it was a big deal after doing a little research since they have squared things away with similar situations, and I've made a 10BTC transaction in the past, but i was a bit worried because of the size of the transactions and the movement of the market.  I ask this how could this be fixed?

6 days later, I finally get a response:

  Sorry for the confusion on that. It looks like your recent purchases
  were canceled due to appearing high risk, and a refund has been sent
  to your bank account.

  I know it must be frustrating to have this happen, but it's an
  unfortunate necessity that we exercise caution when selling bitcoin
  online in order to protect ourselves and the bitcoin community from
  fraudulent transactions. While bitcoin transactions from one account
  to another do not face this kind of cancellation, we can't guarantee
  the sale of bitcoin to every account due to the high risk nature of
  selling them online. If you try a purchase at a later time then you
  may have success getting it to go through. Please don't hesitate to
  shoot me an email if you have any further questions!

  -Rees D. Sloan

  Customer Support Specialist

This response really didn't tell me anything.  So I ask what my other options are and here is there next response:

  Hi _ ,

  I am extremely sorry for the confusion on this. I've taken further
  steps to review your account and at this point we've been able to get
  you whitelisted. Any future purchases you make from this point forward
  will not encounter this cancellation. Unfortunately, since the refund
  has already been sent out on these original purchases, I'm unable to
  push through or re-create the original transactions.

  Again, I apologize for the frustration this has caused. If you need
  further assistance please let me know and I'll be happy to help!

  -Rees D. Sloan

  Customer Support Specialist

Something really just doesn't add up here.  At the date and time that the bitcoins were supposed to be added to my account, the price was at like ~199 and 200+ on bitstamp and mtgox.  Thats ~$50 increase since the time i bought it, costing me nearly $7-800.

So what did coinbase do with the ~$2500 that was in limbo for so long?  And what happened to the bitcoins that was purchased at much cheaper prices?

I mean coinbase could have just denied these transactions right away, and I could have went to another site to buy it right away.

The thing that really hurts about this is that none of this money was mine.  I am just a student and I finally convinced family and friends that bitcoin is a worthy investment and they finally trusted me giving me this money to invest.  Is there anyway that this could be reconciled?

No, you were not defrauded because you did not lose anything real.

You did not lose 10 BTC.
You did not lose $1,556.76.
You lost potential, yet unrealized gain as a result of the delay in processing your order.

You may have not had access to either amount for a period of time because of the flag thrown on your transaction.

AFAIK, Coinbase does not publish its criteria for flagging transactions. Doing so would likely make it more difficult to detect transactions that would defraud them.

One way to look at it is that this is not Coinbase's fault. Coinbase has to protect itself from both financial and legal liability. It can refuse to do business with anyone it so desires if it feels the transaction may not be made with legally obtained funds by people with whom it can legally conduct business.

If you are unhappy with the delay, and that's enough of a transgression for you not to use Coinbase again, then that's your decision to make. However, this can happen with anyone as automated and needfully paranoid as Coinbase.


How Blockchain ensures transactions are not lost? I have a doubt about how the Blockchain system avoids transactions to be lost.

Let me use an easy example:

Let's say there are only 2 mining pools (A and B), which are both trying to find a hash for block 5 to add it to the chain.

Now, A's block 5 can differ from B's block 5 in terms of transactions. E.g. the transaction "Alice buys a coffee for 5 BTC" can be in the block 5 for pool A, but not in block 5 for pool B (e.g. because this transaction arrived later to the node B compared to the node A).

Now, if the winning node for this block is the node B, the transaction "Alice...." won't be stamped in the ledger.

When the competition for the block 5 is over, are the "losing" pools/nodes (in this case the pool A) dropping all the transactions in the block they were working on? and take new transactions from the memory pool?

In this case, if the pools A and B start looking for block 6's hash, the transaction "Alice...." could be in block 6 for pool B, but it WON'T be in block 6 for pool A (pool A dropped this transaction when loosing the "race" for hashing block 5).

What if node A hashes block 6 before B? Now B will drop the transaction in its block 6, so the transaction "Alice...." is disappeared definitely.

Please correct me

Cheers

Why do you think that the transaction will be "lost"?

It will simply stay in the mempool as long as it is broadcasted by the sender and it will stay there until a miner decides to work with it, and thus confirm it in a new block.

A miner dropping the transaction because he doesn't want to include it in the next block that they're mining simply won't make it disappear.

If node B fails to get the next block, where they intended to confirm Alice her transaction, it would simply mean that her transaction will be in the mempool until another miner uses it in his block.

Note that this can happen simultaneously, it seems to me that you think that it is only possible for a transaction to be mined by 1 miner at the time, although this isn't the case.


How to transfer bitcoin bought online to my desktop wallet? Based on popular recommendations, I have started with Electrum as my Ubuntu desktop wallet and Coinbase as the way to buy bitcoin online.

However, it doesn't seem like there is an easy way to transfer bitcoins from Coinbase to Electrum (not without using a paper wallet).

Is this correct? If I want to conveniently buy bitcoins only, but want to securely store them on my own offline hard drive, what's the best way to do it?

You can easily send your bitcoins from Coinbase to Electrum.

Once logged into Coinbase click on the Send / Request button on your left hand menu. A form will pop up asking for an email address or bitcoin address.

What you want to do is enter in one of your bitcoin addresses from Electrum. Open up Electrum and click on the tab labeled "Receive". You can pick any address that is listed there under Main Account > Receiving.  Pick one, copy it and paste it in the Coinbase form that asks for an email address or bitcoin address.

From there just complete the form and hit send. Your funds will now be transferred to the address on your Electrum wallet. Be sure to back up your wallet and seed. If your computer crashes/breaks and you don't have a back up YOU WILL LOSE ALL OF YOUR COINS.


What is the address format of a lightning network address? Are lightning network addresses the same as bitcoin addresses or are they completely different?

The Lightning Network does not use addresses for payments within the network.

When you want to pay someone, you will be given a Lightning Invoice (specified in BOLT 11) which will look like a very long address. These invoices specify various parameters of the payment you will make except for the amount itself. It provides the information necessary to route a payment to the recipient.

However Lightning invoices are different from addresses. Besides being very long, they are actually one time use as you can't use the same hash preimage for multiple transactions over LN. They are also much longer than addresses; these invoices aren't things that you would want to read out to someone. Although they still use Bech32 for encoding, Lightning invoices are completely separate from Bitcoin addresses and unrelated to Bitcoin addresses.


Can Bitcoin mining with my current specs break my PC? I use the Windows Store app mining program. Will it harm my computer if I'm using the following specs:

Intel i5 3.2Ghz
NVIVIDA GeForce 730
8GB RAM
2TB Hard Drive

Thanks in advanced!

I have no idea what "Windows Store app mining" is, but it may very well be a scam and malware, as it makes absolutely no sense whatsoever to mine Bitcoin on a PC. Malware can harm you and your computer.

If it's not malware, it will run your PC hot, causing more ware and tear and thus harming your PC by causing premature breaking of parts.

If nothing else, it will harm your wallet, as you'll be paying an increased electricity bill, while getting nothing in return.

In short: just uninstall whatever that thing is and check for malware some more. If you want to learn about real Bitcoin mining, you'll have to read up on the subject some more first.


Ripple ledger time format? I am wondering what is the format used in Ripple ledger time? For example, one of the most recent ledgers had close_time of 447299110. I initially thought it was UNIX time, but the current time was 1393983976 - an order of magnitude of difference.

What is the Ripple ledger time format and how to convert from a UNIX time to that format?

Ripple times are seconds since 1/1/2000 00:00 UTC. You can add 946,684,800 to a Ripple time to convert it to a UNIX time. If you are writing code to convert from Ripple times to UNIX times, please do your math in a 64-bit variable, not a 32-bit one.


More than one valid hash block Discovering a new block is a task about generation of millions of hashes in order to find one valid hash, which is a hash less than the current target.

The question is: Are there more than 1 valid hash? Is it possible to find more than 1 hash valid for the same block? Maybe there are multiple nonce suitable to valid block hashes.

Yes, its possible for there to be more than one valid hash.  I don't know what the mathematical probability of this is, but if you were to exhaust the entire nonce spectrum, there are likely to be several valid blocks.  Most blocks, however, stop when they get a valid hash, so it seldom is an issue.  Though occasionally, two miners might come up with different valid hashes at the same time, and this results in one of them being rejected.

As for a collision, well, that's effectively impossible.  First, yes, it's possible that the same hash could be found for two different blocks, but that's not a collision.  It's also highly unlikely.  Unlikely to the point of there being no point in dealing with it.

Yes, it could screw up certain software that assumes hashes are indexable and unique, but it shouldn't really be an issue for the blockchain itself to have duplicate hashes.

The only real "collision" would be if an attacker were trying to come up with his own block of transactions, with the same parent that would somehow hash to the same value and trying to "take over" the other block, and that is astronomically unlikely to the point of absurdity.


How can get Bitcoin client API account() name I have setup the BIK_php API of  http://bitcoindevkit.com/  in PHP.
Now, I am able to connect and generate new addresses, but when I am going to call some functions like getaddressesbyaccount, sendfrom etc as given in Bitcoin API call list at https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list , these functions requires "account" parameter as , but I could not understand where from I can get the account value?
So, Please let me know what will be the value of , and how can I get the   value from?

From the API page that you linked:

getaccount <bitcoinaddress> Returns the account associated with the given address.


What methods are available to accept Bitcoin payments? I'm curious about offering Bitcoin payment instead of PayPal (for all the usual reasons for disliking PayPal). Is this realistic, or is my understanding of how bitcoins can be used off?

My customers are mostly nerds or at least tech-savvy people, so they are somewhat likely to be familiar with Bitcoin, and equally likely to be sceptical towards PayPal.

Are there any decent guides on how the whole thing ties together, and which merchant actors are considered serious or "big players"? I'll be looking at getting the bitcoins through whichever funnel is required and transferred to my "real cash" bank account (in any currency, really) as quickly as possible.

Of course, it wouldn't hurt if I could get the coins all the way to my bank account for a <2% commission, but I'll take reliability over price any day of the week.

Clarification: I sell a commercial software license to an open source product (free for personal, non-profit etc use), so there's nothing to be delivered upon purchase. Current options are hand-rolled integration to credit card and PayPal providers.

There are a number of approaches, and the best method for you will vary on a number of factors.

For instance, if you sell a digital good it might be easier to simply sell the item through an online store like CoinDL, where you simply direct your customers there.

Similarly, if you sell a couple of items at a fixed rate, you could sell it on BitMit.net, again -- your e-commerce site simply directs your site visitors looking to pay with bitcoins there.  A blog post on Coinbase describes a "Buy Now" button modeled after another leading e-commerce payment solution.

If you already use an e-commerce shopping cart you might have an easy way to start accepting bitcoin if there is a module for that cart interface software that accepts bitcoin.

When following the DIY route, you can have the proceeds of your sales converted to fiat upon receipt.  Some exchanges (like Mt. Gox) offer "autosell" for shopping cart tools so that proceeds convert to USDs (or other currency) upon receipt.

The easiest way, however, is to use a payment processor like BitPay, WalletBit, Paysius, and ZipBit.  These are used in a similar way that a site uses PayPal to accept payment online.  The payment processor will provide all that is needed for your e-commerce site, and will provide a method to receive cash via a bank transfer.


Is there a list of existing businesses that have started to accept Bitcoin? As opposed to new business that sprung up and accept Bitcoin from day 1.

I believe it will much shorter than the Trade wiki page, and perhaps more valuable in a certain way.

I created this page on the Bitcoin wiki, please add to it.

(BTW, the wiki is extremely slow for the last day or so)


Use same Electrum wallet file for new purchases of Bitcoin? I used Electrum before the August 2017 Bitcoin fork.  Now, I understand that I own both Bitcoin and Bitcoin Cash with the same keys.

I'm in no hurry to access my Bitcoin Cash.  However, I would like to buy some more Bitcoin and transfer it into Electrum.  When I do, should I create a new Electrum wallet file?  What happens if I transfer Bitcoin into my old Electrum wallet?  Will it screw up my Bitcoin Cash or get mixed up with Bitcoin Cash?

I assume that a new Electrum wallet file will support the new Bitcoin (after the fork).  Now, they're talking about another fork into Bitcoin Gold.  Is Electrum's wallet the best to use in anticipation of another fork?

Install Electron-Cash (note the slightly different name , electron, that distinguishes it from the original electrum).

The first release of Electron-Cash had an annoying bug whereby it looked for wallets in the same folder as Electrum: this may have been fixed by now (I haven't checked), but avoid making any transactions until you're sure. You do have the option of specifying a wallet folder of your own choosing.

Once you've ascertained that you're using separate wallet folders for Electron-Cash versus Electrum, you should copy  (not move!) your old wallet file from your Electrum wallets folder into your Electron-Cash wallets folder. Make life easier for yourself by giving it a recognizable name (if the old wallet file is called default_wallet, then use some other name, perhaps BCHdefault_wallet, for your new copy).

In Electron-Cash, open your newly copied wallet (if you took the precaution of giving it a distinct name, then you'll have to specify that name in order to open it). You are now viewing your balance of BCH at an identical address/addresses to your BTC balance. BCH has built-in replay protection, so you can safely move them to some other address without accidentally moving your BTC. Obviously, the safest place to send this is an address (controlled by you) that doesn't have any BTC in it.

There's nothing to stop you from sending them to an unused address in the same wallet, but if you do that, you would then want to go to your BTC wallet (Electrum) and mark that address as "frozen" (and in the new BCH wallet you would want to "freeze" any addresses, including change addresses, that you know, from looking in your old wallet, to have BTC in them).

For any future forks, don't blindly assume that replay protection is built-in. It was for the August 2017 fork, but you'll have to do your own research next time!


Nulldata transaction information Can someone give more information on that type of transaction? Why is it useful for the network. Can it be claimed since it has OP_RETURN command?

From he official Developer Guide:

  Null data scripts let you add a small amount of arbitrary data to the
  block chain in exchange for paying a transaction fee, but doing so is
  discouraged. (Null data is a standard script type only because some
  people were adding data to the block chain in more harmful ways.)

    script: OP_RETURN <data> (Null data scripts cannot be spent, so there's no scriptSig)

Another information (which is related to your example):

  This pattern is often used to encode data in the blockchain. After the OP_RETURN you can
  insert arbitrary data. The advantage is that the simple bitcoin nodes can prune the transaction
  saving memory, while full nodes will hold it. This is considered good behavior when
  ‘misusing’ the blockchain for storing data.

As you can see in your example there are data following the OP_RETURN so it was used to encode data into the blockchain.


Why there are no OP_CODEs for querying the blockchain and retrieving data to the stack? Blockchain data is immutable, so once valid a transaction will always be valid and full nodes can verify it.

There are several reasons why I think having those would be a terrible idea.

Scalability. If scripts can access arbitrary pieces of the blockchain, fully validating nodes would require (fast!) access to the entire chain. This is currently not the case - fully validating nodes do not need the full chain, but only a small database of unspent transaction outputs (which is less than 3 GiB, and grows much slower).
Mempool management. If script validity can depend on the state of the blockchain, unconfirmed transactions can be invalidated by new blocks. It is possible to construct these hypothetical blockchain inspection opcodes so that new blocks never invalidate things (e.g. only have opcodes that fetch from a block, and if that block is not found, cause immediate script failure). However, even in that case validity may be affected by reorganizations. That would effectively mean that the entire mempool would need to be revalidated after every reorganization.
Fungibility. Related to the previous point, it is even the case that deeper-than-1 reorganizations may affect the  validity of already confirmed transactions. This means wallet software would need to be extra careful about accepting payments with transactions whose validity depends on blockchain state, as reorganizations have an increased chance of wiping them out, even when the sender is completely honest. This is not true for transactions right now - transactions removed during a reorg can always be re-accepted in new blocks in the new branch.


Meaning of the Tables in the Blockchain Database I've grabbed "Abe" and have started processing the blockchain into a database, but I can't really find documentation on what the various tables mean / are / contain.

Here's the list:

abe_lock
block
block_next
block_tx
block_txin
chain
chain_candidate
configvar
datadir
magic
orphan_block
policy
pubkey
tx
txin
txout
unlinked_txin

I can make some guesses, but documentation would be better. Can anyone explain what's in each of these, or point me to some documentation?

Thank you, if you can help!

I've worked with Abe for some time; I'll try to have a run at it... I'm using the latest table list from Database version Abe39 on MySQL.

Utility tables:

abe_lock:

Used for locking while performing DDL
configvar:

Configuration and results of some auto-detected SQL features.

Blockchain tables:

block:

Block hash and related statistic/infos.
block_next:

Forward-linking of blocks (blocks references only the previous block; this table links to the next one).
block_tx:

Links blocks to all their transactions in tx.
block_txin:

I believe this is merely a "shortcut" table that contains information accessible elsewhere: somewhat links together block_id, txin and the block it's spent on.
orphan_block:

Used to link orphan block (for eventual out of order/multi-threaded indexing?) References the previous block hash (since we do not have pref block_id yet).
tx:

A transaction: links to inputs (txin) and outputs (txout)
txin:

A single transaction input.
unlinked_txin:

As for orphan_block, links to txin we do not have loaded yet. References the txout_hash as we do not have yet the txout_id.
txout:

A single tx output
pubkey:

A bitcoin address (pubkey)
multisig_pubkey:

A multisig pubkey
chain:

Chain name and properties (one per cryptocoin)
magic

Per-chain magic number
chain_candidate:

Identifies each block height and whenever it's part of the longest chain or not.
datadir:

Information relative to blockfile indexer

Sequences:

This is pretty much DB-specific; on MySQL these are tables that have a single AUTO_INCREMENT column and are used to create unique keys for their respective tables:

block_seq
chain_seq
datadir_seq
pubkey_seq
tx_seq
txin_seq
txout_seq


If I've lost my wallet, but know my bitcoin receiving address, can I get my bitcoins back? Although I do have a backed up wallet file, I seem to also have a second bitcoin receiving address, which doesn't seem to correspond to it. Is there a way to recover any coins associated with that receiving address, or are the coins lost forever?

You can't get your bitcoins with just the receiving address (if that could be done, they could easily be stolen), so your only chances of retrieving them are:

If they're stored in the wallet file you have backed up, then you can use that
Somehow recovering the original wallet file, which is a data recovery exercise. This might be possible in the case of a failure or deletion of a hard disk, or a deletion from an SD card/memory stick


Best practices for service/merchant handling bitcoins Possible Duplicate:
  Best way to safely host a high volume online transactional wallet?

There have been numerous incidents where bitcoin services have been hacked and large amounts of bitcoins have been stolen. There was even an exchange that accidentally deleted its only copy of its bitcoin wallet.

Which best practices should a service or merchant follow when handling bitcoins?

This is probably best conveyed using the wiki:

http://en.bitcoin.it/wiki/Securing_online_services


Does RevokeSSL Require Self-Signed Certs to Work? // ,

I don't want to go to https://bankofamerica.com and see it self-certified.

I don't want to go to https://amazon.com and see it self-certified.

I don't mind going to https://patriotact.wordpress.com and seeing it self-certified, because it doesn't take orders for money, or handle messages.

Now, our government wants everything tagged with the legal ID of the site owner.

How do the above provenance requirements for compliance affect RevokeSSL's effectiveness?

If I use a certificate that is not self-signed, is there a point to using RevokeSSL on the blockchain?

Christopher Allen recently gave a presentation here: http://www.meetup.com/SF-Bitcoin-Devs/events/222712738/

However, I left with a feeling like I did not have a sure y/n on certain core issues.

Am I asking this question correctly? Is this specific enough?

Can we add an SSL tag?

RevokeSSL requires one of the following:

self-signed certificates
certificates signed by CAs that are willing to include extra information in what they sign.

This is because there is a false revocation attack available if the certificate does not contain the information (the address that's going to be used to create the verification transaction) needed for RevokeSSL to work.

Victor (the victim site owner) is up against Mallory (the malicious adversary who wants to harm Victor's site reputation):

Victor creates site, creates certificate, but doesn't include the RevokeSSL verification address.
Mallory obtains Victor's site certificate.  (He does not need to obtain any private keys.)
Mallory creates a RevokeSSL-formatted transaction, containing the OP_RETURN value that is the hash of the certificate he wants to falsely revoke.
Some time later, Mallory "spends" the transaction, revoking Victor's site certificate.

If the hash of the certificate were used to search the OP_RETURNs, this attack would work.  If the original certificate includes the address used to create the verification transaction (and the verification transaction includes the hash of the certificate in question as OP_RETURN), then this attack cannot falsely revoke the certificate.


Do we need to maintain the ability to do a reorg over 100 blocks? The protocol requires that freshly generated coins wait 100 blocks before they can be spent in order to avoid polluting bitcoin addresses with bitcoins that are "uncreated" by a reorg that invalidates the block that created them.

If we decide that "the chain with the most difficulty" means "the chain with the most difficulty over the last N blocks" and pick a good N, it could make some things simpler AND make transactions at a depth of at least N immune to a 51% attack.  Thus, it limits the value of cornering the market in hashing power.  Such "cornering" could happen without being noticed, so it has begun to worry me.

If I remember correctly, we've already done this by (sometimes?) making checkpoints in the Satoshi client at sufficiently large depths when new clients got compiled.

N = 4032 would ensure that two difficulty levels are spanned.
N = 100 would change the pain of a 100-block reorg from something barely tolerable to something impossible.

If the protocol were changed to use this, then a UTXO database based on the results of the blockchain up to the checkpoint block could replace the gigabytes of blockchain that we currently use for validation.

EDIT: Why I asked: It would be nice to validate a UTXO database so that one didn't have to build it from (always increasing GBs of) downloaded block data.  We validate transactions before passing them on, but do we validate them when we download a(n old enough) block?  I think we trust that whatever (old enough) block we get from a peer contains good transactions, so we don't hunt all previous blocks to validate them.  If this trust is already being used, as I suspect, perhaps it is more useful than we know.  I asked a related question: Would a normalized, hashed, protected chainstate reduce miner storage costs?.  I'll have to explore the work on making a UTXO Merkle tree as that seems promising.

If the protocol were changed to use this, then a UTXO database based on the results of the blockchain up to the checkpoint block could replace the gigabytes of blockchain that we currently use for validation.

You can already do something similar to this by turning on -prune. That can cause your node to stop working if the reorg is more than 288 blocks, though as you noted, that doesn't happen often.

That still requires you to download the entire blockchain in the first place, of course.

  If we decide that "the chain with the most difficulty" means "the chain with the most difficulty over the last N blocks" and pick a good N, it could make some things simpler AND make transactions at a depth of at least N immune to a 51% attack. Thus, it limits the value of cornering the market in hashing power. Such "cornering" could happen without being noticed, so it has begun to worry me.

Suppose a node joins later, after the new chain has been published. From its perspective, the two chains were created at the same time. Because of that, it would naturally choose the one with more work attached to it.

So how do we avoid that? This is a problem that's a lot more complicated than it looks.

  The protocol requires that freshly generated coins wait 100 blocks before they can be spent in order to avoid polluting bitcoin addresses with bitcoins that are "uncreated" by a reorg that invalidates the block that created them.

Sure, but we're talking about two levels of consequences. In one circumstance, one person on the network loses money. In the other, the blockchain is forked forever.


Sandbox bitcoins status is pending I have registered on https://sandbox.coinbase.com before, two days ago. They are showing me that I have received 100,000 bits.

It's been 3 days that status is still in pending state. What am I supposed to do?

It would probably be easiest and fastest to simply request addition testnet coin from a faucet. I'd suggest TP's TestNet Faucet which at the time of this writing is giving out 0.94 tbtc per request.

If this also doesn't work, it's possible that Coinbase's testnet node is down, in which case you'd have to contact their support team.

Please remember to return your tbtc to TP's Faucet once your done with it!


First time user. How can I recover my BTC? I've done hours and hours of research trying to unstick my coins with no luck. I bought them off coinbase and transferred them to this stupid google app called sparecoins, from there I transferred to blockchain and then spent them from there. I had no idea really what I was doing. I didn't realize they had to be confirmed. So my money made it to sparecoins app confirmed but after that the next 2 stops it never made it. They sit stuck. Nobody stole it or used it, it's just stuck. The sparecoins app (which I should have never used) has a back up wallet button which makes a file opening the file with notepad it has this at the top "Encrypted Privated Keys (AES) Use a SHA256 digest of your password as the encryption key" and 13 lines of jumbled up letters. I've tried and tried and can't figure out how to recover these funds. Can anyone help?

Encrypt your addon password here https://myeasywww.appspot.com/utility/free/online/Crypt_Decrypt-MD5-AES-HMAC-SHA-DES-RABBIT/en?command=UTILITY&ID=2

Copy the result from sha256result.

On this site https://www.browserling.com/tools/aes-decrypt

enter the encrypted key from the "download" file in the top box, your encrypted password in the bottom

The result should be your private key, you can create a new wallet https://blockchain.info/wallet/#/signup and import via settings, addresses, import bitcoin address


Has someone compared the cost of mining vs. that of brute-forcing addresses? It is known that the type of computing power required for mining is the same used to generate addresses, and it is known that "in general" it is much more profitable to simply mine, rather than try to generate addresses hoping to stole their content.

But AFAIK there are some addresses out there which contain a huge amount of bitcoins: successfully generating their private key would award you a lot more bitcoins than those you would get generating a new block.

Has someone actually made some figures comparing the average revenue of mining vs. the chance of generating the key of a very rich address?

The chance of generating the key of a very rich address is effectively zero. That is, in the entire history of humanity, nobody has come anywhere close to accomplishing such a feat.

Let's consider 1 Bitcoin a score. Since there can never be more than 21 million bitcoins or so, you need to hit on one of at most 21 million accounts. Let's say you could try 2 trillion accounts per second. Your odds of matching an account in a hundred years are approximately one in 11 billion billion.

Good luck.


Bitcoin-qt multiple wallets and transferring between? I am sharing pool mining with a friend with equal cards. We are splitting what we mine in half. I also have a couple extra cards of my own. I want to have one wallet for our shared stuff and one coming from my private mining stuff. In bitcoin-qt how do I setup a wallet for the group one and a wallet for just me on the same computer?  Do I just copy in and move out wallet.dat files when I want to use one or the other?

Also what if I want to move money from one wallet to the other how would I do that?  Both wallets are on the same computer?

Thanks.

You can use a combination of command-line arguments in a shortcut, namely, the "-wallet=" and "-rescan" arguments, to run Bitcoin-qt using different wallets.

Say you want to work with 2 different wallets (one for your shared mining profits, and the other for personal mining profits)

Step 1:

Start up bitcoin-qt and set it up so that it doesn't start up automatically when windows starts up (Settings > Options > Main)

Step 2

Visit your Bitcoin Data directory, located by default at:

C:\Documents and Settings\YourUserName\Application data\Bitcoin (XP)

C:\Users\YourUserName\Appdata\Roaming\Bitcoin (Vista and 7)

And rename your wallet file. In this example we will name it "Personal Profits.dat"

Start up Bitcoin-qt and let it generate a new wallet file (upon finding that there's no "wallet.dat file, the client creates a new one). Encrypt it (use a strong password) and close the client.

Step 3

Set up the short-cut.

If you already have a shortcut created to start up Bitcoin-qt you can make a copy (The original will keep on working with the newly generated wallet.dat, the new one will use a manually specified wallet file).

Otherwise create 2 differnt shortcuts for the client, leave one as is, and edit the other one as noted here.

Right-click on the shortcut you want to use with your shared profits wallet and go to properties, and on the "Shortcut" Tab, add this line a the end of the "Target" Field like so:

C:\Program Files\Bitcoin\bitcoin.exe -rescan

Now right-click on the shortcut you want to use with your personal profits wallet and edit again, like so:

C:\Program Files\Bitcoin\bitcoin.exe -walletfile=Personal_Profits.dat -rescan

Final Thoughts:

As noted on answer posted below, the "-rescan" argument is necessary to avoid issues with your balances (missing funds)

As for how to transfer money from one wallet to the other, while running the client using wallet A, take note of an address on the wallet. Close the program, and run the other shortcut. Now use the send option on the client and fill in with that address. (Method can be used both ways).

And yes both wallets are on the same computer and even the same directory (Bitcoin Data Dir as explained above)


Can attackers change transactions during a 51% attack? If in a 51% attack transactions can be reversed, isn't it possible that the chain with more hash rate also changes transactions (for example if x sent 5 btc to y, they would change it to x sent 500 btc to y)
and then would confirm such malicious transactions more often than the corresponding good transactions that were confirmed on the honest chain.

I have this notion that transactions get n number of confirmations if after the block with that transaction was added, n more blocks were added.

No. A 51% attack cannot modify transactions or those transactions become invalid. Blocks do not dictate whether a transaction is valid. Transactions have their own validity rules and if a block includes an invalid transaction, then that block is invalid, regardless of the Proof of Work.

Changing a transaction's details as you suggest requires producing a new signature. Only the original creator of that transaction can do that. So attackers cannot just arbitrarily change people's transactions as they do not have the private keys necessary to create those signatures. Thus any modifications they make will result in invalid transactions.

All that an attacker could do is remove transactions from history and insert their own transactions. They could only replace their own transactions. The danger of a 51% attack is that the attackers can replace their own transactions paying someone else with a double spending transaction that pays themselves thereby undoing a transaction.


How to run --zapwalletxes command? I am having problems running the --zapwalletxes command from the cmd prompt.  I type C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe --zapwalletxes=1.  After entering this the CMD prompt states that C:\Program Files is not recognized as an internal or external command, operable program or batch file.  If anyone could help troubleshoot that would be great. Thanks.

--zapwalletxes

You're missing a 't'. It's -zapwallettxes.

Also, you may need to adapt the path to the actual installation directory of the program on your computer.


BCC transferred to BTC wallet on trezor i made transfer of BCCto my trezor walltet from an online exchange, but by mistake entered my BTC address of trezor, exchange shows transaction is completed. how to recover the same.

Following the steps from "How to claim your Bitcoin Cash (Bcash)" by Trezor Blog should do the trick.

https://blog.trezor.io/claim-bcash-bitcoin-cash-bch-bcc-trezor-wallet-f0a810d5864a

Steps:

1) Make sure Trezor uses latest firmware

2) Connect your Trezor

3) Go to Coin splitting tool

4) Receive your Bitcoin Cash


Error parsing JSON in bitcoin-cli signrawtransactionwithkey I have issues trying to sign a 2/3 multisig tx with the first private key.

What am I doing something wrong or am I missing something for the arg?

Command format:

/usr/bin/bitcoin-cli -testnet signrawtransactionwithkey "multisig_tx_hexstring" \"privatekey1\"  {\"txid\":\"id\",\"vout\":n,\"scriptPubKey\":\"hex\",\"redeemScript\":\"hex\"}

Filled in:

/usr/bin/bitcoin-cli -testnet signrawtransactionwithkey "02000000017b0cd6ab6beebace32e00f27aea8092879e178a77d2d0e74d001e10b39f560d10100000000ffffffff0100093d000000000017a9145e235c002eb66a1c33abccfb805043a036baf7798700000000" \"cNoe7mVGEVFwUwQXuCJadosEVPYU5rcCVxzTr46gYWbWMD8gXR7b\"  {\"txid\":\"d160f5390be101d0740e2d7da778e1792809a8ae270fe032cebaee6babd60c7b\",\"vout\":1,\"scriptPubKey\":\"a9145c975f4c6d18fa1abd25018e1fa3c18e58c9e93b87\",\"redeemScript\":\"5221029558bd8bc6e0cac883cac93a420bf8e68e76e8e07944f6034e3c5eadd3f1a4db21038d217a8fa3960a3b3212bc545566c5c48add11003551cb23c0d744a13f9ab8272102fcd0e6ff324c7a3bc9a8e224d61cd9ccd244c54186848ca3035a54736a9780d653ae\"}

And the error:

error: Error parsing JSON:"txid":"d160f5390be101d0740e2d7da778e1792809a8ae270fe032cebaee6babd60c7b"

Try this:

You need to provide the private keys and the utxo as arrays and make sure it is valid json and in quotes.

$ /usr/bin/bitcoin-cli -testnet signrawtransactionwithkey "02000000017b0cd6ab6beebace32e00f27aea8092879e178a77d2d0e74d001e10b39f560d10100000000ffffffff0100093d000000000017a9145e235c002eb66a1c33abccfb805043a036baf7798700000000" '["cNoe7mVGEVFwUwQXuCJadosEVPYU5rcCVxzTr46gYWbWMD8gXR7b"]'  '[{"txid":"d160f5390be101d0740e2d7da778e1792809a8ae270fe032cebaee6babd60c7b","vout":1,"scriptPubKey":"a9145c975f4c6d18fa1abd25018e1fa3c18e58c9e93b87","redeemScript":"5221029558bd8bc6e0cac883cac93a420bf8e68e76e8e07944f6034e3c5eadd3f1a4db21038d217a8fa3960a3b3212bc545566c5c48add11003551cb23c0d744a13f9ab8272102fcd0e6ff324c7a3bc9a8e224d61cd9ccd244c54186848ca3035a54736a9780d653ae"}]'


How long does a transfer take I made a few transfers from a btc free mining app 4 times each for 500000 satoshi and it said it would take 10 days to show up in my coinbase wallet, but nothing yet.can I somehow track the transactions so I don't lose 2000000 satoshi?

Transfers in bitcoin can take anywhere from a few minutes to a few days depending on the network status and the fee paid. Currently, it's closer to a few minutes. In either case, you can also usually view unconfirmed transactions in your wallet or on block explorers such as blockchain.info.

In your case, however, things seem unlikely. All such apps that I've ever heard of (free mining, free btc, etc.) are scams, and never actually pay you. They will simply claim the withdrawal is pending, or keep telling you that you are under the withdrawal limit, while using your device for ads, or other purposes.


Walking through a transaction script - blockchain.info As an example, I would like to consider this transaction: https://blockchain.info/tx/6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516

I have three questions:

1) The first two entries in the stack are <sig> and <pubKey> for each input. However, the inputs are just giant strings. For the first of the two inputs, it is

3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01

Where are the two separate items, the signature and the public key?

2) I understand that OP_DUP duplicates the top item on the stack i.e. the publick key and then OP_HASH160 computes the hash. Assuming I have the <pubKey>, I'd like to actually run OP_HASH160 and see that I get the result 12ab8dc588ca9d5787dde7eb29569da63c3a238c using a tool like this http://bitcoinvalued.com/tools.php. Where exactly is the <pubKey> that yields this hash?

3) Finally, there is the OP_CHECKSIG which should take ,  and  and return true or false. Where exactly are these items in this transaction?

This transaction is a Pay-to-pubkey transaction, so there is no OP_DUP and no OP_HASH160. When validating an input, you first need to find the scriptPubKey of the output that this input spends from. The first input of your transaction spends from the first output of https://blockchain.info/tx/ff3dc8b461305acc5900d31602f2dafebfc406e5b050b14a352294f0965e0bf6. The scriptPubKey of that output is

04c9560dc538db21476083a5c65a34c7cc219960b1e6f27a87571cd91edfd00dac16dca4b4a7c4ab536f85bc263b3035b762c5576dc6772492b8fb54af23abff6d OP_CHECKSIG

To evaluate the input script, we concatenate the input script with the output script, so our final script is

3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01 04c9560dc538db21476083a5c65a34c7cc219960b1e6f27a87571cd91edfd00dac16dca4b4a7c4ab536f85bc263b3035b762c5576dc6772492b8fb54af23abff6d OP_CHECKSIG

The first array of bytes (3046...5d01) is the signature. That is first pushed to the stack. Then the second array of bytes (04c9...ff6d) is pushed to the stack; that is the public key.

So the stack now looks like

04c9560dc538db21476083a5c65a34c7cc219960b1e6f27a87571cd91edfd00dac16dca4b4a7c4ab536f85bc263b3035b762c5576dc6772492b8fb54af23abff6d
3046022100e26d9ff76a07d68369e5782be3f8532d25ecc8add58ee256da6c550b52e8006b022100b4431f5a9a4dcb51cbdcaae935218c0ae4cfc8aa903fe4e5bac4c208290b7d5d01

Lastly OP_CHECKSIG is performed. It pops the top two items on the stack. The first item popped is treated as the public key (and in this case it is the actual public key) and the second item popped is treated as a signature (and in this case it is the actual signatures). Then the signature is verified, and if it is, OP_TRUE is pushed to the stack.

For a P2PKH transaction, lets use the second input of https://blockchain.info/tx/12e753ef5cc30925a6eee2c457aa7f53022443ca013ea81882a6b59b69e342a6. This points us to the first output of https://blockchain.info/tx/6f7cf9580f1c2dfb3c4d5d043cdbb128c640e3f20161245aa7372e9666168516 which is a P2PKH output.

The output script is

OP_DUP OP_HASH160 12ab8dc588ca9d5787dde7eb29569da63c3a238c OP_EQUALVERIFY OP_CHECKSIG

and the input script is

304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601 044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c

Concatenating the two scripts gets us a final script of

304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601 044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c OP_DUP OP_HASH160 12ab8dc588ca9d5787dde7eb29569da63c3a238c OP_EQUALVERIFY OP_CHECKSIG

So following the execution, the first two items (the signature and pubkey) are pushed to the stack, so our stack is

044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c
304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601

OP_DUP tells us to duplicate the top item (the pubkey), so our stack is now

044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c
044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c
304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601

OP_HASH160 pops the top stack item and pushes the RIPEMD160 of the SHA256 of that item, so our stack now looks like

12ab8dc588ca9d5787dde7eb29569da63c3a238c
044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c
304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601

The 20 byte hash is not pushed to the stack, so we get

that item, so our stack now looks like

12ab8dc588ca9d5787dde7eb29569da63c3a238c
12ab8dc588ca9d5787dde7eb29569da63c3a238c
044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c
304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601

OP_EQUALVERIFY pops the top 2 stack items and checks that they are equal. If they are not equal, the script execution bails out and fails. Otherwise nothing else happens. So now our stack is

044d05240cfbd8a2786eda9dadd520c1609b8593ff8641018d57703d02ba687cf2f187f0cee2221c3afb1b5ff7888caced2423916b61444666ca1216f26181398c
304502203f004eeed0cef2715643e2f25a27a28f3c578e94c7f0f6a4df104e7d163f7f8f022100b8b248c1cfd8f77a0365107a9511d759b7544d979dd152a955c867afac0ef78601

Lastly we do OP_CHECKSIG like we did with the P2PK output. The signature verifies, so we are left with

OP_TRUE

as our stack. And thus the script execution is successful.

Also, it is important to note that script execution is no longer actually concatenating the input and output scripts. Rather the input script is first verified, and then its resulting stack is examined for whether it is valid (i.e. there were no errors validating the input script) then that stack is passed as an initial stack to the output script verifier and the output script is run.


Search Derivation Path for an Address Has anyone written an utility or something able to search/identify which Derivation Path an Address belongs? For example, giving a mnemonic like "unaware open elite rabbit grunt spread session exotic legal satoshi trend electric" and Address "12rfNtgHFjLoK1y58S3gHijmGHV8t8iteT", the program should return its Derivation Path "m/44'/0'/1'/2/6".

This isn't really possible, short of brute force.
An address contains no information about how it was derived, if it relates to any mnemonic at all, or whether it followed a standard path system.
Absolutely nothing prevents you from deriving a p2pkh address using a segwit derivation path.
Many wallets do have mechanisms to try various derivation paths up to the wallet's gap limit for the selected address type, but searching for a specific address is a fool's errand unless you already know it belongs to a certain mnemonic, and have some vague idea of what derivation path it would fall under (or a lot of patience to try several billion combinations). In those scenarios, you'd usually be better suites to writing your own script to do it under the constraints specific to your case.


What will happen when all bitcoins are issued? In 50 years or more from now, what will happen with bitcoins when all of them are issued? Will mining stop and will there only be a limited amount of bitcoins in circulation?

As far as the stopping of mining, no. Even when all 21 million bitcoins have been created there will still be transaction fees which will be given as rewards to miners. It has yet to be seen if this will lead to a reduction in miners or an increase in transaction fees, or both.


Pros and Cons of using HDD or USB Flash drive (script mining)? Could someone share his/her experience of using USB flash drive over HDD?

I know that the only purpose of both is to store the OS. I am going to use Ubuntu 13.10 which I believe will fit 8 GB USB since it is said to required 5 GB free space.

I am looking for best practices of choosing USB flash drive since like storage and speed requirements(brand may be) and is there any factors (like not enough storage for update/performance/burn/block that can make it clever to chose the HDD instead.

It's best to choose the HDD because it's easier (all computers should have one), and faster than the USB drive in most cases. But it shouldn't really matter.

Why it doesn't matter

Mining is not storage intensive, you aren't storing massive amounts of data when mining. You aren't even storing data when mining. It's all stored in computer memory, think RAM. A faster storage could only help with downloading the block chain in faster time, which won't improve your mining as it is only done once and finally.

But don't go buying up RAM as well. You mainly mine Scrypt coins with a graphics card and those have plenty of on-board memory. And if you are CPU mining you shouldn't be.


Where are P2SH full redeem scripts stored? A pay-to-script-hash/P2SH full redeem script can be up to 520-bytes in size. Just to clarify, prior to being revealed/spent, is the redeem script stored in the spender/Bob's wallet or elsewhere?

The developer guide says:

  "When Bob wants to spend the output, he provides his signature along
  with the full (serialized) redeem script in the signature script."
  (https://bitcoin.org/en/developer-guide#p2sh-scripts)

Soroushjp states:

  "The redeem script itself is only revealed, checked against the redeem
  script hash, and evaluated during the spending transaction."
  (http://www.soroushjp.com/2014/12/20/bitcoin-multisig-the-hard-way-understanding-raw-multisignature-bitcoin-transactions/)

Antonpuolous states:

  "P2SH shifts the burden in data storage for the long script from the
  output (which is in the UTXO set and therefore affect memory) to the
  input (only stored on the blockchain)." (2014:133)

(This question asks almost the same thing: Where the P2SH script gets written?)

(There's an unintended relationship with this question "Storing scripts (smart contracts) outside the blockchain", insofar as the location of redeem scripts.)

Here's a working example that lays the groundwork for answering your question:

Alice wants to pay Bob, so she asks Bob for an address.
Bob wants to receive payment to a P2SH address.
So Bob creates the redeemScript and then uses that to create a redeemScript hash, which is then encoded into a P2SH address.
Bob gives the P2SH address to Alice, and Alice pays it.
Sometime later, Bob wants to spend those bitcoins to Charlie.
Bob creates a transaction with an input whose scriptSig contains the redeemScript he created earlier.

Now for an answer to your question:  Bob needs to know the redeemScript at the time he creates the P2SH address for Alice and when he spends the bitcoins to Charlie.  He can, as you suggest, store the redeemScript in his wallet for that whole time, or he can regenerate it on demand from other data in his wallet, or he can store it externally---however, nobody else stores it for him automatically and it doesn't become part of the blockchain until he uses it in the spend to Charlie.

I believe Bitcoin Core does the simple thing and stores the whole redeemScript in its wallet for addresses created with the addmultsigaddress RPC.

There might be some wallets that use something like BIP45 to regenerate P2SH addresses when necessary from pairs/combinations of HD wallet seeds.

BitPay Cosign might externalize storage of P2SH addresses in some cases, although I'm really not sure about that.


Hardfor and Bitcoin wallet balances hardfork is coming. Is there any risk to use an application? I will have the same bitcoin balance after  fork's procedures are completed?

The balance of your Bitcoin holdings won't change. You will be able to use the same wallet on both chains, but note that both chains don't have replay protection, so transacting on either chain can lead to hijacked transactions in the other.

If you upgrade to the latest version of your applications, you should not encounter any problems with the hardfork, since the original chain will just continue. You might not be able to access your funds on the other chain though.


Is there any way to experiment with the Bitcoin technology without having to buy actual bitcoins for use on the larger bitcoin network? So, I'm just a curious person at this point, I've only just decided to look into Bitcoin and see how it works and what it does. But I'm not sure if I want to try out things on the larger bitcoin network, where there's real money of real value at stake. Is there a way I can setup a local bitcoin "network", with its own blockchain, etc. for testing purposes?

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


How can I withdraw my mbtc on my testnet 3 wallet? Pls can you help me on how to exchange my mBtc on my testnet 3 wallet to my local currency and withdraw it? Pls tell me if this is possible..? I was paid to my testnet wallet and I  want to withdraw it.

Pls help

Testnet coins have no value - there is no way to transfer them to any exchange or broker and exchange for fiat.

If someone is paying you on a testnet and claiming it is valid reimbursement or payment for anything, they are scamming you.


How does the network adjust the rate at which the coins are created? Who runs the Bitcoin network, and how do they adjust the rate at which the coins are created?

TL;DR: The Bitcoin protocol runs the Bitcoin network and the rate at which coins are created cannot be adjusted manually, but follows a pre-defined reward schedule.

The money supply in Bitcoin is governed by the rules defined in the Bitcoin protocol. The protocol defines a reward schedule, i.e. how many Bitcoins may be created with each block, and the rules by which valid blocks may be created.

Reward schedule

The Bitcoin protocol allows a miner that finds a valid block to create a specific amount of new Bitcoins and sent them to an address of the miner's choosing. To do so, the miner includes the mandatory coinbase transaction in the block which doesn't have an input, but only outputs the newly generated coins.

For Bitcoin, this block reward started out to be 50 BTC per block. It is halved every 210,000 blocks, so that it is currently 25 BTC per block (as we are currently at block 281,535).

Block interval and difficulty

The protocol defines that any block which doesn't fulfill the current difficulty criteria should not be accepted by the network. The difficulty is adjusted every 2016 blocks (approx. every 14 days). By the rules defined in the protocol, the new difficulty is calculated such that there would be approximately one block every ten minutes, if the amount of the work available to the network remained like it was for the previous difficulty period.


How many Integer Operations on a GPU are necessary for one Hash? I thought it was the ALU OPs like here:
https://bitcointalk.org/index.php?topic=7964.0

ArtForz speaks of much higher values, though:
https://bitcointalk.org/index.php?topic=4689.msg68933#msg68933

Does the kernel run more than once for a hash? What am I missing?

The ALU OP numbers are correct. The numbers vary based on the video card but are basically in the range of 1,300 to 1,700 operations per double-hash. On the x86, you need more instructions (around 3,700 - 4,500 depending on the exact CPU) but these CPUs can average more than one operation per clock cycle, so you can't convert instruction counts directly into execution speed.

All sensible mining implementations (CPU or GPU) attempt more than one hash at a time. On an x86 CPU, it's typically around four hashes at a time (one per core). On a GPU, it's more like 1,000 - 3,000 hashes at a time (one per core). Hence the superior hashing performance of GPUs.


OP_RETURN with Multisig Let's say I have wallets A,B,C.
A funds multisig address with B and C.
B & C show keys, get input and spent it to OP_RETURN transactions.

Is it possible?

If this is what you are proposing:

Address A: 1Axyz...
Address B: 1Bxyz...
Address C: 1Cxyz...

Tx1

A -> Multisig requiring 1 of 2 signatures from pubkeys of B & C

Tx2

Tx1 output 0 -> OP_RETURN

Then yes, that's totally legal on the blockchain. Not sure why you would want to do it, though.


How to implement a green address in Bitcoind? There are a few websites that use green addresses, but how can one go about implementing it using the standard Bitcoin API?

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


What is the "Count" column in the order book on Bitfinex? I can't understand what count means here. I would have assumed that it was the number of orders at that price, but the total column does not seem to reflect this. Can't find any info in the documentation or glossary. Thanks

It's because the Total column is not the cumulate sum of the column Count but of the column Amount. In your example, at the line for price 1612, Total=6.0 and indeed if you do the sum of all amount of the price above 1612 it gives you : 0.3+1.2+1.7+2.8 = 6