Ripple paper wallet: is "ripplepaperwallet.com" safe? I've been reading on the internet and I have found several websites for generating Ripple paper wallets: ripply.eu, bithomp.com, gatehub, etc. I'm not sure if these websites are official Ripple websites and trustworthy for generating paper wallets.

So, I'm wondering whether https://www.ripplepaperwallet.com is an official and trustworthy website for generating wallets.

I'm using Windows 8.1 and the latest version of Google Chrome.

Considering the fact it has iframes (e.g ads) in it and they might have access to the parent (e.g http://ripplepaperwallet.com) DOM, I would say that even if it was an open source project (which I have not found any references to) I would say it relies on a third party that is not open source therefore theoretically can be not safe.

As well, I did not see an offline version of it, which in my opinion is a good practice to verify integrity of paper wallets.


How do miners receive transaction fees? I know that in a transaction, the difference between the amount and the sum of the outputs is the implicit transaction fee, but how do the miners that verify the block containing that transaction actually get access to that fee as UTXO?

One of the network rules is that a coinbase's outputs cannot be larger than the current block reward plus the transaction fees of the transactions in the block.

So, a miner claims the transaction fees by increasing the amount of the block reward. This is true even after 2140, when there will be no block reward. (Network rules require that the first transaction be a coinbase, even if there is nothing to claim.)


How do exchanges handle fiat currencies? I'm worried about my (non-BTC) money getting frozen in some company account so I want to minimize exposure and understand the transfer processes.

Main considerations are:

Do all exchanges require an account in some fiat currency if one wants to buy BTC?
Is it trivial to transfer funds from these 'prepaid' accounts to a real bank account?
I don't like those prepaid fiat accounts, is it possible to give creditcard details instead and let them charge per purchase?

These are all closely related so I think this one question can include them.

Theses answers are going to depend on a couple of factors:
1) The particular exchange you are working with.

Each exchange is going to have its own set of policies and different levels of transparency communicating these policies to customers. Look for exchanges with more transparency/details.

2) The country the exchange assigns to you when you open the account.

Exchanges are facing financial regulations imposed by governments.
Global exchanges can have different guarantees in different countries.
For example, Coinbase and GDAX state, "If you are a United States resident, your Coinbase USD Wallet is covered by FDIC insurance, up to a maximum of $250,000." Source: How is Coinbase insured? This link Supported Countries shows the supported countries for GDAX and the supported fiat payment methods.
I made this video discussing insurance policies at Coinbase and GDAX. It may help: GDAX and Coinbase - Insuring your crypto is safe

3) If the exchange is centralized or decentralized.

If you are working with a decentralized exchange, you are in control of your funds. The Waves platform is an example of this: https://wavesplatform.com/

Summary:

In general, it's not just the fiat that you have to worry about at centralized exchanges. If the government for example seized the assets of the company, they would also be able to control your crypto. If you are super worried about this, you can send your cryptos to a private wallet that you control. The downside to the private wallet is that you are totally responsible for security, backups, etc. There is no help if mistakes are made.
Most exchanges allow you to send crypto to them after you have opened your account. The crypto can then be used for trading. Additionally, many exchanges allow you to purchase using a credit card.

See this for details on exchange vetting:
How do I know which exchanges are serious actors?
I made this playlist that goes through policies of Coinbase and GDAX. It may help: GDAX Playlist


