Keeping valid shares for it's own when mining in a pool How does a mining pool insure that the miner who will find the valid share for the current block will not use it for his solo mining?

The address the block reward goes to is in the data that is being hashed. That address is the pool's. If a miner finds a hash that meets the block difficulty, changing the address to the miner's own will cause a different hash, and you don't have control over the distribution of the bits in that second hash. So you don't get a block if you change the address.

Going the other way is the same: if the miner mines using his or her own address, that miner will not be able to send shares to the pool to secure part of next block the pool finds.

A miner can withhold the winning share though, which is detrimental to the pool, but cannot pocket the reward.


How can I withdraw Litecoin from a paperwallet? How can I withdraw my Litecoin from a paperwallet?

I have tried to use blockchain.info but it seems like it is only bitcoin that I can withdraw with that.

I used the bitcoinpaperwallet.com webpage to make the wallet.

Thanks guys!

Both blockchain.info and bitcoinpaperwallet.com are for Bitcoin, you need a Litecoin wallet and then import your private key to that.

The most reliable way to have a Litecoin wallet is to download and run the official Litecoin Core client, although you can use web based wallets as well but as I have no experience using them I can only give you a search link.

With Litecoin Core you will have full ownership over your wallet and you will not be depending on the service availability of the website, but this also means you will need to backup your wallet as the wallet.dat will contain your coins.

Importing a private key in Litecoin Core is the same as with Bitcoin (based on this question):

click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab type: walletpassphrase "passphrase here" 600 (only if you set up a passphrase to protect your wallet earlier (you should!))
type importprivkey [private key here]

You will have to wait the synchronization to finish to see your balance.


Merging cryptocurrency wallets In my quest to learn about cryorocurrency, as fast as I possibly can, I have registered with about seven wallets, all with one goal, to deposit Bitcoin into one of them, I am yet to do this but I was thinking that maybe working with only one wallet would be easier, anyone, can you PLEASE help ?

You should find a wallet which gives you control of your keys (non custodial, not a ‘web wallet’ with an online login, etc). This will give you full responsibility over your coins, be sure that you safely store a backup (‘seed phrase’) so that you can recover your coins in case of loss.

If you created a wallet but did not use it to store coins, then do not give a second thought to just abandoning it. Do not attempt to ‘combine’ wallets either, this is counter to how they were designed to be used, and it could have very undesirable affects on your wallet security, etc. Just find some software you like and trust, and use it.

This site lists a number of wallet software options, you’ll need to do your own research to figure out which which one will suit your needs best.

This question is a great place for new users to get info: I am new to Bitcoin, how can I get started?


Is there any exchange website that directly converts to a specific currency once a cryptocurrent payment is received? I wonder if there is some exchange service that I can use for my webshop (Woocommerce) that directly when a customer pays in the webshop, convert the cryptocurrency money to a specific currency like USD or Euro.

What you're looking for is a payment gateway service, and if they take settlement in fiat such as USD or Euro.

It appears Coinpayments.net works on Woocommerce and allows you to withdraw in fiat pairs. You could also look into GloBee, BitPay, Paybear and Coinbase payments, and compare what they offer to see if they suite your needs.


How to send bitcoin to a multisig address I am trying to deposit bitcoin to bitmex, which only offers multisig wallets.

I have tried to send from both GDAX and Jaxx, but the addresses are reported as invalid.

Apologies for the basic question, but how do I send to a multi-sig address?

You send bitcoin to a multisig address in the same way as a normal address. Multisig addresses are just a type of P2SH address which start with a 3, and have been supported by every major wallet and exchange for years.

If your address doesn't start with a 3, it's probably not an address at all. (Unless it starts with bc1 which is a very new address format and not widely supported yet)


Active connections and sync-ing my wallet issues I have been trying to sync my wallet with the network for around 3 months, and it is still only at 45.29%. Any ideas?

I am using Bitcoin Core version v0.15.0.1 (64-bit). I have UPnP enabled, I am also port forwarding on 8333. The machine is a macbook pro running sierra 10.12.1. The wallet is on an external HDD.

I can not get more that 7 active connections to the network. Most of the time I only have 1.

I would have give up on this if I hadn't accidentally sent bitcoins that I have mined to this address already, before the sync completed. ( I had no idea I would have these problems, I have, in the past, sync'd with no problems, using the same machine, same internet provider).

Any ideas on how I retrieve my lost coin, or make the sync process possible? I've exhausted the few ideas I had.

Thanks.
Pete

I just synced Bitcoin Core from scratch in about three hours yesterday on my home computer. The active connection count is not likely to be the bottleneck, it's usually rather the Disk R/W or the verification work done on the CPU. External drives exacerbate the Disk R/W delay significantly. If you have a few GB on your main drive, you could try to run a pruned node on your main hard drive, that would at least mitigate some of the Disk R/W delays, especially if your drive is an SSD. Another thing that can speed the process up significantly is to give your Bitcoin Core more RAM.


Are lightweight LN wallets vulnerable to transaction withholding? As far as I know, LN requires the user to watch the blockchain in order to perform penalty in time. However, running full node is probably a heavy burden to some users, especially to mobile phones. I once heard that improved protocol for lightweight wallet (like Neutrino) can solve this problem, but I also heard that such lightweight wallet protocol still implies trusting the full node or server which provides service. Especially, a malicious full node can hide transactions from its clients, which seems to be a potential threat to lightweight LN wallets.

There is no substitute in terms of security and trust for running a full node.

There are different "lightweight client" concepts. Some of them are...

BIP37 (bloom filter):

[minus] With current used false-positive rates, peers may learn all wallet addresses
[minus] Usually done over an unencrypted channel (p2p 8333), ISPs, etc. learn also all your addresses
[plus] client can validate if the transaction(s) were in a block (merkleblock)
[plus] clients keep a blockchain with headers only can at least check PoW
[plus] uses only little bandwidth
[minus] Hiding back transactions are possible
[plus]"Impossible" to fake a transaction

Neutrino (Compact Block Filters BIP158):

[plus] fewer privacy implications then BIP37 since filtering happens locally
[minus] needs more resources (basic filters from the genesis block up to block 560000 require ~3.5GB space/bandwidth)
[minus] more bandwidth consumption because full blocks must be downloaded (rather then Merkle-"blocks" in BIP37)
[minus] Hiding back transactions are still possible (though more complicated) because the block filters are not committed to the blocks (would require a soft-fork). Not committed means, peers can fake filters and make you miss relevant transactions (can be [partially] mitigated by comparing filters from different peers)
[minus] No solution for mempool filtering (can't show "incoming transactions" reliable)
[plus] "Impossible" to fake a transaction

Centralized Validation (Bitpay, Samourai, etc.)

[minus] Full trust in the company/server (they know all your addresses)
[minus] Can hide back transactions
[minus] Can artificially create transactions
[plus] Minimal bandwidth consumption

Some application mix different approaches (like Electrum does Merkle-tree checks and keeps a headers-only-chain to mitigate the "can artificially create transactions" problem).

Conclusion

If you want to watch the blockchain without trusted third parties, you must run a full node (could be pruned though <10GB space requirement, but lightning implementations are not fully compatible yet).

If (and only if) BIP158 block filters get committed (though a soft fork, hash in blocks coinbase of similar), hiding transactions through peers, providing filters, would no longer be possible.

Recommended practical approach

Buy a tiny computer (Raspberry, Odroid, Pine64)
Buy a >500GB SSD (USB3 SSD, ~100USD in 2019)

NO,.. don't use your old HDD (your sync time will be 20 times slower).

Install Bitcoin Core (there are pre-build ARM64 binaries)
Run with a large -dbcache (if you have 2GB+ RAM)
Sync the chain
zzzZZZ (takes maybe a week)
enjoy being a real Bitcoiner (by avoiding all trusted third parties)


What would be a safe way to store large amounts of Bitcoin long term to ensure safety from loss? What would be a safe way to store large amounts of Bitcoin long term to ensure safety from loss?

Is it safe to use Bitaddress.org to generate private keys and use them to generate multi-sig address, writing private keys on a paper.
Then signing transactions from my multi-sig address on offline computer.

Is that the best way?

NO. Using an online source to generate private keys is incredibly unsafe for a variety of reasons. The best way would be to produce the private keys offline either with a Hardware Wallet or private keys generated from an air-gapped computer with a Bitcoin client installed on it that is capable of functioning as a wallet. Once the private key stores bitcoins, it is then advisable to export it to a paper wallet and removed securely from the computer. Then the paper wallet is left to you as an exercise to keep safe at all times.


If anyone can mine how does inflation not occur? If you can mine money whenever you want how does the price of every bitcoin not diminish?

The answer to your question can be found on the Bitcoin wiki.

It's true that everyone can mine, but the amount of coins that are up to be mined by miners is controlled by the Bitcoin protocol.

The difficulty of mining a "block" is adjusted automatically (every 2016 blocks or ~ 2 weeks). The adjustment is made by all miners using a transparent calculation. The adjustment aims to retain a rate of approximately 1 block mined every 10 minutes.

Additionally, every ~4 years (or 210000 blocks), the reward for finding a block is halved.

Taking this two things in account, the reward for mining a block will become zero after 6930000 blocks or ~136 years. (It becomes zero because the precision in which bitcoins can me measured is too low.)

You may think that people will stop mining when the reward becomes too low, but you have to keep in mind that miners also get the transaction fees from the transactions they verify in their blocks. Currently the accumulated fee is only a fraction of the total reward, but as the reward decreases (and Bitcoin raises in value), these fees will (hopefully) become a sufficient incentive to mine.


The cost of Exchanging $50k Walk me through buying 50k in BC using cash in Dallas and exchanging BC for cash in the SF bay area 3 days later. Specifically with attention  to costs and fees, and maintaining anonymity via in person transactions or whatever method is most relevant to maintaining anonymity.

If for cash means you want paper then it is possible only theoretically - you sell it in the same way as cucumbers or gas to the people that want to buy it. You just need to find them and it will be hard because if you don't want to do it online means you are afraid of something: fake banknotes, money laundering, etc.


How to validate the change address in a multisig transaction? I am using Specter Desktop to create a PSBT for a multisig transaction with some hardware wallets to sign. Part of the PSBT is a change address and I can match what the hardware wallet says to what Specter Desktop intends, but since I don't trust Specter Desktop 100% how can I validate that this change address derives from my multisig wallet?

I went and RTFM and found a sufficient answer: Using the proper change-address descriptor for the wallet, I called deriveaddresses and I see the corresponding change address returned from bitcoin core.


Could there be hyperinflation in Bitcoin? Currently the creation of new coins is fixed at a certain rate which halves every few years and will at some point in the future drop to zero. As I understand it, this is by consensus, i.e. all the nodes in the network agree on this protocol.

Suppose at some point in the future the Bitcoin community were to decide that the currency's deflationary bias wasn't such a good thing for the economy and that it would be better to start expanding the monetary base at a higher rate. What would it take for such a policy to take effect? Specifically, what percentage of the nodes in the network would have to vote in favor of the new expansionary policy?

And if indeed the network could vote itself into an expansionary policy, is it then also conceivable that it might vote itself into a hyperinflation, where the rate of expansion gets out of hand?

In short, what does it take to change the rate of expansion of the Bitcoin monetary base, and how easy or difficult is it to achieve as compared with the stroke of a central banker's pen?

PS: I can see a future where the top miners who own most of the computing power decide amongst themselves that they deserve more than their share of bitcoins after all and so they decide to institute the change, and I'm curious to know how the network would handle such an event.

As I understand it, this is by consensus, i.e. all the nodes in the network agree on this protocol.

No. The network doesn't vote to change itself. Read this: What can an attacker with 51% of hash power do?
Arguably, you could try to get a change to the bitcoin client implemented through astroturfing.

Here's how you'd increase monetary inflation.

Find this code:

int64 static GetBlockValue(int nHeight, int64 nFees)
{
    int64 nSubsidy = 50 * COIN;

    // Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
    nSubsidy >>= (nHeight / 210000);

    return nSubsidy + nFees;
}

Change 50 to, I dunno, 100.
Convince everybody else to do the same thing. Not just a majority - everybody.


What regulations are in place for Bitcoin in California? I'm looking for information on Bitcoin regulation for companies.

Since Bitcoin is commodity, if you are a company and selling bitcoins you need to have license.

What are the licenses and regulators working with them? I am interested in creating a company that sells bitcoins to consumers.

There's actually a lot going on in the California state legislature regarding virtual currency regulation, and you may soon need a specific license from them (although the bill in question---AB1326---still needs to pass). You can read a little more about it here from CoinCenter.

Until that particular bill passes, it's a bit of a gray area, but it would be prudent to consider the guidance from FinCEN released two years ago.


If I receive a LN payment from an anon sender... is there a way to send back to this individual? I see the preimage, hash, and payment request but all of those are transaction specific and unrepeatable. Any idea how it would be possible to send back the other way without knowing the individual?

No, there is no definitive way to detect the source of a payment on the Lightning Network.
However, there exists techniques (either active or passive, such as probing or some heuristics) which may be used to try to deanonymize parties involved in a payment.
So, while you can't reliably identify a party, you cannot assume it's totally anonymous either.


Which mobile apps support swiping/importing private keys via QR code? The bitcoin.org site that provides a list of wallet clients doesn't clearly show which allow for importing bitcoin via a QR paper wallet. Does anyone know a location to see which support such features, or know of ones that work on mobile phones that clearly support swiping?

These wallets do:

Bitcoin Wallet
Mycelium


Confused about UTXO management and consolidation I have a few questions regarding utxo management and consolidation. I know that the more UTXO's you have, the heavier your transaction will be, the more fees you'll have to pay.
The things I don't understand:

How can you effectively avoid that? Let's say I generate a new address every time I self-custody bitcoin, it won't solve the problem, does it? When I'll want to send either the max balance or let's say a rather large amount that needs a lot of utxo's to be complete, the full tx's will be heavy no matter what, correct? So using the same address for cold storage (i.e just a receiving address) or using a new one every time doesn't change a thing?
If a wallet has coin control, does it really matter to do utxo management?
Let's say I have a single address with 100 UTXO associated to it. I want to consolidate everything. I first generate a new address on my wallet, test that address by sending a small amount (from an exchange let's say). If everything seems correct, I can then use the send max feature of my wallet to that address (everything being under the same seed)? Even though it will effectively also send the utxo I just used for testing the validity of the address back to itself?

