text:
How companies are accepting bitcoin for their products or services?
I am new to the crypto currency world and fascinated by its growth. I looked at some of the companies that accept bitcoins for their products. companies accepting bitcoin
Lets say i buy an Xbox from Microsoft for x bitcoins. On the date of buying the x bitcoins correspond to z dollars. After few hours, the bitcoin cost reduced from x to y. (The price is volatile right) How Microsoft will handle this situation? They are ready to take the risk? Or they exchange to dollars or any currency as soon as I buy the product in bitcoin?

They are ready to take the risk? Yes.

Many companies will instantly convert bitcoins to fiat upon receiving. This is done by the payment gateways themselves like Bitpay, coinify.
However, these days you see several website keeping the bitcoins without converting them. You can use payment gateways like blockonomics, blockchain.info, coinsimple etc. This is due to several reasons:

Extra fee in converting
Regulations/KYC in accepting fiat
Bitcoins are scarce
Adoption has increased. Employees are taking wages in BTC, and business can buy stuff like airline tickets and other required goods directly using bitcoins

If you hold bitcoins over a long enough period (say 1year+) you will see that the value has always increased https://www.reddit.com/r/Bitcoin/comments/5vuox8/i_dont_mean_to_brag_but_i_bought_bitcoin_at_the/

You hit the nail on the head about them willing to take the risk. I believe it is less about the risk of price fluctuations and more about appearing like a "futuristic" company with the risk of having 1% of your income losing value (https://www.quora.com/What-percentage-of-transactions-on-Overstock-com-are-in-bitcoin). In other words, only a relatively tiny fraction of consumers actually pay for X in Bitcoin, so why not get some publicity that comes from the decision to accept Bitcoin.
This is becoming less true, because adoption has been increasing. And now I think there is more incentive to accept bitcoin simply because it's an asset that is increasing in value. In this case, they are more likely to hold on to it for a few years and not immediately sell it on gateway like Bitpay.


text:
compling Mac version in Linux
I tried to build windows version successfully using cross-compilation.
is it possible for osx too? I mean compiling osx version in linux?

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Blockchain.info, does recovery phrase recover all wallets?
I need some help understanding blockchain.info.
1.
Under the Default wallet, I can generate multiple addresses and also see the Extended Public Key (xPub). If I go to the iancoleman BIP39 mnemonic converter, and input my backup phrase, it shows all the addressed I generated in the default wallet, and also shows my Extended Public Key (xPub).
But:
If I add a new wallet by clicking "Add", and create addresses under it, I do not see these addresses on the bip39 page:
https://i.sstatic.net/rhphB.png
This wallet also has a different xPub that is not on the bip39 page:
https://i.sstatic.net/bRPha.png
Can someone please explain this?
2.
The wallet recovery backup phrase, does it only backup the default wallet (and all addresses in it)? Or does it backup all wallets within blockchain.info ? (I am talking about wallets created using the "Add" button, NOT another account with a different email).
The reason I'm confused, as I stated above, if I input the recovery phrase in the BIP page, it only shows the xPub and addresses associated with the default wallet only.
If someone help please?
Thank you!

Blockchain.info follows the BIP 44 standard for derivation paths, so the default account has a derivation path of m/44'/0'/0'/0. The derivation path for each account follows the format of m/44'/0'/i'/0. So for each account, increment i to get the address for it. On https://iancoleman.github.io/bip39/, when you scroll down, click the BIP 44 tab and increment the number in the "Account" box to get the next account you made.

Thanks. I like your clear way of explanation, it's rare. For future reference, if a recovery phrase is compromised, what should be done? Should one abandon the whole account and create another with a new email? What if there are still funds in the old account? Thanks again.

If your recovery phrase is compromised, you should abandon the entire account as all your private keys will be compromised. The best thing to do is to make a new wallet and send all of your coins there as soon as possible. Also, I recommend that you don't use blockchain.info.

I appreciate your generous help. Can you give a reason for not using blockchain.info please? And suggest an alternative web wallet? I'm looking into BTC.com, BitGo and Strongcoin.com, but so far it's been laborious just to understand blockchain.info. So I haven't figured out whether the rest give full access to keys like blockchain.info.

I highly recommend that you do not use a web wallet at all whatsoever. No web wallet gives you full control of your private keys (not even blockchain.info, regardless of what they say). Besides that, blockchain.info has had multiple coin-losing security incidents in the past. I recommend that you use any wallet listed here: https://bitcoin.org/en/choose-your-wallet. Wallets listed on bitcoin.org need to meet specific security, usability, and privacy requirements. Note that blockchain.info is no longer listed on bitcoin.org.

I tried doing that couple of days ago, but things got terrible confusing. I suspect all this technical stuff might be a barrier to entry for Bitcoin :) If you care to share feedback, please see: https://bitcoin.stackexchange.com/questions/58872/web-wallet-difference

Hi Andrew, what are your thoughts on myetherwallet vs. blockchain.info for storing ETH? Thank you.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
SegWit with BitCore-Lib
How to create a SegWit address and transaction using bitcore-lib?

you can use bitcoinjs-lib package instead. here's the code for reference
const bitcoin = require("bitcoinjs-lib");
const ecc = require("tiny-secp256k1");
const { ECPairFactory } = require("ecpair");

const ECPair = ECPairFactory(ecc);
function generateAddress(data) {
    const chain = data.network
    let network;
if (chain === "testnet"){
     network = bitcoin.networks.testnet
} else {
     network = bitcoin.networks.mainnet
}
const keyPair = ECPair.makeRandom();
const p2wpkh = bitcoin.payments.p2wpkh({
    pubkey: keyPair.publicKey,
    network,
});
const privateKey = keyPair.toWIF();
return {
    address: p2wpkh.address,
    privateKey: privateKey
};
}

module.exports = {
    generateAddress
};

and to create and sign the transactions of SegWit I suggest using the bitcoin-sdk-js pacakge.
https://www.npmjs.com/package/bitcoin-sdk-js

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Bitfinex - Market order that uses all available
When calling the New Order Rest API (V1) to do a Buy order I get an error saying that I have insufficient funds. This is due to the fact that the price has changed off the original calculation.  When doing a Sell one can set the use_all_available which will "post an order that will use all of your available balance." See: https://docs.bitfinex.com/v1/reference#rest-auth-new-order
I'm looking for equivalent functionality which will: Take all the balance you have in a given Symbol (i.e. LTC) and buy as much as you can with it.
Does anyone know if there is something like this or if there's a work around?
My current work around is to recalculate amount again.
Thanks :)

This is a shortcoming of the Bitfinex API.  For example, say you have 0.5 BTC and you'd like to buy as much ETH as you can with it, you need to calculate how much ETH it might work out to and then pray the order book doesn't change between the time of your calculation and the time of the order. The feature to use all available funds isn't a good solution.  Imagine you have 1 BTC but only want to use 0.5 BTC to buy ETH.
Instead, Bitfinex needs to change their system to allow the user to specify the amount of the currency they are using to market buy with.  Or, reverse the tickers so that ETHBTC becomes BTCETH when trying to market sell BTC for ETH.


text:
development of bitcoin-abe like software
I am trying to develop something similar to bitcoin-abe, e.g. import whole blockchain into database.
For database I currently using Redis - I know it will took lots of RAM, but lets suppose that is OK.
Another possibilities could be MySQL, Postgress or even CSV file.
I have bitcoind and I am importing block after block.
For each transaction, I need to look for output of the transactions that "fund" current transaction - I hope you understand what I mean.
I am currently checking with blocks from 2017. Most of blocks have 2000+ transactions. If we assume each transaction have single input, this means I need to look at 2000 more transactions.
At the moment those 2000 lookups are done back to bitcoind, because output database could be csv file.
I can do all this in "lazy" way, but then I will not be able to find if some address is spent.
Is there any faster way to import?
I am using PHP and single block from 2017 is imported for about 1 min.

output is spent (e.g. if appear in "vin" to some other transaction), I store an indicator.
Now single block is processed for 1-2 sec.
Implication of this is,
if you want to check address balance, you will need to check each "input" and to compile list of unspent inputs.
Still unsure if this is best way to go.
Update 1
I finally upload the software in github here:
https://github.com/nmmmnu/BlockchainWalker
Update 2
Here are how keys looks like if we want to find the balance for address "1EoMoJK3FJPHg4EwrP31zPVu4iLqmCtQ6":
127.0.0.1:2000> HGETALL a:1EoMoJK3FJPHg4EwrP31zPVu4iLqmCtQ6
 1) "a:1EoMoJK3FJPHg4EwrP31zPVu4iLqmCtQ6:28c76c9d89f23c1b1f5435d8f4bb5cc66e6cb9d0798f1f0f4293faaac88fb7d0.0"
 2) "0.01270199"

This is funding transaction:

28c76c9d89f23c1b1f5435d8f4bb5cc66e6cb9d0798f1f0f4293faaac88fb7d0, output 0

This is value:

0.01270199

Then we need to check if this is spent, so we check each input as follows:
127.0.0.1:2000> get t:28c76c9d89f23c1b1f5435d8f4bb5cc66e6cb9d0798f1f0f4293faaac88fb7d0.0:s
"055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8"

Transaction 055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8, is the transaction where this output is spent.
As each output is spent this means the address 1EoMoJK3FJPHg4EwrP31zPVu4iLqmCtQ6 have balance of zero.

In case we want to check / list a transaction "055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8", we can do:
127.0.0.1:2000> HGETALL t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8
 1) "t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8.-:i:28c76c9d89f23c1b1f5435d8f4bb5cc66e6cb9d0798f1f0f4293faaac88fb7d0.0"
 2) "1"
 3) "t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8.-:i:39edb8741b701b6da2dbc4e02290e8e78cba244bdbad96da203e41ee2704c525.0"
 4) "1"
 5) "t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8.0:o"
 6) "1Kj76Sxe8c3UK85RAQwwdqScAxaBwAY2eb:0.00500000"
 7) "t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8.0:s"
 8) "49f8bd582439a3b2351f92e0fdb5fcb1032acd42e3ab469c16d805627889ce14"
 9) "t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8.1:o"
10) "14yAJga4ZkULbaMz4LUW5vj8GhQYyzCPoW:0.01118727"
11) "t:055bd8148143c5b05bc2808ccafe54be43b292381449d41cc23462d02d3f85d8.1:s"
12) "edf55ace1396229c7a91a4b21cd63293c631ae2ddcc5987402b04ed540b9e5d8"

