Effects of mining pools paying for stale shares/work Some mining pools pay for stale shares / proofs of work, and others don't.

If a pool pays for stale shares, how does it affect individual miners? What about the pool?

Related: What are stale shares and what can I do to avoid them?

Stale shares have no chance of being a valid block credited to the pool, thus submitting one contributes nothing to the pool. The default behavior, then, should be not to pay for invalid shares. (A comparison with matching the difficulty target is illustrative. A miner has no influence on how many of his shares match the target, and hence it is fair to be rewarded for failed shares; however, he does have an influence on how many of his shares are stale, as these can be a result of latency on his end.)

If a pool decides to pay for stale shares anyway, this must come at the expense of someone else (as the total average reward of a pool with a given number of non-stale shares is fixed). The identity of "someone else" depends on the reward method of the pool.

Methods like PPLNS do not absorb any variance, and the operator can never lose or gain any money (beyond a fixed fee); 100% of any block reward is distributed among miners. If stale shares are counted for the purpose of dispersing rewards, it means the non-stale shares are rewarded less on average. If all miners have the same stale rate, this has no effect whatsoever on their average reward; there's the same total reward to go around, so what they gain in rewards for stale shares they lose in rewards for non-stale shares. If different miners have different stale rates, this benefits miners with many stales at the expense of miners with few, removing any incentive for the miners to minimize their stale rate.

Some methods absorb variance, the most extreme case being PPS; any statistical deviations manifest as a profit or loss for the operator. If the pool offers payment for stale shares, it comes out of the pocket of the operator. If the stale rate is assumed fixed, this amounts to an effective fee slightly below the nominal fee (e.g. if the nominal fee is 3% but the pool pays for 0.5% of stales, the effective fee is ~2.5%). If the stale rate is not fixed, then the pool becomes more attractive for high-stale miners, and relieves them of the need to worry about their stale rate. This is detrimental to economic efficiency, but can be easier psychologically. To maintain a profitable business, the operator will need to carefully balance his nominal fee with the stale rate of his target audience.


Why does the time interval for OP_CSV need to be in the nSequence field when it is already in the script? BIP68 prescribes how to put the time interval into the nSequence field but then BIP112 tells you that it is possible to specify it in the script with a notation like "30d".
Why are there two ways of doing the same thing? Are they both necessary, or is only one of the two necessary in the verification phase?

They do not serve the same function.
Putting a relative locktime in the nSequence value means "this transaction cannot be mined until its input is at least that old".
Putting a relative locktime with OP_CSV in the script means "Require that the transaction spending this sets an nSequence of at least this value".
The reason why they are split up is to make transaction validation independent of time. If the value passed to OP_CSV would be compared against the time directly, and it failed, there would be no way to distinguish whether the transaction is just outright invalid or it's due to a temporary locktime/nsequence constraint.
In other words: splitting them up allows us to see the spending transaction, verify it once, and know for certain that it's valid. We never need to evaluate it again, as this validity never changes; if it is valid once, it is valid always. The question of when it can be mined remains independent of this, and can easily be checked by just looking at the nSequence value and comparing it with the blockchain's time.


Why is a 20 byte hash acceptable in p2wpkh but p2wsh needs 32 bytes? Why is it acceptable to use a  20 byte hash to represent single-sig witness programs whereas a 32 byte hash is used for pay to witness script hash?

As per this post by Gregory Maxwell, HASH160 provides enough security for the trivial case of public key hash based addresses, whereas script hash addresses can benefit from the additional protection against collisions provided by a longer hash.

The rest of the thread covers more details of the benefits of moving to sha256.


Bitcoin Address generation The bitcoin wiki  says this:

How to create Bitcoin Address

0 - Having a private ECDSA key

18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725

1 - Take the corresponding public key generated with it

0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6

2 - Perform SHA-256 hashing on the public key

600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408

but when I run a sha256 on

0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6

I don't get

600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408

What I get is

32511e82d56dcea68eb774094e25bab0f8bdd9bc1eca1ceeda38c7a43aceddce

what am I doing wrong?

echo -n  "0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"
| sha256sum

Gives: 32511e82d56dcea68eb774094e25bab0f8bdd9bc1eca1ceeda38c7a43aceddce

echo "0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6"
| xxd -r -p /proc/self/fd/0 | sha256sum

Gives: 600ffe422b4e00731a59557a5cca46cc183944191006324a447bdb2d98d4b408

Conclusion: You hashed an ASCII representation of the public key in hexadecimal rather than the public key itself.


clustering addresses, what's the most effective way? The Fistful of Bitcoins paper by Meiklejohn et al has some nice heuristics. i.e.

HEURISTIC 1. If two (or more) addresses are inputs to the same transaction, they are controlled by the same user; i.e., for any transaction t, all pk ∈ inputs(t) are controlled by the same user.

HEURISTIC 2. The one-time change address is controlled by
the same user as the input addresses; i.e., for any transaction t, the
controller of inputs(t) also controls the one-time change address
pk ∈ outputs(t) (if such an address exists).

Are there any others that are particularly effective?

Is it possible to bootstrap my clustering, for instance, maybe if some people have already associated a certain cluster with Kraken or Satoshi Dice, is this information available?

Are there any others that are particularly effective?

Yes, if you know what wallet was used and if its transactions have distinguishing features. For example, multisig wallets usually use p2sh change, but the recipient rarely uses p2sh, which allows to determine the correct change output with high probability.

Data-Driven De-Anonymization in Bitcoin introduces two new general heuristics:

CONSUMER HEURISTIC. Consumer wallets only create transactions with two outputs. Therefore, if an output is spent by a transaction with 3 outputs it is not change.

OPTIMAL CHANGE HEURISTIC. The assumption is that wallet software does not spend outputs unnecessarily. Therefore the change value is smaller than any of the spent outputs.
Because if the change was larger than one output then this output would be left out and the change would be reduced by the output’s value.

The thesis also evaluates the effectiveness of the heuristics using data captured from Android Bitcoin Wallet with the Bloom filter address leak in late 2014.
It turns out that Multi-Input heuristic is by far the most effective: if applied to one address, in total 68.59% used addresses of the wallet are revealed.

By the way, the Heuristic 2 you mention was first described by Androulaki et al. in Evaluating User Privacy In Bitcoin.

  Is it possible to bootstrap my clustering, for instance, maybe if some people have already associated a certain cluster with Kraken or Satoshi Dice, is this information available?

Blockchain.info has a database of tags (https://blockchain.info/tags).


How does the blockchain work, explained in layman terms? I did a lot of intensive research on how the Blockchain actually works. I understand the machinery but it's really difficult to explain this to a layman. Could someone provide the simplest of explanation that can be comprehended by any person,  whether or not he/she is a tech enthusiast.

The purpose of the blockchain is to create agreement about the ownership of balances.

The problem is that if everybody was creating their own records of transactions they witness, the various records would be in different orders and any conflicting transactions would cause a split in what is considered true. At any point of time it would be very unlikely for any two sets of records to match completely.

Traditional money services solve this by having a trusted entity as the arbitrator and sole source of truth.

Bitcoin solves this differently: Each participant collects all transactions they hear about and repeatedly proposes these packaged as a set of updates. We call these sets of balance updates blocks. Instead of having a sole source of truth, the network holds a lottery to designate one of these blocks as the commonly accepted new status quo of the balances. As each block refers to the previous commonly accepted network state and by its acceptance creates a new commonly accepted network state, the blocks create the eponymic chain of commonly accepted states.

The resulting blockchain contains the record of every transaction ever performed on the Bitcoin network. It also allows any new participant to audit the accuracy of the present status quo of the network. Upon joining, they rebuild the set of balances by applying each block in the right order, and will finally arrive in agreement with the rest of the network.


Would the existance of other cryptocurrencies negatively effect Bitcoins? Would the existence of other cryptocurrencies negatively effect Bitcoins? It seems that other forms of cryptocurrencies would be competition to Bitcoins. Alternately, would it be like having other currency units like real money where the English pound and US dollar do not compete?

It depends a lot on the circumstances. If the use cases overlap significantly, then the currencies can compete. That could negatively affect Bitcoins. However, if the use cases don't overlap significantly, then the currencies likely won't compete. That could even positively affect Bitcoins.

Crypto-currencies aren't fighting over shares of a fixed-sized pie. Crypto-currencies are cooperating to enlarge the pie and bring their benefits to a much, much broader population.

In my opinion, near clones like Litecoin do affect Bitcoin negatively because they don't attract a new population and they do reduce the chances that Bitcoin will attain critical mass. However, I must stress that one shouldn't assume that anything that's bad for Bitcoin is bad for mankind. It's always possible a new crypto-currency will come along that's much better for humanity than Bitcoin is, and the weaker Bitcoin is at the time, possibly the better for that currency. Of course, on the flip side, the more Bitcoin has paved the way, perhaps the better for that currency.


How to get the bitcoin balance of a public key in C#? How can I get the bitcoin balance of a public key in C#?

E.g. for this public key: 1FqLoEpbQpMxow5bqEPpFbPVnBEbFcsg3J

How can I get its balance in C#?

If you are ok with a third party service check out the Blockchain API.

They have a C# library and it's fairly easy to use.

If you need only the balance of an address you can use the code below as described on their BlockExplorer page:

 // calculate the balanace of an address by fetching a list of all its unspent outputs
 var outs = blockExplorer.GetUnspentOutputs("1EjmmDULiZT2GCbJSeXRbjbJVvAPYkSDBw");
 long totalUnspentValue = outs.Sum(x => x.Value);


How to run bcoin on testnet? In the documentation you can specify a network param, but the default main network name isn't the same as bitcoind (livenet). What is the name of testnet on bcoin?

EDIT: When going by the documentation and adding network: testnet to bcoin.conf, I get the error

AssertionError [ERR_ASSERTION]: Unknown network.
at Function.create (/usr/local/lib/node_modules/bcoin/lib/protocol/network.js:161:3)
at Function.get (/usr/local/lib/node_modules/bcoin/lib/protocol/network.js:207:20)
at FullNode.Node (/usr/local/lib/node_modules/bcoin/lib/node/node.js:43:26)
at new FullNode (/usr/local/lib/node_modules/bcoin/lib/node/fullnode.js:46:8)
at Object.<anonymous> (/usr/local/lib/node_modules/bcoin/bin/node:12:8)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)