I think that's all my questions, thanks.

UTXO management is not a singular goal. instead, it's a method for balancing multiple priorities, including privacy, short-term fee savings and long-term fee savings.
Having lots of UTXOs is probably better for privacy, especially if they're each in different addresses. But like you said, that will cost more in fees if you want to send your entire balance.
On the other hand, having all your bitcoin in one UTXO is probably not best for privacy or security.
Coin Control is a feature of some wallets, that allows users to directly control their UTXO management strategy. Wallets that don't use coin control make those decisions for the user instead, so Coin Control is usually best for advanced users who know what UTXO management strategy they want.


Bitcoind stuck: Lock table is out of available lock entries My bitcoind daemon stopped updating the blockchain at block 258354.

db.log says:

Lock table is out of available lock entries
Lock table is out of available lock entries
etc...

Here is an excerpt from debug.log:

ERROR: ConnectInputs() : 5915fee0a9 mapTransactions prev not found 66283c57ab
ERROR: AcceptToMemoryPool() : ConnectInputs failed 5915fee0a9
storing orphan tx 5915fee0a9
received: inv (37 bytes)
got inventory: tx 09920def2c50d6b07081  new
askfor tx 09920def2c50d6b07081   0
sending getdata: tx 09920def2c50d6b07081
sending: getdata (37 bytes)
received: inv (37 bytes)
got inventory: tx 09920def2c50d6b07081  new
askfor tx 09920def2c50d6b07081   1379380242000000
received: inv (253 bytes)

Any ideas what I should do?

I just spent a week downloading the blockchain. Please not again.

Have you updated to the latest client in the 0.8.x series? At a wild guess, it sounds like you're on 0.7.x.


Do UTXO's ever get consolidated to avoid complexitity? In 'Mastering Bitcoin' (pg 130) it is explained that a transaction will require higher fees if it is complex. For example, if I collect bitcoin from 100 people to buy a single tent, then when those 100 UTXO's (unspent transaction outputs) addressed to me will need to be aggregated by the miners when validating my purchase of the tent. This aggregation needs more kilobytes and is more complex so requires a larger fee.

In the real world this would be like getting charged higher fees when paying with smaller coins. So do bitcoin transactions simply become more complex with time? What is there to consolidate UTXO'S and prevent them from being split down further and further making every transaction more complex in the long run?

Imagine if we could only get change, in the fiat world, but never consolidate it for larger notes. In the end we just all have pennies, right?

Where have I misunderstood?

When you pay someone using a number of utxo's to fund your payment, the output being created is a new single utxo with the total amount of all those input (minus change and fees).  Effectively, you are consolidating utxo's as inputs to fund your payment.

UTXO consolidation and breakage happens all the time by normal payments and doesn't usually require special intervention or handling by the user making the payment.


Is there a website that shows historic price data? I need to find what the Bitcoin-Mt. Gox USD price was at certain historic dates and times (exact timestamp).

Is there a website where I can input a specific historic date+time, and get the rate for that time?

I believe that Bitcoin Chart's API might do the trick ... but I'm asking about a website with a UX, not an API.

I think this should help:
http://bitcoincharts.com/charts/

Here you can view all the historical data:
http://bitcoincharts.com/charts/mtgoxUSD#tgSzm1g10zm2g25zv

And if you need any specific date you can hit "Custom time". :)

Hope this helps.


How does MimbleWimble avoid transaction graph leaks? Now, creating transactions in this manner supports OWAS already. To show this,
  suppose we have two transactions that have a surplus k1*G and k2*G, and the
  attached signatures with these. Then you can combine the lists of inputs and
  outputs of the two transactions, with both k1*G and k2*G to the mix, and
  voilá! is again a valid transaction. From the combination, it is impossible to
  say which outputs or inputs are from which original transaction.

Suppose that you observe these two transactions on the network, prior to them getting into a block. Can you separate them then? If you can get ahold of all of the transactions in a block before they get combined, can you produce a transaction graph like what we currently have, without amounts?

Yes -- although "without amounts or scripts" gives a clearer idea of what the transaction graph will look like: every output is a uniformly random curvepoint. This story is actually quite a bit better than Bitcoin where there are "addresses" which are often public and often reused.

In general, finding a p2p layer that hides the original, unmerged transactions, seems difficult. Initially I had thought it would be possible for "passive merging" where nodes would just aggregate all the transactions that they saw, taking in unmerged transactions and outputting merged ones. This appears to be very fragile: consider three nodes which each have a transaction, say A, B and C. The first node publishes A, then the second and third latch onto it simultaneously, outputting AB and AC respectively, and now only one of B or C can be confirmed. Observe that this happens even without any adversarial behaviour, and happens even if merging is only done by some special set of "masternodes".

The problem ultimately comes down to the fact that with OWAS, conflicting merges (transactions with intersecting input sets where neither is a subset of the other) look identical to conflicting
 transactions (double-spends). So "unifying" AB and AC to get ABC, which is the desired network behaviour, is just as hard as "unifying" a double-spend. Which, to be clear, is "doesn't even make sense" levels of difficult.

It may be possible to have a p2p layer that does interactive merging somehow, which in Mimblewimble could be made much simpler than Coinjoin in Bitcoin, so that transaction creators have control over what other transactions their transaction gets merged with on the wire. Miners would then drop the signatures or whatever was needed to enforce interaction at the p2p layer and just merge what they got. This might be sufficient to stop the creation of accidental conflicts, but you then have to worry about adversarial behaviour.

It would be possible for users to directly communicate transactions to miners; for a given transaction they'd give a different version to every miner so that nobody but the miner who created a
block would be able to tell what the original transactions in the block were. Absent collusion this would erase a lot of the transaction graph from any specific adversary's view, although it would enforce miner centralization which I find very undesirable.


What would happen if mining difficulty would be decreased to almost nothing? What would happen if Bitcoin mining difficulty would be reduced to nothing/very easy?
I can only think of the benefits such as exceptionally lower enery waste and much faster transaction processing.
The rewarded Bitcoins would, of course, be distributed at a much slower, reasonable pace.
Sure the bitcoin miners would lose a ton but in my personal opinion the mining industry shouldn't have grown to such extremes in the first place.