Send cash: bitcoins vs western union: which is cheap? Bitcoin has been advertised as a very low cost and fast method of sending people money around the world, So if I need to send someone $1000 USD, the cost/fee of using WU is less than $20 USD (Using credit card - UNFORTUNATELY, WU doesn't work. They deny me sending $1000 and give me no reason. I will never use WU again.) but if I use bitcoin, what will be the minimal cost? Since I need to buy the bitcoin in the first place, and that other person need to sell it to get the cash, the conversation fees and the transaction fee would be more than $100 in the end? and if send someone $1000 in bitcoin, there is a chance that when she/he gets the cash next day, my $1000 will be less than $1000? If that is true, how can I trust bitcoin?

If you pay enough fee, which is ~ 5 dollars currently (but paying 10 dollars will guarantee fast confirmation), your payment will get confirmed in an hour. Good luck!

Actually it's possible to send with lower fee by using a SegWit address, but don't take the risk if you don't know what you're doing, set its fee 8-10 dollars. Rescuing the low fee transaction is difficult unless you're an expert.


Specification of REST .bin format? I'm currently using the JSON Rest API to get lots of transaction data from bitcoin. Unfortunately thats quite slow. I know there is also a binary format (see Unauthenticated REST Interface), but I couldn't find any description of the bin format. Is there any description of that format available?

For transactions? https://en.bitcoin.it/wiki/Protocol_documentation#tx
This is the internal format, for communication between Bitcoin nodes. As such this won't be as useful as the JSON format, since you will need to parse it on your own.
This is also equivalent to calling the RPC decoderawtransaction with tx received in the hex format.


Possible to get Blockchain bitcoins over to Stripe or Paypal? I'm new to the Bitcoin world. I accepted a Blockchain transfer over the weekend as payment for something. I'm wondering if it's possible to get my Blockchain Bitcoins (well, fraction of a bit coin) over to my Stripe account or PayPal account?

You can use a crypto currency exchange to move funds from one currency to another.

For example you can sell Bitcoins for USD or other fiat currencies and payout the amount to a credit card or a bank account.


Do any Virtual Currencies use coins that have an expiration date? Bitcoin has no way of knowing if a given Bitcoin is "expired" or has a Base58 address that no one has a key for

One way of ensuring that coins are never lost is to expire coins and add them back to the coinbase at some future date.  People with active keys would simply move all the coins to a new address within a 5 to 10 year period.

Has anyone explored the pros or cons of this, how it impacts velocity of money?

A few benefits off the top of my head include

Forced upgrade of all coins to better newer technology (SCrypt, Sha512, etc)
Better analysis and less speculation of the network (coins in circulation is constant)
More incentives to mine after the 21 million BTC mark is reached

Note: I'm not proposing a change to Bitcoin, but want to see if any Alt-coins have researched this area.

It hasn't been tried yet

At this point to the best of my knowledge there is no crypto currency that uses either expiration of transaction outputs or expiration of addresses. Therefore there are no experimental results available to observe expiration's effect on velocity.

It wouldn't affect velocity

However, one might argue that any sensible period of time (at least five years) would not have a significant effect on the velocity of the money: Savings would just be moved and the transaction fee would not pertain to a significant amount of loss. There'd be a jackpot every once in a while in the mining rewards, creating peak hash rates, and sudden liquidity spikes if the miners sell their rewards directly. Compared to the velocity generated by the majority of the user population that should be negligible though.

A smaller period of time would turn into a saving fee per address, as you'd be forced to pay at least one transaction per address every period of time. This would disadvantage smaller bitcoin holders compared to people that have larger funds in fewer addresses.

Freicoin implements demurrage

The closest that I could come up with is Freicoin, which implements a demurrage of about 5% per annum. It is implemented in such a way that every time a block is mined a tiny fraction of your savings will be added to the mining reward, so that you will lose about 5% per year.

Demurrage slowly drains lost funds

While the demurrage is mainly implemented in order to discourage hording, stabilize the mining reward, and increase the velocity of money, it will also very slowly drain lost funds back into the mining reward. Assuming the target block interval were maintained, in 20 years about 64% of lost funds would be returned into the market. After 50 years more than 92% of lost funds would be recycled.


Accidentrally spent from unconfirmed transaction I accidentally spent btc from an unconfirmed transaction.
Is it likely to confirm at a later date or is it just kinda stuck?
Ive tried searching for answers but I'm seeing conflicting information relating to this.

There is nothing wrong with spending unconfirmed outputs.  Bitcoin core will happily spend its own unconfirmed outputs, though it does prefer not to if it has a choice.

Your transaction can't confirm until its parent does, but otherwise it's treated like any other transaction.

If the parent paid a low feerate and will take a while to confirm then you could be waiting a bit, unless your feerate was high enough to make up for it.

If the unconfirmed parent was created by someone else and they successfully double-spend it, then your child transaction will be invalidated. Otherwise, assuming that doesn't happen and the feerates are sensible it'll confirm fine.


Why was my full node knocked off the network last night? Any idea what happened last night that caused my full node to fail with messages like this:   (full log available upon request)

2017-09-25 21:15:59 Bitcoin version v0.15.0.1
...

2017-09-25 21:32:33 UpdateTip: new best=00000000000000000079fb649dd2c7e35978bd6d7922b8661c1e3ae597f24191 height=486858 version=0x20000002 log2_work=87.166038 tx=256852323 date='2017-09-25 03:51:56' progress=0.999233 cache=370.8MiB(2762033txo) warning='2 of last 100 blocks have unexpected version'
...
2017-09-26 13:32:19 receive version message: /bitcoin-seeder:0.01/: version 60000, blocks=350000, us=108.196.200.233:8333, peer=2183
2017-09-26 13:32:52 receive version message: /Bitcoin ABC:0.14.4(EB8.0)/: version 70015, blocks=489424, us=108.196.200.233:8333, peer=2184
2017-09-26 13:32:55 ERROR: AcceptBlockHeader: Consensus::ContextualCheckBlockHeader: 000000000000000000639be19a0123a1c99d9fef89f0b8ac055a77f4ef86ae3b, bad-diffbits, incorrect proof of work (code 16)
2017-09-26 13:32:55 Misbehaving: 10.32.0.1:55716 peer=2184 (0 -> 100) BAN THRESHOLD EXCEEDED
2017-09-26 13:32:55 ERROR: invalid header received
2017-09-26 13:32:55 ProcessMessages(headers, 162003 bytes) FAILED peer=2184
2017-09-26 13:32:55 connection from 10.32.0.1:46684 dropped (banned)
2017-09-26 13:32:59 connection from 10.32.0.1:47442 dropped (banned)
2017-09-26 13:33:00 connection from 10.32.0.1:50695 dropped (banned)
2017-09-26 13:33:00 connection from 10.32.0.1:49700 dropped (banned)
2017-09-26 13:33:02 connection from 10.32.0.1:15754 dropped (banned)
2017-09-26 13:33:03 connection from 10.32.0.1:47560 dropped (banned)
...
...

At this point my node was seen as "down" by https://bitnodes.21.co/
Today, it appears to be working normally again.

As Nate Eldredge said, the block that you received is a Bitcoin Cash block which is invalid to Bitcoin Core. Because of this, your node banned the Bitcoin Cash node that sent you the block. However, it seems like the way that you have your node set up is that the gateway is acting as a proxy instead of passing through the connections. Thus Bitcoin Core thinks the connection came from your gateway instead of from where it actually came from. When your node banned the Bitcoin ABC node, it banned your gateway as it thought that was the bad node. This had the effect of then banning everything connected to you because they all connect through that gateway and the gateway was banned. The connections are back today because the ban is only for 24 hours.

I highly suggest that you make sure that the connections are properly being passed through so that this does not happen in the future. To ensure that they are passed through, if you use getpeerinfo (or the Peers tab of the Debug Window if you are using the GUI) and look at the IP addresses of all of the nodes you are connected to, they should not be the IP address of your gateway.


keypool option with HD wallet I'm a bit confused.

According to https://bitcoincore.org/en/2018/02/26/release-0.16.0/#hd-wallets-by-default HD wallet is enabled by default. However there is still keypool option of bitcoind which sets how many addresses will be pregenerated on wallet loading. keypool assumes regular wallet backups in order to not to loose keys generated above keypool value and keypool restore.

So, my question is: with HD wallets does keypool option have any meaning? And do I still need to do these regular backups?

The keypool is how Bitcoin Core achieves the lookahead functionality when you restore a backup. It is effectively the "gap limit". While BIP 32 does mean that one backup should be sufficient, it is possible that the keypool is too small (if you somehow hand out thousands of addresses but never receive at them) so backing up routinely is still a good thing to do. Also, backing up routinely allows you to keep metadata like labels when you restore.

The keypool is also useful for encrypted wallets as it allows getting new addresses to give out without having to unlock the wallet every time.


What is an SPV client? I've seen SPV client mentioned in several places.
What exactly is a SPV client? How is it different from a standard client?

Simplified Payment Verification:

  A Bitcoin implementation that does not verify everything, but instead
  relies on either connecting to a trusted node, or puts its faith in
  high difficulty as a proxy for proof of validity. BitCoinJ is an
  implementation of this mode.

http://en.bitcoin.it/wiki/Scalability#Simplified_payment_verification

Also read:

https://en.bitnovosti.com/2018/07/06/jonas-schnelli-current-and-future-state-of-wallets/
https://github.com/bisq-network/bisq/issues/1062
http://en.bitcoin.it/wiki/Thin_Client_Security#Simplified_Payment_Verification_.28SPV.29

MultiBit, Bitcoin Wallet for Android, and Electrum are examples of SPV clients.


Can you run P2Pool without having to keep the blockchain updated? I'm guessing the answer is no, but I thought I'd ask anyway.

I'm running my miner off a USB pen at the moment and I'd like to run P2Pool but the main issue for me is there wouldn't be enough space left on the USB pen to store the blockchain.

Is there a way I can run P2Pool without having the blockchain stored locally?

You could run the Bitcoin client on a separate machine, and connect to it over the network.


How can i generate private key and its address of bitcoin,dogecoin,litecoin etc Is there any way i can generate private key and address of bitcoin and bitcoin forks(litecoin,dogecoin etc...).

For bitcoin I have used BitcoinJ to generate private key and address but for litecoin and dogecoin I can't find any. Is there is any algorithm or code available to generate private key and address for all bitcoin forked coin.

Yeah, you can do that since the only difference between all bitcoin forks addresses is just the prefixes.

For example for Litecoin and bitcoin you could do something like that to generate address from XPUP on Bitcoinjs:

var bitcoin = require('bitcoinjs-lib');
import HDNode from "../../bitcoinjs-lib/src/hdnode";

const litecoin = bitcoin.networks.litecoin
const xpub = "YOUR XPUP HERE";
const node = HDNode.fromBase58(xpub, litecoin);
const address = node.derive(0).getAddress(litecoin);
// Bitcoin
const bitcoin = bitcoin.networks.bitcoin
const xpub = "YOUR XPUP HERE";
const node = HDNode.fromBase58(xpub, bitcoin);
const address = node.derive(0).getAddress(bitcoin);


How can I calculate the profitability of this dash cloud mining contract? I'm looking at a cloud mining contract by Genesis Mining at $500 for two years mining with 100 MH/s for Dash. The current network hashrate is 2550 MH/s. The mining reward is 3.6 dash per block, and there were 550 blocks in the last 24 hours. How can I calculate when I'll break even and how much profit I could possibly make over the duration of the two years assuming these factors remain the same.

Don't make cloud mining contracts! A lot of cloud mining providers are just scammers.

The network's cumulative hash rate of Dash varies a lot but tends to go up and below 3 TH/s a lot. Currently, the block reward is at (converted) 261.96 USD. It goes down by 7.1% per year. Dash's block time is 3.5 minutes.

Think about it: We can approximate the total money miners make under the assumption that the total hashing power and Dash's value stay about the same as the integral of 261.96 USD * 525600/3.5 * e^(-x*0.0736465) over x from 0 to r where r is the time in years we regard Note that this isn't exact but using this integral I don't have to calculate weird sums. This means that you'll make about 100 MH/s / (3 TH/s) of that.

Plug those numbers in and you get that you should make 2438.59 USD during those 2 years.

Now ask yourself this question: Would you sell that for 500 USD or try to keep the 2438.59 USD to you when your operational costs (allegedly) obviously are below 500 USD for that time? And why would the cloud storage provider?

In case you're still interested in the break even point: Just determine r for that integral times your share being equal to 500 USD. The result is r = 0.386758. So after 4 months and 19.23 days.


Easy way to compare bitcoin node block to total block, check sync status I am familiar with bitcoin-cli getblockcount, but is there an easy way to compare this to the total block count to check my sync status?

Since you're already on the command line, try:

wget -q -O- https://blockexplorer.com/q/getblockcount; echo


bitcoin-cli fails with auth error I run it like the below.

bitcoind -datadir=/Users/varunvb/Downloads -conf=/Users/varunvb/Downloads/bitcoin.conf -daemon

When I run (Using the user name and password as in the config file)

bitcoin-cli -rpcuser=<USER> -rpcpassword=<PWD> getinfo

I get
error: incorrect rpcuser or rpcpassword (authorization failed)

I see the below in the debug log

ThreadRPCServer incorrect password attempt from 127.0.0.1

My bitcoin.conf file looks like this:

-e
rpcuser=<USER>
rpcpassword=<PWD>

bitcoin-cli can read rpcuser and rpcpassword out of your config file. Just run it like this:

bitcoin-cli -conf=/Users/varunvb/Downloads/bitcoin.conf -datadir=/Users/varunvb/Downloads getinfo

Also, remove the -e from your bitcoin.conf.


How Long to Verify Payment? I wish to allow people to purchase items at my shop using bitcoin.  I've heard however that blocks take 10 minutes on average to process and transactions may not even be processed in the next block if the transaction fee isn't high enough.

So does this mean that my customers will need to wait at least 10 minutes before I can verify they have made a payment and I can allow them to take their item?

To put it simply, it depends on the value of the transaction. There's little incentive for someone to try ripping you off with a low value transaction, but there is a strong incentive to do so with a high value one.

This has been raised before, but the answer that I found easiest to understand is quite old: https://bitcoin.stackexchange.com/a/832/516

Note that waiting for 1 confirmation isn't a wait of "at least 10 minutes", as half the time it will be faster than 10 minutes. For high value transactions more confirmations may be prudent.

There is good info here too: https://en.bitcoin.it/wiki/Confirmation


BitcoinJ : Balance and Transaction are not showing in wallet after restoring wallet from MnemonicCode I have created a wallet with the help of WalletAppKit on Android and did some transaction in it.

Now what I try to do is, restoring that wallet from mnemonic code (BIP39). It also returns the Wallet object but it doesn't contain the transactions.

Here is the link ref https://bitcoinj.github.io/working-with-the-wallet#seeds-and-mnemonic-codes which describe the working with mnemonic code and seeds.

It also says "now sync the restored wallet as described below" but I never found any way to sync it.

DeterministicSeed seed = wallet.getKeyChainSeed();
println("Seed words are: " + Joiner.on(" ").join(seed.getMnemonicCode()));
println("Seed birthday is: " + seed.getCreationTimeSeconds());

String seedCode = "yard impulse luxury drive today throw farm pepper survey wreck glass federal";
long creationtime = 1409478661L;
DeterministicSeed seed = new DeterministicSeed(seedCode, null, "", creationtime);
Wallet restoredWallet = Wallet.fromSeed(params, seed);
// now sync the restored wallet as described below.

I think this example can help you, to synchronize the wallet

https://github.com/bitcoinj/bitcoinj/blob/master/examples/src/main/java/org/bitcoinj/examples/RefreshWallet.java


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

scriptSig appears in the Input Script.

scriptSig = <sig> <pubKey>

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

What is the sig part of scriptSig?

scriptPubKey

scriptPubKey = OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG

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

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

Now, this is my understanding so far:

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

Questions:

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

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

Thanks.

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

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

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

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

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


How bitcoin application in production retrive UTXO's AFIK, UTXO of an address cannot be retrieved using bitcoin-core, without importing the address in the wallet.

How are application in production able to get UTXO ?
Does all the application use Indexed database like Insight or Abe to get UTXO ?
Is there any way to get UTXO from bitcoin core without importing the address into the wallet?

Most services operating large scale wallets only use Bitcoin Core for networking information, and maintain a separate utxo set for wallet purposes.

There are many existing options to build a full utxo set that can be queried for arbitrary addresses, such as the insight project.

Moreover, recent versions of Bitcoin Core come with the scantxoutset RPC call, which allows you to locate unspent outputs for a given address or locking script.


Possible to build a coin that will never change it's code? I want to know if it's possible to create a coin that will never go through any kind of forks. Where there would be some kind of consequence for the majority of miners trying to change what it is. Is the only way to do this to make it not open source, or is there a simpler way?

Yes, it's trivially possible. All you have to do is never make any changes. Other people might make changes, but you are free to ignore them entirely if that's what you choose to do.

If the initial design is perfect, this should work out just fine. However, if there's anything wrong with the initial design at all or at some future point people consider it unsuitable, you will be stuck using a poor design. You might conceivably be the only person using that design, so it would cease to serve any purpose.

You will only be able to interoperate with people who believe as you do, of course. Just as they can't force you to change, you can't force them not to change.

But you could do it if that's what you really want to do. Nobody can force you to change things if you don't want to.


Network connectivity to the Fullnodes What would the router configuration (port forwarding) be if I have two nodes 192.168.2.21 and 192.168.2.22 running bitcoin and wants to enable port forwarding for them both on 8333?

Just open TCP incoming/outcoming connection for 192.168.2.21 & 192.168.2.22 for port 8333 in you router configuration page.


what is the primary factor responsible for the increase of block size? Blocks are made up mostly of transactions.

I understand that the larger the transaction output is in coins, the greater the transaction size must be because it must list all previous transaction inputs that lead up to this transaction and add up to the net output of this specific transaction.

Is there any other factor I might not have accounted for that increases transaction size or block size?

The primary driver of Block size is the number of transactions. Below is the structure of a block and the size of each part in the block.

  Magic no, 4 bytes

  Blocksize, 4 bytes

  Blockheader, 80 bytes

  Transaction counter, 1 - 9 bytes

  Transactions, -many transactions

The only part of a block with a variable size is the transactions part.

See: https://en.bitcoin.it/wiki/Blocks

If you're exploring the scalability of Bitcoin, see: https://en.bitcoin.it/wiki/Scalability#Storage


Where and how is secp256k1 used within Bitcoin? Bitcoin is unique that is uses secp256k1 to secure it's transactions; and any cryptographic attack against this algorithm is probably going to be percieved as an attack against the bitcoin network.

Where is this algorithm used and in what manner is it used?

All of Bitcoin's public-key cryptography is done with secp256k1. Every sane transaction has at least one secp256k1 signature and at least one secp256k1 public key or public key hash (address). A complete overnight failure of ECDSA/secp256k1 is the only technical failure I can think of which could destroy Bitcoin. This is very unlikely, though.

  Bitcoin is unique that is uses secp256k to secure it's transactions

Secp256k1 is presumably used in other applications (though Bitcoin is certainly the largest). It's a standard curve published in 2000 by Certicom Research and included in OpenSSL and other crypto libraries. Satoshi didn't just make it up or anything.


Is our hardware wallet safe if the PC or Mac has 3rd party apps? For example, our PC or Mac might have 3rd party apps installed, such as Pixelmator, GIMP, or VLC player.  They are usually considered to be safe apps.
However, is it true that when using a hardware wallet, we need to use the PC or Mac, and if the PC or Mac is hacked or is affected by any 3rd party software, then our private key can still be stolen? How do we prevent it from being stolen?
Having said that, I heard that if we did not install the app as an admin on the Mac, that is, if we installed the app only by dragging the app into the Applications folder, then we can reboot the Mac and not run any 3rd party app, and at this stage, no 3rd party app should be able to do anything bad. If we installed the 3rd party app as admin (root), then it is a different story because now the app can be running itself or a small component in the background even after a reboot.

Typically, the signing is done on the device and the private keys never reach the computer. This means that the computer can never generate and sign transactions on its own
A wallet like Trezor (T) shows the destination address from its screen so that you press one of the buttons on the device itself. This makes it impossible for the computer to make the device sign a stealing transaction, because you would see that the destination address is not your intended recipient.
I would use Trezor T with any online computer.


How do I change what wallet Coinbase deposits BTC into when buying? Right now I have to buy into Coinbase and then transfer to another wallet. Can I have Coinbase just send it directly to the wallet and cut out the extra transfer?

Short answer: No.

Long answer: When you buy on Coinbase, no actual transaction occurs on the blockchain, instead Coinbase just updates their internal database, to show that your account now owns some amount of bitcoin.

When you make a request for Coinbase to send your bitcoin to an external wallet, then at that point an actual transaction is broadcast to the network.

So there is no way to 'shortcut around some fees' here. Even if your buy order paid straight to an external wallet, the same processes would happen in the backend (coinbase would update your account's balance on their internal ledger, and then broadcast a transaction to the bitcoin network).


BTC and BCH/BCC after fork I have BTC in a paper wallet. Will that wallet also have BCH (a.k.a BCC) after the UAHF? Should I move the BTC to my blockchain.info wallet or another type of wallet to ensure I also own BCH after the fork?

If you have a paper wallet, that means you have the public key and the private key of your BTC address.

This is sufficient to control both BTC (Bitcoin) and BCC (Bitcoin Cash) after the fork.


what is nMinimumChainWork? I was trying to run my own private bitcoin network, so I downloaded the source and compiled it, then I started two bitcoind instances in two docker contains, and I made sure they did not connect to outside network, used -connect=0 -dns=0 -dnsseed=0, and then -addnode to specify other node's ip and port. When I then tried to run a local miner, the RPC getblocktemplate always return Bitcoin is downloading blocks.... By looking at the source, it looks it won't pass this line:

// in IsInitialBlockDownlaod
if (chainActive.Tip()->nChainWork < nMinimumChainWork) {
     return true;
}

the definition is found in chainparams.cpp:

// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x000000000000000000000000000000000000000000f91c579d57cad4bc5278cc");

What does this mean? What is nMinimumChainWork for? And what is the hardcoded hex number, by searching blockchain.info it is not a block hash.

It is a number designed to protect new clients from accepting fake blockchains when they initially are syncing, if an attacker managed to segregate them from the network. As the name suggests, it's the minimum amount of total work a chain must have before the client considers it valid. It is updated to a higher number at every release, based on the total work in the blockchain at the time of that release (the hex format is more compact and consistent with other code than say a decimal number)


How bitcoin tax is calculated? I bought 1 bitcoin and sold part of it to make cash from time to time. How will tax on this income be calculated?

I’ll start this off by saying I’m not a tax professional, so take this advice as you will...

At the time you purchase your bitcoin, your purchase price becomes your cost basis. This means if you bought 1 bitcoin for $10,000 then this is the price you will compare your capital gain/losses to.

For example let’s say you buy 1 bitcoin at $10,000. A week later the price of 1 bitcoin is $12,000. You decide to sell half your bitcoin due to the price hike and you receive $6,000 for the sale. Your tax liability would be $1,000 in capital gains (sale price of half a bitcoin is $6,000 minus original price of half a bitcoin is $5,000). I believe the in the US the tax on short term capital gains is whatever income tax bracket you fall into, so you would pay a X% capital gain tax on the $1000 profit you made from selling half your bitcoin.

Again I’m not a tax professional, but this is my understanding of how it all works based on lots of research.


Is there a Bitcoin wallet that has French language support? Which Bitcoin app has a language option that can be changed from English to French?

I have tried few applications but they seem to be no language option.

The main bitcoin core client can be run in a foreign language.

Close the Bitcoin client and add this line:

lang=fr

On a line by itself to the end of the file:

C:\Users\YourUserName\AppData\Roaming\Bitcoin\bitcoin.conf

(Replace "YourUserName" with your windows user name.)

Now restart the Bitcoin client.  Done!


What does 44' mean in BIP44? After reading BIP44, I saw

  Purpose is a constant set to 44' (or 0x8000002C) following the BIP43
  recommendation.

I believe 0x8000002C is 128 as an integer, how does this equate to 44' however?

I also believe that the ' means that it is a "hardened key", is it hardened because 128 is between 0 and 2^32 - 1 ? Which means that the only key that can derive it, is the private key?

To further elaborate my thinking, which may or may not be right:

These are the levels:

  m / purpose' / coin_type' / account' / change / address_index

purpose, coin_type and account, all have to be derived with the private key. They will always be between 0 and 2^32 -1

I have also come to believe that if we have derive a change address with the xpub, then if we derive the same path with xpriv, we can spend from that change address?

For example, if I receive some funds to the change address with path:

m / 44' / 0' / 0' / 0 / 0

Then to spend from this specific address, I would need the private key that corresponds to it. To get it, I would use the xpriv on this path?

I believe 0x8000002C is 128 as an integer

... No, it isn't. First of all, it already is an integer, just represented in hexadecimal. In decimal it is 2147483692. How did you get 128?

  how does this equate to 44' however?

44' means that hardened keys should be used. The distinguisher for whether a key a given index is hardened is that the index is greater than 2^31, which is 2147483648. In hex, that is 0x80000000. That is what the apostrophe (') means.

The 44 comes from adding it to 2^31 to get the final hardened key index. In hex, 44 is 2C, so 0x80000000 + 0x2C = 0x8000002C.

  I also believe that the ' means that it is a "hardened key", is it hardened because 128 is between 0 and 2^32 - 1 ?

No, hardened means that the key index is between 2^31 and 2^32 - 1. Between 0 and 2^31 - 1 are unhardened keys.

  Which means that the only key that can derive it, is the private key?

Yes.


Why are my Bitcoin/Bitcoin Cash commands not working on SV? Just trying to run some pretty simple commands on an SV node. Why am I getting this?

ey@BitcoinSV:~$ bitcoind -testnet
bitcoind: command not found

That error means that the command bitcoind was not found on your computer's path. Make sure that you have installed the software correctly such that the bitcoind binary is on the path.


method to keep private key in the open? say I have this private key: 5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf

Now let's say I take the 5 out then take any location of this string and flip it:
bpvD8s5ip4nEB3kEsreAnchuDf HpHagT65TZzG1PH3CSu63k8D

(I kept the space to make it easier to see. merged would look like this: bpvD8s5ip4nEB3kEsreAnchuDfHpHagT65TZzG1PH3CSu63k8D)

Now I send this to myself on an e-mail.

How easy would it be to reverse this string to the original privkey if you knew my recipe? (1. remove first char, 2. split key anywhere and flip)

How easy would it be to reverse this string to the original privkey if you knew my recipe? (1. remove first char, 2. split key anywhere and flip)

Absolutely trivial. An attacker only needs to try a few dozen combinations.

You should assume an attacker can try billions of combinations per second, at least.


Bitcoin wallet file location in smartphone I would like to know where is the wallet file (or private keys) stored on usually in the Bitcoin mobile wallet such as Android wallet (Mycelium or Bitcoin wallet)? Because I installed Bitcoin wallet and I could not find where are the private keys storing

For the Bitcoin Android wallet, you can do a backup from inside the app.  The backup will be located here by default /sdcard/Download/bitcoin-wallet-backup-<yyyy-MM-dd>.  See the Files section of this page for more details.


Is the bits field a unique representation of the target? The bits field is the compact representation of the target.

Example:

bits: 1d00ffff
target: 00ffff0000000000000000000000000000000000000000000000000000

bits: 1cfff00
target: ffff0000000000000000000000000000000000000000000000000000

But these two actually represent the same number.

int(target) ->  26959535291011309493156476344723991336010898738574164086137773096960
 for both of the above targets.

What (if anything) makes bits a unique representation of the target?

Clarification:

In regular interactions with numbers, this kind of thing doesn't really matter, as a few leading zeros don't affect how we interpret the number. However, in Bitcoin, the bits field is used as part of the hash of the block. Therefore, a different bits representation would produce a different hash of the block.

In short: no, the nBits encoding is not unique (there may be multiple 32-bit values that correspond to the same 256-bit target), but the nBits value as required by the network consensus rules is unique.

The reason for that is that all calculations happen on the target, which is then converted (using a deterministic algorithm) into nBits format. That nBits value is then required to match the value in the block header.


What is a fuzz testing harness? The Bitcoin Core fuzzing docs refer to "fuzzing harnesses". What is a harness in this context?
(There have been two previous Bitcoin Core PR review club sessions on fuzz testing at the time of writing, in January 2020 and in April 2020. The latter was on PR 18521 which added a process_messages harness.)

A fuzzing harness is a test case or a particular test target. This blog post defines a harness as an "entry point executable". When you want to fuzz input that is not reachable from the command line you need to write a new testing harness.

For example, if we wanted to assess the security of a client/server application, a testing harness would need to perform many actions, like starting the server process prior to sending network input from a client connection. Or if we wanted to fuzz test the inputs of functions in a DLL (loaded library), since there is no entry point defined we would need to write a testing harness to pass input from the command line into DLL functions.

This blog post goes through an example of writing a test harness to take input from a file and then pass that input to a vulnerable function that we want to fuzz.
There is also a glossary of fuzzing terms here.
Thanks to Marco Falke for answering this question on IRC.


What was the most recent change to the official client that broke block validity? There have been suggestions that various bitcoin protocol rules (max block size, mining reward policy, etc) could be changed in the future by everybody "agreeing to update their client".  The logistics of this are somewhat questionable.

Another question asked about the mechanics of such a change in the situation where people object to it.

I would like to know if there is any recent precedent for this that we could examine.  Specifically: have there ever been any changes to the official client version Y that would cause client version X to reject its blocks, where X < Y?  If so, what is the most recent such case?

I suspect there were probably a bunch of changes like this back in the early days when only a few dozen people were using bitcoin.  It would be interesting to know if it's happened more recently.

The last changes I'm aware of that would cause a blockchain split were in August 2010, after the overflow bug; see, for example, https://github.com/bitcoin/bitcoin/commit/4bd188c4383d6e614e18f79dc337fbabe8464c82

I don't think there have been any changes to the block or transaction validity rules since, although it is very possible I'm forgetting something.


What's a good algorithm for reducing Transaction fees? I'm attempting to use the createrawtransaction to manually create my transactions and I want to (obviously) reduce my fees. The complication I'm having is that I want to send ALL of the bitcoins in my wallet to 2 parties. So I know that I can specify the inputs and outputs, but there's that pesky fee concept which makes it difficult to just spend it all.

So if I have 5 inputs and 2 outputs, how would I go about calculating exactly what the fee will be and reducing it?

https://en.bitcoin.it/wiki/Transaction_fees
Those are rules about calculating fees.

Considering algorithms, i think you should check all possiblities (brute-force) or it could be also some kind of knapsack problem.


Why are the offers to buy Bitcoin on Bisq always way over the market price? I sometimes look at the market price for 1 Bitcoin and think it's low. Then I look at the (SEPA, EUR) offers to buy Bitcoin on Bisq. The best ones are a thousand USD over the market price. It feels really bad to take such offers, but I have no other choice, so I always end up doing so.
Is this just because so few people use Bisq? Do centralized marketplaces always let you buy at (basically) the exact market place?

It's a combination of the low trade volume, and also because the traders on Bisq know that some people will pay a premium in order to avoid having to complete KYC requirements to do their trades.
If you signed up for an centralized exchange, you'll be able to buy at the market rate (minus a fee), but the trade-off is having to complete KYC requirements.


Stratum and Load Balancer Does the Stratum protocol works well with the stratum servers behind a load balancer?

My impression is that each request from the client may hit a different stratum server and eventaully ends up subscribing to both stratum servers. Does this mean both stratum server will be sending jobs to the client at the same time, confusing the client?

Stratum is not HTTP, it's a protocol designed directly on top of TCP.

You could use an existing load balancer that works on the TCP level, directing new TCP connection attempts to backend servers. After a client is connected it keeps talking to the same backend.

All Stratum work is related to one connection. Proofs of work from clients must be sent over the same connection where the work data was previously received. There can be no confusion about jobs, and there is no need to open more than one connection.

There's no need for the load balancer to look at individual stratum requests, or even to understand the stratum protocol. It might be an advantage for the load balancer to be able to tell a client to reconnect to get it over on a different backend, if the backend it is on is overloaded. In this case you'd need to create your own stratum load balancing software - you couldn't use a generic load balancer for this. I'm not sure if such a feature is really important though. Disconnecting a client is probably just as effective if you want it to reconnect to the same IP address anyway (the IP address of the load balancer).

Note that, assuming your mining server software is somewhat efficient, a single server would be able to run even the biggest mining pool today. So a setup like this is probably only useful for failover, not so much for balancing load.


How to move altcoins from Cryptsy into USD? I have recently been trading some altcoin on cryptsy. Since cryptsy doesn't offer markets to exchange altcoin for USD, what's the best practice to convert all your altcoin to FIAT?

It would be possible to trade them to LTC, move the LTC to another exchange (like btc-e) and finally exchange to USD. Is there a simpler way?

sell to btc/ltc move to coinbase, withdraw....
coinbase can do instant confirm/same-day ach


How do i configure two (or more) Antminer S9s on one bitcoin.com account? I just added a second Antminer S9 to my pool. I've been mining with one S9 and bitcoin.com for about a year. in Antminer-1 configuration I have my bitcoin username in the  "Worker" Field / password "123". (works fine). If I enter the same username in my Antminer-2 configuration bitcoin does not seem to see my second Antminer. If I change the Workername in the Worker field, the S9 has no way to access my bitcoin account because the username has changed. It seems the Worker Field entry is functioning as both a Workername and a bitcoin username. The only was I have been able to get both S9s mining is to create a completely separate bitcoin.com account for the second S9 (with a different username). How can I get both S9s mining on the same bitcoin.com account, with different workernames.

If your username is Antminer then the username for each machine needs to be like this: Antminer.foo, Antminer.bar, Antminer.xx where xx is a unique identifier.


How to get difficulty from Fairbrix/Tenebrix? How can I get the difficulty of Fairbrix or Tenebrix directly from the client? Without using an external site.

I use "getinfo" with Bitcoin but with Fairbrix/Tenebrix, "getinfo" doesn't return anything.
I'm running it with their somewhat unstable "portable launcher".

Thanks!

The easiest and most straightforward way would be going to www.allchains.info

No need to bother with command line and stuff.


Where is the Mycelium wallet file stored? I have a fairly straightforward question that's still unanswered after googling for days for a definite answer, I hope you guys can help me out with this one here.

Background: I have Mycelium Bitcoin Wallet installed on my Android phone [ROOT], I have backed up my HD wallet which also contains Local Trader account, and have been successful in restoring said backup[s] (by means of un-installing app, wiping it's old data and re-installing / loading wallet from backup (Master seed)). I also have redundant backups of the app and it's data (I assume that includes the wallet file?) made with Titanium Backup.

Question: I however still do not know where Mycelium's wallet resides, is it on my SD extCard? SD Card? Data  partition? Protected Storage? Is it just determined by the Master Seed and hence resides nowhere?

Final Note: I'm eagerly awaiting this piece of information to be at ease with my policies, knowing that  I can manually backup/encrypt my wallet file (if there is one) is really important to me.

Thanks in advance!

For Mycelium, the actual file that contains the encrypted keys are in the sqlite3 file. You can see in the source code that though there is in-memory storage, it's used mostly for testing and that the main way in which Mycelium data is stored is in a sqlite3 file. Sqlite, if you aren't familiar, is a very simple relational database that contains the whole database in a single file.

You can see the actual relational database table layout in the source code.

To answer the question about exactly where the wallet is, mycelium does not have the installLocation attribute and therefore is only going to be stored in internal storage, or on the phone itself.


"block decode failed" error while mining in pool I just started solo mining last month, and I have no problems with cgminer.
I have already shares accepted and sometimes new block detected.
I want to know why when I want decode I've an error?
For example, "block decode failed (-22)"

In my Roaming\Bitcoin\blocks, I have some 300 files who called blk00000.dat and until i'm mining, until the list expand.

But I don't have receive my awards for my blocks.... and not to for the fees...

Can you explain me please?

Is the blocks files are my detected block by mining?
Why I've an error block decode failed? How to do too receive my awards?

Thanks for your  help...

Ps:i'm french and i say "il n'y a rien de plus frustrant de ne pas comprendre"
It's like "there is nothing biggest frustation than don't understand!!!"

Are you running "bitcoin-cli submitblock xyz" manually? You are not supposed to do this. Software does this. If you mine in a pool you don't even need to run bitcoind at all.

If you do want to run your own bitcoind node, don't mess with the blk*.dat files. You don't need to touch them. The bitcoind program is the only thing that needs to use them.

If you mine in a pool just set up your ASIC mining machines and make sure they are running, then use the pool website for the rest of your needs.


Unknown Address Format Parsing Bitcoin Addresses from Blockchair Data I've obtained a list of all current Bitcoin addresses with balances from Blockchair, which is downloadable from their data repository located here.  I have downloaded the Bitcoin / Addresses TSV database dump.
The list consists of:

~23m P2PKH (1xxx) addresses
~5.8m P2SH (3xxx) addresses
~1.3m Bech32 (bc1xxx) addresses

However, there are also ~400k addresses that have prefixes that I don't recognise, including:

d-xxx (example: d-b697921d996831d1a26ca8d8e92571c1)
m-xxx (example: m-942943e227462513f33c4f32ec6f1e56)
s-xxx (example: s-2ad548f2459c0ed6123400e5d61a479e)

Are these valid Bitcoin addresses?
If they are, how do I view information about them?
If they are not, any idea why they appear in the dump of current Bitcoin addresses from Blockchair?

Having investigated this following @MCCCS answer, the following is information about the addresses provided by Blockhair support:

In fact, there are no addresses on the Bitcoin blockchain. There are
only scripts, some of them are standard and can be converted to a
Bitcoin address, some of them can’t — like nulldata (OP_RETURN)
outputs, nonstandard, and bare multisig. We use the d- prefix for
nulldata, m- for bare multisig, and s- for everything else.
This is briefly mentioned in this API documentation section:
https://blockchair.com/api/docs#link_300

Therefore, these addresses (for want of a better word) are valid transactions on the Bitcoin blockchain.
The prefixes used are:

d- nulldata
m- bare multisig
s- everything else

In conclusion, the data is valid but the outputs are not addresses in the normal sense of the word.
A link to the issue I raised on the Blockchair GitHub is here.


Securing bitcoin addresses in database I'm working on a service which will require me to store bitcoin payout addresses in my database. This means that a potential attack to my service would be to gain access to the database and replace the addresses in the database with the attacker's bitcoin address so that payouts can be automatically sent to him/her.

My users will be have multiple social accounts linked to my service (Facebook, Google, LinkedIn, etc.) and they will log in with a password (which is stored as a hash). The database I'm using is MySQL, so I'm wondering if I can put any restrictions on the bitcoin address column which would require some type of validation of the bitcoin address in order to ensure that somebody hasn't just gone into the DB and put in a bitcoin address of their own. Maybe I can include some kind of a hash which validates the address with the user somehow and allows me to check the address and the hash before a payout is sent, if they match then I can send a payout.

Any other approaches to securing the address?

If an attacker has write access to your database without you noticing immediately, it's pretty much Game Over.

Say you are actually able to secure the payout address field from tampering, then the attacker could still overwrite the password field with his own hash, log in as the user and change the payout address through the "allowed" way.

You should not worry too much about this scenario, but rather make sure no one will get direct access (read or write) to your database in the first place: Use prepared statements, grant minimum required access, harden your servers, etc.


Is there a client that can export to Excel detailed information about transactions? I need a client that has a feature of exporting full information about transactions in an Excel or CSV file. By full information I mean sender, receiver, amount, time, confirmation status.

In other words, I want the information that is related to my addresses. If it has multiple sources and affects several address that belong to me I would like to see one line per address. So I want just to see as clearly as it's possible what happend with my address, when and where from/to the coins moved. Just like when you do your simple accounting. In Qt client I cannot see the information about sender in exported file. Is there any client that has this functionality?

You can use blockchain.info to get information about your address, then use the Export History option in the dropdown menu (slightly confusingly marked 'Filter') to export to CSV.

It doesn't do exactly what you ask for, but has one line per transaction. I'm having difficulty picturing how it would work with one line per address.

The address for querying addresses is https://blockchain.info/address/1youraddressgoeshere


Is there any tool to visualize the bitcoin transaction graphs? I want to visualize the bitcoin transaction graph linked to addresses that could potentially link my addresses and to better chose which coins I would use for which payment to prevent loosing privacy. Is there any tool that could help me build that graph and visualize the clusters that could be formed?

Check out KYCP.org. They have good visual and written explanations of heuristics used by chain analysis companies, such as common-input, round numbers and change outputs, and address reuse.

OXT.me is also a good website. I think they're related in some way, but provide slightly different visualizations and heuristics.


In a perfect world, should RIPE160 be used as the block ID or transaction ID? Edit: In this question I'm looking at storage advantages, and network bandwidth savings.

Given that the TxID and BlockID uses SHA256 to uniquely identify a transaction (and block) is there any reason that RIPEMD shouldn't be used in a brand new/different alt-coin?

The malleability problem is not with the hashing function, but with what is being hashed (or not). The hashed data is malleable, not the hash directly.


What is the need for multiple private keys? From what I understand, there is initially a seed from which the private keys are derieved and from that the public key respective to each private key is derived.

The public key is essentially the wallet address. So now say I wish to receive 10 BTC from Bob. So Bob makes a transaction "paying 10 BTC to wallet address #####(mine)" and signs it with his private key.

I (or the validators for that matter) can verify it by looking at the digital signature with Bob's public key. And if I have to send 10 BTC to Bob, I do the same as above.

What I don't understand is what is the use for having multiple private keys when just a single one can suffice? (I've read somewhere that wallets act more of a storage for keys than storage for Bitcoins, that's why the doubt).

Also, if there are many private keys (=> public keys => wallet address) pertaining to each transaction, how does it become possible to trace back to the previous transactions as each has a different address?

The main reason to use multiple private keys is for privacy. Say you receive 1 BTC at address A, and you want to send 0.1BTC to someone at address X. (We'll neglect tx fees for easy math).

0.1 BTC Address A -> Address X
0.9 BTC Address A -> Address B

Now assume you were trying to watch any spending activity from the User at Address A, how would you know whether they own Address X or Address B? If you send change back to Address A, then it is easy to continue to track the user's spending after the 1st transaction. So, wallet applications keep track of all of the newly generated change addresses (since it generated them), so they can be aware of all the user's unspent Bitcoin.

Another reason might be to manage multiple accounts for accounting purposes. BIP32 is a common standard for generating sub-accounts using the same master key pair.


How can I physically give someone bitcoins for easy redeeming? I want to be capable of giving someone a small amount of bitcoin, in the form of a box (such that can be transfered through the mail or whatever). How can I do it, and make it as easy as possible for them to take ownership and start messing with it?

I've seen paper wallet where you just write a thing down, but I don't want to force them to type in a long key.

Most paper wallets include a QR Code (2D barcode) of the address and private key to save you from typing them in by hand.  Some bitcoin wallets allow you to scan a QR code to sweep the funds out of it - I know blockchain.info's online wallter will let you use your webcam to scan a private key.


Specification of Transaction Inputs - Bitcoin vs Ripple In Bitcoin, the transaction inputs (UTXOs) are specified as a tuple (transaction index, vout) since there is no notion of an account in the bitcoin system and the address (pointed to by vout) alone would not be sufficient. Instead transactions are primary entities.

Ripple on the other hand makes an account a primary entity with transactions changing the account balance. This makes it possible to specify the (account) address alone as an input to a transaction.

These are design decisions. What are the pros and cons of the two models? What was the motivation behind them?

Thank you.

Advantages of UTXO/blockchain approach:

You don't have to pay to addresses that refer to accounts. Transactions can pay to unique rules or conditions that can exist only as the rule to claim a particular transaction output.
Transactions are more independent in execution, not contending for access to the same account structures.
All you need to know about a transaction is that it succeeded. There's no "additional information" such as the previous balance and the new balance.

Advantages of account/ledger approach:

Accounts exist as primary structures and so can have properties, both persistent/configured and dynamic/reported.
Transactions are more independent in formation, not contending for access to the same transaction outputs.
There is no UTXO database to maintain and synchronize and attacks on the UTXO set do not work. (Though there are other ways you can defend against attacks of this type.) More sophisticated transactions can be supported without creating the risk of disagreement on the UTXO set.

Bitcoin's design naturally fits the UTXO approach. Transaction results are simple, and there's no need for account parameters.

That approach would not have worked in Ripple for a variety of reasons:

Because Ripple supports arbitrary assets, many of which can be worthless, there has to be a way for recipients to indicate which assets they'll accept as payment. This means something has to have that as a property, which requires an account.
Something has to issue those assets, which requires accounts to act as issuers.
Cross-currency payments can produce complex results, trying to map those deterministically onto UTXO operations is not a natural fit. Adjusting an account's balance is simpler than choosing UTXO's to consume and create at transaction processing time. Ripple's transactions could not have, for example, specified which UTXOs they'd consume because that isn't known at transaction formation time. (How do you know know who will offer the best rate when your transaction executes? If everyone competes with transactions hardcoded for the juiciest liquidity, the majority of transactions will fail.)
The more complex network state requires a more complex structure to ensure the network agrees on that state. Bitcoin's structure has no way to protect against UTXO divergence, which would be catastrophic, other than keeping transactions simple enough that a mistake of this type is unlikely. Ripple's more complex transactions need a powerful defense against divergence or small bugs in the code could cause catastrophic results.
Because Ripple transactions have more complex outputs, they tend to be larger. Ripple's approach makes it easier to discard transaction history because all you really need is the current status of all accounts and other persistent structures.

You can pretty much meet any requirements with either approach. There are ways to work around each of these issues without changing the approach. But it's often easier to start with the design that most naturally fits your requirements, rather than shaving and jamming to get a round peg into a square hole.


Is Ripple's Contract language intended to be Turing complete or sub-Turing complete ? The wiki seems to imply Turing-completeness because no restrictions on jumps are specified here https://ripple.com/wiki/Contracts#Foundational_Ops.

Which is it and what (if any) is the actual intention ?

Cheers ...

It should be Turing complete. However, every time a contract is invoked, the maximum number of operations the contract can perform is limited. Operations that access a contract must specify an operation count limit to get a limit higher than the default. Higher limits require higher transaction fees.


Exchange currency trade history I am looking for datasets of trade history, which contains the following information: date-time, buy/sell, price. The currency pair and exchange is not important.

You might want to try my website cryptodatasets.com It has free raw data and sampled data from Bitfinex and HitBtc (currently).


How exchange platforms work? I am wondering how exchange platforms such as Kraken or Bitfinex can survive bubble exposions? People exchange real currencies for cryptocurrencies. When a bubble explode a lot of people want to trade cryptocurrencies for real currencies so the exchange platform will lack liquidity.

How do they can survive and avoid bankrupt?

This is not really a bitcoin related issue.  As long as the exchanges have 100% reserves, they can always pay.  This means they need to have the sum of all balances of all customers on their own account.

The problem is that some exchanges apply a fractional reserve.  Using part of the users money to make investments or to cover operating costs.  You are correct to be worried for those exchanges bankruptcy should exceptional selling occur.

Kraken has a concept where they try to cryptographically prove their reserves https://www.kraken.com/security/audit

Not sure if other exchanges also have such a concept.


bitcoin-qt keeps on quitting with "failed to read block" I just wanted to install bitcoin-qt on another machine (all others are working fine) but I cannot seem to retrieve the block chain using bitcoin-qt 0.8.6-beta (as downloaded from http://sourceforge.net/projects/bitcoin/files/Bitcoin/bitcoin-0.8.6/bitcoin-0.8.6-win32-setup.exe/download).

I'm running bitcoin-qt (started as as administrator) on Windows 8 using a 3G data connection. After downloading a few thousand blocks the software keeps on quitting with the error "failed to read block". When I restart the software it fetches another thounsand blocks and quits with the same error soon.

Even a full reinstall (I additionally deleted the whole data directory in %APPDATA\Bitcoin) doesn's seem to help. Starting bitcoin-qt with "-reindex" didn't help either. I checked the hd-drive for errors but didn't find any.

What am I dong wrong?

Start bitcoin-qt in a new command prompt with the flag -reindex after you make sure your 3G provider doesn't block your downloads after a certain threshold.


Can someone explain this double spend on blockchain.info? I'm confused by double-spend linked below, in which both transactions ended up in blocks mined by different miners.  Specifically, I'm wondering if there's any way to tell what exactly happened based on the available information.

https://blockchain.info/tx-index/95574751

Based on my limited understanding of bitcoin, I'm assuming this could have happened in one of the following three ways. If I'm wrong, or if I'm missing other possibilities, could someone please let me know?

1) The double-spender broadcast the first transaction to the network, and then mined his own block containing a transaction using the same output.  He ultimately wasn't able to "outrun" the honest blockchain, but he managed to mine his block quickly enough that some nodes in the network received it before receiving the longer blockchain. So both blocks were briefly accepted by parts of the network, and one was eventually "orphaned" (so its transactions are unconfirmed).

2) Same situation, but the double-spender's blockchain prevailed and the block containing the first transaction broadcast to the network was orphaned.

3) The double-spender didn't mine anything, he just tried a normal double-spend against someone who doesn't require confirmations. Both transactions happened to be included in blocks that were mined simultaneously by different miners in the network, and one was orphaned.

Nothing malicious.  Two blocks were mined at the same time by different miners (Block 267647).  Both blocks included the transaction and both were broadcast to the network.  Both blocks show up in the block chain because you don't know who actually won until additional blocks are mined and added to one chain or the other.  The chain with the greatest amount of work done on it becomes the main chain and the other one gets orphaned.

This is why you need to wait for several confirmations before spending an output.  If you spent it as soon as you saw one of the blocks, your transaction could get rejected later on if the other block ended up winning.

You can tell this is what happened because the transaction ID is the same in both blocks.  In a double-spend, you would have two separate transactions attempting to spend the same transaction output.


Which exchanges allow me to transfer funds from my CurrencyFair account? [Update: In July, 2013 CurrencyFair has stopped allowing delivery of funds to any Bitcoin exchanges.]

I can add funds to my CurrencyFair account via a bank transfer from a number of countries.  This will be a convenient method if I can then send those converted funds as a bank wire transfer to a Bitcoin exchange.

TransferWise used to allow me to do the same thing, but then stopped after their banking partners "weren't comfortable with Bitcoin".

Are there any exchanges which allow this?

Not all bank wire transfers contain the same information so this may vary based on which bank wire network is used.

For instance, CurrencyFair may function as a method to add funds from a UK account (GBP) using a bank wire and then after conversion to EUR make a withdraw as a SEPA wire transfer to BITSTAMP.net, or Mt. Gox, and any other exchange that accepts SEPA transfers.


Blockchain.info not actual? I'm really new to Bitcoining. I've made my own wallet at blockchain.info, and then I decided to get some "free" bitcoins by watchings ads or something. This worked. At leas when i login at Microwallet.org with the Adress I have from Blockchain.
On Microwallet there's displayed my account balance of xxx Bitcoin. But on Blockchain.info (logged in with the same address, of course), my Account balance is 0.

Why?

Lorenz,
Blockchain.info is one of the,  if not the most "actual"  bitcoin wallets you can get.  It's streaming and constantly revised data plotting is also the industry standard,  although it is incomplete.

Most of the spoofy little faucets you find Will in fact earn you some mbtc,  or micro bitcoin,  however,  just because they have deposited into a wallet of their own creation and their own design,  this does not obligate them in any way to connect with the blockchain.info main chain.

This is because mostly you get what you pay for,  and you work for what you're paid. So,  watching videos and doing this or that is all well and stupid,  and it also has nothing to do with earning money. . 00000001 is called a satoshi,  after bitcoins pseudonymous creator.  You will be lucky to have as many as just a handful of these doing what you're describing and also successfully redeeming them by TRANSFERING THEM to legitimate wallet service like a blockchain.info.


Is there a way to stop a man-in-the-middle attack when communicating addresses? Let's say you have person A who wants to pay person B.

A common way for B to communicate his/her address to A is by QR code or email or some such non secure method either of which could be substituted for another address in a man-in-the-middle attack, by person C. In other words C contrives a situation where they can replace B's address with their own, thereby making A pay C instead of B.

This would be even harder to prevent if A and B were continents apart. Not only would A not be able to see B or perhaps even talk to them, but they would also have some difficulty carrying out even basic checking.

Is there a way to stop a man-in-the-middle attack when communicating addresses in this sort of circumstance?

No. That is impossible if A and B have never communicated through a secure channel to exchange keys before, unless you are willing to trust another user, for example a user, D, you know and have safely exchanged keys before, that says it trust users B address, creating a web of trust or less preferable a certificate authority. This is a known and significant issue in public key exchange.


Is it possible to have multiple accounts in MultiBit HD? Is it possible to have multiple accounts within one wallet? Mycelium allows multiple accounts within one wallet, but I don't see how to do that within MultiBit HD.

Only a single account ("Account 1" in myTrezor.com terminology) is supported in MultiBit HD.

This is due to limitations of how the transaction data is obtained from the Bitcoin Core nodes. It is explained in the help in this article in the section headed "Bloom filtering and single HD account support":

https://multibit.org/en/help/hd0.1/how-spv-works.html

Source: I am one of the devs for MultiBit HD.


Is there a limit on the number of characters in a wallet.dat file? I want to try to recover my wallet.dat file which has a small amount of Bitcoin, and I was wondering whether there was a character limit for passphrase encryption, or whether the app allows you to use an unlimited amount of characters for the wallet’s passphrase. I am using Bitcoin Core for Windows.

There has never been a limitation on the characters or number of characters that could be used in the passphrase.


Why must generated coins mature 120 blocks before they can be spent? I mine bitcoin testnet blocks and I find some blocks with difficulty 1.

Some examples: I mined these blocks:

Block 1
Block 2

Why must generated coins mature 120 blocks before they can be spent?

This rule is to prevent people from unintentionally spending Bitcoins that they wind up not owning.

For any Bitcoins other than the block reward, unless you intentionally double spend, a reorganization leaves your transactions valid. So they can just be included in the new blocks. (Assuming they don't spend the proceeds of a double spend.)

However, if there's a chain reorganization, there's no way to recover block rewards. Whoever mined the blocks in the other chain gets that reward. That would make your transaction invalid since it would spend funds you don't actually have.


artificial block size cap? What, either technically or not, is preventing bitcoin core miners from expanding the number of transactions included in each block?

Wouldn't the corresponding increase in maximum number of transactions per second, and higher compensation per block, be a welcome benefit?

The same thing that keeps them from increasing the mining block reward. Everyone else would consider their blocks invalid and so there would be no benefit at all.


How is the size of a block calculated? How is the blocksize currently calculated in Bitcoin Core? I'm specifically asking about how it's done for the purposes of enforcing the 1MB limit. If it's done by calculating the serialization length, what serialization format is used?

The block size is the combination of the block header and the list of transactions. Specifically, the block header has these fields:

version - 4 bytes
previous block header hash - 32 bytes
merkle root hash - 32 bytes
time - 4 bytes
nBits (encoded POW target) - 4 bytes
nonce - 4 bytes

So the total bytes for a block header is
4 + 32 + 32 + 4 + 4 + 4 = 80 bytes

After the block header is the list of transactions which is

transaction count - 1-9 bytes
transactions - varies

Transactions can vary greatly in terms of the number of bytes, but the general serialization of a single transaction is:

version - 4 bytes
tx in size - 1-9 bytes
tx ins - see below
tx out size - 1-9 bytes
tx outs - see below
locktime - 4 bytes

Each tx in has these fields:

previous tx out hash - 32 bytes
previous tx out position - 4 bytes
pubkey script - varies depending on script, max 10,000 bytes
signature script - varies
sequence - 4 bytes

Each tx out has these fields:

value - 8 bytes
pubkey script length - 1-9 bytes
pubkey script - varies

The sum total of all these things in a block determine the size, which currently has to be less than 1 MB.


BIP 65 - how standard is it? I read in this great thread that which BIP are standards is not always obvious.
What about BIP 65? To which extent is it standard?

Currently, all I know is that "Miners following the developers of the "Core" Bitcoin client have been adopting BIP-65, with approximately 25% of the last found blocks claiming to be ready for the soft fork on the version string in the block header. " ... not very precise.

Thanks

The softfork defined by BIP 65 activated in december 2015. This means that the whole network enforces the new rules proposed by BIP 65, and it is safe to use CLTV opcodes in scripts since then.


How to best mine on a smartphone? As you perhaps already know, mining started at the beginning with processors then graphic card.

I want to try to mining on a smartphone. Which electronic component will be the best to calculate hash? Processor or graphic component?

The purpose is only for testing on testnet and get the best performance.

Keywords such as mining and smartphone don't bring me any relevant results via Google.

Mining on a smartphone is unfavourable and might drain your battery very fast. For bitcoin-mainnet and bitcoin-testnet don't even try to mine on a smartphone (it won't be fun).

If you like to do this for testing or research purposes, you probably should use your smartphones GPU over openCL or renderScript.
Also have a look at bitcoin-cores mining code if you like to know more about how mining works (in detail).


How malleable is the Bitcoin protocol? Possible Duplicate:
  How could the bitcoin protocol be changed? Has this ever occurred?

Given Bitcoin is a system based on consensus, is it possible and under what situations would the Bitcoin community consider changing some of it's underlying 'hard-coded' laws. Things such as the number of Bitcoins in circulation the rate of Bitcoin production or the number of confirmations before a transaction is confirmed?

The number of Bitcoins in circulation

That would be almost impossible to change and would drastically undermine confidence in the Bitcoin system. I think we're stuck with this forever, or until Bitcoin becomes obsolete.

  The rate of Bitcoin production

Again, almost impossible to change.

  Or the number of confirmations before a transaction is confirmed?

Anyone is welcome to consider a transaction confirmed after as many or as few confirmations as they like. There is no reason this requires any kind of agreement.


Which is the best LN software? I know that software for the Lightning Network can only be used with testnet and not with real Bitcoin yet.

I'm trying to choose one LN software among C-Lightning, ACINQ, AmikoPay, Thunder, Lit and Lnd in order to study and test it. What are the main differences between them?

Thank you!

Obivously, the question and this answer are subjective based on personal experiences. I've only used LND and C-Lightning, which are arguably the most popular. The following is a summary of my experiences:

LND

LND is built in GO and requires a special version of Bitcoin built in GO as well. The install process is well documented and pretty straightforward. However, I had issues with configuring Glide, which is required to install the dependencies. Additionally, I was hesitant to rely on the GO version of Bitcoin to stay supported. Supposedly, there's a pull request to make the changes needed in the Core version, but still... I considered it a risk. Once past the dependency issues, LND worked great. I would have continued using it, but I wanted to try other implementations.

C-Lightning

Since I run Core's version of Bitcoin and prefer my daemons to be in C (again, an objective position based on personal experiences), I tried C-Lightning next. There weren't any issues with installation on Ubuntu and it's been purring along since. The only problems I've had are around documentation, which I'd say LND has done a slightly better job with so far.

In summary, the above Lightning implementations are great and I would recommend either. Both have fantastic teams behind them and are consistently committing updates.

I ended up sticking with C-Lightning because it had the architecture and dependencies I'm most comfortable with and have the most experience with (Bitcoin Core and C). Since both implementations are still a work in progress and documentation is ongoing, I find myself continuously in the code figuring out errors and options. If I was more of a GO developer, I'd probably choose LND.


How does ShapeShift operate on 0-1 confirmations ShapeShift can exchange user's crypto currency almost instantly. They state that most transactions don't require any confirmations:

  Small deposits are processed with zero confirmations. Larger deposits wait for at least 1 confirmation.

How can they do this and cover themselves from double-spending?

They're not saying that larger deposits will take 1 confirmation. They're saying that they will take at least 1 confirmation.

How can they do this and cover themselves from double-spending?

Sure, doing this increases the risks of double-spending. However, that might be an acceptable risk. They may have done the math and figured that the additional business they get is worth it.
They might be doing it to distinguish themselves from the bajillion other exchanges out there.
Also, they're charging a fee of 3.7%.
Edit: Clarification

With ShapeShift, what you see is what you get. The exchange rate shown is exactly what you'll receive, minus only the "miner fee."
There is no exchange fee, or service fee.

This is true, but the spread is noticeably higher than on other sites.
I arrived at 3.7% by taking the BTC -> LTC exchange rate and comparing it to the LTC -> BTC exchange rate.
1.00 BTC = 137.1636 LTC
1.00 LTC = 0.00685688 BTC

If you multiply 137.1636 and 0.00685688, you get 0.9405. This means that if you exchanged 1 Bitcoin for Litecoins and back, you would have 0.9405 Bitcoins left. (Ignoring transaction fees.) This is a change of 5.95%. Divide that by two, because you'd only exchange once.
This gets you 3.0%, which is different from my original calculation because the prices on ShapeShift have changed since then.
So there is a fee, but it's baked into the price they show you. On the other hand, if you're exchanging less than 0.33 BTC, the fee is lower than what BTC-E would charge you.


Are my ripples gone? Long time ago I registered on ripple.com and had some ripples there. I still remember my login/password but the site is completely different now and it looks like there is no option to log-in anymore.

Is there any hope to log-in to my old account and get my ripples?

Few other details to not confuse people who try to help by answering my question: I am pretty sure it was a ripple.com (I use lastpass which stores information about the site/login/password). I have not bought XRP, I got them for free (as far as I remember in the very early days they were giving ~100 or so to people just to try it).

Maybe you could check waybackmachine? I've searched a bit on there and can't seem to find a login page somewhere on the website in 2014/2015.

Altho it's crazy how often Ripple updated their complete layout.
Almost every year they have a new design.

https://web.archive.org/web/20150204002201/https://ripple.com/


Make sure my offline Wallet is ok? Let's say I make an offline wallet from a live cd with bitcoins-qt.
I make some addresses (10 pcs.)
I encrypt the wallet. Save it on a usb (wallet.dat).
I then send over some bitcoins to one of my newly made addresses.

Then I run my normal OS (online) and install bitcoins-qt, download the whole block chain.
Closes bitcoins-qt.
Replaces wallet.dat with my encrypted wallet.dat
Starts bitcoins-qt.

Can I see the balance of my addresses, without decrypting the wallet?
Is it once I'll send them as I have to decrypt it?

If this works ... Can I in any way try to decrypt the same wallet offline (without the block chain?) To ensure that I can access it, the day I'll send my bitcoins?

Is there a security risk with going online with my wallet.dat if I never decrypts it online?

Edit:
I know that I can see my balance online without the private key.
But I can't think of any other way to make 100% sure I can access my bitcoins in the future?
1.First I make sure that my wallet.dat is working and does have my adresses and the correct amount of bitcoins. (without decrypting it).
2.Then I go offline and make sure I can decrypt the exact same wallet.dat

Is this possible?

If you just want to check if your wallet/password is working, you can do so using the bigcoin-qt debug window. To open the window, select "Help" from the menu bar, and then "Debug Window". Once you open the debug window, you can type this:

walletpassphrase "your walletpassphrase here" 600

to unlock your wallet. If the command completes without an error, you wallet has been decrypted successfully. If you get an error, your wallet couldn't be decrypted. From that same console, you can type this:

listaddressgroupings

to see the addresses stored in the wallet. When you are finished, type this:

walletlock

to lock the wallet. You do not need to be on the internet to do this, so you could do it from your live cd. I also believe you can do this without having downloaded the block chain, but I haven't tested it so I'm not 100% sure. Additionally, the commands available from the debug window are listed here if there are other things you would like to check.


reinstalled multibit wallet I had to remove a copy of multibit wallet from my system & after multiple times of trying to get it to work on my 64 bit system I can now open multibit wallet. I guess when I removed the program that the wallet .dat files were removed as well but I do have the wallet addresses that were removed. Is it possible to retrieve the missing data? Can I just send my bitcoin to another wallet or do I have to have the .dat file in order to accomplish this? Hopefully I have not caused all my bitcoin to go away permanantly. Any advice on this subject will be totally appreciated big time.

According to MultiBit's Getting Started, the wallet file of MultiBit seems to be named multibit.wallet, not wallet.dat. You might want to try searching for that instead.

Sorry to break the bad news, but the addresses aren't sufficient to regain control of the bitcoins. If that were the case, anyone that knew your address could grab your coins, and addresses are public information which would make for a very insecure system.

Therefore, you need your private keys in order to transfer your bitcoins.


Can I hide my IP address by blocking incoming connections in the client? I know that it is possible to find out the IP address of a transaction by connecting the client to every node in the network. Dan Kaminsky wrote:

  When you are connected to every node, the first node to inform
  you of a transaction is the source of it.

So my question is: is it possible to hide my IP address by blocking incoming connections in the client? Or are there other ways to find out the IP address of a transaction?

Dan Kaminsky's deanonymization works by having a lot of probes in bitcoin network that collect data about how transaction propagate and than trying to localize it's source.

When packet travels in the network (Internet), it has to have source and destination IP addresses in it's header. Therefore when your bitcoin client sends transaction it has to wrap it into IP packet with your source address and destination address of the connected peer.

For one way communication it's theoretically possible to have random IP source address in a broadcasted transaction, but it would be still possible to deanonymize by knowing location of closest peers.

It would be easy to avoid deanonymization by using any kind of IP proxy, see this question.

P.S. The answer has some speculations because Dan Kaminsky didn't release the software yet.


Where does it go and who verifies private keys? Let's imagine a situation: I want to send bitcoins to a friend. I need a private key to identify my wallet ownership. So: where is this key sent and who verifies it? Wallet (client)? Nodes? Miners? Who?

There are a few steps involved here.

You create an address. That address is the hash of the public key corresponding to a private key you generated. This is a purely local operation. No communication with the network (or anyone) takes place.
You give that address to someone.
They create a transaction that credits (the hash of) your public key. This hash is stored in the transaction T1, and known to the entire network once it confirms. The coins are now yours.
You get an address from your friend.
You create a transaction T2 that credits your friend's address, while spending the coin you just received. That coin was encumbered with your public key hash, so it needs a proof that the corresponding key owner agrees with the spend. For that purpose, a digital signature created with your private key on, and included with, this T2 transaction. Every (full) node verifies this signature. That includes miners, but they just do it because they don't want to risk creating a block that includes a transaction that is invalid (which would mean losing their payout for the block).


How did blockr.io see this? Here's the pushed/broacast-ed tx http://tbtc.blockr.io/tx/info/d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080

txid was malleated to txid (when the tx was added into the block):

http://tbtc.blockr.io/tx/info/a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec

I am watching all utx broadcasted on the testnet3 network using https://github.com/bitpay/bitcore-p2p

I did not see a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec broadcast-ed I only saw d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080

How the hell did blockr.io see both the original broadcasted tx and the altered tx when it never was seen on the network?

What voo-doo magic is this?

Look, blockcypher didn't store the original broadcasted txid:
https://api.blockcypher.com/v1/btc/test3/txs/d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080

but they did store the malleated version:

https://api.blockcypher.com/v1/btc/test3/txs/a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec

HOW?

related: How confirm my own doublespend transaction got confirmed and testnet3 frequent tx malleability

I did not see a9607981ae4bbf42ed0cfacc05455f9396c85a9e8aeb61474f3f7516c35430ec broadcast-ed I only saw d8e5dac095d5f6133e6c3f11e1d9f923c04dac0824f9f8ce0000573df7cc8080

That might not be meaningful. Bitcoin is a gossip network, so it's possible for a different node to see a transaction that you didn't see, particularly if it contradicts a transaction you have.

If you're connected to 8 nodes, and each of those has transaction TX1 in their memory pool, none of them will send you TX2 if it contradicts TX1. (Assuming they're running Bitcoin Core, of course.)


