Why seed from BIP39 mnemonic phrase is much longer than entropy? BIP39 converts mnemonic
"zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong"

to the fairly long seed
"b6a6d8921942dd9806607ebc2750416b289adea669198769f2e15ed926c3aa92bf88ece232317b4ea463e84b0fcd3b53577812ee449ccc448eb45e6f544e25b6"

Good tool to play around https://iancoleman.io/bip39/

What's the point of so long seed value when the entropy value of random 12-words mnemonic is much smaller?

2048 words list dictionary = 2^11 => 11 bit
12 words * 11 bits = 132 bit
in hex format (4 bit for character) is 132/4=33 charter long, vs 128 of seed

This is specified in BIP 39 itself:

  To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in UTF-8 NFKD) used as the password and the string "mnemonic" + passphrase (again in UTF-8 NFKD) used as the salt. The iteration count is set to 2048 and HMAC-SHA512 is used as the pseudo-random function. The length of the derived key is 512 bits (= 64 bytes).

So the seed that's used is essentially a 512-bit hash of the mnemonic, which explains why it's 512 bits long (= 128 nibbles).

The BIP doesn't explain why they do this, but I would assume that it's convenient to know that the seed will always be a certain size, regardless of how much entropy is actually used to generate it.  This means, for instance, that key generation code can be written to always work on 512 bit seeds.


How to implement multiple wallet folders located out of the bitcoin blockchain folder? After substantial research I could not find any solution for this seemingly simple implementation of the Bitcoin-Core app.
Here is what I am trying to achieve:
Running a full node on one computer require up do 400GB of drive storage. It appear, after all my research, that if one wants to access more than one wallet from the same computer, it would be required that each wallet be run from a different folder altogether, otherwise the Bitcoin-Core will act strangely, refuse to launch, or ask the user to create a new wallet altogether. Add to that, would also be required that each wallet be launched with a different shortcut, which is well acceptable.
I am running a Windows 7 computer that can hold 1TB on a secondary data hard drive. The first drive is an SSD and is strictly utilized for the OS and software installation. Holding the whole bitcoin blockchain is OK but holding 2 copies or 3 is out of the question, besides would be kind of ridiculous since X times 400GB of the same data makes no sense.
What I am trying to do is be able to launch a different wallet via its own shortcut. After several experimentation the only way I found to do this would be that every time I want to run a wallet I have to replace a whole bunch of files related to that wallet into the \bitcoin folder. This is a tedious task and a relatively unsafe way to do things. Such practice is prone to errors and could potentially be risky to lose some bitcoins.
I’ve experimented with the shortcut option

–walletdir=D:\AllWallets\MyWalletA\

but this doesn’t work for some reason. The parameter is completely ignore without generating any error. The only way I found that could work would be to maintain the whole blockchain 3X into 3 different folders and launch any of them with the appropriate shortcut. An option that require 1.2TB and makes no practical sense since it is utilizing so much hard drive memory storage.
So here is the question:
How can I store a specific wallet located in FolderA that is completely different then D:\Bitcoin\
(were D:\Bitcoin\ would be the complete blockchain location) ?
If I could do that then I could also create any number of FolderB, FolderC, FolderD that would hold my different wallets and that I could launch any of those wallets ( not simultaneously ) when I need to do a transaction. All these folders could store the wallet files but not the whole blockchain.
Thanks for your help

One work around the limitation of wallet location is that into the \bitcoin folder there could be a subfolder named, as an example, \AllWallets. Into this subfolder there could be many subfolders containing the files for each wallet desired. These files are the Wallet.dat, .walletlock , and db.log
When bitcoin-qt.exe is launch with NO wallet it will alert the user to either create a new wallet or to utilize the menu “File > Open Wallet” and will offer to open any of the subfolder wallet files that are located into each of those subfolder.  For instance there could be 3 subfolders called \JackWallet , \AlfredWallet and \JoeWallet.
The user can open as many wallets as desired ( it seems ). A selector box will appear into the bitcoin-qt GUI on the top right  corner. This selector will offer to work with any one of the currently opened wallets. This way it becomes very convenient for the user to be able to utilize the wallet of his choice for payment or any other operation. The selection change is quick and appear very functional.
More experimentation is necessary to become familiarized with this newly discovered feature. Although this does not solve the limitation about Wallet location being out of the \bitcoin folder, it sure render the GUI more convenient  for the utilization of multiple wallets.


Is it possible to determine Bitcoin ownership distribution? Could someone guess on the most likely current Bitcoin ownership distribution? Are most bitcoins still owned by (early?) mining enthusiasts who are waiting for the price to go even higher?

No, it's not definitively possible to determine ownership of bitcoins.

It may be possible to identify miner reward addresses that are inactively used, but accumulated regularly at one point. Search for addresses with a large balance, the outputs of which have never been spent or have a large amount of unspent outputs.

It may be possible to find patterns in early mining, up until pooled mining came into existence. Search for blocks relayed by the same IP address, but at irregular intervals. This may indicate solo miners who "tried it out" but lost their keys or are in fact sitting on their wallets. This may only be possible through Blockchain.info's records, because the relay address is not preserved in the blockchain.


How to create a ripple gateway? I want to know what to do if I want to create a ripple gateway, so that people can use it and exchange on it. Where do I start?

The Ripple Wiki has a section on running a Gateway.

Basic summary:

Determine what you will be a gateway for (e.g. bitcoin, alt-coin, fiat, collector coins, etc)
Accept those items outside of Ripple (via a website, in person, via mail, etc)
Issue IOU in Ripple for items received (make a Ripple payment)
Publish and follow a redemption agreement; what you promise to do when sent back your IOUs
When sent a payment in your own IOU, you return/send the items outside of Ripple as per your redemption agreement (via a website, in person, etc)

There is a good example of a private party starting and running a gateway for trading DYM (pre-1964 silver US dimes).

Depending on what you are a gateway for, you can do the Ripple interaction manually (e.g. for the US dimes above it's all manual since the person needs to evaluate and handle incoming dimes anyway) or you can automate it (e.g. there is a TRC and LTC gateway that uses a web interface to configure a Ripple address to TRC and/or LTC address mapping and then automatically passes funds into and out of Ripple.


How to exchange a cryptocurrency from an address that's not in a wallet Possibly dumb question here (and first-time poster).

I have a Coinbase account with several different cryptocurrencies in it. I recently used ShapeShift to exchange ether (ETH) from my Coinbase wallet to Ripple (XRP).

To do this I generated an XRP address using http://ripplepaperwallet.com. Then, in Coinbase, I sent my ETH to a provisional address generated by ShapeShift, after which they immediately deposited XRP into my generated address.

Here's the question: how do I now spend or use that XRP address? I'm only now realizing it's not hosted by any wallet, so I have no idea how to spend it or exchange it. (I'm trying to get it into the Binance exchange, if possible.) I have both the private key and the address, so in theory I should be able to access the funds, right?

Visit https://www.reddit.com/r/Ripple/
and scroll down to the "Wallets" section on the right side bar.

Download a lightweight wallet of you choice, start the wallet sweep/import the private key, then send to your Binance wallet.


Is Bitcoin a fully decentralized network, or how do clients connect to the network? I read that Bitcoin is a fully decentralized network, but I don't understand how Bitcoin's client can connect to the network. I think that client must use some server for this action like other P2P networks: BitTorrent or P2P warez networks

Therefore, it's not a fully decentralized network. Did I get that right? How does a client connect to the network?

The various approaches the core client takes are described in some detail on the Bitcoin wiki. Once you're connected to the network, your peers can tell you about more peers, so the big question is, how do you get the first peer?

There are some hardcoded IP addresses and DNS names in the client that point to mostly-stable Bitcoin nodes. If all of these were suddenly taken offline, new users would only be able to join the network by finding one peer via other means, e.g. asking a person who is on the Bitcoin network their IP via a forum, email, or in-person.

If you're wondering if a government (or other entity) could shut down the Bitcoin network by taking out a few (say, 1-10) "central Bitcoin servers", the answer is no. They could, at best, be disruptive to the network. Just to take out the DNS lookup, they'd need the cooperation of (or the ability to DDOS the servers of) the IANA (root DNS servers), or those in charge of all four of the .org (Public Internet Registry), .me (Montenegro), .be (Belgium), and .com (Verisign) TLDs. Or the government would need to be in control of your Internet connection and prevent/redirect these requests, and block the use of Tor (and other proxy/anonymization things) to bypass these restrictions.


Looking for revenue data of bitcoin related websites I was wondering if we can share pointers or anectodes about revenues of web projects related to bitcoin or general cryptocurrencies.

The blockchain itself is literally a database of every transaction ever, so if you download it and parse through all of the transactional data, I guess that probably qualifies as 'revenue related stats'.

Blockchain.info has a lot of stats that you may find interesting.


Accepting Bitcoin for Services Rendered with Legal Verbiage on Set Coin Price I accept Bitcoin and Ethereum for consulting work, but would like some feedback for Service Type Agreements that span upwards of a 1-year in an enterprise setting. What's the best method for approaching set coin prices in a legal service agreement where the markets can fluctuate?

If you want to go all in on cryptocurrency, you can make an agreement stating the payment method as BTC or ETH and then the amount. The value of these currencies may vary with time and hence no one really signs such an agreement, yet.

The best you can do is sign an agreement stating the USD value of your services payable in equivalent Bitcoin or Ethereum considering the conversion rate at the time of payment (excluding the transaction fee!) for every payment processed.


Why do I see a Bitcoin address prefix starting with 4? I have an old Bitcoin (Counterparty) wallet that I am importing past transactions. I found a Tx that has a missing output address on one API, but it shows on another. I cannot find any documentation on what the Bitcoin address prefixed with '4' means. Is this valid or just a place holder?
Tx Hash: 5288973c6e2a323a2fbc95b84fbfd18b4ed2f75895c8295db03c653ea58c70d6
Blockcypher is showing the '4' (4PTehVhW6qTNhn88DK3JPBMkXfB2wR4juB)
https://api.blockcypher.com/v1/btc/main/txs/5288973c6e2a323a2fbc95b84fbfd18b4ed2f75895c8295db03c653ea58c70d6
Original API call is through Blockchain.Info
https://www.blockchain.com/btc/tx/5288973c6e2a323a2fbc95b84fbfd18b4ed2f75895c8295db03c653ea58c70d6
Blockchain just says "Unable to decode output address".
This is a counterparty transaction so I am thinking it may have something to do with that. Thoughts?