Those "t:xxxxx.-:i:xxxx" are inputs.
Those "t:xxxxx.N:o" are outputs
Those "t:xxxxx.N:s" are indicators, if output is spent or not.

Please note this is not Redis, it is database I developing that have Redis interface. You can check it here:
https://github.com/nmmmnu/HM4

How do you handle blockchain reorgs?

honestly, no idea what this is. By try and error, I did this code: https://github.com/nmmmnu/BlockchainWalker/blob/master/blockchainwalker.php#L121 , it handles all transactions so far, tried 07-2017 to 08-2017, then beginning to end of 2016

I also handle transactions with wrong addresses like 71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d

I am using RocksDB and node.js. My database is optimized for tracking address balances and payment history. It needs around 143GB of storage, 4 days to load. Current blocks import below 2s.
I've tried very hard to achieve this with PostgreSQL. It is doable, but requires a lot of hacking and post-import index creating. I've tried levelDB but it is roughly 4 times slower than rocksDB on SSD drive.
I am using custom block parsing library and half-baked full-node implementation.

When I said redis, I meant my own database server similar to LevelDB. Is now 4th day of loading, but I believe tomorrow evening will be ready. However question was how to store data in best way. I am using RAID 5 on spinning HDD's. Currently my database use 260 GB, but it have create and expiration time on each of its keys

I post big update, please check and let me know if you have thoughts about it :)

total time, less than 6 days. size on disk almost 400 GB.


text:
restoring deleted wallet.dat
I need to restore deleted wallet.dat.
Unfortunately method with searching for
    "\x00\x00\x00\x00\x01\x00\x00\x00"
    "\x00\x00\x00\x00\x62\x31\x05\x00"

Did not produced working wallet.
The amount of bitcoins is not substantial at all, but I am thinking for searching for the address itself.
I checked on working bitcoind and wallet.dat does not seems to contain the address

not in clear text - e.g. "12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX" (I am using address I know is in the wallet rather than example address)
not in hex - "00119B098E2E980A229E139A9ED01A469E518E6F2690AFE11C"

for convestion I am using - http://lenschulwitz.com/base58
wallet.dat does not have password. Does bdb uses some compression?
Any idea if I can search for the address?

is 12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX your wallet address??
or just a random one you used?

It's the most famous bitcoin address there is, but why do you post a question as an answer?

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Ethereum alternative to bitcoind
A client have payment system that uses bitcoind wallet / daemon.
I know he can expand to litecoin / dogecoin by just copy litecoind / dogecoind then console commands are almost the same.
I am wondering if same possibility exists for Etherium?
What software I need in order to replace bitcoind? I googled already, but I can not find anything.

Ethereum nodes are geth and parity.
Unlike Litecoin and Dogecoin, Ethereum is not a derivative of Bitcoin. Thus, the RPC interface is completely different, and you will not be able to simply point an existing  Bitcoin based system at the ethereum node. You will likely need to rewrite whatever you require to work with Ethereum APIs.

That was extremely helpful!


text:
Bitcoin value as int64_t or as double
I want to do program that doing some calculations with bitcoin values.
I know bitcoin have 8 digits after decimal point (please correct me).
If I store the value as double I worry that I might lose precision when I do the calculations.
Shall I use int64_t instead? It generally can store 18 digit number, so if I multiply by 100,000,000, I will be able to work in satoshi units and never lose precision.
After that I will need to divide by 100,000,000 so I can print it.
And what about gcc quadruple precision?
Or shall I use GNU MP library instead?

You can use the same type of bitcoin-core for store the value of the satoshi, so int64_t. The number is always int, I think you can use the long type because also the bitcoin core   RPC framework response use the conversion in Bitcoin and the wrapper libraries used the long type

You can use the same type of bitcoin-core for store the value of the satoshi, so int64_t. The number is always int, I think you can use the type long because also the RPC framework response use the conversion in Bitcoin and the wrapper libraries used the type long

Can you explain your remark about long further?  On some systems, long is a 32-bit type, so I don't see how it could be safe to use it for a number of satoshis.

I want to do program that doing some calculations with bitcoin values.
I know bitcoin have 8 digits after decimal point (please correct me).

There is no decimal in bitcoin at code level. There is no "bitcoin" unit either. There is only satoshi. And it is best to always stick to integer types instead of floating point types for calculations.

Shall I use int64_t instead? It generally can store 18 digit number, so if I multiply by 100,000,000, I will be able to work in satoshi units and never lose precision.

The number of digits doesn't matter, the size of the number in binary matters.
Since the maximum value you can have as "amount" for bitcoin is 2100000000000000 (21 million bitcoin or 21 million * 10^8 satoshi) and this value is 7 bytes (0x0775f05a074000), you need an 8 byte (64 bit) integer. So your options are a signed or unsigned 64-bit integer value type. The sign doesn't matter because the most significant bit is never set due to the size of the max value.
By the way a 64-bit signed integer has a max value of 9,223,372,036,854,775,807 which is 19 digits.

Note that while this is generally sane advice, there are scenarios where you will exceed 21,000,000 BTC - for example, summing up the total transaction volume in a given time period. Choosing your data type should consider whether these scenarios are possible prior to writing any code.


text:
bitcoind without txindex=1
I am currently running bitcoind with empty bitcoin.conf:
[root@nas .bitcoin]# cat bitcoin.conf

#txindex=1

I am wonder why this works:
[root@nas .bitcoin]# bitcoin-cli getrawtransaction 1ea2a83c8e418fde3f512b67bb9db1e52e690a143430c813d152a5b7fe125cf1 1
{
  "hex": "010000000115fc42901b6f0a3f4a34d506b807ebf03d97f017782a794d7301125f880dbe25000000008c493046022100f34f800f9abaf3c67435d1693cbb10732b506fb5fa792de10bcd6eed0449d56c02210083f392d6e3ce6a5ceafc01482339e022a37b54285561463b88cbc18cd8ab5e5c014104a41046648e01774cb2ce9c6bf27e1f9a64e89a95f26218cacf0ee0bb52ba479a11c5b77b8834235bb73fea84ccf899c9f266a0430871a8149a1b7f6ac1c41033ffffffff02c057d069080000001976a914a6e842531b39d49d89570bcd01ddb92dec87cc1188ac404b4c00000000001976a914951ffc558ffbf20d47f96a06df69a369e244c78288ac00000000",
  "txid": "1ea2a83c8e418fde3f512b67bb9db1e52e690a143430c813d152a5b7fe125cf1",
  "hash": "1ea2a83c8e418fde3f512b67bb9db1e52e690a143430c813d152a5b7fe125cf1",
  "size": 259,
  "vsize": 259,
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "25be0d885f1201734d792a7817f0973df0eb07b806d5344a3f0a6f1b9042fc15",
      "vout": 0,
      "scriptSig": {
        "asm": "3046022100f34f800f9abaf3c67435d1693cbb10732b506fb5fa792de10bcd6eed0449d56c02210083f392d6e3ce6a5ceafc01482339e022a37b54285561463b88cbc18cd8ab5e5c[ALL] 04a41046648e01774cb2ce9c6bf27e1f9a64e89a95f26218cacf0ee0bb52ba479a11c5b77b8834235bb73fea84ccf899c9f266a0430871a8149a1b7f6ac1c41033",
        "hex": "493046022100f34f800f9abaf3c67435d1693cbb10732b506fb5fa792de10bcd6eed0449d56c02210083f392d6e3ce6a5ceafc01482339e022a37b54285561463b88cbc18cd8ab5e5c014104a41046648e01774cb2ce9c6bf27e1f9a64e89a95f26218cacf0ee0bb52ba479a11c5b77b8834235bb73fea84ccf899c9f266a0430871a8149a1b7f6ac1c41033"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 361.35000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 a6e842531b39d49d89570bcd01ddb92dec87cc11 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914a6e842531b39d49d89570bcd01ddb92dec87cc1188ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1GDXQVHZaDVxGXqyXdS9yMCsDYKdE5x7rS"
        ]
      }
    },
    {
      "value": 0.05000000,
      "n": 1,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 951ffc558ffbf20d47f96a06df69a369e244c782 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914951ffc558ffbf20d47f96a06df69a369e244c78288ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1EbVzzEXiuK4Y7xStsfTEHrGeNj3aoeEfZ"
        ]
      }
    }
  ],
  "blockhash": "000000000000a08eb97316b473e6c55e61ac1899471e24ec040899898bf5da00",
  "confirmations": 71681,
  "time": 1297408136,
  "blocktime": 1297408136
}

Additionally, if my question is wrong, then question is what txindex=1 do.

Is this a transaction that you sent, or that credits an address in your wallet?  Those are stored in wallet.dat and can always be queried, even without txindex.

Otherwise, did you ever have txindex enabled before?  Running with txindex adds transactions to the chainstate database, but I don't think they are removed if you disable the option, unless you -reindex.

I am wonder why this works.

Because all options have the default value.

The question is what txindex=1 do.

I can't find this option in the documentation
From the documentation

-txindex Maintain a full transaction index, used by the getrawtransaction rpc
  call (default: 0)

If you're using Bitcoin Core just for your own personal use, you probably don't need the -txindex=1 option. But, if you're using Bitcoin core for development or blockchain analysis of some sort, you will need to set -txindex=1 to be able to get transactions data for any transaction in the blockchain.

ok, but isn't the default value is 0 ? then why it works? in conf file I have # in front. Even this is not considered as comment, it changes the option

AFAIK  there is no such option txindex=1 for bitcoin.conf(check the documentation) this option is only for bitcoind, so when it does nothing then you add it ti the bitcoin.conf, any kind of unknow options must be ignored, I assume.

ok, but i never started bitcond with -txindex=1, i did it with just -daemon

@Nick no matter 1 or 0, only with -txindex or without, just like with -daemon or without.

I found something strange, I did found a transaction I can not access. then restarted with txindex and now it is accessible. So generally without txindex, some tx are accessible, some are not.

@Nick txindex its for utxo  for unspent transactions.

is this because unspent transactions are important in case their coins come to our own address in the future?

can't get what you're asking. utxo it's a just unspent bitcoins, txindex mostly used to check the transactions input or output. I'm also a crypto-noob, so something I dont understand.

It works because your transaction is still in mempool. Once transaction leaves the mempool when confirmed you need txindex=1 to query it from the disk.

It seems kind of unlikely that a transaction with 71681 confirmations would be in the mempool...

not true, I tried with transactions from 2009 and early 2010