The mining difficulty adjusts according to a specific algorithm. The difficulty adjusts such that, regardless the hashrate, the average time between blocks is approximately 10 minutes. The difficulty also only adjusts when there are changes to hashrate. As miners go offline, it will adjust down to become easier to mine. As miners come online, it will adjust up to become harder.
So in this scenario, a lot of miners will have gone offline and the difficulty adjusted down. This has no effect on the rate that blocks are produced, so this has no effect on the issuance of Bitcoin nor the time it takes for transactions to become confirmed.
What it does have an effect on is the security of Bitcoin. The immutability of the blockchain comes from the fact that it is hard to rewrite the blockchain. It comes from the fact that in order to change blocks in the blockchain, the same amount of work must be done. With a lower difficulty, the amount of work done on each block is lower, so the amount of work required to change that block is lower. Thus with a lower difficulty, it becomes easier for an attacker to change the blockchain and perform 51% attacks.

In a scenario where someone can snap their fingers and magically cause the difficulty to change, the effects would of such a change would be extremely bad. It wouldn't magically cause hashrate to go offline, rather they would stay online at a lower difficulty. This would mean that blocks are found way faster which greatly increases the risk and likelihood of stale blocks. This would, in general, not be good for Bitcoin. Since the difficulty is magically lower, more people would probably start mining because it is easier for them to make money when the difficulty is low. Additionally, the difficulty would just eventually adjust back up to where it is.

It is important to keep in mind that the difficulty has an effect on miners, and that miners have an effect on difficulty. When the difficulty is low, more miners will come online because it is easier and thus more profitable to mine. As more miners come online, the difficulty will increase. Eventually, the difficulty will reach a point where miners go offline because it is now harder to mine so mining is less profitable. So then the difficulty will drop. This will form an equilibrium.


While Creating new CryptoCurrency should we create Smart Contract? I have confusion in my mind regarding create own cryptocurrency.

Questions:
1.) I have created my own cryptocurrency using bitcoin or litecoin fork. So, From where to generate my original balance on initial bases? Because currently, I have created my own currency wallet from litecoin fork then it displays 0.0 MIND balance. So, if I want to transfer 100000 MIND balance while creating new currency then What should I do?

2.) Using fork create new crypto, Should I create a Smart contract for ICO? If yes, then what is the purpose of creating smart contract?

3.) If I am using fork litecoin, Should I generate my own Mining pool for mining?

Please let me know about my confusion. It is very important for me to understand above question's answer.

From your question it sounds like you don't know what the difference between a smart contract and coin is.

First of all, smart contracts are ran by the Ethereum network. If you forked litecoin or bitcoin, it makes no sense on why you are talking about smart contracts.