Install guide for Ubuntu 18 I tried sudo snap install bitcoin-core, which worked but I've read that it cannot be trusted, so I uninstalled it
the developer, bitcoincore.org, doesn't seem to maintain a binary for Ubuntu (or any other distribution) but provides a tar file.  they supply no instructions for how to install the software and I can't seem to find anything simple.  all I want is to install a running node (so there should be a startup script with SysV/InetD/startup, or whatever system Ubuntu is inclined to use now for automatically running services at boot-time)
can anyone point me to a working guide?

If you want to run bitcoin node on an ubuntu machine, it is always recommend to build it from the source code itself. That way you can be almost 100% sure of its authenticity.
Start with:
sudo apt-get update
sudo apt-get install build-essential software-properties-common
sudo apt-add-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libssl-dev libboost-all-dev libdb4.8-dev libdb4.8++-dev libqt4-dev libminiupnpc-dev libtool libevent-dev automake autoconf pkg-config bsdmainutils
git clone https://github.com/bitcoin/bitcoin
cd bitcoin
./autogen.sh
./configure.ac
make
make install (optional)

After compiling process is completed:
cd src/
sudo cp ./bitcoind /usr/bin/
sudo cp ./bitcoin-cli /usr/bin/
mkdir ~/.bitcoin
nano ~/.bitcoin/bitcoin.conf