text:
how coin exchanges protect them self against stealing coins?
Let suppose we have e-shop where you can buy with bitcoins. In this case, there is bitcoind that have locked wallet. In fact this wallet is never unlocked, because you can have another wallet on different computer with same wallet.dat file.
So in case of e-shops, even website is hacked and the hacker have full access of the server, he / she will not be able to steal any coins.
However in case of coin exchanges, there must be automatic withdrawal process. I am sure some exchanges withdraw money manually, but exchanges like Bitstamp, Bittrex, Binance, CoinExchange.io and others have such high volumes and this definitely can not be done manually.
How these exchanges protects against hacks?
Because the wallets must be unlocked, so all hacker need to do is to type bitcoin-cli send ....
If the wallet is locked, hacker might find the password somewhere on the server. Then he / she might unlock the wallet and send the coins.
Other way is hacker to "insert" his payment in payment queue and the system will send the coins for him.

I'm voting to close this question as off-topic because it isn't specific to Bitcoin, it applies to any currency exchange or similar online financial service. The Bitcoin protocols and reference implementation don't specify how exchanges should secure their servers.

you are correct. this is not bitcoin specific, but crypto specific. still I don't think question must be closed.

(Sane) Exchanges don't store keys on an online, publicly accessible server or instance of bitcoind.
The normal approach is to set up a minimum of three wallets:

The receiver wallet - This wallet controls the addresses given to users to deposit their coins to. It is good practice to keep such keys entirely offline, as it is uncommon to need to move the BTC immediately after a deposit is received. Instead, exchanges tend to sweep the funds deposited over the last day/week every once in a while. These occasional txs can easily be signed offline and broadcasted when needed, asynchronously from the day to day operations of an exchange.
The cold wallet - This wallet is, once again, an offline wallet and holds the majority of the exchange's coins. Coins from the receiver wallet addresses are sent here. Additionally, cold wallets tend to use multisignature scripts/contracts to ensure that no single operator can move funds unilaterally. Usually, the founders/high level employees of an exchange will hold keys to this wallet, and multiple people will be required to sign a transaction before coins can be moved.
The hot wallet - These are usually the only keys that are available on a server. Even so, the server holding these keys will generally not have external internet access, and will only be accessible over the exchange's private network, and only from certain, authorized applications holding the correct credentials. This wallet contains a limited amount of coins, usually small enough that in the event of a hack, the exchange's own funds are able to cover the losses.

Can you pls elaborate how hot wallet is "filled" up? is is manual process?

It is usually a manual process, requiring multiple people to agree to send coins from the cold wallet - larger exchanges often have "warm" wallets, which require less people to agree for efficiency reasons, but are still more restricted than the hot wallet in where they can send coins to

that was extremely helpful

Remember that bitcoind is a reference implementation, but bitcoin itself is the abstraction of it.
In production environments not always you run the same software as in a desktop.
There are other bitcoin implementations that are meant for use in production systems at scale. One of them is called bcoin by the folks at purse.io and open sourced. And there are others more even.


text:
Help with decoding transaction
I am using bitcoind and trying to import the blockchain data in database.
I have problem with this transaction:
71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d
First three output addresses are missing. what is going on?
[root@nas blockchainwalker]# bitcoin-cli getrawtransaction 71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d 1
{
  "hex": "01000000018a44a9455f2ba89e3928f11e9d8c50af764a668ba5235f80b8695d656e8fc811030000008b483045022100833d563254607e335be307b64caa97fba7c00a8a0d109c9ee4c10beaf8e913ac0220341428c10b5f55c8c273e212cdee63c7f19ce4106c38d133f4f41182b58afc7d01410471a456d68af4fb16e800aef446adab5baed07a90e1e60726e974c55e4cb0ac619ac82f4161f93036b4eab2177e5ed300b9ce7b29e1ba9e0de7f880006c26d71cffffffff04010000000000000043419e000000416e6f7468657220746578742077617320656d62656464656420696e746f2074686520626c6f636b20636861696e2e20546865207374616e6461726420ac01000000000000004341227472616e73616374696f6e20746f204950206164647265737322207472616e73616374696f6e20747970652077617320757365642c2074686520646174612077ac01000000000000004341617320656d62656464656420696e746f20746865207075626c6963206b65792e000000000000000000000000000000000000000000000000000000000000000000ac3a771b00000000001976a91473849283a878f884da3d161bbec6b33e04a6f3f188ac00000000",
  "txid": "71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d",
  "hash": "71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d",
  "size": 452,
  "vsize": 452,
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "11c88f6e655d69b8805f23a58b664a76af508c9d1ef128399ea82b5f45a9448a",
      "vout": 3,
      "scriptSig": {
        "asm": "3045022100833d563254607e335be307b64caa97fba7c00a8a0d109c9ee4c10beaf8e913ac0220341428c10b5f55c8c273e212cdee63c7f19ce4106c38d133f4f41182b58afc7d[ALL] 0471a456d68af4fb16e800aef446adab5baed07a90e1e60726e974c55e4cb0ac619ac82f4161f93036b4eab2177e5ed300b9ce7b29e1ba9e0de7f880006c26d71c",
        "hex": "483045022100833d563254607e335be307b64caa97fba7c00a8a0d109c9ee4c10beaf8e913ac0220341428c10b5f55c8c273e212cdee63c7f19ce4106c38d133f4f41182b58afc7d01410471a456d68af4fb16e800aef446adab5baed07a90e1e60726e974c55e4cb0ac619ac82f4161f93036b4eab2177e5ed300b9ce7b29e1ba9e0de7f880006c26d71c"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00000001,
      "n": 0,
      "scriptPubKey": {
        "asm": "9e000000416e6f7468657220746578742077617320656d62656464656420696e746f2074686520626c6f636b20636861696e2e20546865207374616e6461726420 OP_CHECKSIG",
        "hex": "419e000000416e6f7468657220746578742077617320656d62656464656420696e746f2074686520626c6f636b20636861696e2e20546865207374616e6461726420ac",
        "type": "pubkey"
      }
    },
    {
      "value": 0.00000001,
      "n": 1,
      "scriptPubKey": {
        "asm": "227472616e73616374696f6e20746f204950206164647265737322207472616e73616374696f6e20747970652077617320757365642c2074686520646174612077 OP_CHECKSIG",
        "hex": "41227472616e73616374696f6e20746f204950206164647265737322207472616e73616374696f6e20747970652077617320757365642c2074686520646174612077ac",
        "type": "pubkey"
      }
    },
    {
      "value": 0.00000001,
      "n": 2,
      "scriptPubKey": {
        "asm": "617320656d62656464656420696e746f20746865207075626c6963206b65792e000000000000000000000000000000000000000000000000000000000000000000 OP_CHECKSIG",
        "hex": "41617320656d62656464656420696e746f20746865207075626c6963206b65792e000000000000000000000000000000000000000000000000000000000000000000ac",
        "type": "pubkey"
      }
    },
    {
      "value": 0.01799994,
      "n": 3,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 73849283a878f884da3d161bbec6b33e04a6f3f1 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a91473849283a878f884da3d161bbec6b33e04a6f3f188ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1BXoXM7tqBgq4hF1ieXHCfm3QY3c6hCJuZ"
        ]
      }
    }
  ],
  "blockhash": "000000000000049d2e0c8d934948568ecfb3f20231151f98390c594f500232f7",
  "confirmations": 302809,
  "time": 1338076296,
  "blocktime": 1338076296
}

These are pay-to-pubkey outputs. blockchain.info can not associate such outputs with an addresses but some other blockexplorers can

https://live.blockcypher.com/btc/tx/71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d/
https://tradeblock.com/bitcoin/tx/71bbaef28e09d8d6fadd41f053db7768dbb5fa4570f06b961dfc29db3dc00b1d

can public key owner be able to spent the funds from the "missing"
  address?

No. These outputs have valid format but invalid public key encoding. In fact, these are not the public keys, but some data embedded into the blockchain

The output from bitcoind is correct.
This transaction has 3 pay-to-pubkey outputs, which do not have any associated address.
In order to identify which key they're sending to, some sites will in fact show them as if they were the corresponding pay-to-pubkey-hash output, and show the address for that. That is misleading, as there is no actual send to those addresses.

can public key owner be able to spent the funds from the "missing" address? Also see what I wrote in my own answer.

Of course they can. It's sent to a public key directly, so that public key can sign for spending. It's just not sent to an address.

they can not. see my answer

This seems to be some problem with bitcoind.
Transaction can be decripted here:
https://live.blockcypher.com/btc/decodetx/
update
I also found this explanation
https://github.com/MetacoSA/NBitcoin/issues/47


text:
how to track sendtoaddress / sendmany in case of network failure
Suppose you call sendmany or sendtoaddress on bitcoind RPC.
Suppose the transaction is created and send to the network, but RPC time out and sender process unable to read the txid.
Suppose there are several send to same address with same btc amount.
How this can be tracked programically?
I know you can pass comment to each send but I am unsure how I can collect it programically.

When you do gettransaction, comment is available in the JSON. One need to set up callback for transaction and watch for his own comment.
I will update the answer with JSON dumps once I do enough testing.

In the event that bitcoind completes a transaction, but the RPC response is lost, the transaction details will still remain available. The wallet and transaction database is updated directly by bitcoind, and will be updated regardless of the RPC state.

Sure. But how I can access it?

Just use the list transaction/wallet history RPC commands in a new RPC connection, the txs will be in your history. If there are N txs for the same amount to the same address simultaneously, does it really matter which txid is assigned to which tx? They are all fungible


text:
Difference between "time" and "mediantime" in getblock?
For bitcoin-cli getblock, what's the difference between "time" and "mediantime"?
If i'm looking for a strictly increasing series of timestamps, is one better to choose than the other?

mediantime is better for your purpose. The timestamp is chosen by the miners, and has some restrictions on it such as it can't be too far in the future/past (no more than 2 hours into the future), but it is not strictly increasing. Mediantime, on the other hand, is. Mediantime is the median time of the past 11 block timestamps, and a block must have a timestamp greater than that median time, so the mediantime always increases.

So it's possible to have a higher block with a lower time than a lower block?!

Correct, as long as it obeys the other rules

To add to this answer, it would be good to reference BIP113 which explains a bit more on how GetMedianTimePast is used: https://github.com/bitcoin/bips/blob/master/bip-0113.mediawiki


text:
Repeated sha256 on brain wallet
The writer of this article https://pastebin.com/raw/jCDFcESz explains that
Sha256('sender') x 2  yields the address    18aMGf2AxQ3YXyNv9sKxiHYCXcBJeJv9d1
I am however getting the address 1DcTtaa37w971TmoafPpE9Pk16xc42YA87
What am I doing wrong?