Second, if you forked litecoin and created a new coin, you still need to mine it. This can be done either by compiling the GUI wallets, or coind in which you will need two peers to run so mining can start (I'd recommend purchasing a VPS). You cannot transfer funds you don't have. If you want to premine you will need to add some code in the block reward function to give a big reward to the first block.

Third, why would you need a pool for a coin that is not popular? The point of pool mining is because it is too hard for a single miner to find a block for themselves. Instead, they can work together and split the block reward to how much work each miner put in. So no, generating pool would not be a good idea unless the coin is popular.


Crypto-Trader.com Shut down. Did I loose all my Coins? The Exchange Crypto-Trader shut down sometime I believe in 2015. I was never notified by the shutdown. There are reports out there that they sent all their users an e-mail giving 48 hours to withdraw their coins however I never received shut e-mail and never withdrew. At this point is there anything I could do?

A similar type of event happened with Mt. Gox where users lost a total of 850 000 Bitcoins. Your Bitcoins are likely lost forever if the owner of the private keys does not agree to send them to you. However, you may be able to sue the exchange, but I am no legal advice. Take this as a lesson, to never keep a cryptocurrency on an exchange, it is very important to own your coins.


Selling Bitcoin for cash in my store I am small tech store owner and I was recently thinking about selling bitcoins for cash into my store. A lot of clients asked me if I could install a BTC ATM in my store.

But investing in an ATM machine isn't possible for me at the moment. So I wondered if I could possibly sell them for cash directly. The question is: is there any service out there that provides an API to buy bitcoins with my credit card and send them to the client's wallet directly ?

I could possibly create that API myself and send the Bitcoins from my wallet but that would mean that I'll have to invest in Bitcoin and could possibly be losing if the BTC price falls down.

Do the ATM companies actually own Bitcoins ? Or are they purchasing them when someone uses the device ?

So far as I know, most store owners just rent floor space to a company that operates the Bitcoin "ATM". The store owner gets fixed monthly rental income and doesn't have to get involved in Bitcoin transactions themselves.

You don't need to invest in the "ATM". Just rent some floor space with power. I would expect the ATM operator (not the store owner) to arrange for Internet connectivity, but that's probably just a business negotiation.

One way to find a local Bitcoin kiosk operator is to search the map at https://coinatmradar.com/ - the operator's name is shown at the top when you click on a kiosk location after zooming in to an individual kiosk location.

As Wikipedia notes:

"Bitcoin machines are not ATMs in the traditional sense". A better phrase might be "Bitcoin kiosk" or "Cryptocurrency kiosk" since they generally deal with one or two altcoins too.

"According to Coin ATM Radar, there are more than 800 Bitcoin ATMs in the United States as of 2017, with small shop owners earning a reported $300 a month for rental space." (my emphasis)


How can an online system detect coins sent to its offline (cold) wallet? Say, for security reasons, that a bitcoin business has an online wallet (aka hot wallet) with enough coins for day-to-day operations. The rest of the funds are in an offline wallet (aka cold wallet or cold storage).

How can the online servers detect when coins are sent to the offline wallet?

Can this be (easily?) done with bitcoind or is another bitcoin client needed?

Technical details may be interesting, but I think more important is how a merchant can achieve this sort of functionality.

Since version 0.10.0 bitcoind has support for watch-only addresses.

Here is the text from the release notes:

  Watch-only wallet support

  The wallet can now track transactions to and from wallets for which
  you know all addresses (or scripts), even without the private keys.

  This can be used to track payments without needing the private keys
  online on a possibly vulnerable system. In addition, it can help for
  (manual) construction of multisig transactions where you are only one
  of the signers.

  One new RPC, importaddress, is added which functions similarly to
  importprivkey, but instead takes an address or script (in
  hexadecimal) as argument.  After using it, outputs credited to this
  address or script are considered to be received, and transactions
  consuming these outputs will be considered to be sent.

  The following RPCs have optional support for watch-only: getbalance,
  listreceivedbyaddress, listreceivedbyaccount, listtransactions,
  listaccounts, listsinceblock, gettransaction. See the RPC
  documentation for those methods for more information.

  Compared to using getrawtransaction, this mechanism does not require
  -txindex, scales better, integrates better with the wallet, and is
  compatible with future block chain pruning functionality. It does mean
  that all relevant addresses need to added to the wallet before the
  payment, though.

Try bitcoin-cli help importaddress (and the help texts for the other relevant commands listed above) for the details.


Duplicate addresses in transaction possible? I am making a bitcoin laravel package.

I have a table with all transactions.
The txid and the address are unique together.
So it is possible to have only one column with the same txid and address.

Is it possible to send a bitcoin transaction with the same address twice?
Because when it is my table structure isn't right.

Sample transaction(address: amount):

1BoatSLRHtKNngkdXEeobR76b53LETtpyT: 0.01
1BoatSLRHtKNngkdXEeobR76b53LETtpyT: 0.04
1NsC7NJfkFgp9ppeJdD38PrY3Yy92o88cu: 0.06

Is this transaction possible?
Or would it be automatically this

1BoatSLRHtKNngkdXEeobR76b53LETtpyT: 0.05
1NsC7NJfkFgp9ppeJdD38PrY3Yy92o88cu: 0.06

A transaction can have several inputs come from a single address and can have several outputs go to the same address.

It is also possible that there are more inputs in that same address and that they're spent in a different transaction or that money is sent to addresses which have already been used (and may or may not still hold money).

You may also want to have a look at this when coming up with data structures: https://en.bitcoin.it/wiki/Transaction_Malleability


meaning of "full node" in Lightning Network? According to this answer: (Link to answer),

  "A 'full node' refers to a fully validating node on the
  Bitcoin network, meaning the node validates each block and transaction that happens on the network.

  A 'lightning node' refers to a node on the Lightning Network,
  which is a network that exists on top of the bitcoin network."

There is a list of Lightning Network mobile wallet applications here: (Link to list) in which there is a column as "Requires own full-node ?" such that in case of some wallet applications, it is answered by "Yes".

What does this requirement mean exactly?

The lightning node secures the channel funds in form of Bitcoin transactions.

When a lightning node negotiates an initial balance with another Lightning peer (channel opening), it needs to ensure a confirmed funding transaction, which is broadcast and confirmed in the Bitcoin blockchain. When the channel is closed, the closing transaction needs to be confirmed in Bitcoin.

The lightning network represents a network of payment channels between 2 peers respectively. The funds of each of these channels, however, are secured by signed Bitcoin transactions, and the only way to confirm that the channel has been opened (confirmation of funding tx) or closed (confirmation of closing tx) is to validate these in the Bitcoin strong chain.

Payment channels represent a transaction "layering" technique, by which transaction chains are not all confirmed in the Blockchain, except during the opening and closing of the channel lifetime. Throughout the lifetime of the channel, each peer must also remain vigilant to potential cheating of the counterparty. This cheating manifests itself as a confirmed transaction, only observable by the counterparty on the Bitcoin strong-chain.

The only way to validate the strong-chain, is by operating a full-validating node. That is why all lightning nodes require a trusted or local full-node. If a lightning wallet does not require a local full-node, it is using a trusted public one instead, or operates a SPV light client, which does not perform full-validation of the blockchain, but solely follows the chain with most PoW (a security trade-off for lower validation costs).


How do I know if the Bitcoin page has been hijacked With so many hackers hijacking websites these days, what do I look for to show me that I'm not on a hijacked page?

First, there isn't any one bitcoin site, but hijackers often try to setup phishing attacks on cryptocurrency sites to get you to enter information they can use to steal your coin (as happened with EtherDelta this week).

Generally speaking, look for the green lock icon in your browser. If it isn't there, don't open continue. Best to also check the actual certificate by clicking on that green lock to ensure the certificate is from a well known Certificate Authority. Also generally a good idea to watch the twitter account associated with the site. For example, in EtherDelta's case they started tweeting about the issue pretty quickly once they were aware. And if in doubt, don't open it and tweat to the twitter account associated with the site just to make sure all is well.

If you see a "self-signed" certificate Do not open the site!


Rewriting the entire blockchain: is it possible to spoof block timestamps of a privately mined chain? According to fork.lol and Pieter's bitcoin.sipa, it would currently take ~200 days for an attacker with 100% of the current hashpower to rewrite the entire btc blockchain. My question pertains to how an attack like this could actually play out:

Lets assume that 100% of the hashpower is in an attackers hands, and the btc chain has stopped progressing. The attacker points 100% of the hashpower towards mining on the genesis block, so they will generate the first 2016 blocks SUPER fast, and then the difficulty will increase by a factor of 4. This will continue until the difficulty reaches it's current levels, and after ~200 days the attacker's chain will have a higher cumulative difficulty, despite having a much lower block height.

But I don't think that is very interesting, the rest of the network will realize there is a problem well before 200 days have passed, and probably code up a solution of some sort to keep things running smoothly.

So how possible is a more covert attack? Could an attacker with a modest amount of hashpower mine a private chain, and spoof the timestamps to keep the difficulty lower than it should be? Thus allowing the creation of a 'replica' chain with a few txs changed for the attackers benefit?

This could be done while the honest chain is still operating, and the attacker would slowly catch up to the honest chain. The further along the attacker makes it, the more hash power they will need to dedicate to the attack to keep outrunning any honest miners. But if a modest amount of hashpower can privately rewrite a good chunk of the early history, it seems like the current 200 day window might actually be a slight overestimate.

Note: In this scenario, the total time to enact the attack would be longer than 200 days, but some of this time would be spent privately mining with a portion of hash power that 'won't be missed' by the network. So the rest of the network may only be able to notice that an attack is happening inside of the 200-day window.

I do not see this as a real threat, I'm more interested in understanding what is actually possible, particularly in regards to spoofing time stamps on a private chain to keep difficulty targets low.

Yes, an attacker could spoof the timestamps on the block and create a covert alternative history. However, this doesn't make much of a difference in this attack. The reason is that, if the attacker chooses to manipulate timestamps to increase the difficulty, then they will end up producing fewer, in count, high-difficulty blocks. On the other hand, if they choose to manipulate timestamps to lower the difficulty, then they will end up producing more, in count, low-difficulty blocks. In any case, the cumulative difficulty in the adversarial chain will be the same (both in expectation and, due to a Chernoff bound, with high probability, unless they increase difficulty tremendously).

I'm doubtful about your claim that the network will realize there's a problem. The attacker's chain will remain private until they have surpassed the current honest chain in cumulative difficulty. During covert mining, the honest parties are unaware that an attack is taking place (and the honest chain can continue growing, provided there is some non-majority honest power). The attack will only become visible when the attacker reveals the chain, when the honest parties will instantly switch to it. At that point, the attacker can perform a large double spending attack and walk away prior to the honest parties employing a patch.

One thing the attacker has to keep in mind is that the current blockchain is sometimes checkpointed, so if a client has a checkpoint, then the adversary can only reorg the chain up to that checkpoint. Furthermore, especially near the present, the block timestamps have to match the current time of the verifier computers, as this is checked by some clients, at least approximately. Other than that, this attack could work.


Why would someone rent hashing power? I have seen some people on the bitcointalk forum looking for hashing power to rent (here is one example) and usually they pay more to rent the rig than they would earn by selling the mined coins at market price.
It seems to me that they are losing money with the deal so why would someone want to do this? Are there other uses for the hashing power besides bitcoin generation?

The person hopes that the future ratio of how much money they can earn with a given hash power will be more favourable, so they enter a long-term contract.
The person wants to increase the hashrate of a mining pool they own, whether for test purposes or to attract more people with a high hashrate.
The person holds some other cryptocoins and wishes for their price to increase due to higher difficulty the extra hashing power would bring.
The person wants to mine coins, be they Bitcoins or otherwise instead of buying them at an exchange (one may not exist, or the person does not want to use it for some reason).
The person wants to do other activity that can use hashpower for. The person would need to make special arrangements with the owner of the rig, but it could be possible to use the hashpower for generating vanity addresses for example.
The person wants to launch a 51% attack on a smaller cryptocoin network.
To commit money laundering. Renting hashpower is not regulated under anti-money-laundering laws like the exchanges. On the other hand, the mined coins can't be traced back, so they can be sold at any exchange with ease.


How to search for TXs using only the PublicKey linked to those TXs? The quest is to define a method for searching TXs on the Bitcoin blockchain using only a PublicKey in HEX format - as opposed to searching TXs by popular terms like  wallet ID, txid, hash, etc.

I haven't found any such method. Does it exist?

Scenario:

Bob holds a compressed PublicKey of the form

02af31b067645ffe4eb534d609da80332e5c5747543fd97385e832c6fdf2d4b4bf

Hypothetically, Bob has no other info at his disposal and he wants to query the Blockchain to find all TXs associated with the above PublicKey.

If Bob succeeds, he finds this Transaction

Is this type of searching the blockchain possible?

In fact, the usual way to consult blockchains is using the public key (purportedly the public key of the searcher) as the result will be all the transactions in which the key is involved:
https://www.blockchain.com/btc/address/1EwpnNBdFJykwxp6X8v9AfZnup9bgmrLE1

I suppose you're puzzled about the way to convert the public key to the public address, as the latter is the one used in blockchain explorers (I don't know if there's some one that can use the public key as input) :

You can use online tools like this one: https://iancoleman.io/bitcoin-key-compression/
Or some code, for example using my very simple Python scripts bitcoin-in-tiny-pieces, in this case, as the prefix of the compressed pub key is 02 we know that y is even, and as y is not necessary in compressed form we can use 0x00 as y coordinate:

:

$ ./bitcoin-address-from-public-key.py af31b067645ffe4eb534d609da80332e5c5747543fd97385e832c6fdf2d4b4bf 00
pubkey = 04af31b067645ffe4eb534d609da80332e5c5747543fd97385e832c6fdf2d4b4bf00

Compressed public key:
key_hash =      98f7fbd15e7b30a4ed55aec7baae40729967ba67
checksum =      c199dbe6fc87793152351aaa25b4ce28e395225dd3abcb4606b159e1ac26b346
key_hash + checksum =   0098f7fbd15e7b30a4ed55aec7baae40729967ba67 c199dbe6
bitcoin address =       1EwpnNBdFJykwxp6X8v9AfZnup9bgmrLE1

In case you want to ask directly blockchain.info from command line it is possible to combine various scripts:

C:\> bitcoin-address-from-public-key af31b067645ffe4eb534d609da80332e5c5747543fd97385e832c6fdf2d4b4bf 00 | bitcoin-get-address-balance

address         = 1EwpnNBdFJykwxp6X8v9AfZnup9bgmrLE1
total_received  = 1.57390781 Bitcoin
final_balance   = 0 Bitcoin

In these examples I've modified two lines in bitcoin-address-from-public-key.py with COMPRESS_PUBKEY = 1 and VERBOSE = False.


How would multiple people send in one transaction? Is it possible to have multiple inputs, from different people?

How would this be set up?

Is it possible to have multiple inputs, from different people?

the bitcoin system doesn't know people - it is working with transactions, that move funds from address to address. Still the answer is "yes". You can create transactions, that spend funds from different addresses. To be more specific, we would talk about UTXO, but I think that goes beyond scope of the question, and the developers webpages have enough explanation (see reference below).
Exchanges create such transactions all the time, or also faucets. They (can) have multiple inputs, and multiple outputs as well.

  How would this be set up?

you would follow the specification :-)
A guided example is in  the Complex Raw Transaction section of the developer examples.


How can I get the transaction indexes involving a particular address If I want to work with a particular address, I need to know all the transaction indices/hashes that have inputs or outputs to/from that address. How can I find out those values assuming that I have the Bitcoin core installed and synced. Is there a command I can give that will return that information for a given address?

Bitcoin Core has no option to maintain an index of addresses, thus you cannot search by address or search for things related to an address.


Backup of a bitcoind wallet using the extended private masterkey only If I understand correctly, bitcoind makes use of a extended private masterkey in order to deterministically generate private/public keys for a wallet.

Using the dumpwallet command, I'm able to get access to this extended private masterkey.

My questions:

1) If I only backup that extended private masterkey, would I be able to recreate the wallet entirely in case my application crashes? Or do I really need to backup the wallet file itself? (Let's say I do not import addresses that were not generated by bitcoind itself.)

2) I heard that changing the passphrase of a wallet would change the extended private masterkey... Is that true?

3) If #2 is true, can I simply backup all generated extended private masterkeys (every time I change the passphrase) to be able to recreate the wallet entirely using those multiple extended private masterkeys? What would be the command to run to recreate the wallet from more than one extended private masterkeys?

1) If I only backup that extended private masterkey, would I be able to recreate the wallet entirely in case my application crashes? Or do I really need to backup the wallet file itself? (Let's say I do not import addresses that were not generated by bitcoind itself.)

No. Bitcoin Core does not allow your to create a wallet from the master private key. There is no way to import it into a newly created wallet or to create a new wallet with a master extended private key.

  2) I heard that changing the passphrase of a wallet would change the extended private masterkey... Is that true?

Only setting the password will change it. Subsequent password changes will not change any of the private keys in your wallet.

An important thing to note here is that Bitcoin Core does not use an extended private key. Rather it uses a HD seed (as defined in BIP 32). When keys are being generated, that seed is hashed to get the extended master private key, and from there the child keys are derived. That extended master private key is never stored in the wallet file itself.

Instead of backing up the master private key, you could instead backup the HD seed. This can also be found in the dumpwallet output and it will be listed as hdseed=1. It will look like a normal private key and be presented in Wallet Import Format.

Once you have the seed, you can create a new wallet and set it to use your backed up seed using the sethdseed command.