I see it as multisig script on OXT

Blockchair shows it as multisig address: m-99d8dc4aa2b7f5b105fe442f651d73e6

blockstream.info shows UNKNOWN


Can bitcoin pools set a different difficulty value other than the network difficulty I would like to know if bitcoin pools can give a different difficulty value other than the network difficulty or is the network difficulty the same for everybody

First of all, please be careful with using the terminology "network difficulty." Network difficulty is the difficulty at which a hash is accepted by the network (as opposed to the pool). Technically speaking, if d is the network difficulty, then your probability of finding a valid hash is 1/(d*2^32). If your question is interpreted literally, then the answer is trivially yes, since no pool would do such a thing. If everyone submits shares at the network difficulty, then the only share submitted is the one that solves the block, which means that the block finder gets the entire block reward, negating the reason people use pools (to reduce variance).

I guessing you're actually asking the following: Can mining pools give everyone a different difficulty?

The answer is yes. Basically, I might be mining at a difficulty of 16, and you could be mining at a difficulty of 32. If we have the same hashrate, then I would be finding shares twice as often as you, but your shares are worth twice as much. In the end, it all evens out. Mining at a lower difficulty reduces variance, but for miners with a large hashrate, their variance is already low enough that they can afford to mine at a higher difficulty, and they generally do so to reduce the stratum load (since they must communicate with the pool every time they submit a share).

There are several ways a pool could implement different difficulties. One is to have a setting on the pool website that you can adjust on your workers page. Another is to have multiple strata, each with a different difficulty. Yet another (which could be used in combination with the previous technique) is called vardiff, where the pool adjusts the difficulty to an optimal level in response to its estimate of your hashrate. Note that adjustment of share difficulty must be done at the pool level; there is no way to tell cgminer to choose a certain difficulty. (Even if you could, trying to submit a share at a difficulty lower than the pool wants will end up getting rejected, and only submitting those shares at a difficulty higher than the pool specifies will not get any bonus points for the extra difficulty.)


Json-rpc fails with "No connection could be made because the target machine actively refused it" Playing around with litecoin json-rpc running on windows (the API is the same as bitcoin, so I am using bitcoin's references).

My litecoin.conf has the following data:

rpcuser=user
rpcpassword=pass
txindex=1

Based on the documentation I started the core client as .\litecoind.exe -server, and it looks like it works just fine because I can run various commands from another window (.\litecoin-cli.exe getblockcount and many other work as expected).

Now I wanted to make some json-rpc calls and I tried Go's library which bitcoin's developers recommend. I used the example from that library's github and the only modifications which I introduced were my user and pass in the definition of the ConnConfig.

The code fails during the execution of client.GetBlockCount() with an error:

  Post http://localhost:8332: dial tcp [::1]:8332: connectex: No
  connection could be made because the target machine actively refused
  it.

I think that the problem is with json-rpc server but I have no idea how to verify that it works properly. Any idea how to fix it?

I was using bitcoin's port. Should have provided a port for litecoin: 9332.


how much data represents 1 satoshi? and on entire bitcoin I mean, how many bits or bytes represents 1 satoshi, the minimun bitcoin portion
and how many bytes represents one entire bitcoin, not a block, a 1.00000000BTC

Bitcoin amount is simply a number in the outputs of transactions, bitcoins themselves don't really exist. For example, in this transaction, there is this output:

  "addr":"1P3VQasrhmCnViL4sVouxSZiSu1BRWuCvN",
           "value":6103964

Value is the number of satoshis in the output, these output values are the only representation of bitcoins on the blockchain.


What coin offers a decentralized ledger, without mining and transaction costs? How much will transaction fees eventually be? describes that current transaction fees are untenable. The transaction cost for users, I think should be the only upward driver for the price of bitcoin. Ripple has played out the transaction cost economy by centralizing the transaction processing (if I understand correctly). But, this is because traditional banks already have a real 'reputation to uphold', which is of course a reputation of paying enormous fines for untoward doings. Anyway, what coin offers a decentralized ledger, without the mining and transaction costs?

If any DLT is working without mining, then it is vulnerable to frauds, double spends, because there is no gaurantee that the nodes are honest upon block broadcasting, and no way to reach consensus between the nodes. This is only feasible in private blockchain if at all.


Is there such thing as paying a "tax" or "task" on non-spendable bitcoin in a blockchain wallet in order to get the private key? I had bitcoin placed into my account and now am being told it is non spendable and in order to get the private key and make it spendable, we have to pay a fee.

This is a common scam.

If you don't have the private key to begin with, you have no bitcoin whatsoever, and never had any.

Stop talking to whomever is claiming this, and accept your loss.


Deterministic Wallet Step By Step I'm reading about deterministic wallets, I get the point, but it get's confusing when you actually start setting up things. I have to install support for generating "whatever"-coin addresses on a server. Where do I start, how should it be done? People are talking about importing keys from a seed. OK great but again, how? People talk about using different wallets. Should I use one of the existing wallets? How can I create my own wallet? Is there a console-based step by step tutorial that you can apply to any crypto-coin network/wallet?

Currently I use bitcoind for communicating with bitcoin network. It's the only good-enough documented piece of code. Thanks for your help!

If you know Python, pycoin might be a good place to start for a hd wallet implementation.


To combine or not to combine If I have to make 10 payments of various amounts to different recipients:

What is the best approach for the lowest tx fee? One transaction that will serve many (or all) logical payments (many inputs and outputs) or many but small in size transactions that will each serve a single logical payment?
Which of the above transactions is most likely to get completed successfully? In the combining transaction, if a sub-payment fails after the transaction has been broadcasted to the network will all of the other sub-payments fail and will the transaction never confirm?

There are more variables at play than you have listed, so I can't answer with certainty. Calculator for estimated TX-Fees lists some of the considerations as to when a fee is required, and how much the fee is. (but note that some of the info there is out of date due to a change; the Bitcoin wiki has more up to date info, and is also a good resource on this subject) For example, how many inputs are there, and what sizes and ages are they.

That said, I think that most likely, the best thing to do would be to do it all in one large transaction and pay 0.0001 BTC per 1000 bytes. I'd expect you'd have to pay 0.0001 or 0.0002 BTC (~US$0.06-0.12) for the transaction. Including more wouldn't hurt, and might improve how long it'll take to get it confirmed.

Assuming the transaction is valid (you should make sure it is before broadcasting it) and includes a large enough fee to be relayed by most peers and miners, you shouldn't have to worry about anything going wrong with the transaction. E.g. none of your recipients can invalidate the transaction.


Why mining pools miners need to choose their difficulty? I read this and this.

It said: "The traditional method involves assigning members a work unit comprised of a particular range of nonce, the number that blockchain miners are computing for. Once the pool member completes the work on the assigned range, he places a request for a new work unit to be assigned."

From what I understand, the nonce range is the same for all miners and in order to proof their work, miner need to send the share with the difficulty fixed.

So I don't understand the interest to increase the difficulty for a miner. If he keep the minimum difficulty, why would he reduce his lucks to proof his work with a higher difficulty?

Having a different difficluty and thus have lower luck does not reduce the payout at all. Payouts are proportional to a miner's hashrate. So with higher difficulty shares, the payout will be higher per share which compensates for having fewer shares.

However a miner will want to use an appropriate difficulty level even though the payouts are the same. Although the payouts will be the same in theory, in practice, there is a difference. If a miner mines at too low of a difficulty, the mining hardware may spend a lot of time having to send and receive data from the pool server that it remains idle for so long it can't submit as many shares as it should so the payout isn't as high.

Conversely, if the difficulty is too high, the hardware won't ever be able to find a share so the payout will be basically 0. So a miner should choose a difficulty which matches his hardware so that it is at 100% utilization almost all the time but still be able to submit shares frequently.

The pool difficulty itself has no effect on the luck a miner has on finding a share at the actual network frequency. Pool difficulty is just a way for pools to keep track of how much work each miner is doing.


How is a Ripple address constructed? How is a Ripple address constructed? Is it similar to how a Bitcoin address works albeit with a different net byte, or are there some more differences?

The structure of the address itself is basically the same as they way they're done in Bitcoin. Not only is the network byte different but the alphabet is different.

However, the client generates accounts very differently from the way it's typically done in Bitcoin. The client begins by generating a random 128-bit seed. This seed is shown to the user and they are asked to write it down to ensure their funds are never lost.

Any number of public/private key pair and accounts can be generated from this seed. And accounts are generated from those public keys.

Of course, Bitcoin clients could generate accounts this same way and I believe that at least some do.


The change to the size of blockchain data files The blkXXXXX.dat files in the new Bitcoin-Qt client (v0.8.1) are about 130MB each in size, while the old ones are about 1.9GB in size each. Does anyone know the motivation behind this change?

The reason is future pruning functionality.

Pruning will be implemented by simply deleting files (and related metadata in index databases) with only old blocks in them. Having smaller files means higher granularity in choosing what to keep or not.


How long does it take for a SPV to intermittently sync (order of magnitude)? Say I have a device that is mostly offline, with a SPV on it.

Say once in a while (for instance once a week) I go online for about 20 minutes, and make a large number of transactions (which are based on transactions I might have received while I was offline).

How long, would you say, does a SPV (e.g., BitcoinJ, bitc or  others) need, upon getting online, to be fully operational in these circumstances?

I confess: I am not yet familiar with SPVs (although I did read about them, I have not had time to fully understand them yet). The steps a SPV follows to sync are outlined here, but no timeline is given.

Thanks

SPV syncing depends entirely on the SPV servers that you're connected to. They may not have that much bandwidth and you might have a very slow sync, for example.

That said, you only need 80 byte headers per block you haven't seen (about 1000 blocks per week, or 80Kb for every week that your device is offline) and about 500-1000 bytes per UTXO you have (obviously this is highly dependent on how much new UTXOs you've received).

So assuming about 5 tx's per week and 1000 blocks per week, it's less than 100kb download to catch up once a week, which by any measure should be very quick. On most connections it shouldn't take more than 10 seconds.