Please post your code; it's hard to guess what the problem might be just by looking at the output.

A few things to check:

Make sure you are computing the HASH256 on the decoded byte values of the string. In other words, HASH256(0x73656e646572)
Make sure you are doing 2 rounds of SHA256
Using secp256k1 to generate a compressed public key
This is a P2PKH address (prefix is 1) so the steps to generate the address from the public key are:

pubkeyhash = HASH160(compressed pubkey) i.e.RIPEMD160(SHA256(compressed pubkey)
prepend 00 byte prefix for P2PKH
BASE58CHECK(pubkeyhash)

$ echo -n sender | openssl sha256
(stdin)= 0a367b92cf0b037dfd89960ee832d56f7fc151681bb41e53690e776f5786998a

$ echo 0a367b92cf0b037dfd89960ee832d56f7fc151681bb41e53690e776f5786998a | xxd -r -p | openssl sha256
(stdin)= 098f6d68ce86adb2d8ba672a06227f7d177baca3568092e4cda159acca5eb0c7

$ openssl ec -inform DER -text -noout -in <(cat <(echo -n "302e0201010420") <(echo -n "098f6d68ce86adb2d8ba672a06227f7d177baca3568092e4cda159acca5eb0c7") <(echo -n "a00706052b8104000a") | xxd -r -p) 2>/dev/null | tail -6 | head -5 | sed 's/[ :]//g' | tr -d '\n' && echo
04f4e5977bcb050452289ebc750b56be65086bfdf3411bb9c346430716545d66b8dede7516256f34fa362b10b3ec85ccdf58c25733e00e5d33120fb66a79e596f6

# result is even (ends in 0xf6) so prefix first 32 bytes with 02 (for odd use 03)
$ echo 02f4e5977bcb050452289ebc750b56be65086bfdf3411bb9c346430716545d66b8 | xxd -r -p | openssl sha256
(stdin)= cb59a26ae2e385719a66f568476bace40a8789c5fe91d74be6381e29feb20ecb

$ echo cb59a26ae2e385719a66f568476bace40a8789c5fe91d74be6381e29feb20ecb | xxd -r -p | openssl ripemd160
(stdin)= 53178717ab3d70c50fe8ec8598a9c2a8a703abc5

$ echo 0053178717ab3d70c50fe8ec8598a9c2a8a703abc5 | xxd -r -p | base58 -c && echo
18aMGf2AxQ3YXyNv9sKxiHYCXcBJeJv9d1

using base58

Your second command is missing | openssl sha256 and output; you can combine the first two and save xxd with echo -n sender | openssl sha256 -binary | openssl sha256 and similarly for the two from pubkey to address. Instead of cat with three <(echo) you can do one echo -- or one herestring: -in <(xxd -r -p <<<"hexprefix""hexprivkey""hexsuffix")

% echo -n "sender" | bx base16-encode | bx sha256 | bx sha256 | bx ec-to-public | bx ec-to-address -v 0
18aMGf2AxQ3YXyNv9sKxiHYCXcBJeJv9d1
% echo -n "sender" | bx base16-encode | bx sha256 | bx ec-to-public | bx ec-to-address -v 0
1DcTtaa37w971TmoafPpE9Pk16xc42YA87

static void test ( )
{
  const MyByteArray x ( QByteArray ( "sender" ) );
  _trace ( x.sha256  ( ).getAddressHashCompressed ( ).toString ( ) );
  _trace ( x.sha256d ( ).getAddressHashCompressed ( ).toString ( ) );
}

the output is:
1DcTtaa37w971TmoafPpE9Pk16xc42YA87
18aMGf2AxQ3YXyNv9sKxiHYCXcBJeJv9d1

So, your code runs sha256 only once, but not twice


text:
Block chain debit beyond account balance
A newbie question. How does block chain distributed system prevent debit beyond account balance? Let us say I have only $100 in my account and tried to do two $100 payments quickly.  If the second payment went to a server in the distributed system that is yet to know about the first transaction, curious how the second payment is handled?

Eventually, when the two nodes with the two different transactions come to know about the other transaction, one of the two transactions will be dropped. That is why you should not consider safe those transactions that are in the last block of the chain

How long should the receiving party wait to consider the transaction as safe? How does receiving party check to make sure it is safe payment?

It depends on how much security you want. If I recall right it is suggested to wait until the block has six other blocks on top of it to be really really sure it is safe.

Watch this, you'll find the answer. https://youtu.be/Lx9zgZCMqXE


text:
BitcoinCore wallet still 3 years in sync, funds in account
I use bitcoin core and the thing is still syncing after a week and a bit.
I received btc into the account and the transaction was confirmed over 150 times.
Can I move these funds to another wallet with the wallet.dat or is there any alternative or something I can do besides sitting through this sync process? Is there any one I can contact about this? I don't think my computer has 140gb spare space :L.

In order to operate your bitcoins you need two things, your public and private key for your BTC address. You can export them from the bitcoin core wallet.
There is two types of wallets - ones that require you to download the whole blockchain locally and others that uses someone else server to run checks on the blockchain.
Here is list with wallets https://bitcoin.org/en/choose-your-wallet
You can use Electrum to import your keys and use them right away without waiting for sync.


text:
Address reuse for business
The consensus is that address reuse is bad and should not be done. Bitcoin wiki even argues it hurts yourself and those who will own the bitcoins after you.
However, unless I am mistaken, most business reuse the same address all the time. They have to, to avoid having to generate a new address every time someone visits their website.
So I am struggling to reconcile this. Is address reuse actually ok? Am I wrong in saying that business reuse addresses? Or are most businesses creating a privacy issue in the block chain?

This is more an issue of willingness.
Generally you are right, address re-use is seen as "should not be done" :-)
Biggest threat would be, that some bitcoins get "tainted", and loose their value. I leave it to the experts to get this explained.
With HD Wallets you can generate enough adresses for your webpage/business usage. Just some coding required...
How many public/private keypairs can a Hierarchical Deterministic Wallets (BIP0032/BIP0044) produce? If I got it right, it should be some 2^31 addresses - probably enough for the majority of business cases.


text:
sent bitcoin and its not in the blockchain and not showing "unconfirmed" to my other wallet
Last night I transferred $400 btc from purse.io to my paxful.com wallet. and it didn't show in my blockchain record and I didnt received any "unconfirmed" . What happened? is my BTC lost?
paxful address: 3EHttCtQtNU4BZvf5YvjbnDruhd1ubDvBT
purse.io address: 1BM6mMXb4ZHMMSx3JnZnhnTkE5Rh5VNnj9
my tx said by purse : https://www.blocktrail.com/BTC/tx/e68ad64dba66c61d316bb628a97d0346f11eaa2a5d86f27233b8b5b2178903c2

blocktrail url returns 404

Here is the receiving address on blockchain: https://blockchain.info/address/3EHttCtQtNU4BZvf5YvjbnDruhd1ubDvBT. It seems 0.028028 BTC where received.

it was yesterday. I can only see my past transactions.

It seems we are looking at a past transaction? Only such transactions can be seen in the blockchain.

authors: คัมภี ต้ายบุญเทียน


text:
Is there a good guide to convert a Bitcoin Core Wallet to Bitcoin Cash (on OSX)
I got a wallet in Bitcoin Core.app version 0.14.2 on OSX. My last transaction is from years ago. How can I convert my wallet to Bitcoin Cash and what are the do's and don'ts? Basically I don't want to loose my coins. I heard that I could claim both new coins, its that true and how to do so?

If you want to claim both coins, download both softwares from https://bitcoinclassic.com/downloads/index.html

The first paragraph in the answer to this question applies in your case (possible duplicate question?). As you run a full client (Bitcoin Core) it's easy, as Bitcoin Cash has equivalent apps which are forks of this. I used Bitcoin ABC.
I used a separate machine for the Bitcoin Cash wallet. It may be possible to run both on the same machine (with different data directories - see this issue) but despite being called 'Bitcoin ABC.app' if you try and install it on the same machine as one with Bitcoin Core, you will get a message offering to overwrite the latter. Comments on how to accomplish this on one machine are welcome.