What will happen to my bitcoin if both Core and XT remain indefinitely? I have some bitcoin in wallets and online accounts in multiple places. What will happen to this bitcoin if both Core and XT remain indefinitely? Will I own twice as much bitcoin, just in two different currencies?

Ultimately I believe the chain with most work should be the valid one, suppressing all other chains. In fact if you use an SPV client, such as MultiBit, you don't even check the size of the block, because you only use the headers. So if that's the rule, your money will only ever be in one chain: the one where most computing power was used to generate it.

PoW is entirely democratic: people vote with their computing power and if more people decide they want different protocol rules, so be it. In fact I would go even further and say that this is much more democratic than a bunch of developers deciding what the Bitcoin protocol should be.


Is the "double geometric" payout method for pooled mining fair to part time miners? The "double geometric" payout method as used on the Ozco.in pool is supposed to be fair and prevent pool hopping, but is this method fair to miners that only mine for a few hours per day, as opposed to miners that mine 24/7?

Yes. If you mine at a given point in time, you do not know when a block will be found, and thus your reward for shares you submit is a random variable. DGM is constructed so that the average reward for a submitted share is always equal to what you would get from it in PPS (assuming equal fees). The total reward for all shares you submit is additive - so it follows that the average reward you get in DGM is equal to what you would get in PPS, no matter what is your mining pattern.

However, the reward you will get is random and has some variance, and the variance is greater if your mining is intermittent. The exact degree of this depends on the parameters used by the pool.

More background information about mining pool reward methods can be found in Analysis of Bitcoin Pooled Mining Reward Systems.


What does "prev_out" and "n" mean in blockchain.info's API data? When getting information about transactions with blockchain.info's API, every transaction contains exactly one "prev_out" object, and within that object "n" is always equal to either 0 or 1.

What do these things stand for/mean?

A transaction consists of a number of inputs and a number of outputs. Outputs define a script that need to be executed to be able to spend the coins in the output. Inputs provide data to enter into an output script to make it execute successfully and to spend the coins in it.

So, a transaction input must be able to reference the output it is willing to spend. Outputs in a transaction are ordered, so an output can be referred to by specifying the transaction ID of the transaction it has been defined in, and the index it has in the list of specified outputs in that transaction.

The prev_out field is the transaction hash (txid) and the n is the index of the output.

It's not true that every transaction contains exactly one prev_out value. However, many transactions do. This is because many transactions have only one input. You must know, though, that it is possible to have multiple inputs.


Since Bitcoin Core 0.14.0, how does a node with default settings compute the dust limit? In earlier releases of Bitcoin Core, the dust limit was defined as an output whose spending would require more than 1/3 of its value as fees:

https://bitcoin.stackexchange.com/a/41082/10845

The minimum fee was in turn defined by minRelayTxFee, a user-adjustable setting that defaulted at one point to 1 satoshis/byte.

The release notes for 0.14.0 have this to say about minRelayTxFee:

  Since the changes in 0.12 to automatically limit the size of the mempool and improve the performance of block creation in mining code it has not been important for relay nodes or miners to set -minrelaytxfee. With this release the following concepts that were tied to this option have been separated out:

  incremental relay fee used for calculating BIP 125 replacement and mempool limiting. (1000 satoshis/kB)
  calculation of threshold for a dust output. (effectively 3 * 1000 satoshis/kB)
  minimum fee rate of a package of transactions to be included in a block created by the mining code. If miners wish to set this minimum they can use the new -blockmintxfee option. (defaults to 1000 satoshis/kB)

  The -minrelaytxfee option continues to exist but is recommended to be left unset.

https://bitcoin.org/en/release/v0.14.0

Unfortunately, this statement doesn't clarify the question of how the dust limit is computed going forward. In particular, the statement "calculation of threshold for a dust output. (effectively 3 * 1000 satoshis/kB)" is confusing. It appears to mean that the dust limit is hard coded with a fee density of 1 satoshis/byte, yielding a minimum output value of 546 satoshis ((34 + 148) * 3, as per previous policy). But this doesn't make much sense given that the market fee density for next-block confirmation is routinely above 100 satoshis/byte, and changes daily.

Assume I'm running a 0.14.0 node with default settings. What's the effective dust limit for this node, and how is it calculated, given that I'm being instructed not to touch minRelayTxFee?

The dust limit in 0.14.0+ is set by a value called the dustRelayFee. This is separate from the minRelayTxFee although it has the same default value of 1 satoshi/byte. That is what is used to calculate dust now, and the dust calculation is still the same as before. So the default dust limit in 0.14.0+ is 546 satoshis. You can configure the value you set for the dustRelayFee by using the -dustrelayfee=<n> option.

In Bitcoin Core 0.15.0, this will change slightly. The calculation changes to be that the dust limit is the amount that we would pay to spend the output at the dustRelayFee. To keep the dust limit the same as before at 546 satoshis, the dustRelayFee is increased to 3 satoshis/byte.


Does the btc price depend on the reward? Hey guys if you answer this question that I am keeping from months ill be happy.

Does the actual bitcoin price depend on the mining profitability?
So is it more profitable mine when the price is high?
Is the same thing with other cryptos?
There is a bitcoin tab on github and I have heard that people can modify it, so why they modify it if they can't change the actual bitcoin code?

Does the actual bitcoin price depend on the mining profitability?

Strictly speaking Bitcoin doesn't have a price, it is a currency that has exchange rates with other currencies.

The exchange rate between BTC and, for example, USD seemingly depends on

market sentiment.
supply and demand.

Changes in production costs, for example due to the halving of the mining reward, have some influence on the exchange rate but not as much as, for example, the influence of government reactions to the Covid-19 pandemic.


How can I fund my node in regtest? I am fairly new to bitcoin and was attempting to setup a local test network in my machine. I am using the regtest network to create the local network. Is there a way in which I can initialize the nodes (using a genesis block or something) to hold bitcoins (without mining)?
I was going through the developer docs but I could not figure it out. Pardon me if it is a simple solution as I am fairly new to bitcoin.
Something like an initialfreecoins=10000000 in the elements/lightning network.

No, there does not such thing as initialfreecoins=10000000. However mining on regtest is not resource hungry and nearly instant. It's the only way to get coins.

To get coins on regtest you first need a address to mine those coins to. An address can be created with
 bitcoin-cli -regtest getnewaddress.

To mine and payout to this address use with <address> being the output of the first step and <nblock> the number of blocks you want to mine. A good number would be for example 101 to get 50 coins (because coins need 100 confirmations to be spendable).

bitcoin-cli -regtest generatetoaddress <nblocks> <address>

You can repeat generatetoaddress or set a higher value for <nblock> to get more coins.


Negative number of confirmations for a testnet transaction on blockexplorer I am curious about the test transaction f72f59a32c1bac47ec87bc3678ec44e98eece5e235d29d79cd1f5461ccc5bf38. Depending on which site I view this transaction, the number of confirmations is positive or negative:

On https://testnet.blockexplorer.com/tx/f72f59a32c1bac47ec87bc3678ec44e98eece5e235d29d79cd1f5461ccc5bf38 there are -1797 confirmations.

However on https://live.blockcypher.com/btc-testnet/tx/f72f59a32c1bac47ec87bc3678ec44e98eece5e235d29d79cd1f5461ccc5bf38 there are +1318 confirmations.

Moreover, one of the outputs appears to be spent on blockcypher but unspent on blockexplorer.

I have two questions:

Why is there such a difference in the number of confirmations?
Is there something wrong with this transaction?

If you look closely on blockexplorer.com, you will notice that the site does mention that the transaction was included in block #1484064. The blockexplorer seems to be confused about the height of the blockchaintip, or has some other general issues regarding the confirmation count. For example, it shows all of the transactions in the latest block to have -3562 confirmations:

The transaction in question has some 1300+ confirmations, so this seems to be squarely on blockexplorer.com.


Have a bunch of wallet.dat files. What alt-coins do they have (and may be how much)? A few years ago I mined a couple of alt-coins. Now I have approximately 5 wallets which are named in non-suggestive way: wallet_01.dat, wallet_02.dat, ..., wallet_05.dat. Each of them has reasonable amount of coins, also I have no idea how much exactly and what coin correspond to each wallet. Now I would like to restore some order by checking what do I have and how much.

Is there a way for me to figure this out? I do not remember exactly what these alt-coins are but have approximate ideas (probably can try to remember and select 30 potential candidates).

With this, I clearly can try each of the alt-coin client, wait for sync (may be do not even need this) and try to open each of the wallet. This will be very slow and because I am not 100% sure I will be lucky with my 30 crypto-coin guesses might take even longer.

So, is there a way to find a corresponding alt-coin for a wallet. Even maybe finding how much coins are in the wallet without downloading the client?

Just open each file and look for name"

the address will be after that.


Getmemorypool example? I'm currently trying to figure out how to properly use Getmemorypool for mining and I'm having some problems with it. Are there any examples provided somewhere on how to properly call that RPC with some data (for example showing a call with a block that ended up in the testnet block chain)?

Eloipool (developed by the Eligius mining pool)'s source code contains multiple examples of using getmemorypool. It also includes a proof-of-concept proxy for miners.


How to import BCH address into Exodus wallet? How do I link my Bitcoin private key to my new Exodus BCH wallet so that I can claim my BCH?!

Can't find anything on here. Can't find anything on the Exodus website. Can't find anything on Google or Youtube...

I've got my Bitcoin address private key, but I simply need to associate it with my Exodus BCH wallet somehow to claim my BCH.

I'm baffled there isn't any information out there on how to do this.

Thanks

Exodus co-founder here...

Take your Bitcoin private key, and move the funds via the Bitcoin Cash private key import/move. Note, this moves the Bitcoin Cash only from the private key into Exodus. Here's how this can be done: http://support.exodus.io/article/87-can-i-import-a-private-key

Note, you'll select Bitcoin Cash, unlike the article which shows Bitcoin.


Why does P2SH-P2WPKH use DER encoded signatures? If we simply assumed 32 bytes of r and s each, then signatures can be 64 bytes. Now they are on average 71 bytes in DER plus an additional byte to declare their size, effectively making them use 72 bytes of space. Similarly, if we assume public key is always compressed then we can simply keep 2 stack items of 64+32 bytes. I guess it is to do with the way OP_CheckSig is implemented.