How to Get UTXO using bitcore-lib? I am using this library to make a wallet service that runs on a web browser. I use the library and browserify it so its compatible with the rest of my jquery. Now this tells me how to make and sign a transaction. This specifies the parameters used to make a utxo but I don't understand how to get the data for it.

It says

  It can take outputs straight out of bitcoind's getunspent RPC call

My understanding is that the UTXO can be obtained only when running a full node and not from the browser, so my plan is

1) Send amount, receiver and sender public address to the server using browserfiy, bitcore-lib and jquery

2) Server then finds UTXO (how?) and returns the raw transaction to the browser

3) Browser then prompts using to enter his private key, which is used to sign the transaction and sent to the server

4) Server then pushes this onto the blockchain and returns the transaction hash

I am not able to achieve point 2.
Now I understand that a lot of online wallets would have a similar structure but I am unable to achieve this. The blockchain used is Bitcoin, server side language is entirely in nodejs.

Could someone please help me out/ tag relevant links.

You can use bitcore explorers module to use Insight send transaction and get utxos data.

Check further https://github.com/bitpay/bitcore-explorers


Which block explorer indexes the keys used in mutisig scripts? Consider transaction 0846e91bc3afdf2275db14bcbb10e19f141069d77f17dae6bcbd907fd28f4747, which takes money out of the script address 3PJQGGnBQr8DJBdPYowd6Mp2kSWvFFo7Gk. As we can see in the input scripts, this script address references script 51210261afd7a2796e9bb83896089293f11edd2987ebbd67ed2075f5e45b7c4bb7edcb51ae, which, according to the decodescript command, is

    "asm": "1 0261afd7a2796e9bb83896089293f11edd2987ebbd67ed2075f5e45b7c4bb7edcb 1 OP_CHECKMULTISIG",
    "reqSigs": 1,
    "type": "multisig",
    "addresses": [
        "1xW3APNVG6Ro1HY8hysmnKq8mvgVk6oPU"
    ],
    "p2sh": "3PJQGGnBQr8DJBdPYowd6Mp2kSWvFFo7Gk"

So this payment was made to anyone who has access to the key with the address 1xW3APNVG6Ro1HY8hysmnKq8mvgVk6oPU.

But none of the common block explorer websites seem to index this; when I ask them about the address 1xW3APNVG6Ro1HY8hysmnKq8mvgVk6oPU, they list no transactions.

Is there a block explorer that maintains a mapping from key address to the script addresses the key is mentioned in?

You must not see the address in the blockchain as a receiving address. It is a P2SH tx, which means, that the spending condition is sha256’d. This is the type 3address above. The 1-of-1 multisig condition inside defines, that anyone who has the private key to the “1xW3APN...” address can spend this tx, which happened on 2014-07-28 to the target address “1UxOYSY...”
I highly recommend reading Andreas’ book mastering bitcoin (online available), which explains in nice detail the reasons and insights of those multisig adddresses.

Blockexplorer blockchain.info obviously doesn’t show the decoded script, cause it is not an address used to receive funds.


History of ideas behind a bitcoin protocol Could you outline the logical sequence of main ideas (concepts) that contributed to the evolution of the bitcoin protocol from the beginning
to now?

Bitcoin is roughly defined by the 2009 whitepaper. Long before, the idea of a trustless cryptographic money was discussed by Wei Dai; however, Wei Dai couldn't solve the double spend problem, which delayed the creation of magic crypto money until 2008 (yes, the Satoshi client was created before the whitepaper)

Inspired by: WeUseCoins.com


What if a pair of double-spent transactions are collected into a new block? Let's say, Alice sent a bitcoin to Bob, and then immediately sent the same coin to another address controlled by her. A honest node collected these two transactions into a new block.  Would the node be able to detect that this pair of transactions are double spent?

When Alice sends the bitcoin, she spends an Unspent Transaction Output (UTXO) created by a previous transaction. To create a doublespend, she has to use the same UTXO as an input for another transaction.

As every full node keeps track of all existing UTXO, it is trivial for all nodes to recognize these transactions as doublespend. A block containing two conflicting transactions would be invalid, and thus would not be accepted by any nodes.


What are Jaxx wallet's slow, average and fast mining fees? In the settings for Jaxx Wallet, under BTC Mining Fee, there are three options:

Fast
Average
Slow

How do I find out the actual transaction fee for each of these settings?

How do I find out the actual transaction fee for each of these settings?

The exact Jaxx miner fees vary per transaction depending on various factors. You can still get an estimate for each "Fast", "Average", "Cheap" option.

Steps

Using Jaxx app, at the top of the screen, tap/click the appropriate cryptocurrency symbol presently activated. Such as BCH (Bitcoin Cash) or BTC (Bitcoin). In this example we will use BCH.
Navigate to Menu >>> Settings. Tap on “BCH Mining Fee” option.
Select one of the following three options:

Fast
Average
Cheap

Still using Jaxx, start a BCH transaction. After you tap "Send", a small orange confirmation screen will mention the exact fee you will pay to the miners before you can confirm the transaction. This is your first answer.
To get all your answers, repeat all of the above steps for "Fast", "Average", "Cheap" option.
Done. Now you know the exact estimated fee per option. Enjoy :)

Notes

Jaxx said that they are using adjustable fees based on a feed from  https://bitcoinfees.earn.com and they are adjusted based on the historical fees charged by the miners in the past few blocks. Source at https://www.reddit.com/r/jaxx/comments/6u0p06/what_is_jaxxs_mining_fee/dlpdz1z/
There are three levels of miner fees you can choose from. They determine the speed of the transaction to be confirmed by the network.
Three level:

Fast
Average
Cheap


Read the "value" being redeemed in a Bitcoin P2SH Script Is there any way for a Bitcoin P2SH Script to read the amount of Satoshis being redeemed?

Inputs do not reference the value of the UTXO they spend. You need to look up the spent UTXO to find the value. Usually, this information is available to a node via the UTXO set, or can be looked up by inspecting the transaction that created the UTXO.


In Lightning Network, what are the proposals for solutions to transfers to offline end users? Basic examples in LN always mention payments from an online end user to other online end user. But let's say we want to send a micropayment donation to a blog that does not have an always online LN client.

With an on-chain transaction, the payer can send the money and the money will be there even if the payee can't check that within a week time. How about LN?

What are the current proposals for such payments? And what are the requirements for such end users who want to receive payments? Do we require the payee to get online at least once a day, once a week, or no such requirements are there?

Payments are handled by means of an established bi-directional payment channel.  While this may seem like a payment could travel in one direction to an offline participant in an open channel, in practice this would be difficult if not impossible.

The problem is that a channel exists as a protocol between two active participants.  There are no other computers involved.  If one of the two computers is not online, who does the sender send the transaction to?  Where is the transaction stored after the sender goes offline, but before the recipient comes back online?  In Bitcoin, these problems are solved by relay nodes and miners.  Once a transaction is in the mempools of enough nodes, the sender does not have to worry about retransmitting a transaction.  The point-to-point nature of the lightning network does not allow for this.

A work around could be a payment service, which is always online to receive and send payments on behalf of a user (for a fee, of course).  Another option is simply sending a regular Bitcoin transaction to an offline recipient.


Transaction schedule I`m thinking about building a business with a friend of mine. The business would use bitcoin as its primer currency, because we expect most of the transactions to be rather small amounts of money (1 to 5 $).

I don`t really want to go into details about the idea, but our goal is to only operate as a middleman in the market. The transactions of our business would have to happen as follows:
The user sends us a small fraction of a bitcoin and would define a time frame after which the money should get transferred to another user. From this amount we would take some % for us as profits.

The problem is, our idea would only work if there were a lot of users. And if we achieve this, it implies that we have too many transactions to handle them manually.
So my question is, how can we automatically transfer the coins after a certain time, in a professional way?
User a for example would define that he wants his money to get transferred to user b after 2 days and 1 hour. How can we do this transaction in an automated way.
And how can we store the coins securely within this time? Do they have to be online the whole time, or could we have a better solution whit cold storage in some form?
Any suggestions?

Thanks guys

The simplest way to send and receive bitcoins programatically is to run the standard bitcoind client and have your software talk to it via the JSON-RPC interface.  You can give it commands to send coins, check for incoming transactions, and so on.

As for how to schedule transactions to be made at some future time: once you know how to make transactions via RPC, doing it at a scheduled future time is really just a general programming question and not within the scope of this site.  The most obvious approach would be a similar algorithm to Unix's crond(8): have a queue of pending jobs in chronological order, and sleep until it's time to execute the next one.  When a new job is scheduled, insert it at its proper place in the queue, and if it turns out to be first in the queue, recalculate the sleep time.

As for whether and how to use cold storage: that's something you'll have to determine.  Keeping the temporarily held coins in cold storage will reduce the risk of them being stolen by an attacker, but also adds extra costs since you will need a trusted human employee to manually transfer coins back out of cold storage at appropriate intervals.  You'll have to balance that against the risks and potential liabilities of having coins stolen.


How to retrieve transactions in realtime from bitcoind .dat files I want to get all the data from blocks as they get updated on my local node.
Abe offers very poor performance, and fast-dat-parser creates other .dat files and doesn't have enough documentation for me to understand how to get data like block size, age, hash difficulty, Transactions and transaction fees.
Is there an alternative tool, or at least a detailed documentation that would allow me to write a parser for content of .dat files?

Trying to read and parse the .dat files while bitcoind is running is likely a good way to have tons of errors due to partially written data. Instead of trying to read the .dat files, you can use bitcoind itself to notify you of new blocks and to use the RPC interface to decode and fetch the block information for you. You can start bitcoind with -blocknotify=<cmd> where <cmd> is a command that bitcoind will run every time a new block is accepted. You can read bitcoind -help for more information about what -blocknotify does. The command that is run can then be a script which calls the RPC interface and fetches the block data that you need by using the getblock RPC command.


When "lock time" was added to Bitcoin? Since when lock time exist in Bitcoin transactions?

Since the very beginning. Transactions have had the nLockTime field since Bitcoin 0.1.0.