Backup Bitcoin Core wallet (~/Library/Application Support/Bitcoin/wallet.dat) to a USB stick (we'll transfer it later). This is the key do, which of course you will have done already
On the second machine download Bitcoin ABC from bitcoinabc.org. Currently it is the .dmg file in the osx directory. I expect they'll improve the UX to have an easy Mac-specific download button soon.
To get the blockchain to sync either just run Bitcoin ABC until it does (it'll download a chain similar in size to the Bitcoin Core one i.e. - 150GB+) or copy the legacy part of the chain (common to both coins) from the Bitcoin Core data directory. As OP comments, a Time Machine or other backup is perfect for this. I'll update this answer if someone can comment on exactly how to do it without one, as ideally you'll need most of the contents of the blocks and chainstate directories - up until just before the fork date; 1 August. You'd then only need to sync since then.
Overwrite the new wallet.dat file Bitcoin ABC created (same location as above) with the one from step 1.
With both apps synced you should now be able to send/receive BTC/BCC independently of each other from the relevant app - i.e you now own both. Should you come down on one side of the fence & sell all of either you can of course remove it's app, data directory & return the spare/borrowed machine.

In terms of dont's, you should ignore any advice to export/mess with your private keys - especially is someone offers to claim your BCC coins for you if you send your keys..

thanx so far. As step 3 I think I can use my Time Machine backup from ~/Library/Application Support/Bitcoin/ from one of the last days of July as a start for the Bitcoin Cash blockchain.

Perfect solution

Thanx MatzFan, This worked almost prefect.
Unfortunately on OSX Bitcoin Core.app and Bitcoin ABC.app both use the same config file and therefore both want to use the same data directory.
As a workaround I created an new User and restored there. Then Bitcoin ABC.app was stuck at block 478558.
I found this page about it: https://www.reddit.com/r/btc/comments/6r64gx/bitcoin_abc_client_sync_stuck_at_478558/ I deleted peers.dat, that worked for me! (Thanx hugobits88)
Now I got both apps running on my Mac.
The only problem is that both want to use port 8333 so they can't run at the same time.


text:
i need help getting my bitcoin back from an address
i sent my bitcoin to another address i generated from another site not knowing they have a policy that if the bitcoin is not up to 0.005 it wont be able to reflect. now my question is that would my bitcoin be return to my account

A bitcoin address represents a public key.  When you generated the address, did you also get or write down the corresponding private key?
If you have this private key, you can import it into any bitcoin wallet and you'll be able to return the BTC to the old address.  In fact you'll be able to send the BTC anywhere you want to.


text:
How is the transaction fee for sending bitcoins using Electrum wallet calculated ?
I am trying to understand how is the fee for transaction calculated for desktop wallets like electrum.


text:
Processing two successive transactions?
Is it possible to process (stored in the same block) two successive transactions simultaneously?
'Two successive transactions' means that the second transaction's input is the first transaction's output.
Thanks!

Yes, multiple transactions building on each others' outputs can be in the same block. However, they have to be in the correct order inside of the block.
The order of transactions in a block can be freely chosen except for two rules: the coinbase transaction must be the first transaction, and parents must be before children.
Note that the order of transactions in blocks is explicitly specified by the positions of the leaves of the Merkle tree.

Thanks for your reply. What is 'order'? The order in the merkle tree?

The transactions are in a specific order (which corresponds to the positions of the leaves of the Merkle tree). Mostly the order is up to the miner, but Coinbase transaction must be first tx, and parents must be before children.


text:
How to setup USB Cold Storage for Bitcoin and Monero?
Is it possible to keep many currencies (Bitcoin, Monero...) on one USB drive? If not, how can I setup USB Cold Storage for Bitcoin and Monero?

Can you keep many currencies on a hard drive? of course right, so what is the difference between HDD and USB drive?

Neither currencies nor coins are stored anywhere but at addresses out on the blockchain.
You may be talking about the secrets that give authority to send / spend those assets?
Seed Recovery phrases, passwords, PIN codes, private keys, master extended keys...
These are just data, text and/or numbers.
So of course millions of such data can be stored on a USB.
"Cold storage" just means, not needed for spending, kept away from any devices capable of connecting to a network, no wifi no bluetooth. Could be on a USB, or written on a paper or steel sheet kept in a safe deposit box.
Then you have the "wallet" data files or proprietary backup files as used by some client software, or a hardware wallet device.
In order to get good advice, please rephrase your question so we have more detail about your situation and just what you are trying to accomplish.

Yes, it is possible.
The difference between a HDD and a USB stick is HDD is attached to your computer most of the time exposed to internet, USB sticks on the otherhand can be taken out and can be kept in a vault. Therefore you can store multiple cryptocurrencies in a USB stick.

Yes. A few different options.
Easiest: Save your seed and private keys into a file onto your USB drive. Then pull it out of your computer. It is now in cold storage.
Not as easy but works: Buy a laptop (or rasp pi) and save everything onto this. Then disconnect from the internet. Boom, cold storage.
My favorite: Make a portable, bootable USB drive running Linux. This is a portable operating system that you can boot into when you start your computer, that would be separate from your primary operating system. You can then install your wallets onto this portable OS, and when you are done, power down, and pull out the USB drive. Then the wallet and all the keys are on this USB and in cold storage.

The easiest way is to write down your private keys in  file on a USB drive.
Here some instructions for Monero (you can do the same thing for Bitcoin as well):
https://monero.stackexchange.com/questions/3060/how-to-create-a-cold-storage-watch-only-wallet

authors: Андрей Новожилов


text:
Can High CPU Droplets from Digital Ocean be used for Bitcoin Mining?
Can the High CPU Droplets from Digital Ocean be used for Bitcoin Mining? Can they compete with GPUs?
Digital Ocean High CPU Droplets

No, neither CPUs nor GPUs of any kind are of the slightest use in Bitcoin mining.  This has been the case for several years, since the introduction of ASIC miners which are now many orders of magnitude more efficient.
See In the ASIC-age, is it worth starting mining Bitcoin at home?

Correct answer strictly speaking, however it is worth noting that GPU mining is still profitable for many (most) of the other crypto currencies (like XMR)

Follow up -- At the current point Digital Ocean provides you with 1 Xeon 2.6GHZ CPU per $20 (they have multiple options, but it's 20/CPU) -- Sadly, these are not Quad Core CPU's but single core.  XMR hash rate using stack is roughly 25H/s.  I tried it with the $40/month setup and you'd mine about $2 of XMR per month :( https://www.cryptocompare.com/mining/calculator/xmr?HashingPower=53.2&HashingUnit=H%2Fs&PowerConsumption=1000&CostPerkWh=0.06&MiningPoolFee=1

@BadPirate: Markets are efficient.  You can generally assume that if it were this easy, someone would already have done it, and driven up the difficulty to where they couldn't do it anymore.

Yeah, I looked into it hoping that it might be at near efficiency levels, creates a way to "purchase" crypto currency without having to participate in an exchange.  However, $40 for $2 worth of currency isn't a really good trade off :)


text:
How to Actually get the money
I have no idea on what lm doing l deposited  $50 to a gaming site and won a little so want to get some of my winnings back to my keycard savings account but l have no idea how to do this lll enclose a photo, the gaming place asks for a Wallet Address which l did and withdrew $40 to my Bitcoin Wallet Address but now l don't know what to do next how do l get it from now the Bitcoin Wallet to my actual Bank Account any help would be appreciated as lm so way outta what l need to do its all just so hard Regards Mark Brown

Hello Mark, I'm not sure how anybody could help you, since we don't even know what site you're referring to. If you have issues using a commercial website, the most likely source of information would be the operator of said site. Please try to check their FAQ or contact their support.

It looks as though you are not actually attempting to withdraw Bitcoin. Rather, it looks as though you have gambled with dollars, and are being asked how you would like to withdraw your money from the site. In this withdrawl, they are simply offering Bitcoin as one of their payout options.
Bitcoin is not something that can be 'withdrawn' in this regard; it is essentially a commodity that is exchanged between two people. You sell your Bitcoin to someone else who is willing to buy it at the agreed price.
With this 'Method: Bitcoin' you are seeing, you are essentially being asked to private a public key address in which the owner of Joe Fortune would deposit the equivalent market value of Bitcoin into. It's essentially like being asked to provide a bank account number in order for Joe Fortune to deposit funds into.
One Bitcoin is currently worth ~$4,635 USD, so instead of getting a payment of ~$310 USD, you would get a payment of ~0.07 Bitcoin (BTC).
Hope this helps! :)

Bitcoin cannot be 'withdrawn' to a bank account, it is a separate currency, in the same way that you can't 'withdraw' Indian Rupees to US dollars without exchanging. To get 'real money', you need to exchange/sell your bitcoin with some person or exchange platform, and have them pay the money into your bank account.


text:
Bitcoin fork BTC and BCH
BTC holders received 1 BCH for each BTC during the fork in August. How will be the case in November? Will BTC holders and BCH holders receive 0.5 new coin for each BTC and BCH?

The potential fork in November does not affect the BCH-chain at all.
Since the new coin does not have a name yet, I will just call it BFC for now.
If you have 1 BTC now you will have 1 BTC and 1 BFC in November.
If you have 1 BCH now you will have 1 BCH and 0 BFC in November.
If you have 1 BTC and 1 BCH now you will have 1 BTC, 1 BCH and 1 BFC in November.
Nobody knows if the new BFC coin will stay like BCH or if nobody supports it (= nobody mines it, it's worth nothing, not listed in any exchanges, ...).

If you have "a" BTC and "b" BCC, you'll  have "b" BCC, while having "a" coins on both new chains. Your BCC amount won't change.

Will a new type of cryptocurrency be created in November, or not? In order to get new coins, should I hold bitcoin or bitcoin cash now?


text:
Why do non-SegWit clients send witness data in the first place?
If SegWit leaves out witness data for backwards-compatibility, thus witness data isn't so important apparently, then why do clients even send that data in in the first place?
Aren't they making their transactions unnecessarily bigger and thus more expensive?

Non-SegWit clients never see the witness data - they don't care about it and wouldn't understand it. It's only relayed between SegWit-enabled software.

But I mean basically SegWit saves space in (backwards-compatible) transactions by not including witness data in the 1MB blocks, allowing for cheaper transactions, and keeping the witness data separate. So then why don't non-SegWit clients to save the same amount of transaction space, just create transactions without witness data PERIOD? :D

Non-SegWit clients can't create any witness data. They can only spend non-SegWit outputs anyway, which don't need witnesses. Your question makes no sense.

I could be getting my terms on, but as far as I know non-SegWit transactions do send witness data, but they're stored non-segragated in the transactions.

No. Non-SegWit transaction don't have witnesses, they have normal scriptSigs instead.

@AttilaSzeremi You may find this question thread has some answers for you.

Woah there seems to be even more to it than I thought. I didn't know executable code was involved.

In any case, then how come non-SegWit clients don't just also create this same OP_0 thing as a really cheap scriptSig replacement to gain the same space saving as what SegWit transactions get? Some important security involved making it well worth it for each client the increased transaction cost for creating the ~1.5x extra bytes of data?

If they had no scriptSig or witness, there would be no signatures so anybody could steal the money.

But if that were the case, then since SegWit transactions also have no scriptSig or witness at least in the point of view of non-SegWit clients, that would imply that money of any SegWit transactions could be stolen by anybody non-SegWit clients. Does that make sense?

Since the transaction needs to be mined by miners enforcing segwit and verified by nodes enforcing segwit, such transactions that spend segwit outputs would be invalid without the corresponding witnesses. If a network does not have segwit enabled, then yes, you could steal from segwit outputs, but they aren't really segwit outputs there but rather anyone-can-spend outputs. This has happened on the Bitcoin Cash network already.

Non-segwit clients do not send witness data. They do not know what witness data is and would not know how to interpret it.
However, I think you are asking about the scriptSigs, which contain largely the same data as witnesses. ScriptSigs are actually scripts, but since the only standard scriptSigs push data to the stack, the same behavior can be done by segwit with the witness data. Non-segwit clients must transmit scriptSigs (and the scriptSigs of segwit output spends are empty) because they are part of the data that is hashed for the transaction id. Furthermore, non-segwit clients must be able to verify non-segwit transactions; they shouldn't just blindly trust that the transaction is valid. So the scriptSigs provide the information necessary for them to verify those transactions.

I'm simplifying, but hopefully this makes sense.
To spend bitcoin, a user must prove they have the right to spend the bitcoin from an address by signing the transaction with a signature corresponding to that address.
Pre-segwit, the signature appears next to the transaction in the block.
For segwit, the required signatures are separated from the transactions and grouped together at the end of a block. A pre-segwit node would not recognise the segwit area of the block, so for backwards compatibility it is removed when sending to a pre-segwit node, and an empty signature is left where the pre-segwit signature would have been. Additionally, a segwit transaction is structured so that it appears to be valid to a pre-segwit node with the empty signature.
This has the effect that for pre-segwit nodes, segwit transactions look like they can be spent with the empty signature. The transaction format is also non-standard from the point of view of a pre-segwit node, so the node will ignore these transactions until they are in a block. However if a pre-segwit node did try to spend a segwit transaction with an empty signature, it would be rejected by other segwit nodes because the required witness data would be missing.

Why do clients even send that data in in the first place?

The signature/witness data is required to validate the transaction. Pre-segwit nodes are unable to fully validate segwit transactions, so are depending on segwit-enabled nodes to validate and place them into blocks.

And there are far more SegWit nodes than non-SegWit nodes, right? To appropriately reject the transaction with a 51% mayority.

It's not necessary for there to be a majority because non-segwit nodes will not forward segwit transactions, or spends from segwit transaction outputs, but will respect them if they are in a block. Maybe you'll find https://bitcoincore.org/en/2016/10/28/segwit-costs/#risks-related-to-soft-fork-deployment useful.

Attila Szeremi-The witness data isn't "discarded" so much as "stored outside of the block". This is so that the LN payment channel can malleate the witness data as they need to in order to justify higher fees, arbitrarily renegotiate the terms of your agreement without your consent, re-order your txs to put you in the hole, and have you owing the bank, or other legacy financial service provider whose processing your txs, steal your Bitcoin and give you IOUs to spend.... You know, all of the fun, and abusive practices that caused you to look for another means to tx monetary value.
If this sounds far-fetched, consider. Normally the witness data is locked up in an encrypted block of hashes. In order to malleate the witness data, you have to get the block ahead of the rest of the chain, decrypt it, change the witness data, and re-broadcast the changed block back out to the network and get it included instead of the "true" block. With the witness data stored outside of the block, (I don't think it is encrypted...not sure) you just have to be the only recipient of the block before it's included in the chain. If you were a company that was performing Lightning Network services, all of the txs only happen in your payment channel before you broadcast them to the blockchain. This would allow you a lot longer than 10 minutes to do whatever you wanted with your customers funds until whenever you decided to close your payment channels. Considering we can now do "Atomic Swaps", it's conceivable that the coins you are sold/paid/given won't actually be Bitcoin. You may give them Bitcoin, but they will be binding some other IOUcoin to the keys they issue you.

This is just incredibly incorrect. Besides the fact that you clearly do not understand how segwit and the lightning network works, segwit does not exist solely for the lightning network. Furthermore, there is no encryption in any of Bitcoin's protocols at all. There are no "IOUcoins". This answer reeks of conspiracy theory and completely lack of understanding of the topic at hand. I highly suggest that you actually read into how Segwit and the lightning network works before answering such questions.

No sir, I am simply thinking further down the road than you are. I do notice that you don't have any real counters though, you just call me crazy/ignorant. The blocks are in fact encrypted (SHA-256 remember?).

There are so many things wrong with this post that I don't have enough characters to explain why, but I will try. Firstly SHA256 is a hash function, not an encryption function. You cannot decrypt a SHA256 hash. Secondly, the witness data is not stored outside of the block. It is stored within a block as part of each transaction. It is stored in each transaction in a new structure within the transaction itself which is not relayed to non-segwit nodes. LN payment channels do not malleate witness data; they need segwit to avoid third party malleation (first party malleation is always possible).

No malleation is done in a payment channel. There is no "higher fees" or "arbitrarily renegotionte the terms of your agreement without consent". Besides the fact that there is no agreement, if there were, LN does not allow just one party to change the channel; both parties must consent to change anything in the channel. Regarding fees, LN and segwit reduce fees; Segwit by increasing the block size with the block weight redefinition and LN by moving many transactions off-chain. There are no "IOUs" or owing any money to anyone; the money in an LN channel exists and is not a debt to someone.

Malleation of witness data does not require "unlocking" a block (which are not encrypted) or "changing a block". Malleation occurs when a transaction is unconfirmed; and the malleated transaction is effectively a double spend that confuses many software. It also makes LN difficult to work. Segwit does not allow for malleation of a transaction when it is included in a block. It is protected by having the hash of all of the transactions in their entirety (so including witnesses) included in the coinbase transaction. The merkle root in the block header protects the txids.

When using LN for atomic swaps, you will receive Bitcoin (or whatever coin you wanted to receive). Each channel can only exist for one coin, and you will know exactly what coin it is because the channel must have been funded with that coin when the channel was created. When doing transactions in a payment channel, the funds still exist in that channel and do not leave, so it is impossible for a merchant to "do whatever you wanted with your customers funds".

As we can see from the above four comments, your post is incredibly incorrect. It is not "thinking further down the road than you are" but rather a gross misunderstanding and mischaracterization of the technologies involved. Just because I did not go through the effort to write this up the first time I commented does not mean that I am incorrect or do not know what I am doing. It is simply that there is so much wrong that sometimes it isn't worth it to break everything down. I guess this time is not one of those times.


text:
Can an altcoin be worth less than 1 satoshi (0.00000001 BTC)?
I have a friend who thinks that it's safe to invest in any altcoin that approaches 1 satoshi (0.00000001 BTC) in value, because there will always be someone who is willing to buy it at that price, and if BTC continues to rise in value, that means the altcoin can only ever go up in value.
Is this a reasonable position?

there will always be someone who is willing to buy it at that price.  There is no good reason to think so.

Can an altcoin be worth less than 1 satoshi (0.00000001 BTC)?

Yes

Is this a reasonable position?

No

Altcoin can be valued much lower than 1 satoshi. Sprouts is ranked 152 on Market Cap and 496 on 24 Hour Transaction. But its value is 8.027e-09 BTC as on 13th of September. It was valued higher and it dropped.
When you talk about value, you have to compare it to something. If you compare it to something that has a fixed value (i.e. Gold), the value of it would be determined by the market, which in turn would be determined by the policies around it (if it becomes a legal tender, the demand would increase). If you compare it with currency (take any currency which is not Gold linked), the value even if stays steady, would mostly go up as the currency itself is de-valuating (like the US dollars). You can never know the position as there is no thumb rule to know that.
Think of it as a penny stock investment. The thing can become big and give you multi-fold returns or go poof.


text:
API that gives owner of tx/address?
I'm trying to do some analysis of different entities on the bitcoin network. I'm looking for an API that I can input a transaction id or address into and it will tell me the exchange, miner, or other entity that it is most likely connected with.
Blockchain.info, for example, has tags that are visible when you search for an address, for example those associated with Mt. Gox. However, it doesn't seem like this is available through their API.
There are other sites out there like http://bitcoinwhoswho.com, but haven't found a simple API yet.
This must be out there somewhere. Can someone point me in the right direction?


text:
What is the method to determine the total market capitalization of the Bitcoin market?
When I look at the following site it says (at the time of writing) that the total market capitalization of Bitcoin is $125,927,574,809 AUD.
Now I think you could do this by running through the entire history of transactions on the blockchain, adding them all up, and multiplying by the current price. But there is probably a better way.
My question is: What is the method to determine the total market capitalization of the Bitcoin market?

"Bitcoin market cap(in AUD)" = "Number of bitcoins in circulation"   X   "Value of single bitcoin(in AUD)"
The same as a market cap of some company: "number of their shares" X "value of single share".
Market cap means what would be the money you get if you sell all the bitcoins at current price.
Number of bitcoins in circulation can be calculated by going through all blocks of the main blockchain and sum the bitcoin reward of each of them.

Great answer. Where do I get the number of coins in circulation?

I use this site for that kind of stuff: https://coinmarketcap.com/

Ok - I was looking for an implementation method

What do you mean by the implementation method?

I mean in terms of the BTC protocol and how the a software client and that site use it.

You can sum all the mined blocks from first one ever mined and multiply each one with the reward it gave. These are all the bitcoins that ever entered the circulation

Alternatively, and surprisingly, this is equal to the value of all unspent outputs currently on the blockchain. Because all unspent outputs show all the bitcoins in the circulation.

The sum of all unspent outputs will give you the actual amount of Bitcoin in circulation. This will be slightly less than what you calculate from mining because there are some coins that are irrevocably lost.

How can they be lost? (If keys are lost they are still on the chain as UTXOs ?)

Ok - can you please update your answer to include that?


text:
Are bitcoin transaction confirmation times limited by block size?
The following commentator writes:

When transactions are announced to the Bitcoin networks, they appear as part of a ‘block’. Bitcoin blocks are produced on average every 10 minutes. Bitcoin blocks have a maximum size, so if there is no room then your transaction will be delayed. If you are desperate to have your transaction included in a Bitcoin block promptly, you will have to increase the transaction fees that you pay to the Bitcoin network.

Now it seems if you had a flexible block size - this transaction confirmation time issue would be addressed.
My question is: Are bitcoin transaction confirmation times limited by block size?

https://en.bitcoin.it/wiki/Block_size_limit_controversy
Here it states that larger block size would allow more transactions per second.
If blocks have around constant mining rate (1 per 10 minutes) and fixed "amount" of transactions can fit in one block the statement logically follows. How are the size of one transaction and block size defined is a separate question.
The link also gives some context about the size limit.


text:
Is there a way to estimate the number of unfound nonces?
I've heard anecdotally that the ability to find nonces is much harder than it once was. This implied that there was a fixed number of nonces in the Bitcoin system, and a large number of them have been found.
My question is: Is there a way to estimate the number of unfound nonces?

This question is based on a false premise. Mining doesn't work like that - it isn't a matter of finding nonces in a finite pool that eventually gets used up.  See https://bitcoin.stackexchange.com/a/1291/5757 for a better explanation, and other questions tagged [tag:mining-theory].

Nonces are not 'found' or 'unfound'. A nonce is simply a little bit of data in the block header which can be changed by the miner to change the resulting hash of the block header (this is how mining works, they try lots of nonce values for their block to find one which has a hash less than some target). But because the difficulty of mining bitcoin is now so high, because there are so many powerful miners, the small nonce field can not be changed enough to find blocks any more, so miners have to change other data in the block too such as data in the coinbase transaction, or the timestamp. I believe that's what you heard.

Is the difficulty high because of the powerful miners? (Your sentence has a couple of 'because's' in it.

Yes, the difficulty keeps adjusting to ensure that blocks are found on average once every 10 minutes. So more powerful miners = harder difficulty to keep that time toughly constant


text:
How do I reverse an unconfirmed transaction to the original wallet
Is there an easy to understand step by step guide I can execute to create a double spend and get the unconfirmed transaction reversed back into the original wallet so I can resend it with a higher fee and get it delivered?

You can try sending the same amount but this time with a little more free than usual so that this transaction gets confirmed faster than the previous one.

I dont know how wallets work but he should make sure to reuse previously sent outputs, to invalidate older transaction.

Is there an easy to understand step by step guide

No. There is no easy to understand guide if you do not understand the underlying  processes.

I can execute to create a double spend and get the unconfirmed
  transaction reversed back into the original wallet

The transactions can not be "reversed back" and are not going "to/from the wallet".

so I can resend it with a higher fee and get it delivered?

The doublespending transaction is the transaction which uses the same input set, but has another outputs/fees. You do not need to do two steps (a) reverse original transaction (b) send another transaction with higher fees, because this is one step.
As far as I know, some wallets contain Replace-By-Fee features, but I use my own program. It is not "easy-to-understand", but it works

No, but if your concern only is to make the transaction to go through you can google for transaction priority services.
several miners offer services to pay extra fees to expediate transactions that would otherwise be stuck with too low fee.

you can not reverse sent transaction. It is in mem pool and waiting to be picked up.
you can send double spend transaction with higher fee to another nodes, if your first transaction is not picked by miners yet there is very very low chance your new transaction will be processed first as miners might pick with high fee.
Eventually only one tx will be processed.

No. That type of double-spend will produce a conflict and will get your node DoS banned assuming that you've already broadcasted an earlier transaction that spent the UTXOs.
Unfortunately, you will not be able to use RBF to doublespend.

downvoted. the answer is wrong

my answer is based on src/validation.cpp:653 in bitcoin-core, unless I misunderstood something. Double-spending an already spent output will cause a transaction to be included in setConflict, so the DoS score will be incremented for the node that relays the conflict tx.


text:
Is mining still profitable in october 2017
Hi guys this is isaaq from UAE.   I HAVE A QUESTION ABOUT MINING.     IS BITCOIN OR OTHER COIN STILL PROFITABLE TO MINE.     I WANT TO INVEST 100KUSD IN MINING.  I WANT TO PURCHASR ANTMINER S9.    PLZ CAN ANY ONE CALCULATE PROFIT JUST NEED RETURN CALCULATE.  AND BREAKEVEN DAYS.  OF MY 100KUSD.   WE MAKE OUR OWN ELECTRICITY.   MY ELECTRICITY COST IS ZERO.     SO IF I HAVE ZERO COST OF ELECTRICITY PLZ TELL ME HOW MUCH TIME IT WILL TAKE TO RETURN MY INVESTMENT AND ALSO TELL ME WHAT IS AVG DAILY INCOME
THANKS

There are a ton of good calculators out there on the web. Just search "bitcoin mining calculator" on Google and many will show up. Here is my favorite:
https://www.cryptocompare.com/mining/calculator/btc

Entirely depends.  Most efficient mining gear currently available is the Bitmain (who does offer volume discounts on larger orders btw) S9 running at 14.5 TH.  Electricity costs are by far going to be your most significant cost so depending on what your localities $/KW/Hour rates are.
Currently, where I live for example we pay about $0.096/KW/Hour so mining is still fairly profitable (assuming you can get the units in-hand in a timely fashion), and with Bitmain your basically always purchasing a pre-order.
You might want to consider also looking into diversifying your investment into more than just sha256 gear at this point so your not essentially putting all of your egg's in a single algorithmic basket ;)


text:
How to restore redeem script from a spent transaction?
What is the procedure to restore redeem script of P2SH address from a transaction sent from that address? The script is stored on the blockchain in the tx data, the question is how to extract it?

are you looking for automated process or you need to restore redeem scripts a couple of times? the second can be done with blockchain.info block-explorer

If the P2SH output is already redeemed, then the transaction that spent it must have provided the redeemscript with the scriptSig in the outpoint to that P2SH output.
The last push of data in the scriptSig contains the whole redeemscript (https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki#Specification).
E.g. for a multi-signature the scriptSig that spends the output will be of the form:
scriptSig: 0 [signature1] ... [signatureM] {M [pubkey1] ... [pubkeyN] N OP_CHECKMULTISIG}

Where everything inside {...} is a push of that redeemscript which you just have to extract.


text:
Bitcoin - not so democratic future?
Bitcoin's goal is a decentralized democratic value system.
But miners and platforms are already consolidating into bigger more powerful entities.
What's to stop it?
I feel a crypto will only be truly democratic when the holders are also the miners, and the markets.

Power to the holders is implemented by Proof of Stake.

"What's to stop it?  I feel...." is not a question; it is commentary, and not appropriate for a Q & A site.

This is not a question, it is commentary and seeking discussion which is inappropriate for a Q&A site. If there is a question here, please clarify.

Bitcoin's goal is a decentralized democratic value system.

It absolutely is not. A democracy is a system where the majority of participants can decide for everyone.
In Bitcoin, nobody can decide for you. A Bitcoin node will verify all blocks and transactions that others produce. It does not at any point what other participants in the network think or do, if they don't agree with the rules you enforce, they simply don't exist from your point of view. In other words, in Bitcoin, your choice of participation is choosing the rules the system has. If you disagree with those rules, you are effectively on a chain fork - which is essentially its own currency.
There is one exception to this everyone-validates-everything model, and that is double spending. If someone produces two conflicting transactions (which spend the same money) and broadcasts them on the network, the system somehow has to make a determination about which of the two is to be accepted. There is no objective rule that everyone can enforce here. You can state that the first one is to win, but unfortunately due to the finite speed of light, it is impossible for geographically distributed entities to jointly come to the same conclusion about who was first. To solve this problem, miners are introduced. Their only power is cooperating to building up versions of history, resulting in the ability to decide the ordering and timing of otherwise valid transactions, up to and including the power to delay transactions indefinitely.
For miners, hashpower majority matters. But this is not a democracy (it is not one miner one vote, it is one hash one vote), and they do not set the network rules through it. All they can do is either cooperate, or disrupt. The system is designed so that disruption is less profitable than cooperation.
Now, your main concern stands. Centralization of power in mining is a dangerous trend, as it gives small groups of actors a large power to disrupt.

Bitcoin's goal is a decentralized peer-to-peer payment network. Miners and early adopters serve(d) an important part in going from 0.001$ to 1000$, and having taken that (big) risk comes with a big reward.
Miners still have to answer to their users in the form of functioning full nodes dicating the protocol. They amass large sums of bitcoin for doing their verification, but are still kept in check by the end users. If they plan an attack by increasing the block size or raising the block reward, the rest of the network will reject their blocks and they will have hardforked themselves away from bitcoin.
Power to holder via Proof of Stake also has its downsides - most notably the fact that people with money get progressively more of it. It does not fix the inequality, it only moves it to people with big investments.


text:
Trezor; How is it true cold storage if their is a recovery seed?
I don't understand how a Trezor is considered cold storage if you can lose it, and then recover your keys through their recovery seed and another Trezor.
Where are the keys coming from?
Where are they being stored?

It is considered cold storage because the private keys are never exposed to an online device which can steal them.
The private keys are stored on the Trezor itself. They can never leave the Trezor, even when it is plugged into a computer. Thus they are never exposed to something which is connected to the internet that is able to steal the private keys.
The recovery seed is a BIP 39 mnemonic. This encodes a BIP 32 seed which is then used to generate all of your private keys. The Trezor actually only stores the BIP 32 seed and generates all other private keys when they are needed. Restoring a Trezor with the recovery seed (aka BIP 39 mnemonic) just tells Trezor what the BIP 32 seed should be.

I would say that the notion on hot / cold storage does not correlate 100% with the type of wallet (software / hardware / paper / memory / ...). I see cold as "secure, hard to use" and hot as "less secure, easier to use". The benefit of hardware wallets is that they remain relatively easy to use but provide much more security than software wallets. Say, a Trezor constantly plugged into your PC can be considered hot, whether a software wallet on an air-gapped PC in a physical safe is rather cold.


text:
Split coins in wallet using coins from coinbase.com
Tell me if this is a valid / secure idea to split my coins in my wallet after a hard fork without replay protection (e.g. segwit2x).
I have read the question here, but I want to clarify how to use it with my wallet (Electrum, but probably similar for other wallets). My plan is basically to use the "taint" method, using coinbase.com to provide the "tainted" coins.
I have some pre-fork bitcoin on coinbase.com, so after the fork I'll be entitled to some BTC and B2X. I also have some pre-fork bitcoin in my own wallet. My plan is this:

Send a small amount of B2X from coinbase.com to my wallet
In my wallet, select a server on the segwit2x branch. I should see the transaction from (1).
Create a new wallet
Send all coins, including the new tainted coin, to an address in my new wallet
Change to a server on the non-segwit2x branch. I should see that my balance is unspent.

Done.
Now my new wallet will contain only coins valid on B2X, because the transaction in (4) would not be valid on BTC. My old wallet will contain only coins valid on BTC, because they've already been spent on B2X.
coinbase.com claim their sends have replay protection: "You can safely send any BTC or B2X from Coinbase without worrying about replays on the other chain."
Does this imply that the coins I get in (1) can be used as a "taint"?
I could repeat the procedure, sending a small amount of BTC to my old wallet, and sending this plus all my coins to a new address in the same wallet, to make sure any transactions using them are not replayable on the B2X branch. Is this necessary, or are my BTC coins immune to replay by virtue of already having been spent? Even if a transaction I did on BTC could be replayed on B2X, I wouldn't care, because my value on B2X is now in a different address. I'd like to skip this step to avoid the transaction fee.
Now that I have a wallet for each chain, will they remember which chain they belong to? If I use automatic server selection, then if I get the wrong server my wallet will show a balance of 0. This is more of an annoyance than an actual danger, because I can always manually select the server. Just wondering.
As an alternative to (3) and (4), I might just send this transaction directly back to coinbase.com to exchange the B2X. Should this modified procedure also work as I intend?
I know there are other methods, but I have my reasons for not preferring them, such as fiddliness or utilizing features not supported by my wallet.

coinbase.com claim their sends have replay protection: "You can safely send any BTC or B2X from Coinbase without worrying about replays on the other chain."
  Does this imply that the coins I get in (1) can be used as a "taint"?

Yes, if a transaction only exists on one blockchain, it is by definition only valid on that blockchain, so any other transaction which spends from it is also only valid on that chain.

Is this necessary, or are my BTC coins immune to replay by virtue of already having been spent?

The latter, since your outputs have already been spent on the B2X chain, any replay of your BTC transaction would be rejected as a double-spend there, so you can safely just spend your BTC normally.

Now that I have a wallet for each chain, will they remember which chain they belong to?

I assume that would be the case, but I'm not familiar with the wallet so I can't answer this.
I'm unsure what you mean in your last point, send which transaction back to coinbase?

In my original scenario, I was talking about sending from one of my Electrum wallets to a new Electrum wallet. I could decide instead to send from my Electrum wallet directly to coinbase.com.

In that case yes, I believe that would work equally well, as long as the B2X transaction you send includes the taint your bitcoins will be safe.


text:
Will coinbase.com have replay protection for receives?
According to this, "Bitcoin Segwit2x does not have any built-in replay protection, but Coinbase has implemented our own replay protection system. You can safely send any BTC or B2X from Coinbase without worrying about replays on the other chain."
But will they have any replay protection for receives, as well as sends? I don't imagine they can do anything to prevent a transaction sent to them from being replayed on both chains, but at least they could detect the replay, and credit both currencies to your account.
I'll probably try to avoid this, but just wondering if I have some backup protection if I make a mistake.

It is impossible for the receiver of a transaction to prevent transaction replay of the transaction. They cannot do anything to that transaction to make it unreplayable.
However it is likely that Coinbase will credit both your Bitcoin and Segwit2x if a transaction is replayed. This is because they should be operating nodes for Bitcoin and nodes for Segwit2x which will inform their backend of the transactions occurring on each chain. Since a replayed transaction will be seen on both chains, both nodes will see it and thus their backend will credit your accounts.

Apparently SegWit2x has been suspended so there should be no need for replay protection concern in the immediate future about a hard fork.

This is now irrelevant because the SegWit2X fork has been called off!
What a day to be alive =).


text:
Did I lost my balance by using an old wallet.dat?
I saved a copy of my wallet.dat as a backup, i used it to transfer 1 btc to another address, now it's got 1 btc less in the total. now I deleted the wallet.dat and open the wallet with the saved wallet.dat before the transaction, I can see a higher balance(it not showing 1 btc off). how could it be? do I lost my whole balance from not saving the newest wallet.dat?

please be a bit more specific, so we can have an idea what software you are using, which wallet type, or an online wallet, and maybe a transaction ID or a "sent to" address. this would help to dig deeper...

Ack! You certainly could have.
When you send bitcoin, the "change" is returned to an address that you have not previously used to protect your privacy. If your wallet.dat files doesn't contain any unused addresses, a new one is generated and the corresponding private key stored back in the wallet.dat file. If this happened, and you didn't save the new file, you may not have the address the change from that transaction was returned to.
I believe that newer implementations of the bitcoin core wallet make this much less unlikely.

The important thing you should clarify is if the address to which you transfer your BTC belongs to the same wallet or another one.
A wallet is just a collection of addresses which have been created by the same Private Key/Seed. In case you created a new address from the same key (belonging in the same wallet) then You should see the BTC you sent in your balance (minus the transaction fee).
It is also possible that your transaction has not been processed yet.
Without additional information we are unable to help.

The adress do not belong to the same wallet.

You can use blockchain explorer to search for both your addresses, the source and destination one. That way you can verify that the balance in the destination address is the amount you sent minus the transaction fee.


text:
How to broadcast a Bitcoin Gold transaction
I'd like to broadcast a signed BTG transaction - In Bitcoin it's very easy to do with tools like coinb.in. Is there a public RPC/API endpoint similar to the following examples where you can broadcast a signed transaction:

coinb.in
chain.so
block.io

Bitcoin Gold is a fork of Bitcoin. You can just start up a Bitcoin Gold node and broadcast transactions using sendrawtransaction. Another option is to use an insight-api.
https://btgexplorer.com/ is a fork of the famous insight block explorer. You can use their API to broadcast your raw transaction using these docs:
https://github.com/bitpay/insight-api#transaction-broadcasting

Send a POST request to https://btgexplorer.com/api/tx/send with rawtx as a parameter.


text:
Is a 980 TI good for mining?
i have a Nvidia 980TI and i just wanted to know if it was worth bitcoin mining. the electricity company I'am with is utillia.
Thanks.

There's quite a time that neither CPU nor GPU are good for mining Bitcoin. Nowadays, you got to use ASIC equipments, electronic machines totally specialized in Bitcoin mining.
And from time to time, even the most advanced Bitcoin mining equipments become obsolete.
You should consider mining other cryptocoins, alternative to Bitcoin, also called altcoins. Ethereum, for instance, is still mineable. Other cryptocoins, like Feathercoin, have been conceived to never be mineable by an ASIC.


text:
51% attack clarification
Im just reading a book on the basics of blockchain and I encountered a confusion regarding the 51% attack. If I'm right, it says that an attacker holding 51% or more of the network's computing power can rewrite the blockchain to his own favor.
What confuses me is the following: Blocks in the mainchain can only be added sequentially, hence the growth speed of the blockchain is at most the speed of the fastest miner in the network. So if a attacker is faster than the fastest miner of the rest of the network can start at some lower block (maybe even the genesis block) and add his own blocks on a new branch one after the other. Since he is faster than the official main-chain, his branch will eventually be longer than the latter and consequently become the new main-chain.
So the attacker does not need 51% of the whole computing power, only more than any other node, which is usually much less than 51%. What is wrong here?

Yes, the attacker needs to be faster than the rest of the network combined.  Being faster than the second-fastest miner is not enough.
I think this is where you are mistaken:

Blocks in the mainchain can only be added sequentially, hence the growth speed of the blockchain is at most the speed of the fastest miner in the network

Yes, blocks are added sequentially, but I can't follow your logic as to why that means block growth only happens at the rate of the fastest miner.  If you are the fastest miner on the network, that in no way means that you are producing 100% of the blocks.  It means that you are producing the highest proportion of the total, which is still likely a minority.  Block growth still happens at a rate of the entire network collectively, regardless of who is fastest.
With that in mind, you can see why an attacker needs to produce blocks faster than the rest of the network combined.

The source of confusion is probably that the poster considers mining a block is a deterministic process that requires certain amount of sequential work, that cannot be paralelized. While in fact mining is a guessing process similar to the lottery where the person with 100 tickets is still unlikely to win the lottery comparing to 100000 tickets bought by the rest.

Oh yes, I guess I see my misunderstanding. That the time needed for mining a block has a probability distribution with non-vanishing deviation is essential here. Thx Jestin and croraf.

@Jestin [1/2] I am still not clear on the answer, probably because I don't understand the part "Block growth still happens at a rate of the entire network collectively".
How does the growth depend on the entire network collectively? The nodes are working separately to solve the puzzle. It's not like they are combining their powers to solve the puzzle.

@Jestin 2/2 "If you are the fastest miner on the network, that in no way means that you are producing 100% of the blocks"
If I were secretly mining on a sidechain, wouldn't this be true? And if I had the highest mining power in the network, I would eventually mine more blocks (in my sidechain) than the rest of the network working of the original chain?

@ShariqHasanKhan "It's not like they are combining their powers to solve the puzzle"  They absolutely are.  Because each node on the network is guessing, it multiples the number of guesses being made.  Since it's random who will get it, the more collective random guessing, the faster the problem is solved.


text:
How does a miner know which nonce to start with ?
Pretty straightforward question :
When a miner is trying to find a 18-leading-zeros hash, does it always start with a nonce at zero ? I suppose it doesn't, because other miners in the world may have found out that the first 1000 nonces won't give a sufficient hash.
My question is then, how does a miner knows which nonce to start with ?

The entire block header enters as input in the hashing process.
Along with nonce and some other fixed fields there is a "Merkle root" field in the block header that each miner has different.
So each miner can search the nonce range from 0 to the last - in order; because of different Merkle root each miner will have different block header hash for the same nonce and other fixed fields.
NOTE: Why each miner has different Merkle root? That's because in the transactions miners include in the block (from which Merkle root is derived) there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address.

Thanks for your answer. Could you elaborate the reason why the Merkle Root is different for each miner ? According to what I read, it is the root of all the transactions in the block, so why would it be different depending on the miner ?

Good reasoning. But from these transactions there is one special transaction called "coinbase transaction" that each miner has unique. Therefore the Merkle root is also unique. "Coinbase transaction" is included by the miner himself along with regular transactions and is the transaction that gives mining reward to miner's own address.

@croraf - could you add that to your answer?  Comments are transient and may be deleted.


text:
Why does this script return an error ?
I'm trying to understand how Script validates transactions.
I have taken this transaction as an example 55e5bbdba33050bbe6584e896b4a20575cf3fe3f29114467f17f67f6b172eb73
When showing the scripts, we can see as input
ScriptSig: PUSHDATA(72)[3045022100c70904b2925a6822fd3dc2d236bcba1fa1518fdfdadbda8f25a89a339879c82a02200bd7ca7d502d46ebc6fbc97f51af3d0ab4f290d73931ada9abb76fb1b6d3b55b01]
PUSHDATA(65)[043fd05d2490b2b8496da3b8498f1aee08634c43eef40aa58b66e36271632571d6dbda0ec7fb6fcec09409597e38e3b968648ed10ad6402647bb6143f0f9f09b3f]

And output :
DUP HASH160 PUSHDATA(20)[57d713220076f8298b54e9eea84d2e1dde62e4a1] EQUALVERIFY CHECKSIG

So, from what I understood, if these script bits are run one after another, the result should be true (please correct me if I'm already mistaken at that point).
I have used an online Script debugger but these bits did not return a success.
Has anyone an explanation on why I couldn't get this right ?

taking the pubkey hash from the previous tx (6fe066d1be6359dba98e7f00f3f45707e0bd07ad), I can see the stack pushes the sig (3045022100c70904b...), then the pubkey (043fd05d2490b2b...). On top goes "OP_DUP", and there are two pubkeys. Good. This duplicated pubkey is hashed (6fe066d1be6359...), and OP_EQUALVERIFY'd. Good, they are the same. The user "is allowed" to spend the funds... Then only sig and pubkey remain, and OP_CHECKSIG returns "NULL" - so a failed stack. I did the same with one of my "old" tx, and it failed as well... At a different step (OP_HASH160) - amybe contact the author...

when you choose the "empty" button, and provide only sig and pubkey, it verifies to "RESULT OK". But then again, change the keys or hashes (even giving a non-hex char), it still returns ok... there might be s.th. going wrong with the page, or I'm missing something terribly.

You are not supposed to be using the output scripts of the outputs created in the transaction but rather the output script of the output that is being spent. What you are using is the output script of the output in that transaction.
Rather you should click the output link next to the input and get the output script from the referenced output that the link takes you to.