Segregated Witness was already a large collection of changes that impacted several parts of Bitcoin (P2P, validation, fee estimation, sighashing, script execution, ...).

Many small improvements could easily have been added to the proposal (including the signature encoding, the superfluous stack pop in OP_CHECKMULTISIG, the signature algorithm, various script extensions, new sighash flags, ...). However, we wanted to avoid letting the scope grow too large, to avoid bikeshedding and review burden. Instead, a script versioning system was introduced that would make it possible to later pretty much enable adding in any other change as a softfork).

So the answer is that DER is still in use in P2WPKH simply because it was in use in P2PKH and it didn't change. However, I expect that future proposals will come soon enough to change it to pure 64-byte signatures.


Redeeming physical bitcoin and transfer from mini private key to my wallet How do I send bitcoin from physical bitcoin private key to my wallet address?

I can't seem to find an option to receive payment from a 30 byte mini private key and the only thing close is to get from a qt code which opens camera.

Import it into a Blockchain.info wallet.

Or use the python script from: http://en.bitcoin.it/wiki/Mini_private_key_format#Decoding


IsCanonicalPubKey method in Bitcoin Core source In my logs I see that I keep getting:

  ERROR: Non-canonical public key: compressed nor uncompressed

This error is thrown from inside the method:

  bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags)

I can't understand what this method is checking. I understand it's checking if the Public Key is Canonical but, I don't understand what that means.

Can you please explain?

bool IsCanonicalPubKey(const valtype &vchPubKey) {
    if (vchPubKey.size() < 33)
        return error("Non-canonical public key: too short");
    if (vchPubKey[0] == 0x04) {
        if (vchPubKey.size() != 65)
            return error("Non-canonical public key: invalid length for uncompressed key");
    } else if (vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03) {
        if (vchPubKey.size() != 33)
            return error("Non-canonical public key: invalid length for compressed key");
    } else {
        return error("Non-canonical public key: compressed nor uncompressed");
    }
    return true;
}

1) Public keys must be either 65 or 33 bytes long.
2a) 65 byte long public keys must start with one byte prefix 0x04
2b) 33 byte long public keys must start with one byte prefix 0x02 or
0x03
3) Any other byte sequences can not be treated as public key