Different balance for same private key using bcoin and copay I´ve got a copay wallet for test purpose. In there I have used a wallet for quite a while. Now I´ve started to play around with bcoin and wanted to import the wallet from copay to bcoin. therefore I´ve imported the tpriv into bcoin with /wallet/importedDemoWallet:

{
    "witness":false,
    "passphrase":"sample",
    "watchOnly": false,
    "accountKey":"tprvxxxxxxxxxxxxx[...]"
}

Here I´ve got the problem that in bcoin it only shows me a balance around 1.4 tBTC while in the copay wallet it shows 2.4 tBTC. even after a rescan the result does not change. can someone tell me whats wrong here? shouldn´t be the balance in both case the same?

UPDATE:

result from get server info:

    "result": {
        "version": "2.0.0-dev",
        "protocolversion": 70015,
        "walletversion": 0,
        "balance": 0,
        "blocks": 1722115,
        "timeoffset": 0,
        "connections": 12,
        "proxy": "",
        "difficulty": 1,
        "testnet": true,
        "keypoololdest": 0,
        "keypoolsize": 0,
        "unlocked_until": 0,
        "paytxfee": 0.0002,
        "relayfee": 0.00001,
        "errors": ""
    },
    "error": null,
    "id": null
}

There are several factors that could be causing the discrepancy.

Make sure you are running the latest version of bcoin (v2.0.0 was just released)
Make sure your node is fully synced to the testnet blockchain.
Make sure all the transactions in the Copay wallet history are confirmed.

Other possible issues:

Do you make a lot of transactions with this wallet? Like, more than 10 or so in a single block? It's possible you've exceeded the BIP44 lookahead and some manual configuration may be necessary to recover all the transactions (although this particular behavior is usually fixed with an additional rescan)
When you rescan, do you specify a block height to rescan from? Make sure that is low enough to catch your complete transaction history.