My bcoin.conf file is

network: testnet
prefix: ~/.bcoin
prune: true
http-port: 8332
api-key: ******
uri: http://localhost

As stated by the configuration page, you set

network: testnet

In your bcoin.conf file.


How a transaction is permanently accepted by the blockchain? If a miner A creates a block containing a transaction A and a miner B creates a block NOT containing the transaction A about at the same time, then some of the other miners will first receive the block of the miner A and the others will receive the block of the miner B. (Fork)

If the chain of the miner B grows faster than the chain of the miner A, then the transaction A will never be accepted (like it never happened). So, how the user A who created the transaction A can be sure that the transaction A was accepted/verified by the blockchain?

Also, is there a possibility that the transaction A is verified by the blockchain at some point and then in the future another subchain (from a previous fork) not containing the transaction A will grow faster, thus rejecting transaction A ?

Are there any time checkpoints created that all the miners should agree upon ?

If the chain of the miner B grows faster than the chain of the miner A, then the transaction A will never be accepted (like it never happened).

The transaction A is still unconfirmed in the mempool for any nodes following the best chain building on miner B's block. Any subsequent block is free to include it. The best chain has only one block at each height. Any competing blocks that don't end being part of the best chain are irrelevant for the network's state. So, if the block mined by miner A ends up being in the best chain, transaction A gets confirmed in A's block. If the block mined by miner B ends up being in the best chain, transaction A is free to get mined in the subsequent blocks following the block mined by B.

Confirmation of transaction is always probabilistic. Theoretically, an arbitrary long part of the chaintip could be reorganized to a better chain. It's just increasingly unlikely the longer the tip is. Many users consider transactions with six confirmations to be reliably confirmed. For smaller amounts, they may even trust fewer confirmations, larger amounts may cause the recipient to wait longer.


Sharing a wallet with a friend How can I share my bitcoin wallet with my family members? Such that if my grandmother spends one btc one day, I see that reflected on my computer, etc.

This is also a great safety mechanism, in case one of our family member's hard drive crashes, the other members will still have the wallet.

If you're looking for something technically straight-forward, I suggest using an "e-wallet" and giving your partner access to the wallet account.

Review these links:
https://en.bitcoin.it/wiki/Browser-based_wallet

And here are several e-wallet's listed:
https://en.bitcoin.it/wiki/Category:EWallets


Can I find a list of possible error codes and their meanings for bitcoin-cli? Can I find a list of all of the error codes and their meanings which a bitcoin node can return when using the RPC commands?

Here is the list inside the Bitcoin Core v0.15.0.1 source code:

https://github.com/bitcoin/bitcoin/blob/v0.15.0.1/src/rpc/protocol.h#L32L87


BTC to BTC trades on Ripple I see some BTC to BTC trades on Ripple.
Are these just transfers from one exchange to another?
Or, is Ripple being used as a mixer?

The counter-parties are different.

In Ripple chain: BTC has an issuer, it can be Bitstamp, Snapswap, Gatehub or any other gateway. So if you send your BTC to Bitstamp, they will give you BTC (issued by Bitstamp), if you send BTC to GateHub, you will get BTC (issued by Gatehub).

If you have BTC (SnapSwap) and you want to withdraw BTC from your Bitstamp account, BTC must be exchanged from BTC Snapswap to BTC Bitstamp. Though it can be done automatically (path can be found)


Store bitcoin transactions in mysql How can I use the jsonRPC for the bitcoin client to export the chain into mysql and then sync the two as transactions come in? I'm writing a blockchain explorer for a new alt coin and unfortunately ABE won't work for this particular coin. I can query the chain using jsonRPC just fine for each transaction but I want to be able to store the chain in mySQL for speed and efficiency later on.

Preferred technologies: php & mysql.

You can't use jsonRPC to do this, because jsonRPC commands like gettransaction only work for wallet addresses you have in your wallet.  They don't work for arbitrary addresses.

Sites like blockchain.info basically read the physical blockchain files, not using jsonRPC.  You could do something similar.  I've heard that bitcoinj may do what you want, but I've never used that library.  You also want to check into Bitcore from BitPay.


What's stopping an infinite number of altcoins with the same protocol from appearing in the future? My novice understanding of BTC is that BTC is valuable because it's scarce - mathematically, there can only be 21M BTC, no more.

What's stopping another altcoins from starting with the same protocol, but a new chain, rendering the limit of BTC to N * 21MBTC?

Nothing stops this at all.  You can start your own right now, removing the 21M limit or adopting whatever rules you want, and mine as many coins as you like.

Likewise, you can sit down at your printer, and print lots of $100 bills with your own portrait, and invent whatever rules you want as to how they can be spent.

The question in both cases is whether anyone besides you will want to use them, and be willing to exchange them for goods or services.  You'd have to convince people to use them, that your rules are such an improvement over the existing ones that they should switch.   If they don't, then your new coins or bills have no real value.

So there's nothing stopping an infinite variety of altcoins from appearing; but probably only a few of them will be adopted by anyone.


How to access Blockchain remotely for statistics study? I would like to write small paper supported by Blockchain stats.
Could you tell me how to access blocks chain remotely via GUI to make a query ?

Blockchain's size is 159GB as of today, so download is heavy.

Ok, I can study block headers only to limit overheads.

Do you know how to download or access blockchain headers as mySQL database ?

How to access Blockchain remotely for statistics study ?

As you mention in your comments, blockchain.info can provide this information.

You can get a raw block in JSON format using the /rawblock/ links, for example:
https://blockchain.info/rawblock/0000000000000000008d49f25f7dd5d3704575a348e030a1d2e5f396b3e80516

Then you can also get it as the hex-encoded raw block by adding ?format=hex to the url:
https://blockchain.info/rawblock/0000000000000000008d49f25f7dd5d3704575a348e030a1d2e5f396b3e80516?format=hex

Hope that's what you are after :)

EDIT: Oh, just re-read your comment, you want just the headers? In that case you probably can't use blockchain.info, you could try BlockCyhper instead:

For example: https://api.blockcypher.com/v1/btc/main/blocks/294322

You can find more info about their API here: https://www.blockcypher.com/dev/bitcoin/#blockchain-api


Why am I getting payouts from 6 blocks with only 1 share found with a LTC P2Pool pool? I was mining in a LTC P2Pool pool and found a share.
As I understand it, if the conditions outlined in this answer would have been satisfied, I should have received a payout from the next block found by the P2Pool network. As a matter of fact, It seems I received a payout from the next six blocks (from 414890 to 415003).

I failed to find the rationale behind this. Could you please enlighten me?

The payout method in p2pool is based on PPLNS. In this method, every share is rewarded for each block found within the next N shares. Depending on the exact value of N and the luck in finding blocks by the pool, this can mean several blocks.


Remove address from sequence in HD wallet Is there a way to eject an address out of the sequence of an HD wallet?