Add your RPC user and RPCpassword value in bitcoin.conf file, save, exit.
bitoind -daemon

Your node will start syncing in background.


Please tell me the procedure for installing bitcoin full node in CUI on CentOS I am really sorry, please teach.
Please tell me the procedure for installing bitcoin full node in CUI on CentOS.
Currently I installed using the following procedure, but I got an error in RPC authentication.

1.
$ sudo yum install wget

2.
$ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/bitcoin-0.17.1-x86_64-linux-gnu.tar.gz

3.
$ sudo wget https://bitcoin.org/bin/bitcoin-core-0.17.1/SHA256SUMS.asc

4.
$ sudo wget https://bitcoin.org/laanwj-releases.asc

5.
$ sudo gpg --import laanwj-releases.asc

6.
$ sudo tar -zxvf bitcoin-0.17.1-x86_64-linux-gnu.tar.gz

7.
$ sudo install -m 0755 -o USER_NAME -g root -t /usr/local/bin bitcoin-0.17.1/bin/*

8.
$ mkdir ~/.bitcoin

9.
$ vi ~/.bitcoin/bitcoin.conf

Enter the following with vi and save.

mainnet = 1
txindex = 1
server = 1
rest = 1
rpcuser = a
rpcpassword = a
rpcport = 8332

11.
$ cd /DATA_DIR

12.
$ sudo mkdir bitcoin

13.
$ sudo chmod -R 777 bitcoin/

14.
$ bitcoind -daemon -datadir=/DATA_DIR/bitcoin -conf=/.bitcoin/bitcoin.conf

Bitcoin server starting

15.
$ bitcoin-cli getbalance

After this, the following URL error will occur.
error: Authorization failed: Incorrect rpcuser or rpcpassword

error: Authorization failed: Incorrect rpcuser or rpcpassword

Which procedure is wrong and how do I fix it?
I am really sorry, please teach.

In your bitcoin.conf, remove the spaces before and after the equals (=) sign. I believe the conf file parser does not handle spaces well.

Also, your command has -conf=/.bitcoin/bitcoin.conf, but your conf file is at ~/.bitcoin/bitcoin.conf so it is pointing to the wrong location.


Expected property "0" of type ECPair, got p When I'm trying to create a wallet in react app using the following code:

const seed = bip39.mnemonicToSeed(mnemonic);
const master = bitcoin.HDNode.fromSeedBuffer(seed, "testnet");

I got error: Expected property "0" of type ECPair, got p

HDNode was removed and is now a separated package.

  npm install bip32 See Issue #1243

const bitcoin = require('bitcoinjs-lib')
const bip39 = require('bip39')
const bip32 = require('bip32')

const mnemonic = 'praise you muffin lion enable neck grocery crumble super myself license ghost'
const seed = bip39.mnemonicToSeed(mnemonic)
const node = bip32.fromSeed(seed)

Test examples: bitcoinjs-lib tests


Conflicted transactions in blockchain reorganizations When my service detects a conflicted transaction (either sent or received) it rollbacks everything that was logically built upon this transaction. The "problem" is that transactions can go from category conflicted to sent/received if a blockchain reorganization happens, so my question is how long (how many blocks) should my service wait in order to be positive that a conflicted transaction will never  get included into a block?

I have found this question to be helpful: What is the longest blockchain fork that has been orphaned to date?

I know you're looking for some magic constant, but it doesn't exist.  Your code needs to deal with reorgs of any depth back to the genesis block.

This may seem like a annoyance of dealing with the block chain, but it's how payments have always worked.  Even if some guy pays you with a suitcase full of verified gold bars, a court order can compel you to return those bars at any later point.  (For example, it's fairly common for the court to order stolen property returned to its previous owner without any compensation to its current owner even if the current owner didn't know it was stolen when he bought it.  This notably happens occasionally with art stolen 70 years ago during WWII.)

If you really want to take a shortcut and leave dealing with long reorgs up to some future programmer or database admin, then any arbitrary constant will do.  This is why many high-value sites require six confirmations---not because six is the correct value, but because approximately one hour of confirmations is a nice arbitrary value.


Electrum: get transaction confirmations I need to get transaction confirmations via command line. But seems there is no such method. onchain_history seems returns information but I don't want to pull a whole history, I need info about one transaction only not all. Is it possible?

get_tx_status('TXID')
Replace TXID with transaction id.
>> get_tx_status('c12ed68e512aa68dbf88878902efba20446024b645f5254f4b9411db2c6e684c')
{
    "confirmations": 589
}
The transaction should be associated with your wallet else you will get below error:
Exception: Transaction not in wallet.


Tutorials for BitcoinJ Beside the examples that come with BitcoinJ and the documentation on Google Code, does anyone know of any tutorials for using BitcoinJ?

There was a 3 part article in JavaWorld about bitcoinj in 2011. It is obviously a bit dated but is a thorough introduction to it. First part:
http://javaworld.com/javaworld/jw-11-2011/111122-bitcoin-for-beginners-part-1.html


Tor: inbound self-connection I set up my bitcoind to run on tor network.
When I list peers, I get 8 outbound connections and 4 inbound, which all have

"addr": "127.0.0.1:46310",
"addrlocal": "****.onion:8333",

where the addrlocal addres is mine listening address.

Why are there inbound connections to myself?

When your node has an inbound connection via the Tor network, the addr field of the getpeerinfo command shows the local port to which your local socket for the connection is bound. It does not show you any information about the host which requested the connection, nor does it show you information about any Tor relay to which your node happens to be connected. As you rightly point out, the addrlocal field is your onion address (and port).

When the same node has an inbound connection via the ipv4 network (which is possible even for a Tor node provided it is properly configured) then the addr field does show you the ip address (and port) of the requesting host, and there is no addrlocal field.

So what appears to be "inbound connections to yourself" are simply inbound connections (from external hosts, not yourself) via the Tor network as opposed to the ipv4 network.


have can i retrive my bcc (bitcoin cash) from bitcoin address? bittrex says i set bitcoin cash (bcc) to a bitcoin address ..i had made numerous trans actions before using bcc bitcoin cash ,,as i was transfereing i saw the screen change and so did the deposit address to the bitcoin address ..when i contacted bittrex they said it was my fault and said they couldnt do anything and said it was a matter to go to cross chain recovery ...i cant find anything to contact them ..can any help

Depends. Do you control the adress you sent the bitcoin to? If so, simply import the private key in a wallet compatible with bitcoin cash.

If you don't, you're dependant on bittrex, and they only recover amounts higher as 5000$, with a 10% fee i think.

https://support.bittrex.com/hc/en-us/articles/115000961172-Bittrex-s-Crosschain-Recovery-Policy