Compare the history of the two wallets (https://bcoin.io/api-docs/?shell--cli#get-wallet-tx-history). Can you determine which TXs are missing from the bcoin wallet? It might be helpful for debugging if we can identify a pattern.

If you want more interactive help debugging, you can find the developers on IRC #bcoin or on slack: https://bcoin.io/slack-signup.html


Running out of memory, how can I reduce the size of wallet.dat? My wallet.dat is 260MB big. I am using 32bit bitcoind (bitcoin-0.10.2), linux.

Bitcoind is having memory problems:

 ["errors"]=>
  string(89) "EXCEPTION: St9bad_alloc
std::bad_alloc
bitcoin in ProcessMessages()

Current memory allocation:
  2.9 GB virt, 2.3 GB virt.

How can I resolve the memory problem? Can I delete old unused addresses?
I did not find an API call to remove old addresses.
Probably bitcoin-0.11.0 does not resolve the problem either, it has already nearly same values: 2.45 GB Virt, 2.1 GB Res.

Bitcoind uses a lot of virtual memory, due to having multiple threads, and maintaining several node-wide and per-peer caches of data (UTXO cache, mempool, relay cache, network buffers, known invs list, ...).

Until recently, many of these were effectively unbounded, depending on network conditions. The upcoming release of Bitcoin Core 0.12 has far better internal memory accounting, UTXO set limiting, mempool limiting, and more compact internal representations.


New address generation on exchange services Services like ShapeShift generate new addresses for each transaction. It is not clear how to they do that. I didn't find any API that supports address generation for such a big amount of coins like on ShapeShift. Or maybe these guys use some crypto exchange to generate the addresses.

How can I implement address generation function?

There are a lot of online tools to generate bitcoin addresses and some of them have APIs. For example Blockcypher
's one.

But usually such services have their own full node which manages their wallet. In such case they'll generate new addresses using bitcoin-cli tool.

$ bitcoin-cli help getnewaddress
getnewaddress ( "account" )

Returns a new Bitcoin address for receiving payments.
If 'account' is specified (DEPRECATED), it is added to the address
book
so payments received with the address will be credited to 'account'.

Arguments:
1. "account"        (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account "" is used. It can also be set to the empty string "" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.

Result:
"address"    (string) The new bitcoin address

Examples:
> bitcoin-cli getnewaddress
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

As to the other coins, I bet they have alike tools, but looks like there is no "silver bullet" API for every coin out there.

And if you are going to handle big amount of coins, you, maybe, don't want to generate addresses via the third-party services.


How can you get a list of all addresses mentioned in the blockchain? I'd like to parse the blockchain in order to produce a list of all addresses that are mentioned in the blockchain.

I'd like to do this with a program, language agnostic.

Addresses aren't mentioned in the blockchain. But you can calculate them based on the transaction scripts. In order to do this, you need to calculate the address from the scriptPubkey of each transaction. To calculate the address you have to:

Determine whether it is a P2PKH or P2SH, so you know what prefix to use: List of address prefixes.
Calculate the BASE58CHECK(HASH160(<prefix><scriptPubKey>))


Compact integer in Scripts I've been looking at the compact representation of integers for integer operations in the Script language. It seems that most operations produce or push byte arrays, but when integer operations are performed those arrays are interpreted using a signed compact format.  Is this format actually defined anywhere, or is it strictly bitcoin specific?

As I understand it you can process up to 4 bytes as a integer, the negative of an integer is binary or'd with 0x80. I'm having trouble decoding 1-4 byte negative integers into the correct bit string encoding.

Does anyone have any examples, or can point me in the right direction?

generic big endian MPI format
bitcoin-specific little endian format, with implicit size

python implementation

https://github.com/petertodd/python-bitcoinlib/blob/master/bitcoin/core/_bignum.py


How do atomic swaps work when blockchains operate at different rates? If two cryptocurrencies work on blockchains that have very different confirmation / finality rates, or blocks are mined / minted / created at very different rates, how do atomic swaps match up? What if the prices change during the swap?

Atomic swaps work with so-called hashed timelock contracts. These lock the value for a specific time except the other party can provide a secret which hashes to the given hash. In Bitcoin (and most clones) the timelock can be set either to be a specific block or a specific timestamp. After reaching this block or this time, the first party can claim back their funds.

When you know which chains you want to use for your atomic swap, you know how to set the locktimes to be sufficient for your purpose.

The locktimes can also be different on both chains.
And when you know, a chain reaches finality after a day, you can easily set the locktime to be in a week.


Non-Bitcoin blockchain security questions I've been seeing a lot of stories lately about companies wanting to use blockchain, I've got two questions regarding companies using blockchain networks to store transaction ledgers.

With Bitcoin, users are encouraged to adhere to the correct protocol and to continuously verify the transaction log because they are rewarded through Bitcoin mining.  If a blockchain network is used to store a ledger of contract transactions, for instance, what incentive is there for users to continuously verify the transaction chain, since there's no reward for creating a block and adding it to the chain?  If users aren't continuously verifying the blockchain, won't that make it more likely than a malicious entity can create their own block?
If a company creates their own blockchain network, their computing power is minuscule compared to the total computing power in the world.  If another entity can enlist more computing power (by being a larger company/government or by using a zombie network), won't that larger entity be able to control the transaction ledger?  That not a problem for Bitcoin since the total computing power on that network is huge, but what stops this from occurring on other networks?

Ethereum is one example of the blockchain used to store the contract transactions. Nodes on the blockchain validate the transactions and add it to blockchain. Ethereum also has it's currency and miners are rewarded for doing work. What you think is absolutely right, if you don't have any incentive mechanism in place then only few people will mine and network can easily be attacked.
When companies talk about using blockchain for only themselves, they are referring to private blockchains and not public. Node needs permission before they can join this private blockchain thus not prone to attack. Otherwise in public blockchain anyone with 51% majority can easily alter the transactions. Some attacks are possible even at 33% majority.


How do I get started mining bitcoin with a GPU? I'm totally new to this, but love this idea!

I want to help, (and generate coin), and have only installed Bitcoin-Qt version 0.8.1

It ran, synchronized; I encrypted my wallet.

But now what?  Will it use my 2 NVIDIA gtx580 GPU's on its own? Do I need to do anything else, other than just let it run?

Got the green checkmark; up to date
I have 8 active connections and my wallet is both locked(?) and encrypted.

I just did this today...

I found a mining pool (I picked Eligius) from here https://en.bitcoin.it/wiki/Comparison_of_mining_pools

The pools website had further instructions. In my case, I installed a mining client "bfgminer" and followed the instructions to add my ID. It sounds like for a windows OS, GUIMiner might be a good start too.

gui miner thread https://bitcointalk.org/?topic=3878.0

The key thing to realize is that there is a difference being a BitCoin "client", which is what you setup above, and a BitCoin "miner" which requires the steps I in this response.


Connecting to a bitcoind in "-regtest daemon" mode remotely from another node (e.g. BitCoinJ) Anyone knows how to connect to (or even possible) a remote "-regtest" server?
I have managed to setup the -regtest daemon, but still trying to figure out how to connect to it using BitCoinJ client.

===== Update ======

Just in-case someone here has the same query, I've managed to connect to the remote -regtest, I can now download the blockchain and perform RPC using BitCoinJ

Just follow the bitcoin example to setup the bitcoind. (I ran using bitcoind -regtest -daemon)
In the BitcoinJ code, use the REG_TEST_NET, and add your remote -regtest server's IP to BitCoinJ's PeerGroup object using

peerGroup.addAddress(InetAddress.getByName(your-remote-ip));

in the bitcoin.conf, I set the additional following attributes
server=1
rpcport=18444

If anyone is looking to connect to a RegTestnet using bitcoinJ here are the step on mac:

I used a docker image to setup the bitcoin network.

https://github.com/freewil/bitcoin-testnet-box

run this docker image using this command:

docker run -t -i -p 19001:19001 -p 19011:19011 -p 19000:19000 freewil/bitcoin-testnet-box

When you run this docker image it will start 2 bitcoin nodes.

Node 1 will listen to bitcoin node connections on port 19000 and for rpc connections on port 19001.

Node 2 is not listening to bitcoin node connections. Node 2 is connected to node 1.

Now using the port forwarding settings in Virtual Box forward the container port 19000 to your host machine port 19000.

Now you can connect to Node 1 from any machine in your local network (wifi network) using the address your-machine-local-ip:19000

Here your local machine ip is the ip address of your laptop in your local network. In mac you can find it out from network preferences.

To connect to Node 1 from bitcoinj use this:

mParams = RegTestParams.get();
.
.
// define how to connect based on network params
if (mParams == RegTestParams.get()) {
    try {
        PeerAddress pa = new PeerAddress(mParams, InetAddress.getByName("<your-machine-local-ip>"), 19000);
        mKit.setPeerNodes(pa);
    } catch (UnknownHostException e) {
        e.printStackTrace();
    }
}


Bitcoin Unconfirmed Transaction Tiny Fee I sent a huge amount of Bitcoin(.7) with a tiny fee. What can I do to get the transaction confirmed. Does it have to go through eventually? I can wait a week or two.

Otherwise I am looking for other ways to get it confirmed. Bitcoin was sent from Blockchain Info to Electrum. Electrum has a low fee warning sign next to the unconfirmed transaction.

Ok question was posted in error. The fee was actually around $50 for $7500 which is ok and got 4 confirmations in 30 minutes. But I am  sure the initial fee was tiny (like 50 cents) and then changed to unknown, turning out to be the higher figure.


How to exploit the possibilites of blockchain for proof of authorship? I want to to create some kind of Proof-of-Authorship mechanism, that's something that many artists had asked before: How can I prove authorship of my work

To accomplish my objective I need to deal with 2 problems:

first, how to precisely and uniquely define a work, and
second, use something like a public ledger to store and validate that information.

I will think about first later; it's a very complex problem; I want to know if I could use the blockchain for the second one. (If you can give me some suggestions for the first problem they will be appreciated too.)

If expressing the (artistic) work in any kind of document (be it sheets, photos or audio/video recording) is good enough, then you can use something called proof of existence. This simple method allows you to store a hash of any document into the Blockchain, thus proving it existed at the time when a particular block was mined.

You can indlude the autor's name (or other identifier) into the document, making it clear that he (at least) knew about it back then. If nobody proves the possesion/familiarity with that particular file/work dated before, the author should be able to claim his rights.

One (perhaps the first) proof-of-existence service is proofofexistence.com.


Can I lose my Bitcoin.com wallet if the company and the website database are destroyed? I am planning to convert a part of my fiat currencies into BTC. I see that web wallet are a good balance between ease of use and security as it prevents breaking a device, being robbed physically, etc.

However I still have a question that the website support could not clearly answer: what if the website and the associated company are completely destroyed (bankrupt, whatever...) ?

Will my 12-word pass phrase still be useful to recover my BTC into another web-wallet ?

Thanks

I have performed a few tests and it seems that the 12 word phrase is able to recover the wallet from any wallet client that supports this 12 word phrase method.

The 12-word is a human readable alias for a master key that links to each private key of a set of wallet.

I have installed Electrum which is a local client installed on Windows and it did successfully gain access to my Bitcoin.com wallet by using the 12-word phrase.

I deduce that these words are enough to recover my wallet even if Bitcoin.com falls down.

@Toomakesense: the question is not whether or not it is likely to happen but what would happen in case it is. Everything is possible even if it is unlikely!

Anyway thanks for your help


Verifying that a transaction is in the blockchain Let me first start off by saying im just learning about blockchain and the technical aspects.

From my understanding, each transaction is cryptographically hashed, the hashes are paired and hashed until a single root hash is generated. The miners hash the entire block containing the root hash, previous hash, timestamp etc. If the hash meets the target difficulty then the block is added to the chain. Cryptographic hashing makes it infeasible to obtain the input from the hash output.

Q. If say, I wanted to go back to block X and see which transactions it contains, how is that possible if all the hashes are cryptographic and its infeasible to find the input from the hash output?

Thanks in advance.

Just to be clear: It's not the entire block that is being hashed, as you said, blocks are found by hashing only the block header of a candidate block. However, the block header includes the Merkle root of the transaction tree which in turn commits to the exact set of transactions in the block.

You're correct, a cryptographic hash function is a one-way function and the block content is not retrievable from the hash. To learn the content of the block, you use the block hash as a unique identifier and request the complete block from an archival node, i.e a full node that keeps the complete Bitcoin blockchain in store.

In turn, if you only have the txid to go from, you can request the full transaction from any node that has knowledge of it. The raw transaction does not include the information in which block it was included though. AFAIU, to get that you'd do a getData request of the MSG_MERKLEBLOCK type. This will not only give you the full transaction, but also hashing partners to form the Merkle branch up to the block hash and the block header, allowing you to fully validate the transaction's inclusion in the blockchain.


SPV clients querying the full node Is there a way currently where an SPV client can send a TxID to a full node which is present in the UTXO set of the full node and have the full node not scan its entire blockchain to fetch the transaction data? Or under all the circumstances, the full node would always scan the entire blockchain to fetch the data?

Also, do the full nodes along with the transaction data also return the merkle proof to prove the validity of the data returned? I mean, how can an SPV node be convinced that the correct data has been returned?

Is there a way currently where an SPV client can send a TxID to a full node which is present in the UTXO set of the full node and have the full node not scan its entire blockchain to fetch the transaction data? Or under all the circumstances, the full node would always scan the entire blockchain to fetch the data?

A full node never scans the entire blockchain for a particular transaction to send to a SPV client. No client (SPV or not) can just request transactions that are in the blockchain; a node will not respond to such a request because it is computationally expensive (requires scanning the blockchain).

A SPV client can set a bloom filter which will filter for specific outputs and txids, and then request blocks from a full node. The node will send a filtered block to the SPV client then.

So no, a SPV client can't send a txid to a full node and get the transaction if it is already confirmed.

For SPV clients that use a client server model like electrum, the server is a full node which has indexed every single transaction in the blockchain (it maintains a database which maps txids to locations on disk). Those servers will respond to requests for specific txids, but they are not your typical full node and speak a different protocol.

  Also, do the full nodes along with the transaction data also return the merkle proof to prove the validity of the data returned? I mean, how can an SPV node be convinced that the correct data has been returned?

Merkle proofs are provided by the nodes to prove that the transaction is in the block.


Block version 0x20000000 When i run getblocktemplate, Bitcoind gives me in the version field a decimal number, when i convert it to Hex it's 20000000
I know it must be in little endian, but to build the blockheader must i put it like this 00000020 or 02000000  ?
I am asking this question because in version 1 the blockheaders are using 01000000 and not 00000010 so i am confused
Help is appreciated
Thanks to all of you

The bytes you would put in the block header would be, in order: 0x00 0x00 0x00 0x20. That's how the number 221 (= 0x20000000) is stored in 32-bit little endian encoding.
Note that this is actually a large number; that range is used for BIP9-compatible versions. Older blocks that use versions 1 through 4 predate BIP9.


What prevent someone to not use the receiver address of one transaction as the sender in another one? Title may be confusing you, and to be honest I am also confused how things work and I am new to this crypto world so sorry in advance if I am not using the correct words.
I try to explain :
Let say Alice wants to send cryptos to Bob.
A sends to B
(address of A) to (address of B)

Because blockchains are public, and both address will be known to each one, what process do prevent Bob from not using Alice address as the sender in another transaction ?
B pretends to be A
using A to send to B
(address of A) to (address of B) without A consent

The reason why I am confused right now about this question is because in Dapps you can use a wallet like Metamask to make some transactions, which means you only needs an address. So how is that secure.
If someone code a program using the same logic as Metamask, what prevents him to use another person's address in Dapps and to smart contracts? (Similar to changing the ip field in http requests, which was a popular hacking technique for man in the middle before https was widely used).
Thanks in advance for helping me to understand.

what process do prevent Bob from not using Alice address as the sender in another transaction

Bob doesn't know Alice's private key.

A transaction requires that a kind of digital signature be included with the amounts being spent (e.g. From Alice's address)  All other Bitcoin users (wallets, miners, etc) check the signature.
the signature is just a complex mathematical process that proves someone knows a private key without ever disclosing the private key. The private key is just a large number that is kept secret by the user (e.g. Alice).

Further reading:

Is it true that all the bitcoins in existence are on the blockchain (the ledge), but it just depends on who the owner (address) is?

Some other things worth remembering:

Bitcoin has rules but no rulers.
Bitcoin is electronic cash
There are no accounts in the Bitcoin network
Wallets don't contain money.
Addresses don't identify people, businesses or places.
Bitcoin isn't sent to, or from, addresses.
Bitcoin is never really in transit.
Bitcoins don't survive transactions.
Bitcoins don't exist as entities.
The blockchain is not a ledger (it's a transaction journal)
Miners don't have any special privileges (they exercise a role that has two special rewards).

The above are intended to guide readers away from misconceptions, not as a self-evident explanation of the points made.


Why am I getting this make error w/ 0.4.0rc1 on Ubuntu Building 0.4.0rc1 in Ububtu via make -f makefile.unix returns the following errors/warnings:

ui.cpp: In member function 'virtual void CMainFrame::OnIconize(wxIconizeEvent&)':
ui.cpp:488:25 warning: 'bool wxIconizeEvent::Iconized() const' is deprecated (declared at /usr/local/include/wx-2.9/wx/event.h:2150)
ui.cpp:456:43 warning: 'bool wxIconizeEvent::Iconized() const' is deprecated (declared at /usr/local/include/wx-2.9/wx/event.h:2150)
ui.cpp: in function 'void SetStartOnSytstemStartup(bool)':
ui.cpp:1808:39: error: 'class boost::filesystem3::path' has no member named 'native_file_string'
make: *** [obj/ui.o] Error 1

Does anyone know how I could fix this? I'm guessing it's an issue with my libraries...

The first two lines are just warnings that can be ignored. But the error is a known issue caused by Bitcoin's use of a deprecated API that was removed in your version of Boost. The fix is to modify src/ui.cpp around line 1809 as follows:

  {
     if (!fAutoStart)
     {
-        unlink(GetAutostartFilePath().native_file_string().c_str());
+        unlink(GetAutostartFilePath().c_str());
     }
     else
     {

(Remove the line marked with a - and replace it with the line marked with a +.)


Mitigating a Double Spend Attack by Punishing the Attacker? One of the main reasons it's not safe to accept Bitcoin with 0 confirmations is due to the possibility of a double spend (where Mr. Scammer first sends 1 BTC to Alice and then creates an identical transaction in which he sends the same 1 BTC to Bob or to another address controlled by himself. If the network ends up including the second transaction in the blockchain only Bob (or Mr. Scammer himself) will be viewed as the rightful owner of the coins and Alice will be left with nothing).
However, being that it is impossible to hide a double spend forever, and everyone on the network will eventually discover that Mr. Scammer double spent his coins, why is it not possible to penalize the double spender in order to reduce the economical incentives of doing so in the first place? For example, we could create a special type of transaction in which Mr. Scammer has to lock up an equivalent amount of BTC for a specified amount of time. If the network indeed concludes that a double spend has occurred we "burn" (or destroy) the locked up BTC.
Wouldn't this significantly reduce the likelihood of a double spend occurring in the first place?

Given two transactions that spend the same input, there is no way to know which one 'came first' or is the 'rightful' transaction. Because of this, it is very difficult to enforce a 'no double spend' policy in this way. How can you guarantee that you have the transactions ordered correctly? What happens if some nodes on the network see the transactions arrive in a different order? Or what if a scammer sends a payment, but then claims that a transaction that pays those same coins back to themselves is actually the 'first' transaction? Etc.
This is why the blockchain exists in the first place: to give an explicit order to the transactions which occur on the network. Attempts to make 'zero-confirmation transactions' as reliable as confirmed transactions will never succeed, and if they could, then we could just do away with the whole blockchain! Perhaps there are ways to make double-spend attempts less likely to be successful, but ultimately if you are accepting zero-confirmation transactions, then you are incurring some risk of being double spent against.

For example, we could create a special type of transaction in which Mr. Scammer has to lock up an equivalent amount of BTC for a specified amount of time. If the network indeed concludes that a double spend has occurred we "burn" (or destroy) the locked up BTC.

You have more or less described an escrow system, in which a third party is employed to ensure that the transaction in question proceed smoothly. This is possible today, and indeed some markets provide access to this sort of protocol.
Keep in mind: if you are requiring that the user lock up some coins on-chain as collateral... that will require a bitcoin transaction to create this 'locked up UTXO'. To create that UTXO you will have to wait for an on-chain transaction to confirm... and at that point you might as well just wait for the payment to confirm in the first place! If you don't wait for it to confirm then you're just back at square one in regards to double-spend risk.
Attempting to automate this doesn't seem viable, for reasons similar to those I mentioned in the first paragraph above.


Why are only specific transaction types accepted into the mempool? In the Bitcoin Mainnet, only specific transaction types are accepted:

  Bitcoin uses a scripting language to specify (and satisfy) the encumbrances, thereby allowing a whole host of transaction types. Although many transaction types can be represented in the scripting language, only a limited number of standard transaction types are actually accepted by the network and the miners. (source)

What is the point of equipping Bitcoin with a scripting language, while only accepting a pre-defined set of transaction types? What harm could be caused to the network by accepting valid transactions with an arbitrary locking script?

Any script can be used in P2SH/P2WSH technique. Using arbitrary scripts in transaction outputs cause grows of UTXO database and other problems.


Are Relay Addresses Possible? Is it possible to create an address such that different parties can spend certain portions of any output spent to that address?

R: 1zaybxcrandrelayexampaddr
A: 1xyzabcrandexampladdressa 97%
B: 1cbaxyzrandexampladdressb 3%

Such that ex.gr. A can spend 97% of any output that is spent to the relay address and B can spend 3% of any output that is spent to the relay address.

Would it be possible to do this transitively, to arbitrary depth? Where A or B could be relay addresses (and their component parties in turn also could be relay addresses)?

Would it be possible to do this with arbitrary breadth with an arbitrary number of parties composing a relay address?

Related: In the bitcoin scripting language, how can I access other outputs of the transaction? Or how else can I limit how the coins may be spent?

You cannot create your specified spend conditions with Bitcoin script directly, because you cannot specify the nature of a future output within an input's script. Put differently, an input's script cannot define the outputs created from it.

You could perhaps achieve a similar result using a multisig address, and a third party 'rule engine' signer or similar (credit to @RaghavSood in the answer I linked to above), but it is not possible to program a Bitcoin address to behave this way independently.


Add a Watch-only Wallet in Bitcoind When running bitcoind under OSX/Linux, how can we add a watch-only wallet using the JSON RPC? Do we need the public key or is the bitcoin address sufficient?

As of bitcoind v10, there is support for watch-only addresses. A bitcoin address is sufficient. The bitcoin-cli command is:

bitcoin-cli importaddress "address" ( "label" rescan )

Where "address" is the address you wish to watch, "label" is an optional label for the the address, and "rescan" is a boolean of whether bitcoind should rescan all previous transactions for activity relating to "address".

The example in bitcoin-cli's documentation of the JSON-RPC command is:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ["myaddress", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

Release notes for watch-only wallet support


How to allow/setup crypto transfers/payments on my website? I'd like to learn how to allow end users on my website to pay for goods using cryptocurrency.

Questions I have:

1 - How would I confirm the transaction has been received ?
2 - How would I confirm the value of the transaction is correct ?
3 - Are there any API's I could use to achieve what I'm looking for ?
4 - If I had to refund a user how would I do this ?

To check payment:
you can use blockchain api to do so:
https://blockchain.info/q

which is

https://blockchain.info/q/getreceivedbyaddress/[BITCOIN ADDRESS]?confirmations=6

confirmations can be any but minimum 6 is recommended

to accept bitcoin, I suggest u host a bitcoin core and use something like  Easy Bitcoin PHP Library to do so


API for multiple blockchains Is there an API to get data for multiple blockchains? Most blockchain explorers already offer an API but I'd like to be able to get information for different blockchains through the same API.

Found it: https://chainz.cryptoid.info/api.dws

You can see a list of all their supported block explorers through http://chainz.cryptoid.info/explorer/api.dws?q=summary


How to verify a signed message by bitcoin core? I want to verify, in Java, a signature produced with bitcoin core's signmessagewithprivkey (equivalent to the verifymessage). I noticed a bitcoinj method similar to the bitcoin core's verifymessage - org.bitcoinj.core.ECKey.verify. What follows is my implementation attempt and its test.

For testing I will generate a signature and check it in bitcoin core:

>bitcoin-cli signmessagewithprivkey $(bitcoin-cli dumpprivkey 1CwKH9PQPkFPjQagEv483FUM5ngk57L3Pp) ""
H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic=
> bitcoin-cli verifymessage "1CwKH9PQPkFPjQagEv483FUM5ngk57L3Pp" "H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic=" ""
true

So, signing an empty message with the RPC using the address 1CwKH9PQPkFPjQagEv483FUM5ngk57L3Pp (public key: 021c3be5fb7820c56d881ea2d02a906d87540ec8888bbe819b7abd2e39f6f6e512), produces the signature H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic=.

My Java implementation attempt:

import org.apache.commons.codec.binary.Hex;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.Sha256Hash;
import java.math.BigInteger;
import java.util.Base64;

public class Notebook {

    public static BigInteger[] ParseSig(byte[] sigBytes, int sigOff) {

        BigInteger r = new BigInteger( 1 ,sigBytes, sigOff, 32);
        BigInteger s = new BigInteger( 1, sigBytes, sigOff + 32, 32);
        return new BigInteger[] { r, s };
    }

    public static void main(String[] args) throws Exception{

        // Signature
        String signatureString = "H2wp/+5N2+OQwP6a5GFRbt8S+EfML1Szx4uhWPfiO0e/QcY2rZQOkLOR+unknNl4NgDWBacRRXOLjr+m53V0xic=";
        byte[] signatureBytes = Base64.getDecoder().decode(signatureString);
        BigInteger[] signatureRandS = ParseSig(signatureBytes, 1);
        ECKey.ECDSASignature signature = new ECKey.ECDSASignature(signatureRandS[0], signatureRandS[1]);

        // Public key
        String pubKeyString = "021c3be5fb7820c56d881ea2d02a906d87540ec8888bbe819b7abd2e39f6f6e512";
        byte[] decodedPubKeyString = Hex.decodeHex(pubKeyString.toCharArray());
        ECKey publicKey = ECKey.fromPublicOnly(decodedPubKeyString);

        // Message
        String message = "Bitcoin Signed Message:\n";
        Sha256Hash messageHash = Sha256Hash.of(message.getBytes());
        Sha256Hash messageDoubleHash = Sha256Hash.of(messageHash.getBytes());

        // Test
        boolean result = publicKey.verify(messageDoubleHash, signature);
        System.out.println("Result: " + result);
    }
}

Notice that I used the salt Bitcoin Signed Message:\n before hashing the message - this is done by signmessagewithprivkey as shown here and here. The problem is the above implementation doesn't pass my test and I don't know why...

EDIT:

Thanks to Septem151 I was able to fix this. The code passes the test, if the message section is replaced with:

        // Message
        String message = "Bitcoin Signed Message:\n";
        byte[] messageBytesEncoded = new byte[message.getBytes().length + 2];
        messageBytesEncoded[0] = 0x18;
        messageBytesEncoded[messageBytesEncoded.length - 1] = 0x00;
        for(int i=1; i <= message.getBytes().length; i++) messageBytesEncoded[i] = message.getBytes()[i-1];

        Sha256Hash messageHash = Sha256Hash.of(messageBytesEncoded);
        Sha256Hash messageDoubleHash = Sha256Hash.of(messageHash.getBytes());

The preimage used when signing messages with Bitcoin Core is a combination of the "Magic" phrase: Bitcoin Signed Message:\n and the Message you are signing. However there is one caveat, being you must have a VarInt prepended to both the "Magic" and the Message. The VarInt encodes the byte-length of the message (encoded in UTF-8). Since the "Magic" value never changes, its VarInt value will always be 0x18.

For your example, the message is nothing, therefore your VarInt will be 0x00. Your preimage and sighash becomes:

Preimage: 0x18426974636f696e205369676e6564204d6573736167653a0a00
Sighash: SHA256(SHA256(preimage)) = 0x80e795d4a4caadd7047af389d9f7f220562feb6196032e2131e10563352c4bcc

    0x18       0x426974636f696e205369676e6564204d6573736167653a0a        0x00      (empty)
MAGIC_VARINT                       MAGIC                           MESSAGE_VARINT  MESSAGE


What happens to my outgoing txs in a block reorganization? Let's assume I create and send a series of txs:

|------block A--------|------block B----------|----block C-----|----block D-----|
|Tx1......Tx2.........|...Tx3.................|................|......Tx4.......|

but then a fork happens and a block reorganization takes place:

|------block A--------|------block B----------|----block E-----|----block F-----|--block G--|
|Tx1......Tx2.........|...Tx3.................|......???.......|......???.......|.....???...|

Whatever happens to Tx4? Will it be included in one of blocks E, F, G or another block? Is it gone? Conflicted/invalidated? Do I need to resend it? If yes, can I spend the same inputs I did when creating Tx4?

Will it be included in one of blocks E, F, G or another block?

It's likely already included in one of those blocks. If not, it can be included in a block after that.

  Do I need to resend it?

Probably not. If block D or Tx4 was widely seen by the network, it should get into a block soon. (It might already be in blocks E, F, or G.)

  If yes, can I spend the same inputs I did when creating Tx4?

Yes. When doing a reorg, the Bitcoin client first rolls the chainstate back to the first common ancestor.

The standard Bitcoin client actually includes a database for the sole purpose of rolling the blockchain back. (It's called an undofile.)


Can the forked be unforked? So: BTC, BCH, BTG and BSV all trade at different prices/values.

All have forked off from BTC and have different development teams, theories, practices, technology, etc.

I noticed that when you look at the amount of coins mined on sites like coinmarketcap.com, it shows the following circulating supplies for each:

BTC = 18,287,125
BCH = 18,351,063
BSV = 18,348,240
BTG = 17,513,924

Are the amounts of the circulating supply of coins (other than BTC) the amounts of coins mined after they forked from BTC?

How is BTG's supply calculated since it is lower than BTC?

Also, if/when one of these coins "wins" through having the "best" technology, most TPS, etc., will they all converge back into one coin some day possibly?  If/when that happens, will the values all become the same since they will converge back into one coin?

Any light anyone could shed on this would be GREATLY appreciated!

When a fork like this happens, and a new cryptocurrency emerges, the blockchain history from before the fork remains the same.

The amounts you have listed are the coins mined from before the fork + coins mined after the fork. The amount mined will always vary, because of possibly different rules or because the blocks don't always get mined exactly every 10 minutes (BTC block time has jumped up to 15 minutes and will probably slowly decrease over time, while BTG block time is 10min and 26 sec).

BTG supply is lower from BTC simply because from the time BTG forked, more BTC blocks were mined than BTG blocks.

The supply is calculated with the help of total blocks mined and the reward issued for those blocks.

After a fork happens, cryptocurrencies can never merge again. There will forever be separate blockchains.


Error loading wallet.dat: Wallet corrupted I've been using bitcoin for over a year now without issues. It's been a while since I fired up a bitcoin client though, at least a couple months.

When I try running a bitcoin client (bitcoin-qt version 0.6.0-oneiric0) today, I get the error message

Error loading wallet.dat: Wallet corrupted

I generally use GPG to encrypt and decrypt wallet.dat, and I only have backups of the encrypted wallet.dat.gpg file. I encrypt and decrypt the file only while bitcoin is not running.

I tried following https://bitcointalk.org/index.php?topic=11331.0 . The tools appeared to work (dbdump.py --wallet doesn't throw any errors and spits out what looks like proper wallet contents), but after fixing my wallet with fixwallet.py I get the same "Wallet corrupted" error from the bitcoin client.

The bitcoin client works fine if I blow away my ~/.bitcoin directory.

I'm using 32-bit Ubuntu 11.10 desktop.

I also tried installing the latest bitcoin Qt client on Windows, but that also reports wallet.dat is corrupted.

I tried using a Linux binary from bitcoin.org, and I get this error message:

************************
EXCEPTION: 22DbRunRecoveryException
DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
bitcoin in Runaway exception

terminate called after throwing an instance of 'DbRunRecoveryException'
  what():  DbEnv::open: DB_RUNRECOVERY: Fatal error, run database recovery
Aborted

This may be related: https://github.com/bitcoin/bitcoin/issues/809

Update Mon, 30 Apr 2012 21:45:00 -0700

I ended up trying a bunch of older versions of the bitcoin client, and version 0.3.24-beta reads the wallet just fine! What the heck!?! Gotta be a bug in bitcoin. Now I just need to figure out a way to safely "upgrade" my wallet so it works with 0.6, I guess.

Update Mon, 30 Apr 2012 22:00:00 -0700

Bitcoin 0.4.1 is able to work with everything in my ~/.bitcoin dir. 0.5.4rc3 and 0.6.0 do not work.

Is there some way to serialize the wallet data as plain text? Man, I hate BerkeleyDB.

Update Wed, 02 May 2012 10:43:19 -0700

Using Bitcoin 0.4.1 with my old wallet (which apparently contains something corrupt), I was able to transfer my balance to a new wallet created from scratch with Bitcoin 0.6.0.

Version 0.6.0 introduced more strict validity checks on the keys when loading a wallet, to prevent silent further corruption. It seems like you have a wallet where one or more keys are corrupted (the private and public one don't match, for example). You can try moving the funds away using an older version, but there is a chance that will fail.

I intend to add a sort of "recovery mode" in 0.7.0 for situations like this.


Are number of transactions in Merkle Tree always "even"? According to definition and structure of the Merkle Tree, apparently, the number of transactions in a block that inserted in a Merkle Tree structure must be even (and not odd), is not it?

Please see the following figure which shows a Merkle Tree:

All the examples that I have seen, are like this one, meaning that apparently always number of transactions in a Merkle Tree are even (ex. in the example above there are four transactions). Is there an example in which number of transactions would be odd? And what happens if number of transaction are odd? (ex. how to insert 5 transactions in above example?)

If there are an odd number of nodes on any level of the merkle tree, the last node is duplicated and hashed with itself.n

If there were a Tx4, the diagram would look like this

                  Root (Hash01234444)
               /                      \
        Hash0123                 Hash4444
        /      \                    /     \
   Hash01      Hash23           Hash44     Hash44
   /   \        /   \             /   \
Hash0  Hash1  Hash2  Hash3     Hash4   Hash4


What is the best way to implement micropayments with Ripple? I'm interested in the following use cases:

Web content
Voice and media traffic

For the first case, it would be ideal to be able to include some sort of proof in a custom HTTP request header showing that the client has made the payment. The server should be able to check this proof and verify that the payment has indeed been made, and then reply with the requested resource or return an error.

It may be a payment (required), or it may be a donation/tip (voluntary); in the latter case the server may collect these and verify them later.

For the voice and media case, the idea is to incentivize independent relay nodes to forward traffic for clients behind NAT/firewall or simply those who wish to add a layer of anonymity (similar to Tor). Again, these could be "metered" payments (e.g. 0.0001 XRP per 10 MB, or say for 30 minutes), or they could be tips. The speed would be extremely important in this case.

As I understand it, there are two ways to do micropayments:

On-ledger: These are payments made on the ledger and verified by the recipient using the transaction ID. This may be too slow, depending on the use case.
Signed transactions: Here the sender simply sends a signed transaction to the recipient, who can verify instantly if the sender has sufficient funds. Double-spending is possible in this case.

What would be ideal is if we could generate some sort of bearer token that could be passed around over multiple payments before it is finally redeemed on the ledger.

It would be even more awesome if these bearer tokens were anonymized using blind signatures.

Has anyone implemented micropayments with Ripple, and are there any guidelines/recommendations on how to go about it?

Pre-signed transactions won't work the way you want due to how Ripple uses a simple sequence number. The only downside to doing small transactions via Ripple is the 0.000010 XRP transaction fee and the 2-20 seconds (or so) delay between signed ledgers.

Normally a merchant generates the payment information. E.g. "send 1 USD to account A, destination tag 123 (any 32 bit number), invoice ID 0x12345678 (256 bits of data)", often this would be with a Ripple URI (note that page doesn't document how or if an invoice id can be specified in a Ripple URI). The customer then selects the URI and is taken to the send page in their configured client (currently now always ripple.com/client) with all that information pre-filled in. The merchant then listens on their connection to a Ripple server (either local or remote) for information on payments to their account and uses the destination tag and/or invoice id to update payment status for individual customers or invoices. Normally merchants should handle the possibilities of one invoice being paid via multiple transactions and overpayments or the like as well.

You could have the customer provide the transaction hash(es) as you suggest, but that's not normally done and is usually more work for the customer for no reason.


How does the difficulty target affect the time to complete the block? So, I'm currently doing a personal project where I'm creating my own crypto blockchain (just for fun). I'm currently coding the Difficulty Target part of the Blockchain, but I'm not entirely sure how the difficulty part affects the process for completing the block? I know that with Bitcoin, the difficulty adjusts every 2016 blocks based on how long it took to complete the 2016 blocks, but what is the difficulty applied to and how does it make subsequent blocks harder/easier to complete?
Thanks.

Have you read this? It is sort of technical, and goes into How is difficulty calculated? and How is difficulty stored in blocks?
https://en.bitcoin.it/wiki/Difficulty
re your comment about nonces: The nonce is not the difficulty. In the example below, I'm trying to find a sha256 that starts with 0. On my imaginary blockchain, a proof-of-work that starts with a single 0 is good enough. Notice that I don't change anything but the number after foo. The number after foo can be thought of as the nonce. It's just some thing I change to get a new proof-of-work.
[I] ➜  ~ echo -n "foo" | shasum -a 256
2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae  -
[I] ➜  ~ echo -n "foo1" | shasum -a 256
bb4eca334f61af3b67b5d528907d30285151610200539302f4c8cabe66225b53  -
[I] ➜  ~ echo -n "foo2" | shasum -a 256
4963bd713a7eb1bce458868b0c8472bdc8bc5929a7892a92dd24344aea92093d  -
[I] ➜  ~ echo -n "foo19" | shasum -a 256
06651ba147df6422edcd47690fd3d68795bc59636f37f10b67a94fa70fe1fdbb  - yay

Compare that with miners on the bitcoin blockchain. Currently they have to find a sha256 hash that starts with 19 0's. e.g: 00000000000000000006d31a10b4190a8f86c93189debe87a4d1fff54fbd5b23


Monitor non-wallet bitcoin addresses for new transactions This is usual checkout functionality. Show address to the user and needs to monitor it for new transaction during n minutes. Addresses are not unique for each payment.

Optional:it would be good to have listener for transaction with certain incoming amount, but this is optional.

blockchain.info have something similar, but I want to it using local bitcoin-qt from .Net application.

*Update: this should be done for non-wallet addresses/transactions.

Bitcoin-qt has several limitations when it comes to this type of thing. There are only really two ways to do this.

Use the listunspents RPC call to watch the balance for a particular address, and compute the total balance. Then trigger your call on the backend from your .net application.
Use the external wallet-notify bitcoind option that sends transaction data to your .net process via a script, parse the result to determine the payment. This can cause problems on high volume sites as it spawns external processes per wallet notify.

Finally, you can only use this method to interact with addresses registered to the local bitcoind. Either addresses it controls, or that you have manually loaded.


What is the wallet in MultiBit? What is the actual wallet? The slight confusion comes from the install note -

"Backup all your wallets.

You can do this by exporting your private keys
using 'Tools | Export Private Keys'."

If a new wallet is created and called newwallet.wallet,
is that the wallet, the other file with a date string newwallet-2013xxxxxxxxxx.wallet, the exported private keys, or all of them?

Which one is to be backed up, or to be saved and imported into another system?

Also, are these multibit wallets only compatible with multibit, or can they be imported into other programs. On other programs they are called wallet.dat?

There is a section in the help which describes what each file is and the the data it contains. It is in the section 'More technical details' called 'File descriptions'.

The wallet file (without the numbers) is the main wallet file. It contains your private keys and the relevant transactions.

The wallet file with the numbers in the name is a rolling backup file. The numbers are a timestamp and it is 'the wallet that was saved just beforethe last save'.

The files with the suffix 'info' contain the labels for your addresses.

Private key exports are typically given the extension 'key'.

You can backup your wallet either by :

Closing MultiBit and then copying the wallet and info files.

Or

Exporting your private keys to a private key export file. This only contains private keys (no labels,  no transactions). You can import it into a new wallet and it regenerates the wallet (but currently you lose your address labels).

For higher value wallets I recommend backing up using both techniques and to two separate devices (just to be on the safe side).

Note that the MultiBit wallets are not deterministic so if you create more receiving addresses you will have new private keys created. You will want to redo your backups. You can choose how many new receiving addresses to create at a time (1, 5, 20 or 100) so I normally add more than I think I'll need for that wallet to save me the bother of re-backing up.

The wallet format is in a format called protobuf. This is the format used in the bitcoinj library and is also used in the Schildbach Bitcoin Wallet.

Developers can easily read and write this file format in other languages like C, C++, python though to my knowledge no-one has written parsers for the data format yet.

Different clients tend to have import and export at the private key level (as that is the crucial data) and it's more standardised. The MultiBit private key export files can be imported directly into blockchain.info and the individual private keys can be transferred to and from anything that supports the WIF private key format. Pretty much all the clients import/ export this private key format.


If I buy a bitcoin in USD who gets the cash? Question if I buy a bitcoin @$103.89 USD as of today’s prices where does the USD payment go?  Do the funds paid in any world currency go into a pool to back the bitcoin or into the developers of bitcoin clients?  What are the IRS requirements as to the value of ones account?  The Norfed dollars where backed or made of precious metals and taken down by the federal coinage act.  The $20.00 coin is now worth about 30% more than face value, go figure.  Thanks any info would be appreciated.

When you buy an ounce of silver bullion at the coin store, who gets the money?

The person who held the coin before you did.

All bitcoins are first issued to miners. From there, miners use those coins for trade or exchange.  So when you buy a bitcoin with cash, you are buying it from someone who owned it but initially it was obtained from a miner.


What server-side Bitcoin clients are available to serve information? I have been toying around with the idea of building a bitcoin app. My research has thus far led me to conclude that it makes sense to run a bitcoin client daemon on my server in order to provide an API for my mobile app.

Is bitcoind any good for this? I used the -server mode of the Bitcoin-qt client for mac, as explained here, and it seems to be very slow for most of the RPC calls. Is the daemon any faster? It seems like something this slow is not preferable to run on the server, and would almost force me to cache some responses that would probably be unnecessary for a faster running client (obviously, down the road cacheing would make sense, but for the initial small scale of this, I would like to avoid it.

Are there better server-side clients I could run that would perform better than bitcoind? Do any of them provide better interfaces that JSON-RPC, or is there some reason that JSON-RPC is intrinsically better for this sort of use-case? How about a REST API?

It depends on what information you require. Bitcoind can provide you with information through its API, but you'd need to be running it yourself and it only works through HTTP JSON RPC. There are other sources of similar information, like blockchain.info's API, which can also handle other formats.


How does the rate of getwork requests correlate with the hashrate of a miner? In a setup where a standard bitcoind serves full difficulty targets to some mining nodes, how can I calculate the hashrate of a mining node from looking at the rate of getwork requests? Does this depend on the used mining program or the used mining extensions?

The standard getwork protocol forces the miner to send a new request every second. This means that if a miner takes longer than 1 second to check all nonces in a given getwork (2^32), it will be making a new request before it checks all values in a given request, thus giving you 1 getwork request per second regardless of the hashrate.

If the miner can solve the getwork faster than that, it would be making requests more often. In theory, you could use this formula to calculate the hashrate:

Hashrate = noncemax/time

Where time is the interval between the getwork requests and noncemax is the size of nonce field (2^32). However, this assumes no time delay due to the network lag and so forth, so it's an ideal scenario. Moreover, some miners discard unfinished work after submitting a share, so it would appear they are doing more work in your configuration than they actually are.

If you intend on using getwork extensions, specifically noncerange and rollntime, you could calculate the hashrate more accurately. Noncerange would change your noncemax to whatever size you set, and rollntime would allow you to measure time intervals greater than one second. However, not all miners support the extensions.


Someone scammed me, and I want my money back. What can I do? I was cheated by ebankbtc.com, which gave me this address: 1QiCsWaZxvNy4hXZMvQJEBcnVm5KH3fK5

You can see the transaction here:
https://blockchain.info/tx/e22206dcf27249afa6576443b3953b11ae43c04050c9e663a64f61ea320a7a4f

So, I lost my own Bitcoin.

What can I do about it?

If the receiving party is not co-operating you cannot enforce them to return the payment.

In this case it is recommended to take the case to your local police and make a  crime report of fraud. Most civilized countries have courts which can enforce the fraudster to repay the stolen property.

However getting anything back is unlikely if you were scammed in Internet. as most likely the culprint is in another country.

Welcome to non-regulated cryptoanarchy.


Is there some way to add a third party authorizer to (or by) a lightning network transaction? I'm not asking for "multisig on the lightning network", but I'm more curious about how one would set up shared control over lightning network transactions in general.

Imagine we don't have a multisig transaction... would it be possible to set up some sort of 3rd party oracle that would "link" a channel?

Or maybe set up some sort of logic implemented by the opening or closing of payment channels on a boutique lightning network?

In 2.2 of the lightning network paper, it says that opening payment channels doesn't actually control the movement of any funds.
https://lightning.network/lightning-network-paper.pdf

Some folks came up with an idea for a way to pay an oracle for provable information (especially information that can best be obtained in from a lot of different decentralized nodes at "anti-affinitied" locations) using lightning & bcoin: https://github.com/michaelfolkson/bcoin-hackathon

My brother wrote an implementation of NAND gates here, https://github.com/rjb25/gate-wiring , and since considering both of these I wondered whether one might hook up some sort of gating system whereby a third party could make a decision about two possibilities for distribution of the funds of another two parties.

And now I'm wondering if it'd be possible to set up some sort of private lightning network that uses the opening and closing of payment channels (or resizing them) to do some kind of third party authorization logic for lightning payments?

Perhaps where one person (party A) receives some amount of bitcoin in one case, and another (party B) in a different case, as determined by a third party oracle or mod?

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


Understanding skip pointers in BlockIndex in bitcoin sources From source code:

/** The block chain is a tree shaped structure starting with the
 * genesis block at the root, with each block potentially having multiple
 * candidates to be the next block. A blockindex may have multiple pprev pointing
 * to it, but at most one of them can be part of the currently active branch.
 */
class CBlockIndex

//! pointer to the index of the predecessor of this block
CBlockIndex* pprev;

//! pointer to the index of some further predecessor of this block
CBlockIndex* pskip;

Can anyone help me understand the need for skip pointers, perhaps with a picture? Why should we track this? The comment says some predecessor . When and where are these useful?

It is implenting a skiplist.

Every index node points to its immediate predecessor (pprev), and to some other predecessor that is further away (pskip). These skip pointers are used when we need to find a far predecessor quickly. One common case is when we need to find the 2016th ancestor of a block to recompute the target difficulty.

Most of the skip pointers only go back a few blocks, but ocassionally one points back very far, allowing many nodes to be skipped.


Block orphaned by same miner? Just noticed 2 conflicting blocks by the same pool.

One of the blocks was naturally orphaned, but why would the same pool broadcast 2 such blocks? Does it happen often?

Well that is simply bad luck. It can happen if the miner uses multiple Bitcoin nodes to handle the getwork or stratum requests. In the case of GHash.io my guess is that they either have so many resources that a single nodes cannot handle all the work to keep them working, so they created multiple nodes and distributed the resources on them.

Another reason might be that they have multiple locations, and in order to keep latency low, they have local nodes feeding work to the resources. This scenario would fit pools like btcguild.

While certainly annoying, it is not really anything you can do against it, if they'd known from the other block from their own network they would simply have dropped it and we wouldn't have known about it.


Can I use Copay like Bitgo? I need to use multisig wallet on my online service. The most suitable service for me is Bitgo, but it is very expensive. Commission 0.25% on the withdrawal.
Can I use the Copay wallet for such tasks? I would not want to run my own Bitcore server. I can not figure out how to send API requests to the Bitcore server from Bitpay.

There is a multisig option for wallets.  Bitgo has a much more nuanced way to handle multisig.  Better for some environments, but not so good for others.  Try creating a multisig wallet in Copay and seeing if it will work for you.  You can do it across a few devices to make sure you see how it works