Lets say an address was used for a political donation to a regime in Namibia that may get international condemnation a few decades in the future (can never tell with political parties, maybe they don't invade Russia in the winter and end up writing the history books) or perhaps anyone that donated to a campaign against zombie equality rights is now condemned publicly in the unforeseen future even after the majority population donated and voted the same way you did

Therefore I don't want that to appear in my wallet, whether I restore a seed on a different device or future wallet. But I only thought of this after the address was used. This is considering the possibility that in some future, I may accidentally mix inputs to other addresses, providing for blockchain analysis of addresses I own, or perhaps I simply leave my computer unlocked at some point in the future and someone is able to see my addresses.

Is there a way to eject that address from the HD sequence or perhaps is this simply a GUI thing that software clients would have to do on there own?

The problem with dropping an address from an HD wallet is that they are deterministic, so how do you change the determined sequence? The only way I see is creating a new HD wallet (a new sequence), transfer all your money there, and then denying the original affected one was yours (this may need coin mixing).


With Mike Hearn quitting Bitcoin, what seems to be the future of bitcoinj? Mike Hearn has apparently sold all his Bitcoins. So what is to be expected about the development of bitcoinj? (and Java based clients in general).

Hopefully, bitcoinj will now be maintained by other people that based projects on it. From what I've read and the commit list it seems that Andreas Schildbach, who also initiated the Bitcoin Wallet for Android, now takes a leading role in maintaining of bitcoinj.


Is buying and selling bitcoin in large volumes possible, or wise? I'm asking because I think it could be a decent investment, but on clarkmoody the volumes aren't very large.

Which could mean that bitcoin is only useful in small volumes, and that larger transactions (i.e. $ 5000 - $ 10000) will have to much of an influence on the price to be considered a wise investment (i.e.: you wouldn't be able to buy/sell everything at once without the price dramatically rising/falling). Any ideas/suggestions from the experts?

It is possible. You can go to Mtgox if you like, but of course you can make an offer in BITCOIN-OTC, "outside the market". If someone agrees your offer, this trade would't impact on Mtgox and similar markets.

It may be wise. You only need to be careful with people you agree to trade, using the "trust database" to see people's reputation, so you decrease the probability of getting ripped.


Does Bitcoin Core support watch-only wallets? Is it possible to use Bitcoin Core in a watch-only mode? I want to be able to generate new addresses in an online instance of Bitcoin Core, but keep the private keys separate on another local Bitcoin Core instance.

How would I be able to do that with Bitcoin Core? I don't want to use any third-party solutions, preferably only Bitcoin Core.

It's possible if you use a fixed number of addresses. Take a look at https://www.reddit.com/r/Bitcoin/comments/5z35nm/watchonly_wallet_in_bitcoin_core_qt/


bcoin example conf file? Hey I've been looking around for an example conf file and I can't find one. I'm not sure how to put some parameters in. Do I do

prune=True

Or

prune

as in the documentation it says 'default: false'

I found it at the bottom of some documentation

https://github.com/bcoin-org/bcoin/blob/master/etc/sample.conf

prune: True


Why is this transaction stuck? https://blockexplorer.com/tx/286fefb79f1b0a14526997e8c7bcb4bd7a5665c953586f6bbcd09e441b192d3f this is my transaction blockchain hash

This is first time I've actually seen something like this - the buyer sent me $200 (at least he says) and the $250 came to my wallet but $50 is Unauthorized or something like that. The transfer is seems to be stuck in limbo.

I was trying to wait - I asked about it on LBC they have no idea...

Can anybody explain to me in what circumstances can a processing transaction become stuck?
If this transaction does process will it transfer to my wallet or reverse to sender account?

Is this situation avoidable and how long it at maximum could it take?
A simple explanation would be great I'm a beginner btc user.

The transaction spends an output which itself is unconfirmed, it means there's a chain of requirement back two transactions which may or may not be completed. In this case, one previously must be confirmed before this one can enter a block.

  If this finally process will it transfer to my wallet or reverse to sender account?

It may be confirmed, it may never be confirmed, or it may be invalidated by a double spend, there's no way of knowing this in advance. In general this is why the advice is to never give payment for an unconfirmed transaction, until it has a reasonable number of confirmations there is no assurance it will ever confirm. With LocalBitcoins in particular there is an internal escrow tool which you can use to avoid this in the future.


Does merkle root contain hashes of transactions from previous blocks? Every block in a blockchain contains merkle root value. So for any block, there is some list of transactions and you create a merkle tree based on these transaction.
For other blocks, same process will repeated.

My question is:
Let us assume that A, B,C,D are transactions and we create a merkle tree and we add the merkle root in block. Now later we got the transactions E,F,G,H so:

whether merkle tree is based on E,F,G,H only
or it is based on A,B,C,D,E,F,G,H .

I want to know that for some block, we created a merkle root value based on A,B,C,D. For others block whether we include previous transaction with new transactions  and create a merkle tree. Or with only new transactions, merkle tree is created.

The blockchain is the mechanism for Bitcoin to converge on one shared state. Participants submit payment orders in the form of unconfirmed transactions to the network from which miners then select a set of transactions into their block candidates. The Merkle root hereby represents a commitment to one specific list of previously unconfirmed, valid transactions. When a new block gets authored, all network participants validate the block and then adopt the new set of balances as the current network state.

Beside the Merkle root as a commitment to this block's transactions, the block header also commits to exactly one preceding block as its parent by including the hash of that predecessor block. As the predecessor in turn committed to it's own predecessor, a new block therefore inductively commits to the full history since the Genesis Block.

Given that each preceding block in turn contains a Merkle root with which it committed to its own set of transactions, any new block also commits indirectly to the full history of all transactions.

Coming back to your example, this means that if Block#1 committed to {A, B, C, D}, the Merkle root in Block#2 would only commit to {E, F, G, H}. However, Block#2 commits to {A, B, C, D} indirectly by declaring Block#1 it's predecessor.


How to get transaction id (txid) in UI I deposited dogecoins in my cryptsy account through faucet. How the transaction id (txid) has been displayed in cryptsy UI? suppose I make the transaction then I know the transaction id, but how cryptsy get transaction id for the particular address?

Coins are associated with an address, but they are actually stored in transaction outputs.

Transactions take one (or several) inputs (referencing previous transactions) and sign over the total amount of the inputs to one (or several) outputs.

Usually, these outputs are formed in a way that they can be spend by the owner of a specific address, but other requirements to the signature can be scripted. Anyway, each and every balance is at atomic level made up from these transaction outputs.

The transaction outputs, though, reference the transaction that created them. That means, anyone looking at the blockchain can easily see what transaction sent the money to your address.


Bitcoin core Testnet version 4 I am Curious about bitcoin testnet.
Since there is a massive change in bicoin mainnet i.e. https://bitcoin.org/en/alert/2017-07-12-potential-split

Will Testnet4 be there and Testnet3 completely wipe out?
I just want to perform mining on Testnet. As some people are mining with ASIC even on the testnet and increased the difficulty. If so happens then it would be great to have 0 difficulty again.

I am Curious about bitcoin testnet. Since there is a massive change in bicoin mainnet i.e. https://bitcoin.org/en/alert/2017-07-12-potential-split

The change on mainnet does not effect testnet at all. The mainnet change is to activate segwit. However testnet has had segwit for the past year and a couple months.

  Will Testnet4 be there and Testnet3 completely wipe out?

No.

  I just want to perform mining on Testnet. As some people are mining with ASIC even on the testnet and increased the difficulty. If so happens then it would be great to have 0 difficulty again.

There is no such thing as 0 difficulty. The minimum difficulty is 1. Testnet3 has provisions to ensure that it is always mineable by someone. If a block is not found within 20 minutes, the difficulty will drop to 1.


Transaction verification up to coinbase? Do full nodes verify the entire transaction chain up to coinbase when verifiying a single transaction to be included on the block which they are working on ?

They achieve the same result as if they did this, though not by actually doing it. (There are a number of obvious optimizations, for example, maintaining an indexed database of unspent outputs.)


How to get the pool name from coinbase transaction? Is it possible to retrieve the name of the pool that mined a block looking at the address in the coinbase transaction?

For example, the address in the coinbase transaction of block 00000000000000000002dce191b529017edae3c76d91ab21f757d156daebf43f is: 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY.
From Blockchain Explorer, that block has been mined by F2pool.
Is there a way to associate F2pool with 1KFHE7w8BhaENAswwryaoccDb6qcT6DbYY?

Although is may be possible to associate addresses that appear in coinbase transactions with mining pools, this relationship can be quickly broken - because they can easily change this address - and that's not how tipically mining pools are identified.

Mining pools/miners that want to identify themselves do so in the scriptsig of the coinbase. In your example, the scriptSig is:

03404a092cfabe6d6d5995dc2134639c494208abda86747b0f77fe5b92e9456a85974f452f51a3da0910000000f09f909f00144d696e6564206279206365616d6b7978696c6f6f000000000000000000000000000000000000000000000005001f450000.

If you decode this hexadecimal number to ascii, you get:
@J ,ú¾mmYÜ!4cIB«Út{wþ[éEjOE/Q£Ú    ðMined by ceamkyxilooE

You can see that it contains the string Mined by ceamkyxiloo, which is what identifies F2pool. Most of the decoded text is unintelligible because this field (expect the first ~4 bytes) are used to create entropy during mining - what is called "extra nonce".

Most block explorers keep a mapping of these signatures to miners/mining pools. Here is an (outdated) mapping.


Why is my transaction so big and thus so expensive? I have a bitcoin wallet that I am accessing using Electrum. In this Wallet, I have received Bitcoin from a total of 29 (very small) transactions. Now, I want to access my BCC in this wallet. Therefore, I want to transfer all the bitcoin to another wallet. However, the transaction has 29 inputs and is 4kB in size, making it super expensive!

The suggested transaction fee when using the smallest suggested fee is almost 10% of my bitcoins and thus more than I would earn from the BCCs! Is that normal? Is there anything I can do to circumvent this?

I think you answered your own question.  Yes, the transaction is so expensive because you are combining multiple inputs.  This makes the transaction high in terms of bytes, but low in terms of value.  As such, the transaction fee (which is based on bytes, not value) may not be worth the transfer you are attempting.

However, since it sounds like what you are actually trying to do is access the BCH (Bitcoin Cash) that you also own due to the fork, you can instead leave your bitcoin where it is on the main Bitcoin blockchain, and instead perform your transfer on the Bitcoin Cash blockchain where the fee will likely be cheaper.  This is, of course, assuming you need to move your bch at all.  Unless you need to spend it, you can just leave your bch where it is as well.


Recover BTC from seed I wonder if you can help me.
I have my 17 word seed (yes 17 words) and my wallet crypto address and I can see my crypto on the blockchain under that address.
How do I restore my wallet with the above two things because my previous device failed and is dead.

Not an expert on the issue, but try to find out what algorithm was used initially to generate your private key from those 17 words.
You should be able to apply the same algorithm and get it back.
I did not get from the question if your wallet was hardware or software, but either way, by checking the documentation of that wallet, you should be able to find the information above.
Hope this helps.


How to send btc from multiple addresses to a single btc address? Let's say, I have 3 btc addresses A, B, C i.e; 1 BTC in address A, 1 BTC in address B, 1 BTC in address C. Now I want to send 3 BTC to another address. How to do that and what about the miner fee?

If you were asking about creating transaction manually, you can do that by creating raw transactions using addresses (A, B, C) inputs.

You can set the fee by not spending the fee while creating the transaction.
so if you have 3 BTC you send 2.998 and just leave the rest, it will be considered as miners fee.

By default if you are using Bitcoin-core or any other wallet they are using required inputs to cover your payment, so you shouldn't worry about that.


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

My question is: Is there a way to estimate the number of unfound nonces?

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


How to get list of all transactions in bitcoinj wallet? I configured bitcoinj library so I can connect to network, replay blockchain, create addresses, receive and send bitcoins. I using FullPrunedDatabase as block store.

I'm still missing how to find all transaction in this wallet. I'm also interested how to compute confirmed and unconfirmed balance on single address. I know this one was asked here before,How to get balance from a specific address in bitcoinj?, but I cannot figure out how to use CoinSelector

Use Wallet.getTransactions(boolean). This returns a Set<Transaction>:

boolean includeDeadTransactions = true;
Set<Transaction> transactions = wallet.getTransactions(includeDeadTransactions);

for (Transaction t : transactions) {
    //Do something
}


Is it possible to use BitGo's wallet with other software (Electrum or else), what is the used derivation path? BitGo wallets are based on a 2-of-3 multi-signature, the end user have access to:
- Public key (xpub) of the 3rd signer (as the main wallet xpub)
- Native Segwit (Bech32), bc1... addresses to receive BTC assets
- Private key/seed (BIP39) of the 1st signer (and public key xpub as well)
- Private key/seed (BIP39) of the 2nd signer (and public key xpub as well)

Seeds can be converted to private key here, BitGo provide it's own recovery-tool (it's debug infos can be used to get the xpub keys of the first and second signer).
Public xpub keys can be converted to Zpub (p2wsh) here or with Electrum with the command ./electrum.AppImage convert_xkey 'xpub...' 'p2wsh' --offline (Electrum and xpub-converter uses those specs and derivations paths).
While it is possible to import the BitGo wallet into Electrum without error, Electrum never generate the same receiving address as BitGo, Following this and this bitcointalk's forum threads:
1. What is the derivation path used by BitGo Bitcoin wallet?
2. Is it possible to use BitGo wallet in any other software like Electrum or else?
Other related QA: 1, 2, 3, (note that I am using Bitgo's wallet through Bitwala)

Looking at the BitGoJS code it would appear that the derivation path is m/0/0/derivationChain/*.
Looking further, the derivationChain seems to be a code depending on the address type:
    [0, UnspentType.p2sh, Purpose.external],
    [10, UnspentType.p2shP2wsh, Purpose.external],
    [20, UnspentType.p2wsh, Purpose.external],

    [1, UnspentType.p2sh, Purpose.internal],
    [11, UnspentType.p2shP2wsh, Purpose.internal],
    [21, UnspentType.p2wsh, Purpose.internal],


Extract private keys from Bitcoin Wallet I have encrypted my bitcoin wallet. I know the passphrase, that's not the issue.

I want to transfer my bitcoins to blockchain.info but it's asking me for the private key. I cannot find it nor can I find how to find it. I have searched around on google; a few sites say that pywallet will extract the private key, but I have used this and all I get is the address I have created.

Where is my private key(s)?

Use pywallet to extract the private keys and copy the output to blockchain.info's Import Backup page.

To use pywallet, you open a command prompt/terminal window at the folder where you saved it and type ./pywallet --dumpwallet --password="Whatever your passphrase is". NOTE: this will output everything in plain text, so if you do this on a public computer or with somebody looking over your shoulder, some of your bitcoins may be stolen.


cgminer fails to start with error "error opening terminal: dumb" I'm using Windows 8 x64. I've downloaded the latest cgminer (3.4 at this time), but when ever I try and start it I get the error message:

Error opening terminal: dumb

I've seen various post that suggest this relates to the TERM env var and setting this does change the message to end with what ever is in TERM, but nothing I've tried fixes it. Anyone know what I need to do to get this working?

I had the same problem and for me it worked to set the TERM variable to nothing directly before you execute cgminer. Like this in the cmd shell:

set TERM=
cgminer-nogpu.exe ........

If you set it to "" (meaning nothing) in the system settings it will use the default value "c:\windows\system32\cmd.exe". You can check the the variable in the shell with:

echo %TERM%

I hope this will help you :)


Sent bitcoin but was never recevied After withdrawing bitcoin from a site I use I sent it straight to another site with a generated address, on my site it said it was completed but was never received on the other site. The three addresses are

1BVLvno6UX8Rn3KtAQgJcpcZca58bcjVc6

8uskrzBQKwbhWHL7LYFMAD5yCNH6vTLnj

37eHZRcG9G3q3ZE7a3x5qYmWnhFeiThnKR

I sent it straight to another site

Evidence suggests not.

At the time of writing, none of those addresses has any history of transactions in the public blockchain for Bitcoin (BTC). The second address 8usk...TLnj does not appear to be a valid Bitcoin P2PKH, P2SH or Bech32 address

Therefore the "site" you "withdrew" Bitcoin from, or your subsequent "sent it" (if a separate transaction), did not actually create a transaction (or at least, not a transaction that was both valid and had a sufficient transaction fee).

Consequently the money is still in its original location.

You can check addresses and transaction-IDs at any public "blockchain explorer". I suggest trying several to be more confident of the information returned.

If I add a 3 to the start of your second address 8uskrzBQKwbhWHL7LYFMAD5yCNH6vTLnj this makes a valid Bitcoin P2SH address which currently has been used in six transactions in recent days. None of those transactions involve the other addresses in your question.


Path notation for extended public key of hardened child? Typical path notation for a BIP44 child private key would be something like:

m/44'/0'/0'

The public key is

point(m/44'/0'/0')

Where point is the ECC multiply function. Is there any better notation than this? It would not be right to use M/44'/0'/0' as this path is not derivable.

Is there any standard notation for the xpub calculated from a hardened child private key?

(Note: I'm looking for notation that would be useful to parse and then re-derive this key, not necessarily the type of notation that would be intuitive in an academic paper.)

Is there any standard notation for the xpub calculated from a hardened child private key?

I have chosen to use the below notation. Others may use it if they find it useful.

[m/44'/0'/0']

Is the public key derived from the hardened child private key.

[m/44'/0'/0']/0/0

Is a child public key derived from the master private key m. However, [m/44'/0'/0'] may be stored as a separate public key, essentially as a checkpoint in the HD tree.

This notation has some useful characteristics:

Easy to parse.
Shows exactly where the private->public derivation was done. So, while [m/44'/0'/0']/0/0 and [m/44'/0'/0'/0]/0 my produce the same xpub, the calculations done to derive that xpub were quite different.
Inside of brackets, hardened notation may be used, but outside of brackets only non-hardened notation is permitted.


In a bitcoin multi-sig wallet, can i determine which of the m of n keys were used to send bitcoin? I'm particularly interested in this for large n multi-sig wallets. For example, if m-of-n is 4-of-6, and 6 different people (e.g. 6 non-profit co-directors) hold each of the n keys. If one day all of the wallet is emptied just using 4 (m) keys, will the 2 (n-m) people be able to determine which were the 4 keys and thereby the 4 co-directors that emptied the wallet?

The signatures and public keys have to be supplied to spend the coins so yes you can tell by looking at the spending transaction on the blockchain.


the only iPhone wallet app offers NO WAY to include a transaction fee? I recently sent some bitcoin to a friend using the blockchain.info iPhone app and it sent it with 0 transaction fees.  As a result it caused an awkward situation as my friend was watching block after block added to the blockchain while our transaction remained at 0/unconfirmed.  It eventually got into the blockchain about 8 hours later.

Is this a bug in the app?  I couldn't find any way to control the transaction fee.

EDIT: I'm frankly perplexed that no one seems interested in this question.  Let me put it a bit more starkly.

Making payments using mobile devices is one of the huge promises of bitcoin and was a core part of the original Satoshi vision.  As it stands, the only functional payment app on the top (or 2nd to top... whatever) mobile platform has a serious flaw, in which there is no way to ensure that payments get confirmed in any reasonable amount of time.

Shouldn't this be adressed?

I can't elaborate much on your answer but can provide reasons as to why this market seems so bare.  Apple has shut down other providers of BitCoin wallets for "legal reasons" -- all due to the legal ambiguity of BTC transactions.

Your best bet is to look into mobile-optimized websites that offer BTC transactions.  I'm unfortunately not too knowledgable on the topic - but at first glance, you might want to check out https://walletbit.com/, https://bips.me/ or something similar.  Happy hunting!


Why do my futures keep getting cancelled using BitcoinJ? I am trying to write an application that queries bitcoin nodes for the results of a particular transaction. I am attempting to imitate FetchTransactions.java, one of the examples that comes with bitcoinj.

Sometimes my requests go through to the peers, no problem. Other times, they get cancelled. I figured maybe I was stressing some of the peers, so I decided to loop through all the peers I could find and ask. Now I can't seem to get any peers to answer my request. I think I'm missing some basic network etiquette or something. Here's the relevant code:

        NetworkParameters params = getNetworkParameters();
        PeerGroup peerGroup = getPeerGroup();
        peerGroup.startAndWait();
        peerGroup.addPeerDiscovery(new DnsDiscovery(params));
        peerGroup.setMaxConnections(100);

        peerGroup.waitForPeers(3).get();
        Peer peer;
        int i = 0;
        while (true)
        {
            try
            {
                while (i >= peerGroup.numConnectedPeers())
                {
                    peerGroup.waitForPeers(peerGroup.numConnectedPeers() + 10);
                    System.out.println("Waiting to connect to more peers.");
                }

                System.out.println("Attempting to connect to peer " + i);
                System.out.println("numConnectedPeers = " + peerGroup.numConnectedPeers());
                peer = peerGroup.getConnectedPeers().get(i++);

                Sha256Hash txHash = new Sha256Hash(hash);
                ListenableFuture<Transaction> future = peer.getPeerMempoolTransaction(txHash);
                System.out.println("Waiting for node to send us the requested transaction: " + txHash);
                tx = future.get();
                System.out.println(tx);
                peerGroup.stopAndWait();
                break;
            }
            catch (CancellationException e)
            {
                System.out.println("Task was cancelled. Trying again.");
            }

        }

Also, when it hits 75 peers and tries to wait for more peers, it returns immediately. I don't understand why it doesn't wait until it gets more peers before returning, since the source code of PeerGroup.java indicates it should only return when it has as many peers as specified in the argument.

Also it has never worked on the testnet: requests for a transaction have always been cancelled on the testnet.

Anyways, any tips in the right direction would be much appreciated.

Ok figured it out. The memory pool only holds transactions that have not been included in a block. The reason it stops working after a few minutes is the transaction is included in a block, and therefore the peer does not have it in its memory pool.

It seems I will need a different approach.


Are there drawbacks to the Thin Block patch? Mike Hearn talked about a patch he applied to BitcoinXT recently in his AMA:

  I posted a patch last week that makes XT download blocks as lists of hashes instead of duplicating the transaction data, so a full 1mb block would drop to about ~70 kilobytes, in theory, if you were online for the whole time since the last block. However, the patch needs more work and testing before it can be shipped to users.

If I understand correctly:

Blocks themselves would stay exactly the same.
Transactions only need to be downloaded once (instead of once or twice)
Each node reassembles the block from this "ingredient list"
Missing transactions can be requested from peers by transaction hash.

This would reduce the total traffic to transfer a full block roughly from 2MB to 1.07MB. This seems like an obvious improvement of the current status quo which could be introduced cheaply, especially reducing the network load during the peak demand right after a block is found.

Are there any drawbacks that I'm missing?

Compact Blocks in Bitcoin Core provides similar functionality (see BIP 152 for spec). The main improvement is in the way it gets rid of bloom filters, as those add a DoS attack risk.

There's a bit more in commentary from nullc (Gregory Maxwell) in this thread on Reddit


Looking for a Bitcoin Cash (bch, bcc) testnet faucet As the title states I am looking for a Bitcoin Cash faucet. I know about the very nice one:

https://testnet.manu.backend.hamburg/bitcoin-cash-faucet

but it seems to be down at the moment. A google search does not yield any other faucets so I am not very optimistic.

Thank you!

There's a new faucet, it can be accessed here: https://testnet.wormhole.cash/faucet/

Edit: Broken! Coinfaucet still works.


Is routing approach of Bitcoin Lighning Network "decentralized" and "trust-less"? From the Bitcoin Lightning Network:

  it is possible to find a path across the network similar to routing
  packets on the internet.

Is routing approach of Bitcoin Lighning Network performed in a "decentralized" and "trust-less" manner ?

Also, the fact that in the Bitcoin network there is no routing table does not matter ?

Is routing decentralized and trustless:

Generally, yes. It uses sphinx onion-routing to prevent any peer along the way to know origin/destination of payment.

Also note that Information of channel balances can leak if routing attempts are used to probe liquidity along a route.

Routing is not robust against sybil attacks, as compromised nodes can determine routes by reconstructing path via payment_hash in the htlc output scripts.

It is, however, incumbent upon the channel operator to ensure the lightning implementation is always synced with a full-node. Only this way can it detect a cheating channel counter-party and broadcast a penalty transaction. Watchtowers may provide vigilance as a service but they are not trustless

Also, note that the lightning network is a separate p2p network.

Discovering topology occurs with peers gossiping.


Bitcoincore wallet 0.20.0 Because on windows it is so difficult to load the blockchain into the BitcoinCore wallet. Arrives in 2016 the loading rate increases days. In ubuntu18.04 it is so fast and does not slow down after 2016. When it slows down and checks on windows with bitcoind.exe after 2016 and it finds four errors in the blockchain; how should I proceed?

It's normal, because the number of transactions are bigger. The blockchain size is very big one, and it depends in your internet speed, it can take even 4 weeks to download the entire blockchain


Probability that a block will be confirmed in x minutes I know that a block usually takes 10 minutes on average to get confirmed. But what is the probability that this will happen?

I mean is there any formula that we can use to calculate the probability that a block will be confirmed in the bitcoin network within x minutes? (assuming that the resources are fixed in the whole network)

The time T until a block is mined follows an exponential distribution.  Assuming the difficulty has properly calibrated to the network hash rate, the rate parameter for T will be λ = 1/10 per minute.  So the probability that the block is mined within t minutes is
P(T <= t) = 1 - exp(-t/10).


Recommendations on how to buy Bitcoins with limit orders I live in the US, have US bank accounts, and would like to buy Bitcoins, but with limit orders, e.g. place a limit order for 1 BTC = US$500 or less, and wait for several weeks to see it fulfilled.

What are reasonable options for me?  I know that Mt. Gox offers such limit orders, but to get money to them requires expensive and time consuming international wire transfers.

An ideal solution would enable to me to place a limit order to buy Bitcoins with a transfer from my US bank account.  I can easily transfer USD from my US bank account with ACH or a US wire transfer.  However, I am open to any reasonable solutions.

Any suggestions are appreciated!

This answer is no longer applicable, since CampBX is shutting down.

CampBX offers limit orders, and allows US residents to deposit dollars by mailing postal money orders, or (after a verification process) personal checks.


How do Bitcoin and Colored Coin react to malformed transactions? I need some help to clarify Bitcoin and colored coin mechanics.

Are the assumptions below correct (and complete)?

If an error (maybe a fraud) is presented in a Bitcoin transaction, nodes (including the miner) reject this transaction and do not forward it to other nodes. This transaction will never be included in a valid block.
If an error (maybe a fraud) is presented in the "color code" (included after OP_RETURN) of a colored Bitcoin transaction, this is a legal Bitcoin transaction accepted by (non-colored) nodes and mined by a miner. But these colored transactions are verified, rejected and ignored by colored nodes and therefore they are forgotten by the colored coin network.

Thank you!

I think you are correct.
It is perfectly reasonable that a colored-coins transaction is malformed while its bitcoin-level data is correct.

Indeed, most colored-coins transactions are legal bitcoin transaction in any case. Think of wallets like Colu, which cover every transaction for you. It's very unlikely that something done automatically comes out malformed.

Anyway, I wouldn't say that colored-coin nodes "forget" this transaction.
They will just consider it as a non-colored transaction or an invalid colored-transaction, depending on the error.
However, since it is a valid bitcoin transaction, it will be included in the blockchain (which is the same for both colored and non-colored nodes);
and then "visible" to all nodes.

Generally speaking, I would say it will be simply considered as the other (non-colored) bitcoin transactions.


Sending a value of BTC0.00 I'm monitoring The Shadow Brokers wallet out of curiosity on how big it will become, and I've noticed that a transaction with a value of £0.00 was sent. How can this be?

The transaction I'm referencing is: da849be1571092b467da9be31bcb0a43508bde5776173954bdba0d48845bd842

It was my assumed understanding that you can't send a value of nothing (in this case £0.00) as when I try and send BTC0.00/£0.00, my client always asks me to input a value.

Utlimately, my question is how and why would someone send £0.00.

The why may be impacted by the urge to contribute to the wallet funds for NSA 0days.

How would someone send £0.00?

The transaction you mentioned sent .00001 BTC to
19BY2XCgbDe6WtTVbTyzM9eR3LYr6VitWK which is the Shadow Brokers account. £0.00 is only a rounded number when converting to fiat. Disregarding this transaction, it is possible to send Bitcoin transactions with no BTC value

  why would someone send £0.00?

Your why question is more speculative, but sending dust is a common (low cost) tactic for chain analysis companies to tie bitcoin addresses together in the future. In this case it is likely that many chain analysis companies (on their own or on behalf of government clients) will attempt to identify the owners of that Bitcoin account.


can parent private key sign a transaction created by a child address? like this:

I have a private key P, and via a HDchain, it creates a child address addrChild with a child key pair: priKeyChild and pubKeyChild.

When I create a rawTransaction with the addrChild, I can successfully sign this rawTransaction with the priKeyChild.

the question is: instead of using the priKeyChild, can I successfully use P to sign this rawTranscation ?

No, you cannot. The relationship between parent and child keys is via HMAC-SHA512, not related to ECDSA (the signature algorithm). To ECDSA, the parent and child keys have no relationship, they are both just private keys. So only the child private key can sign for the child public key, not the parent.


which was the purpose of changing the signature of a TX? or it was just a bug before segwit? Was there any purpose in changing the signature of a transaction?

Or it was a bug before segregated witness?

Does segregated witness disable some wanted feature?

By using sighash flags you can flag a transaction to intentionally make specific parts of it modifiable after signing it.  This kind of intentional malleability is a useful, if not often used, feature and isn't changed by segwit.

Malleability in the SIGHASH_ALL was simply a design flaw and based on all the issues that the original software had with it appears to have been unintentional and unrealized at the time of the protocol's release.

The main origins of malleability in typical transactions arise from effects that aren't especially visible while writing the software-- e.g. that pushes could be serialized in different ways, or that there were multiple distinct valid signatures of the same data.


Is it actually possible to secure your coins while also allowing access to "near and dear" when you die? I have my wallet.dat files encrypted, stored on a computer which in turn is encrypted. All storage devices where the files are backed up to are also encrypted. I strongly doubt that any human could ever guess the passphrases, even for the storage disks, then find the wallet.dats and then also decrypt those.
(And if they did, they would also find a bunch of embarrassing stuff which I wouldn't want them to ever see.)
There is no way that I would ever put any of these phrases on a piece of paper. That would violate the entire point of this "as-secure-as-possible" setup.
If I die tomorrow, my "loved ones" (let's just assume that I have some...) would never be able to get any use of my coins. They would just know that I had them and that they exist wrapped inside insane layers of security, and can likely never be retrieved even if they hire some company and entirely ignore my "dead man's privacy".
It is unthinkable for me to let some third party hold my coins "for safe keeping". It's also unthinkable to give them the decryption phrases, because then they could:

Have an incentive to murder me and take the money. (You never know...)
Have no bad intentions, but leak it by accident or coincidence to a third party which then murders me or just steals one of the disks and grabs the coins.
See all my personal files and stuff after I die from natural causes and they use their given-by-me sheet of passphrases to get to the wallet files. This would be awkward.

Maybe you say that I should keep them on separate USB sticks and disks which I've spraypainted orange and put a Bitcoin symbol on. Sure. That's actually something I've thought about. However, I have no money to buy a bunch of new disks; even the ones I have are worryingly old by now, safe for one USB stick which I bought recently for the sheer purpose of having a slightly newer storage device after not buying any new ones for so long.
Also, those dedicated storage devices will only protect against my smallest concern, which is pretty nonsensical to begin with since I'll be dead anyway. And also, they will add the problem of really screaming to whatever threat entity sees them that I have Bitcoins on them, whereas my existing devices are cryptically (no pun intended) and generically labeled.
Maybe there is a way I could set up a "smart contract" which runs perpetually and is able to send all my BTC to a given receive address (which I've very carefully set up for my family members and taught them extremely well to keep secure and backed up and how to use it) when I die, by polling some kind of government API daily to see if my status is "dead" or "alive" or something. But then what happens if that API has a bug in it, or somebody in the government learns about this and decides to mess with me by declaring me officially dead for one day just to trick the smart contract and cause me to lose all my coins? Plus, the entire thing about "smart contracts" seems to be some kind of fantasy and doesn't really exist in reality. At least, I've never found any way to use them or seen anyone using them other than talking about how it's a thing.
What can possibly be done so that I don't risk anything by doing it, yet allow my "loved ones" to get my coins when I die?

This is what safe deposit boxes are for.  Write your passphrase on a piece of paper and put it in a safe deposit box at a bank that will allow only you (with proper identification) to access the safe deposit box, until you die, whereupon access will be available to whoever you've designated through proper legal documents.
If you are worried that some bank employee will break into the safe deposit boxes, then put half your passphrase in a box at one bank and the other half in a box at a different bank.
I'm sure you can imagine ways this can still go wrong, but unless I'm missing something, they are all extremely unlikely.


Entry point hardware for profitable mining A) Which hardware
B) Which GH/s level

will be profitable for

1) Pool mining
2) Solo mining

Bitcoins as of February 2014?

Links to sources where information can be checked over time will be great, beyond the simple answer to the questions.

Question is what kind of coin are you going to mine. If you are going to mine Bitcoin (SHA256) you will need special hardware (ASIC 28nm min) for it to be profitable. Here you have an excellent seller, I bought my mining equipment from them, but now they sold out their next generation devices. If you want to mine this coins you will have to risk buying ahead of time, I mean you will have to buy a device that is in development and wait like 6 months for the hardware to arrive, so you will need this calculator to make a preview of what your profits will be. Actually there are many other sellers (Butterfly Labs -which I do not recommend-, Cointerra, make your own search in google, but KNC for me is the most trusted one). Here you have a comparison of mining devices for Bitcoin.

If you plan to mine Litecoin (Scrypt) you will be able to do that with GPUs, you have a mining hardware comparison here.

You will first need to decide which coin are you going to mine and what kind of ecryption are you going to be solving (SHA256, Scrypt). You will need to consider what kind of risk you want to take, for instance, if you mine Bitcoins you know it is the safest bet with an actual price of 803$ and having reached 1150$ per coin it is cryptocoin that is being accepted in stores right now therefore it has a possible great future. On the other hand, mining this coin has become difficult and a considerable investment and risk is needed to aquire the hardware needed.

On the other hand, if you choose a coin which has recently started, it will be easier to mine those coins, but it won't be profitable (if you think that coin could gain value in the future then it may end being profitable, who knows).

Finally it is up to you to read and choose where you want to enter and what amount of money you want to risk.


At what block height may locktimed transactions get included? Transactions with outputs whose sequence is smaller than UINT_MAX are interpreted as locked until the timestamp or block height specified in nLockTime is reached.

Specifically regarding the block height, I read imprecise or disagreeing information on whether a transaction may be included in a block of height > nLockTime or height ≥ nLockTime. Which of the two is the case?

A transaction becomes valid when the chaintip reaches the height specified in the locktime, and may be included in any block with a height greater than nLockTime.

    if ((int64_t)tx.nLockTime < ((int64_t)tx.nLockTime < LOCKTIME_THRESHOLD ? (int64_t)nBlockHeight : nBlockTime))
    return true;

  via https://github.com/bitcoin/bitcoin/blob/v0.19.0.1/src/consensus/tx_verify.cpp#L21L22

H/T Pieter Wuille for code section and explanation.


gettransaction cannot get address where it send from Hi i have test few time with gettransaction method, it seem only show full detail about transaction when send inside node.

But if i send from another address outside my node, gettransaction only show transaction detail of receive address.

How i can get full detail for both ways even that address not come from my node

What you're looking at is a byproduct of the now-deprecated account system. The send/receive labels are applied according to the addresses that are part of your wallet.

If you want the sender/recipient details as a whole, pass the raw tx hex to decoderawtransaction. This will give you the inputs and outputs as they appear in the transaction, without the accounting filters on it.


Operation not valid with the current stack size According to bip65
https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki

I can use expressions like IF ... ELSE ... ENDIF
Here is example script from this document:

IF
    HASH160 <Hash160(encryption key)> EQUALVERIFY
    <publisher pubkey> CHECKSIG
ELSE
    <expiry time> CHECKLOCKTIMEVERIFY DROP
    <buyer pubkey> CHECKSIG
ENDIF

But when I trying to spend transaction with the following script:

OP_IF
    OP_SHA256 4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a OP_EQUAL
OP_ELSE
    10 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_SHA256 dbc1b4c900ffe48d575b5da5c638040125f65db0fe3e24494b76ea986457d986 OP_EQUAL
OP_ENDIF

https://tchain.btc.com/dbf477b700b7e159c07f15e1b6f5917e1247175e055fe533068a6fbc4ce2c374

I get error:

bitcoin-cli -testnet sendrawtransaction 020000000174c3e24cbc6f8a0633e55f055e1747127e91f5b6e1157fc059e1b700b777f4db000000000151ffffffff01c0d401000000000023a820dbc1b4c900ffe48d575b5da5c638040125f65db0fe3e24494b76ea986457d9868700000000
error code: -26
error message:
mandatory-script-verify-flag-failed (Operation not valid with the current stack size) (code 16)

Where is my error ?

P.S.

  SHA256 from 1 ->
  4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a

  SHA256 from 2 ->
  dbc1b4c900ffe48d575b5da5c638040125f65db0fe3e24494b76ea986457d986

Your transaction only has 0x51 (just OP_1) in its scriptsig,  the OP_IF consumes the 1, and OP_SHA256 then operates on an empty stack, causing this error.


How to choose the most profitable pool? Say I have a moderate amount of hashing power and I want to maximize my profit by using the pool that would give the best rewards for mining with them, what should I look at when choosing a pool?

Mining is a zero sum game so pool size has no effect other than to reduce variance not average payout.  Your goal would be to acheive 100% of fair value per share.

Some factors:

Inclusion of block fees.  While small pools which keep block fees
result in lower payout than solo mining.
Merged mining.  Currently adds a roughly 5% bonus relative to BTC only mining.
Hop proof reward algorithm.  Proportional pools are vulnerable to pool hopping.  As mining is a zero sum game anything pool hopper's gain 24/7 miners lose.
Pool fees.  Any fee paid to pool reduces revenue per share relative to solo mining.
Pool efficiency.  This one is tough because pool source code is often closed source.  If pool has a bug which results in extra 1% stale shares then that in effect is a 1% hidden fee.
Pool uptime.  A pool with 0.5% downtime is in effect costing you a 0.5% fee.  This can be partially mitigated by using miner which supports backup server.
Pool latency.  The slower communication is between you and pool
server the greater percentage of shares which will be lost as stale
in a block change.  Part of this is due to server resource
limitations but some of this also comes from geo-location.  If your
miners are located in China a pool which only has a server on East
Coast US ISP is going to have a longer than average latency.

So the most efficient pool would be one that includes transactions fee, charges no pool fee, has low latency connection to your miners, offers merged mining, has high uptime, and has no hidden back end bugs which reduce efficiency of shares.


What is the best way to share the blockchain and get it verified by the wallet? I am the owner of BlockchainDownload and am looking for a way to get some trust in the website.

I have shared the link in a couple of topics an get the response "Please do not suggest that people download a preindexed blockchain from you. Doing so implies they need to trust you to tell them exactly how much money everyone owns.".

I do now generate a .rar with the whole data directory exept of the peers.dat and wallet.dat.

Is there a way to share the blockchain on a more trustworthy way?

You can literally concatenate all the *.dat files and share that. The user downloading can use that as their base download by using the bootstrapping option (-loadblock) in bitcoin core.

Generally, the trust a user puts in the blocks you give them is not really needed since the proof-of-work is verifiable by the new node. New blocks will also reference the previous block so it's easy enough to verify that they're on the chain that new blocks are coming in from.


Are there any math contests paid in Bitcoin? Are there any hard math problems or math contests that have rewards paid in Bitcoin?

There is a site where one can submit bounties for proofs of theorems in Coq formal proof management system, and get paid in bitcoin:

proofmarket.org

Additionally there are other sites that have done competitions in the past:

mathgate.info treasure hunt

Another project in development (but at the moment not specifically tied to bitcoin) is ProofPeer

Additional information about these proof markets can be found in this article:  http://blogchain.fr/programmarket-en/


Can anyone intersept & redirect? Be kind! It was my first time!
Is there anyone out there that can intercept this transaction? Or redirect it to just return to the wallet it came from? It was my first transaction and I sent BCH to BTC. Expensive lesson!
1edfdf8e76e8e46fe5c1034ee129efd92b4b5d8f15004ae5acf1b961a176a809

Your only hope would be getting that private key for your bitcoin address! Once you get that then import it into bitcoin cash wallet. You should be able to see your money and send it accordingly


What are some valid ways to obfuscate the scriptPubKey? Is it possible to hide the balance of an address from standard clients who may be watching blockchain?

I'm thinking about using script to modify the the key that is to be verified, but am having trouble concocting such a script.

Is there any prior work that does obfuscate the RIPE160 address?

You can insert two OP_HASH160 after the OP_DUP and then push the hash of your pubKeyHash. Nobody can tell the recipient address this way.

Example:

OP_DUP OP_HASH160 OP_HASH160 double_double_hash OP_EQUALVERIFY OP_CHECKSIG

Where

double_double_hash = RIPEMD160(SHA256(RIPEMD160(SHA256(pubKey))))


Usage of PkScript as a part of Inputs of a Transaction I've seen transactions with PkScripts as part of Inputs

eg : Example of such a transaction

Could anyone please explain how this PkScript is used ?

This is additional information displayed by blockchain.com, and not part of the transaction data (for the transaction being viewed).

The PkScript is the locking script set by the previous transactions that created the outputs being used as inputs for the selected transaction. The selected transaction does not include this information, only a reference to it (in the form of the previous output txid + vout).

Blockchain.com uses this reference to lookup the PkScript from the previous transaction, and displays it alongside the scriptSig and witness data here.

The PkScript is used to ensure that the transaction is valid - it is also known as a locking script, and is a Bitcoin Script program that sets the requirements for the output to be spent. For example, a p2pkh locking script sets the requirement to "the input must be signed with a private key for which the public key's HASH160 equals the HASH160 in the locking script".

The input's scriptSig (and witness, in segwit transactions) is fed to the locking script as input. If the program evaluates to true, the scripts are valid. If it evaluates to anything else, it is invalid.


Running bitcoind on VPS, won't speak to my web server I have a VPS with bitcoind set up, synced the blocks and its all running fine. I have set up the bitcoin.conf file and allowed the IP of my web host server.

I am running a script on my web host that communicates to the wallet but it just won't connect!

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to http://INVENT_A_UNIQUE_USERNAME:INVENT_A_UNIQUE_PASSWORD@VPSIP:8333/' in /home/1234/public_html/gm/install/driver_test.php:61 Stack trace: #0 /home/1234/public_html/gm/install/index.php(16): jsonRPCClient->__call('getbalance', Array) #1 /home/1234/public_html/gm/install/index.php(16): jsonRPCClient->getbalance() #2 {main} thrown in /home/1234/public_html/gm/install/driver_test.php on line 61

Any suggestions? I have run out of ideas.

It looks like you are using the wrong port. The RPC server listens on port 8332 by default, so try that. Port 8333 is for bitcoin node traffic.


What / Who is the Bitcoin mining-power useful to? I searched the internet to find out who (or what) was taking advantage of the result of mining but I couldn't find a clear and complete answer (and sources).

I know Bitcoin miners decrypt hashes, but what is that useful for? I guess there is something behind that, otherwise why should we need to decrypt hashes, why should we need a huge power 24/7? Is that really ethical to mine Bitcoins ?

I'm not very familiar with virtual money, I may have missed something!

It is useful to the currency itself.

Bitcoin tries to be a democratic currency rather than being controlled by a central authority. Democracy means that the majority of people rule by their vote. This is a concept that might work in real life (all irony intended), but it's hard to pull off on the Internet since we can't simply prevent one real person from creating thousands of virtual identities and using them to make his vote louder (so called Sybil attack).

Bitcoin solves this via a concept known as proof-of-work, which requires some non-trivial work to be done for every vote to be registered. While it is not a perfect solution (surely one can manage to do twice as much work as somebody less capable), it has an ambition to prevent all serious scams, making it infeasible for a single entity to overpower (outvote) the crowd.

Mining is the process of voting, and miners are the voters. Every voter has to find a reverse hash according to some very specific rules, which is considered a hard work. All the others can verify his solution easily.

I know this does not describe the problem entirely (and it was not my goal), but it should give you the idea. If interested in the technical details, please see the original paper or read some articles explaining Bitcoin in-depth. There's plenty of them out there, but be prepared to spend a few hours going through the stuff.


Bitcoin cash signraw "Input not found or already spent" I've created raw transaction with non-spent inputs and already exist in Bitcoin cash abc 0.16.2, But when I try to sign that raw transaction I get Input not found or already spent

RawTransaction

  02000000012a6b8e40c82f2a428ea6fb1b355832fe01319235393a9ca2cbf5bfbe3a342e290000000000ffffffff0280969800000000001976a914fe7cba7f798d378abffa4d5620f80d22adfbe1b088ac20091409000000001976a9147aec53c51184a7cf5413a919674bf5efffc0ad6088ac00000000

if you decode this transaction you see the input I used and it's "not already spent"

when I call Bitcoin-cli listunspent I see used input exist in the wallet.

{
    "txid": "292e343abebff5cba29c3a3935923101fe3258351bfba68e422a2fc8408e6b2a",
    "vout": 0,
    "address": "n1V7R2SadYSRqBg3AzFxiokDRm8LG85tdX",
    "account": "",
    "scriptPubKey": "76a914db094c026ee745ed8c65af3a692411a9766022f288ac",
    "amount": 1.62500000,
    "confirmations": 6,
    "spendable": false,
    "solvable": false   },

When i follow the same steps to create/sign a transaction on Bitcoin core or litecoin it works.

I heard that I should add used inputs when calling signrawtransaction


electrum - how to rename automatic a new wallet? I am looking for a possibility to rename automatically new wallets.

my problem is that when I restore a wallet by terminal I get this error: "Remove the existing wallet first!"

But if I rename the default_wallet to wallet1 (for example) i get no error.

so is there a possibility to rename new wallets automatically to wallet1, wallet2, wallet3, ... ? maybe by electrum config?

Change the source code.

Here you can see where the word 'default_wallet' is defined:
https://github.com/spesmilo/electrum/search?utf8=%E2%9C%93&q=default_wallet

If you would change that to 'wallet1' the default created wallet would be called wallet1.


How did you try to sign your transaction? There are no signatures in your transaction, so the OP_CHECKMULTISIG is failing.

Because you are using a custom script, signing software are unlikely to be able to sign your transaction because they can only sign for standard templates. You are not using a standard script template (because of the OP_3 OP_EQUAL) so no signatures are being created. To sign this transaction, you will need to produce the signatures manually (by computing the correct sighash and signing it) and insert them into the transaction manually.


What disadvantages are there when broadcasting a transaction via a 3rd party application? Bitcoin marketplaces could transmit their transactions through e.g. blockchain.info, why aren't they? Do bitcoin marketplaces & selling services run their full node to broadcast a transaction? What alternatives and possibilities are there for broadcasting a transaction, other than through a 3rd party?

The main disadvantages, are you are trusting the third party to actually relay the transaction, that third party can now link you to the bitcoin being moved in your transaction, and you are trusting other people running full nodes to verify your transaction. Your most secure and privacy-centric option would be to use a wallet which relays your transactions through a full node you run yourself. This way you are not trusting a third party to relay your transaction, and running a full node will help verify your own transaction. Some examples of wallets which do this are the wallet built into bitcoin core, Armory, and Electrum allows you to run your own Electrum server, CoPay allows you to run your own server as well, but last time I looked into this it was not a simple process. The drawback to this, is you will need to store the blockchain on your computer, which can require a lot of storage space.

EDIT: The bitcoin wallet mSIGNA, also allows you to use your own full node.


What is the practical link between the hashing power in the bitcoin network and its security? Several books claim that as the hashing/computing power increases, the bitcoin network is securer. How can a non-techie sees that from a practical standpoint?

Several books claim that as the hashing/computing power increases, the bitcoin network is securer. How can a non-techie sees that from a practical standpoint?

Bitcoin has the world's largest/most-energy efficient hashing infrastructure when considered as a whole.
Otherwise, someone would fire up some new miners, make most of the new blocks, don't accept transactions, and then turn off the hashrate to cause transactions to be unconfirmed for long.
But if your hashrate is high, this won't happen.
If the whole miner network were consisting of two computers and some smartphones, NSA or Google would be able to do what I just described above with their computing power.


Inevitable dust spam Given I have an account with balance 1BTC + 1 satoshi.
I want to transfer 1BTC to another account and tribute 0.0001 BTC out of that 1BTC to the network as fee. Would my transaction being rejected for produce dust spam (1 satoshi in this case)?

So the number is:

Account 1: 1BTC + 1 satoshi
Transfer: 0.9999 BTC and tribute 0.0001 BTC to miner
Left over: 1 satoshi.

Your transaction (1.00000001 ===> 0.99990000 transfer + 0.00010000 fee + 0.00000001 change) will be valid. But it is not guaranteed that other nodes will pass your transaction. May be yes, may be no.

Modern referral clients do not relay such transactions, because developers hate dust and spam. But there are nodes which relay such transactions and there are miners who confirm them into blocks.

E.g. https://blockchain.info/address/1Fri3h6MtMkjZjYHub4r1N6r5nERWgZXHQ


Why does Bitcoin make my computer lag/freeze? Whenever I run bitcoin, my computer (Dell E4200 running Ubuntu 12.04, with AwesomeWM) lags quite heavily.

It will operate normally for 10-15 seconds, then 'freeze' for 10 to 15 seconds, during which time keyboard and mouse input seems not to register. Some actions are more affected than others. Chrome won't output keystokes in this textarea during such a lag, but I can change tabs freely. All the keystrokes show when the freeze ends.

I am running bitcoin-qt from this repository: https://launchpad.net/~bitcoin/+archive/bitcoin

I installed it with sudo apt-get install bitcoin-qt

Version shown during install:
Unpacking bitcoin-qt (from .../bitcoin-qt_0.6.2-precise0_amd64.deb) ...

I had the same issue when I was running Ubuntu Unity, and the 'original' bitcoin client.

My client is currently synchronizing with the network.

My total CPU usage is between 20-60%, with occasional spikes to 90+%.

Memory usage is steady at ~60%, and swap is ~5%.

Any clues to help me diagnose / solve this issue?

Thank you.

When you use the Bitcoin client for the first time, the client has to download the whole Bitcoin blockchain from the network. This can really (really!) take a while and because it is stored in your homefolder and therefore has to be encrypted, this take some CPU power as well.

Apart from this, while your client runs, it helps verifying new transactions offered to the network, just like every connected Bitcoin client does, these calculations can take CPU power as well.

What CPU does your machine have?
You can try to use clients like MultiBit that do not download the whole blockchain, but only the part that is relevant to your coins.


How do I load wallet.dat on new PC and import everything into Electrum? My primary PC died last month due to what I believe is a motherboard error. My EVGA board displays "FF". The fans, drives, everything powers up as usual. But I don't hear any beep, no POST, no BIOS, just nothing.

Since then I've taken up residence on a box much more modest than what I'm used to, but I've used it as an opportunity to learn Linux. Nothing like jumping in head first.

Luckily I have a backup wallet.dat file taken at some point after my last known transaction. I changed the filename of the file in the directory, then renamed my backup as wallet.dat and loaded up Bitcoin Core on Linux Mint 13 Maya.

It was partially successful. I could view and export a list of every transaction I've ever made with my desktop wallet. I opened my CSV file in Calc and found the total sum of transactions left the balance equal to what I remember last having in the wallet.

However, the wallet has no balance and all the transactions have a "conflicted" status. Do I need to download the blockchain first? Is it worth my time to download bootstrap.dat?

After my funds are accessible in Bitcoin Core, how do I then move them to Electrum?

You can also import the wallet.dat directly into Electrum. Bitcoin Core needs to download the whole chain (as you mentioned) so that'll take a while. Without the chain, your transaction are indeed illegal/conflicted. Since you have the wallet, you can just install Electrum and import it there. Electrum doesn't need to download the chain, so your balance would be visible (and accessible, even more important) immediately.


Are my retrieved BCCs stolen from my Electron Cash wallet? I installed the Electron Cash Wallet on my laptop (version 2.9.2 downloaded from official site "electroncash.org" with the correct checksum). Then I retrieved my BCCs (from an imported BTC adress in my Blockchain.info wallet) into my Electron Cash Wallet, using the (Electron Cash) Wallet/Private Key/Sweep command (with the private key for the BTC adress as argument). After the "Broadcast" of the transaction the BCC's were added to my Electron Cash balance (on 7 Aug. 01.07 hour). So far so good. After that I closed my (password protected) wallet and put my laptop to sleep. In the morning I started my computer again, opened the Electron Cash wallet again, but saw to my great dismay that at 3:50 hour - when I was sleeping - a transaction has been done (by a unknown person/computer/hacker?) in which all my BCCs have been transfered to a for me unknown adress. So now my BCC balance is 0 again! (see screendumps of the wallet history and the unknown/illegal transaction below). My first impression was that I 'm robbed.

What happened here? Has anyone stolen my BCCs? And if so, how is this possible? After all I closed my wallet and shutted down my laptop. (Some thoughts: could someone have been able to get my private key for the adress in which I received my BCCs in my Electron Cash wallet? And if, so how? Could it be that Electron Cash (2.9.2) is not save, e.g. when using Private key/Export command, by sending secretly a copy to some unknown receiver? Or else?). Has anybody the same experience with retrieved BCCs in Electron Cash wallet, and/or an idea what could have happened. And more important: is there a possibility to get my (lost/stolen?) BCCs back again (and if so how)? (I my opinion I don't have the problem that Electron Cash is erroneously referring to an Electrum Cash BTC server (mentioned on other posts). To be sure I put the server on manual on "electroncash.cascharia.com", but that does not bring my BCCs back. What can I do to get my BCCs back?  Your answer(s) is (are) highly appreciated.

I would not trust the Electron Cash software. Unless you experience one of the wrong server selected bugs, as other people describe in the linked questions, I would guess that the wallet sent your coins to someone elses address.

There is a warning about Electron Cash from Electrum:

  The person who distributes the Electron Cash binaries has decided to
  remain anonymous, and uses the fake name "Jonald Fyookball" in order
  to sign Electron Cash binaries. Thus, if these binaries contain code
  that is designed to steal your bitcoins, the author of the theft will
  be anonymous and walk away safely with your funds.


Longer fake block chain with "valid" transactions What is preventing the bitcoin client from switching to a fake block chain that would be longer that current official chain? The faked chain would contain fictional transactions, but within the faked chain the transaction would be valid (e.g. like no double spends etc.).

Bitcoin clients always accept the longest valid chain. On one hand, clients check the received blocks for validity, on the other hand length is defined by another metric than many assume. The length of the blockchain is the sum of the difficulty of all its blocks, not the number of blocks. So, in order to create a fake chain, the attacker would have to actually create a valid chain at the same difficulty. This is either possible for very short chains (double spend attack) or requires a major share of the network's power (51% attack).


Difference in balance in my wallet and in btc explorer I am coding a website to get BTC balance from explorer using the following url:

https://blockexplorer.com/api/addr/3CyZgGhkhE3z2WY8E5ztPMRYCDdg1hdD7g/balance

The problem is that the balance appeared using this url (explorer) is totally different from what in my wallet (nicehash).

Explorer balance for this address: 0.00946525 BTC

Wallet balance for this address: 0.01642334 BTC

What is the cause of this? and how to show the real balance in explorer exactly as in wallet?

The 3CyZ... address has a balance of 0.00946525 BTC, so it appears that your nicehash wallets includes some other addresses as well.

In general, a bitcoin wallet will include a collection of addresses: the more you use the wallet the more addresses it will generate. Best practices include only using each receiving address once (if you search 'address reuse' you'll find the reasoning behind this), so every time you send or receive a transaction the number of addresses you wallet controls will increase.

So to get an accurate account of your wallet balance, you'll need to sum the balance of all of the addresses the wallet controls, not just the 3CyZ.. address.


How can you extract private keys from MultiBit HD? It was possible in MultiBit Classic, but I can't find it in MultiBit HD.

WARNING: While this answer may be a solution to the issue in the question, it involves exposing your wallet seed to a tool on the internet. Please be very careful when doing this!

Can't add comments so extend Chris.J's answer:

Here are my notes on how to recover / rebuild / regenerate / extract ALL addresses and keys used by MultiBit HD:

Go to https://iancoleman.github.io/bip39/
In the field "BIP39 Mnemonic" fill in your 12 wallet generation words
No password
Code: Bitcoin
Under Derivation Path, select the BIP32 tab
Client: Custom derivation path
Derivation path FOR EXTERNAL (RECEIVING) ADDRESSES (copy paste this): m/0'/0
Your receiving addresses are now displayed at the end of the page.
Derivation path FOR INTERNAL (CHANGE) ADDRESSES (copy paste this): m/0'/1
Your change addresses are now displayed at the end of the page.
Absolute Happiness ;)

(solution found on:https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki in "Hierarchical Deterministic Wallets" picture)


Bitcoin-cli -regtest getaccount, listaccounts, setaccount, method not found I just setup bitcoind (0.18.1) and put it in regtest mode, I am trying to work with accounts, but the account commands are not found...

setaccount

 jlroberts@mixerregtest:~$ bitcoin-cli -regtest setaccount 2NDCk4d7BYGztagf812gUdWqqPSMymdH4rS one
 error code: -32601
 error message:
 Method not found

getaccount

jlroberts@mixerregtest:~$ bitcoin-cli -regtest getaccount one
error code: -32601
error message:
Method not found

listaccounts

jlroberts@mixerregtest:~$ bitcoin-cli -regtest listaccounts
error code: -32601
error message:
Method not found

getblockchaininfo

{
  "chain": "regtest",
  "blocks": 303,
  "headers": 303,
  "bestblockhash": "77d7169d013574a1254ccf472389b40c3393f41498ddc6f84b8d078c740d3da3",
  "difficulty": 4.656542373906925e-10,
  "mediantime": 1568636861,
  "verificationprogress": 1,
  "initialblockdownload": false,
  "chainwork": "0000000000000000000000000000000000000000000000000000000000000260",
  "size_on_disk": 92175,
  "pruned": false,
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "reject": {
        "status": false
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "reject": {
        "status": false
      }
    }
  ],
  "bip9_softforks": {
    "csv": {
      "status": "locked_in",
      "startTime": 0,
      "timeout": 9223372036854775807,
      "since": 288
    },
    "segwit": {
      "status": "active",
      "startTime": -1,
      "timeout": 9223372036854775807,
      "since": 0
    }
  },
  "warnings": ""
}

What could I be doing wrong?

accounts method was deprecated in v0.17 and was removed since v0.18. accounts was replaced by label and it provides more flexibility as compared to before such as setting label on any address, not just receiving address. It also irons out issues raised in the past. If you are used to using accounts to mimic separate wallets, you now have an option to use separate wallets in separate wallet files in Bitcoin Core.

So according to the commands you are looking, you will replace them by:

getaccount with getaddressinfo
listaccounts with listlabels
setaccount with setlabel

You can see the full documentation of accounts vs labels in the v0.17 release docs.


Is it safe to transfer coins directly between exchanges? Say you want to transfer some coins from one exchange to another, and you want to do that directly without sending them to an indermediate address. Bittrex' Terms and Conditions, for example, state

  You may be required to verify that you control the External Virtual
  Currency Address that you use to load Virtual Currency to your Hosted
  Wallet.

I presume you are not able to verify that, if the external address is under the control of an exchange. But under what circumstances would it be even necessary to verify your withdrawal address? And what other risks are there, if you send them directly from the withdrawal address of exchange A to the deposit address of exchange B without going through another address which is only under your personal control?

I have used BITTREX, and I have transferred between exchanges (HitBTC, BITTREX, Binance). I am not aware of any risk, as this happens as a standard transaction between two wallets belonging to exchanges. I have even noticed, that the addresses change (maybe they use HD wallets). My use case was simple, that one exchange did not provide the altcoin I was looking for. So I was able to transfer amounts between exchanges, providing the target address. I did that with bitcoins, ethers and bcash. I haven't been asked by any of the exchanges, and can't remember having seen s.th. like this from BitTRex.

I cannot say, under which circumstances this would be necessary, that is a question which might need to go to BitTRex. But I think it is a layer of protection for the users. Two many people sent their coins to wrong addresses, and then spammed the support teams with requests about their lost coins.


Newbie question about the security of mixing If I am running my own node, and using a mixer to anonymize my BTC, will it not be connected anyway because the transactions are to/from my own node?
I mean I am sending the BTC to the mixer from my node, and then getting it back to another address, sure, but I am accessing that address from my own node...
Even if I am using TOR, is there not something that identifes the nodes and tells observers that these two addresses have something in common, the node on my machine?

Technically the others nodes you are connected to would see you sending the transaction to them but they wouldn’t know if it is your transaction or someone else’s and you are just relaying it.
There might be a scenario where someone has strategically placed lots and lots of nodes into the network and monitors when certain transactions arrive to each of them and might be able to narrow down where the transaction originally came from to a small set of nodes.
Using TOR would limit this potential deanonymization by obfuscating your IP (which is the identifying piece of info)


Watch only Wallet help i need help. I'm totally New with bitcoin. Last time i would buy something and when i pay i've got an sms-code for bitcoins with that i've to make the pay. I send this to a watch only Wallet. But that was wrong.  What i can do to send it to the right wallet.  I've no pc, only my Handy with the blockchain and bitcoin wallet APP.

I send this to a watch only Wallet. But that was wrong. What i can do to send it to the right wallet.

Bitcoin transactions are irreversible. You cannot cancel or reclaim them. Therefore you cannot now redirect those bitcoins to the right wallet.

Watch-only addresses are controlled only by whoever knows the corresponding private-key.

If you know who owns the private-key to the watch-only address, you can ask them to make a new payment to you of the same amount you sent them. You have to rely on their charity.

Related?

Reg: Watch only Address