Is mining difficulty leveling out (Spring 2015)? How does this affect the economics of Bitcoin? Bitcoin mining difficulty has been through some interesting ups and downs lately. (I've supplied snapshots below to give context for future readers)

Considering its long history of pretty much only going up for years, I'm wondering what people involved with mining should think about this.

Some base questions:

What is the primary cause? Are miners leaving as new ones come it, or are new ones no longer interested?
Why are miners leaving/not starting?
If it truly is leveling, or at least resuming a slight growth pattern, how does this affect Bitcoin price in general? What about during "events" such as halving of the block reward?
In principal, should Bitcoin value be related to difficulty in a predictable way, and is this leveling something that facilitates that or not?
Lastly, does a stable difficulty help encourage Bitcoin's use in anyway? In other words, if people aren't getting into mining but are getting into Bitcoin, do they generally consider difficulty as a factor in this decision?

I'm not necessarily asking that you answer all those questions. Instead, I'm trying to show that I am interested in how an extended period of leveled and stable difficulty, as we seem to be heading into (Spring 2015), affects the economics of Bitcoin mining and use.

Here's snapshots of that page (clickable):

It's pretty easy.
The first asics where based on 90's technology, current asics are almost cought up now to recent chip technology.

So the asic industry has camped 15 years of tech advancement into 2 years.
Every couple of months the new asics where more than twice as fast. That caused the rapid hash increase.

Now that they are caught up with current tech we will go back to 10% efficienty increase per year again. Like in the gpu days. Back then the difficulty raised very slowely because gpu's also had a 10% efficienty increase per year on avarage.
When gpu's came to the scene you saw the same rapid growth that flattned again when everybody had switched to gpu's. The only reason it was just a short period is because retail gpu's where allready in line with the chiptechnology of the time.

Now that asic efficienty improvements are in line with the industry the only way to increase hashpower is to have more machines instead of ever faster machines.

All that you are seeing is growth in hashes per watt flattning out, and with it difficulty growth flattning.


Anti-Virus Software Found Trojan from Electrum? I downloaded electrum wallet 3.3.2 recently and installed it. But my anti-virus software detected a trojan from my wallet file. This has happened many times previously.

Why do anti-virus softwares always report trojan in Bitcoin wallets?

Many antivirus software mark Bitcoin wallets as being malware because they look for wallet files. When an antivirus sees a particular software looking for a wallet file, it may flag that software as a virus. This is because coin stealing malware and your Bitcoin wallet software both do very similar things. Both will look for a wallet file, open the file, read the private keys, and send Bitcoin. The only difference is that a coin stealing malware will either send the Bitcoin automatically to the attacker's address but your wallet software will let you choose who to send your Bitcoin to and only when you want it to do that.

Coin stealing malware may also look for your wallet file and send that to the attacker.

So because coin stealing malware and wallet software behave similarly (especially with the looking for wallet files part), many antivirus software will mistakenly flag a wallet software as being a virus.


How Many Bitcoins Are Missing? Recently my HDD went, losing all of my data. I make backups frequently and luckily only lost 0.02BTC. I tried everything to recover them, but no luck. As I stated it was small amount that wasn't a much for me to pull my hair out. Just bang my head against the wall. And miss out on a day of coffee.

But this got me thinking. Is there a way to find out how many bitcoins in the world are missing?

I'm guessing that about 6000 transactions after all of the bitcoins have been mined, someone may be able to develop some sort of spider, bot or scrapper of some sort that will index the blockchain and make an educated guess by looking at the transactions.

And if that is so wouldn't it be possible to also determine the Bitcoins that are missing and remake or counterfeit the missing bitcoins?

I know Bitcoin uses SHA encryption. But with good computing power, the knowledge of none being made again. Couldn't something like rainbow tables be created to forge the missing bitcoins?

One cannot distinguish between saved and lost coins, because it is only possible to prove ownership of a private key, but impossible to prove that a private key is lost. I.e. nobody can tell the difference between whether I just haven't moved my coins for five years or I lost the key.

Coins cannot be counterfeited.

Coins can only be spend by having access to the private key. Rediscovering a private key, though, is extremely unlikely and due to the amount of computation required most likely not profitable.


What is the threat model of a Bitcoin HSM / Hardware Wallet? There are many devices available which purport to allow for the secure storage of Bitcoin in adversarial environments, such as compromised computers or potentially untrusted host devices such as phones.

How secure are these devices for storing Bitcoin, and what is the threat model that they protect against and are vulnerable to? How much do commonly stated practices about using these devices improve the safety of storing Bitcoin using them?

what is the threat model that they protect against and are vulnerable to?

Hardware Wallets are security appliances with varying hardware and features, but the overall concept is largely identical. A trusted device holds cryptographic keys, allows for viewing of information on a dedicated display, and accepts secure input through its own interface (buttons or a touch screen).

In the Hardware Wallet security model, a user interacts with their untrusted host device to construct a transaction paying an amount to an address, the transaction is then send to the hardware wallet for assembly of the transaction including the cryptographic signatures. The user is expected to verify the information shown (namely the amount), and acknowledge the transaction on their device. Each transaction needs explicit acknowledgement on the hardware device, and the host is unable to make transactions without that approval.

This is distinct to the traditional software wallet model where a user interacts with an untrusted host, which on the entering of the encryption key for the wallet, can make any arbitrary transaction of any amount to any destination.

  How much do commonly stated practices about using these devices improve the safety of storing Bitcoin using them?

Many of the pieces of safety advice given about the usage of Hardware Wallets provide very little additional security, or provide just the illusion of security in lieu of actually effective measures.

An often repeated security measure is checking that the address on your hardware wallet matches the one you attempted to send to using the companion application on the host computer. This is completely meaningless, as the destination address is provided by the untrusted host. The address not matching would be an indicator of absolutely nothing at all other than severe software failure on the part of the device.

  How secure are these devices for storing Bitcoin

The ultimate security of the device comes down to trust in the manufacturer, as it is extremely easy for mistakes in software to allow for complete theft or loss of funds, and for invisible backdoors to be inserted. History has shown that many of the devices available are plagued with severe code quality concerns, have poor choices in the construction of their hardware security, and can otherwise be an unsafe choice to store funds.

Backdoors

Backdoors in Bitcoin transactions, specifically due to some features of EDCSA, are trivial to produce and are extremely difficult to detect especially if sporadically deployed. ECDSA signatures contain a number which is generated from a supposedly random source, however if this number is crafted to contain values of a third party, it can deniably leak the secret private key or other information along with being valid. Modern software implementations of ECDSA use [deterministic generation][5] for the secret nonce value, but this is not verifiable without using the private key for validation.

Code Quality

All devices today have shown severe issues with their open source implementations of ECDSA cryptography, or simply have their implementation completely closed source to evade analysis.

The Bitcoin Trezor originally shipped with a ECDSA implementation that based on a python library transliterated into c. This code was comically slow and exposed a [very large timing sidechannel attack][6]. Being physically close to the device while it was signing a transaction exposed enough information through the execution time to expose private key material. The Trezor has otherwise had a considerable number of bootloader, timing analysis, power analysis, and hardware vulnerabilities.
The Ledger Nano has a amateur hour mistake in its bootloader which allows for complete bypass of the security on at least the main processor which is handling user input and communication. For most microcontrollers the layout of the memory has repeating sections and multiple positions at which pieces of data can be accessed, the bootloader was simply unaware of this and allowed for arbitrary changes to the security sensitive code.
The CoinKite series of hardware uses micro-ecc, an abandoned "ECDSA for arduino" which contains absolutely no tests and is vulnerable to at least one timing attack.

Using a hardware wallet for storing Bitcoin is not a bulletproof choice, it's a considered set of security trade offs that requires thoughtfulness and understanding of the threats and weaknesses of the devices.


Help needed with upgrading bitcoin ABC I'm running my own bitcoin cash node. However, I'm getting stuck on the block where the network hard forked for the May 15th 32mb blocksize update. I believe the version of bitcoin abc I have installed is out of date, hence why it is stuck at block 530361. Here is the version with getinfo:

{
  "version": 160200,
  "protocolversion": 70015,
}

Is my node out of date? How can I upgrade my bitcoin abc node?

I tried:

sudo apt-get update
sudo apt-get upgrade

but nothing changes in the version or protocol version with getinfo. What should I do?

Yes, you need to upgrade.  You have version 0.16.2, and the 32MB block support was added in 0.17.0.  The latest release version is 0.17.2.

Your apt-get commands will only work if you originally installed bitcoin-abc from the apt package repository.  It sounds like you didn't.

You can check if you installed from a package at all with dpkg -l bitcoinabc.  If so then you can remove the package with dpkg -r bitcoinabc.  Otherwise you can figure out where the bitcoin-abc binaries are installed (using which or similar) and delete them manually.  Then install a new copy from scratch, either from the above-linked repository or any other way you choose.  (But this time make a note of what you did!)


How does one work out hashrate based on number of submitted shares We are running a pool and are trying to get a total hashrate estimate.  How can we figure out how many hashes are being submitted to the pool based on the shares submitted?

A share has more often than not the maximum Target value (as in Difficulty 1). To create a share one needs on average 2^32 tries, or hashes. Multiply the number of submitted shares by 2^32, divide over the period those shares were submitted in and you have your hashrate estimate.


Is it legal to start a Litecoin mining pool in the US? My question is this: Given all the regulations in the USA, is it legal for me to start my own litecoin mining pool here in the US?

There is nothing illegal in the process of mining litecoins or bitcoins.

As far as cryptocurrnecies concern, you should be worried about "money transmition" and "money laundering". If you do not hold other people's coins you are not breaking any laws.


Find message attached to Bitcoin transaction? Given a txid, can I find out the message/comment the transaction was attached with by the sender?

Transactions do not have comments attached to them. Any comments are local to a person's wallet only. They are not broadcast to the network nor are they actually attached to a transaction. So you cannot find the message or comment that a person assigned to a transaction in their wallet.


What's the magic key version bytes for BIP49 I'm implementing BIP49-compatible key derivation for bitcoin-s, but I'm having a hard time finding the magic version bytes to use for the extended keys.

I've been looking at BIP49, but can't find anything there.

Also, is there multiple schemes for deriving P2WPKH-nested-in-P2SH? I've been looking at the Samourai fork of BitcoinJ, Trezor's implementation and the test vectors in BIP49, and I can't get the vectors to pass by using the magic version bytes from Trezor/Samourai.

Maybe I'm confused by which magic bytes from Samourai corresponds to mainnet/testnet P2WPKH-nested-in-P2SH, so any clarification is appreciated here. From my understanding, the mainnet version bytes are 0x049D7CB2 (pub) and 0x049D7878 (priv) and testnet are 0x044a5262 (pub) and 0x044a4e28 (priv).

As a final thing, any pointers to test vectors for BIP49 and BIP84 is appreciated. Currently I've come across the BIPs themselves, as well as SLIP132.

I'm implementing BIP49-compatible key derivation for bitcoin-s, but I'm having a hard time finding the magic version bytes to use for the extended keys.

It's prefixes are: YPUB = 0x049D7CB2 and YPRV = 0x049D7878

  Is there multiple schemes for deriving P2WPKH-nested-in-P2SH?

You are confusing the two. 77429938 that you have linked in Trezor is used to derive ypub. If you scroll down on Samourai code you will see 0x049D7CB2 for ypub which is same as 77429938 in decimal. xpub stands for extended public key and allows you to generate addresses and scan all the funds associated with them, but not spend them. ypub is exactly like an xpub, except the 'Y' denotes with certainty that this particular extended public key belongs to a wallet that is also following the BIP49 bitcoin standard. This instructs the wallet to definitely scan for P2SH(P2WPKH) addresses. There is also zpub, and that instructs the wallet to only scan for bech32 addresses that starts with bc.


Implementation languages of popular exchanges What programming languages are some of the popular BTC exchanges implemented in? E.g. MtGox, BTC-E, Coinbase, etc. MtGox is releasing their new Midas trading engine, and there does not seem to be much information available online.

MtGox - Website is PHP, I don't know what their trading engine uses
Coinbase - Ruby on Rails
BTC-e - ???
mcxNOW - C++
Vircurex - Ruby on Rails


Simulator bitcoin miner I was checking this C++ mining project to start with Bitcoin mining and understand better how mining works.

This is the project: https://github.com/gavinandresen/bitcoin_miningsim

But now i want to experiment with one real situation to verify what will happen. What more do I need to implement? I need to include the connection to my pool and then let the miners work to send the different blocks that they are mining?

I am little lost so if someone can tell me if this a good example for learning or know others that can help me.

The code you are linking to is for simulating network-like effects of various mining technologies and policies. It does not actually mine, and will not teach you about mining itself.

You may look up projects like cgminer of bfgminer for actual mining software.


Why was 'extern' used in the noui.h file? When I review the Bitcoin Core source code, I see the noui.h as a header file, but the method noui_connect has been declared with the keyword extern. I think there is no need to do this.

extern void noui_connect();

extern before function prototypes does not have any effect. If it were a variable, it’d be needed to specify that the variable was declared somewhere else.

void noui_connect();

void noui_connect() {/*something*/}

^^^The compiler can easily find which is the prototype and which is the implementation of the same function. However,

// main.h
int a;
// main.c
#include "main.h"
int a = 5;
// util.c
#include "main.h"

^^^The compiler might create two symbols. One in main.c, one in util.c. To prevent creation of another variable, the extern keyword is used to leave the variable to the linker, the final step at compiling.

On the contrary, the function prototypes, not the implementations are put in header files, which are always left to the linker. Because that's the way function prototypes are designed, they don't need extern.

If you see extern before function prototypes, that's pure coding style, probably to be consistent with other extern variables.


Unconfirmed/Pending Blockchain.info Transactions Returned to Wallet On 10-26-17, I sent $425 from my blockchain.info wallet to my Coinbase wallet.  As of 10-28-17, the transaction is still pending.  If the transaction is never confirmed, will the $425 reappear in my blockchain.info wallet?

The transaction was finally confirmed 56 hours after I initiated it.  I assumed the transaction would be rejected, and the funds would revert back to my BlockChain wallet, but they found their way to my Coinbase wallet.

Interestingly, there was no record of the transaction on Coinbase.  After 24 hours, the network had no record of the transaction.  Anyone viewing my Coinbase wallet would have no idea how the funds arrived in the wallet.  All's well that ends well!


Help get specific address private key I want to know if someone can help me with this situation:
Two years ago I changed the password of my Bitcoin-Core wallet and forgot it.

I sent my wallet.dat to some person, who claimed that will crack it down and return my coins with some fee.

In the wallet there were only 2 addresses, and after some time the coins dissapeared, but only from one of them. I saw in the blockchain that they were "mixed" or split, in a way not to be traced.

Here is the address they went to: https://www.blockchain.com/btc/address/1PFygtEEhi4spjHJ3DHEBvgVpNp8oBY4A2

Coins from the other address are still in the wallet, and I found my password for the core wallet, but I don't know how to use it for that specific address with the coins left.

There are 1.3 BTC inside / still 8.30 stolen / but it will be a little relief for me if I can get them.

I have my original wallet.dat file also - so if anyone can help me, I will be very grateful.

It isn't clear why your "helper" would have missed 1.3 BTC at a separate address in the same Bitcoin-core wallet. Did you use the "Account" feature that was recently removed from Bitcoin-core?

I would do the following

Prepare a new empty wallet using your choice of hardware wallets or software wallets (1). Make a careful note of the seed-phrase/recovery-phrase or private-keys. Practice restoring this wallet from only that noted secret information.

Download and install the latest Bitcoin-core onto a clean PC and reinstate the old wallet.dat file into it (2), then use the newly found password to open it

Let it synchronise (may take days or weeks)

Immediately any money is visible, transfer any money into the other wallet.

If no money is visible, try to find out the status, in the wallet, of the address you say holds 1.3 BTC. Note that the command line interface(3) may be helpful in listing addresses the wallet is keeping track of.

References

https://bitcoin.org/en/choose-your-wallet
Import wallet.dat into a new Bitcoin-Qt client
https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list


How do I write a script such that my funds are locked in a 2-of-2 multisig that converts into a 1-of-2 multisig after 365 days? I would like my Bitcoin to have the extra security that a 2-of-2 multisig provides. With a single sig I am worried that if a single key gets hacked I will lose my funds. However, with a 2-of-2 multisig I am worried that if I lose either key my funds will be trapped.
How do I write a script such that my funds are locked in a 2-of-2 multisig which converts into a 1-of-2 multisig after 365 days? This way I get the best of both worlds. I have greater security for 365 days and then if I lose one of my keys I can still access my funds after 365 days.

To construct the script you could use Pieter Wuille's Miniscript site.
If you go to the Policy to Miniscript compiler section there is an example in Policy for a 2-of-2 multisig that turns into a 1-of-2 multisig after 90 days.
and(pk(key_user),or(99@pk(key_service),older(12960)))

You would need to adjust it for your desired example. A Policy that fits your needs would be:
and(pk(key_1),or(99@pk(key_2),older(52560)))

Once you have the Policy you can copy and paste this into the Policy to Miniscript compiler section and get the Miniscript equivalent of this Policy. The Miniscript output is:
and_v(v:pk(key_1),or_d(pk(key_2),older(52560)))

Further down you can copy and paste this Miniscript in, press Analyze and you will get the size of the resulting Script (78 bytes) as well as the actual Script:
<key_1> OP_CHECKSIGVERIFY <key_2> OP_CHECKSIG OP_IFDUP OP_NOTIF
    <50cd00> OP_CHECKSEQUENCEVERIFY
OP_ENDIF

It is worth noting that this example assumes you are more concerned with losing one particular key (key_2 in this example) and you assume will still have access to key 1. If you are just as likely to lose either key (key_1 or key_2) you would want a different script.
I recommend you try this on testnet or Signet first where coins aren't worth anything. Alternatively with a small amount of funds on mainnet that you can afford to lose. You don't want to be losing all your funds due to a mistake or a misunderstanding.


How come the block reward keeps only getting halved but there is an upper limit for bitcoins in existance? The maximum number of bitcoins that can exist is 21 million. New bitcoins are made by confirming that transactions happened. Every 4 years the amount of bitcoins people get when they solve a block is halved. When you keep on halving something you never get zero, so someone will always get paid some amount of bitcoins, but the max number of bitcoins that can exist is 21 million. So how is the total number of bitcoins not going to go over 21 million?

This is more a math question, but basically, the sum is a geometric series:

https://en.wikipedia.org/wiki/Geometric_series

1/2 + 1/4 + 1/8 + 1/16 + ... = 1

That's basically what's happening here except with 21 million instead of 1.


Who decides what the next, correct Nonce is? As I understand finding the correct Nonce is the basis when hashing transactions for Proof of Work.

How and where is this decided in the ecosystem what the next Nonce is?

In my limited understanding this part needs to be centralized somehow, that every node is searching for the same, correct one. At the same time this might be an important security aspect.

Each node is searching for a different set of Nonces, actually.
This is because each node collects randomly a bunch of transactions that will form a block. So each block that the nodes are mining is different. On top of that, there are many Nonces that could make a correct form of hash.

The only thing here that matters is:

all the data inside the block seem to be correct (correct inputs, with correct and confirmed transactions, with their correct associated hashes, etc.).
Nonce + Block gives you a hash smaller than a predetermined number (known by all the nodes).


Private key to WIF compressed: which one is correct? This is how we can find the WIF from a private key:

private_key = '000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f'
decoded_private_key = bitcoin.decode_privkey(private_key, 'hex')
wif = bitcoin.encode_privkey(decoded_private_key, 'wif')
# 5HpHgWkLaovGWySEFpng1XQ6pdG1TzNWR7SrETvfTRVdKHNXZh8

But how to get the WIF compressed?

Should I do:

private_key = '000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f'
compressed_private_key = private_key + '01'
wifcomp1 = bitcoin.encode_privkey(bitcoin.decode_privkey(private_key, 'hex'), \
             'wif_compressed')
# KwDidQJHSE67VJ6MWRvbBKAxhD3F48DvqRT6JRqrjd7MHLBjGF7V

or

wifcomp2 = bitcoin.encode_privkey(bitcoin.decode_privkey(compressed_private_key, 'hex'), \
            'wif_compressed')
# KwFfpDsaF7yxCELuyrH9gP5XL7TAt5b9HPWC1xCQbmrxfFzfMakg

It seems that #1 is correct and not #2.

Also it seems that:

the non-compressed WIF, imported in Electrum, produces finally a non-compressed Base58 address,
the compressed WIF, imported in Electrum, produces finally a compressed Base58 address

which seems obvious. But I'd like to be sure that compression of WIF and compression of addresses at the end is really linked.

Can we conclude that the use of a compressed or non-compressed WIF (both encoding the same private key) will determine, when importing them in Electrum, if the public-key (and thus the address eventually) will finally be compressed or non-compressed?

It seems that #1 is correct and not #2.

Yes, #1 is correct. The encoder will add the 01 flag byte to the end of the private key for you. By doing that manually in #2, you will result in the private key having an additional byte which is incorrect.


Why is Bitcoin address encoded in base58? Why does bitcoin address encoding use base58 instead of, for instance, base64? I don't see it is useful in any way.

Why base-58 instead of standard base-64 encoding?

Don't want 0OIl characters that look the same in some fonts and
 could be used to create visually identical looking account numbers.
A string with non-alphanumeric characters is not as easily accepted as an account number.
E-mail usually won't line-break if there's no punctuation to break at.
Double-clicking selects the whole number as one word if it's all alphanumeric.

Features of Base58Check

An arbitrarily sized payload
A  set of 58 alphanumeric symbols consisting of easily distinguished uppercase and lowercase letters (0OIl are not used)
One byte of version/application information. Bitcoin addresses use 0x00 for this byte (future ones may use 0x05).
Four bytes (32 bits) of SHA256-based error checking code. This code can be used to automatically detect and possibly correct typographical errors.
An extra step for preservation of leading zeroes in the data


Bitcoin Cash Wallet Recovery I just realized that I have an old Electrum wallet with a small amount of Bitcoin. I'd like to claim the Bitcoin Cash, but I'm having a hard time figuring out how to do this. I do have the original wallet password & seed phrase. I've also transferred the associated Bitcoin to a new address.

According to the Electrum site, I shouldn't install Electrum Cash on the same computer as Electrum. Unfortunately I don't have another computer to work with. I do have an iPhone & a Trezor, but I haven't figured out how to sweep my Electrum address into one of those devices.

What are my options for recovering the Bitcoin Cash without installing Electrum Cash?

Easy steps :
1.  Start up Electrum where your Bitcoin is.
2.  Save the Wallet Private Key somewhere safe.
3.  Move your Bitcoin to your Trezor or Ledger (you really should have a hardware cold wallet).
4.  Now install ElectronCash from electroncash.org (it's fine on same PC)
5.  Start up ElectronCash & login with SAME password as your Electrum.
6.  You'll see the Bitcoin Cash sitting there.
7.  Transfer Bitcoin Cash into Ledger or Trezor (using the Beta Trezor Wallet here : https://beta-wallet.trezor.io/)
8.  You're all set.

Cheers!


Understanding basic Bitcoin Transactions: the scriptPubKey.addresses array I used to think the addresses array into the scriptPubKey (vout) is populated starting from the script, but examining old-fashion multisig transactions, I discovered something made my assumption wrong:

Given this three vouts:

{
    "value" : 0.01000000,
    "n" : 0,
    "scriptPubKey" : {
        "asm" : "1 04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG",
        "hex" : "514104cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4410461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af52ae",
        "reqSigs" : 1,
        "type" : "multisig",
        "addresses" : [
            "1AJbsFZ64EpEfS5UAjAfcUG8pH8Jn3rn1F",
            "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq"
        ]
    }
}

{
    "value" : 0.00000002,
    "n" : 0,
    "scriptPubKey" : {
        "asm" : "1 0351efb6e91a31221652105d032a2508275f374cea63939ad72f1b1e02f477da78 00f2b7816db49d55d24df7bdffdbc1e203b424e8cd39f5651ab938e5e4a193569e 2 OP_CHECKMULTISIG",
        "hex" : "51210351efb6e91a31221652105d032a2508275f374cea63939ad72f1b1e02f477da782100f2b7816db49d55d24df7bdffdbc1e203b424e8cd39f5651ab938e5e4a193569e52ae",
        "reqSigs" : 1,
        "type" : "multisig",
        "addresses" : [
            "1NdB761LmTmrJixxp93nz7pEiCx5cKPW44"
        ]
    }
}

which comes respectively from transactions:

60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1
274f8be3b7b9b1a220285f5f71f61e2691dd04df9d69bb02a8b3b85f91fb1857

I have noticed that they share the same script:

OP1 OPDATA OPDATA OP2 OP_CHECKMULTISIG

but with different results.

In the first one transaction you can see two addresses in the addresses array, in the second one you can see only an address.

Also, given this one:

{
    "value" : 0.00000001,
    "n" : 22,
    "scriptPubKey" : {
        "asm" : "1 6565292c66696c653d7379732e737464657272290a0a69662046616c73653a0a202020207072696e742870726f78792e73656e647261777472616e73616374696f 6e287369676e65645f74785b27686578275d29290a656c73653a0a202020207072696e74287369676e65645f7478290a0000000000000000000000000000000000 2 OP_CHECKMULTISIG",
        "hex" : "51416565292c66696c653d7379732e737464657272290a0a69662046616c73653a0a202020207072696e742870726f78792e73656e647261777472616e73616374696f416e287369676e65645f74785b27686578275d29290a656c73653a0a202020207072696e74287369676e65645f7478290a000000000000000000000000000000000052ae",
        "type" : "multisig"
    }
}

which comes from transaction 4b72a223007eab8a951d43edc171befeabc7b5dca4213770c88e09ba5b936e17

No reqsigs nor addresses comes in the parsed transaction.

So, I think I am a little confused on how addresses array is populated.

tx: 60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1

OP_1
04cc71eb[...cut...]0d348ac4 // this is pubkey of 1AJbsFZ64EpEfS5UAjAfcUG8pH8Jn3rn1F
0461cbdc[...cut...]c15342af // this is pubkey of 1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq
OP_2
OP_CHECKMULTISIG

to spend this transaction one should sign it with one-of-two privkeys

tx: 274f8be3b7b9b1a220285f5f71f61e2691dd04df9d69bb02a8b3b85f91fb1857

OP_1
0351efb6[...cut...]77da78 // this is public key of 1NdB761LmTmrJixxp93nz7pEiCx5cKPW44
00f2b781[...cut...]93569e // this is not a public key!
OP_2
OP_CHECKMULTISIG

tx: 4b72a223007eab8a951d43edc171befeabc7b5dca4213770c88e09ba5b936e17

You can read about this transaction here:
http://www.righto.com/2014/02/ascii-bernanke-wikileaks-photographs.html [16]


Startum protocol extranonce2 - where the extraNonce2 comes from I'm curious where the extraNonce2 comes from in stratum protocol?
In the official documentation, I found

Extranonce2_size - Represents expected length of extranonce2 which will be generated by the miner.

Could you clarify this sentence and give more details?

Extranonce2 is generated by the miner performing the work. When a miner runs out of nonces in the block header, they can increment Extranonce2 in the coinbase transaction to be able to give themselves a much larger search space for a valid PoW for the difficulty that they are mining at.

The pool has to provide the size of Extranonce2 because Extranonce2 is not an actual field in the coinbase but rather part of the variable length arbitrary data that a miner can include in the coinbase transaction. So the pool specifies the size so that the miner knows how much space they have to work with for Extranonce2.


When I have a problem running the bitcoin client, where can I go to get help? Let's assume that either a bug report exists already, or the problem is unlikely to be caused by a bug.

What I know so far is:

This site will be appropriate for some support questions, and the mechanism for the site encourages peer review of each answer. Here's an example of a support question.
The bitcointalk forums have a technical support category that is likely to give a good response as there are lots of active users.

Where else might I get timely support? (paid or unpaid)

I think you have mentioned them all:

bitcointalk,

bitcoin.stackexchange,

github issues page,

bitcoin-dev.

For commercial companies offering bitcoin client support see Stephen Gornick's answer.