Are there any stochastically dependent proof of work algorithms? In bitcoin, the probability of discovering a block on the X-th hash is the same1 as it is on the Y-th hash. As such, the probability of discovery is stochastically independent.

Are there proof of work algorithms that are stochastically dependent? Miners using one might have no idea how close to a discovery they are, but they would know that they are "getting closer".

Read on if you would like a quick and dirty description of why I think such an algorithm could be interesting:

A consequence of bitcoin's stochastical independence is that whenever a miner discovers a block, none of the other competing miners are "any closer" to rediscovering the same block (with a different, yet valid hash also meeting the difficulty). It is of course only natural then that bitcoin doesn't provide any incentive/reward for rediscovering blocks, as that proof of work is better spent attempting to discover the newest block. Unfortunately though, an attacker with enough hashing power and time has a good chance of besting the competition several times in a row; which is why it's said that to be safe you need to wait for 6 confirmations, which amounts to an hour of transaction waiting time for. We could say that in bitcoin confirmations are serial.

In contrast, stochastically dependent proof of work could allow for efficient implementation of parallel confirmations; thereby greatly reducing transaction waiting time, since rediscoveries could be expected to follow shortly after the first discovery of a block. Assume a cryptocurrency using such proofs to reward not just the first discovery of a block, but also the first X of its rediscoveries. The payment receiver then only needs to verify that the transaction is listed in all the block's discoveries (or at least a high enough percentage thereof). The amount of hash power needed by an attacker to make rediscoveries should ideally be the same as it was for the initial discovery (grow linearly). These rediscovery hashes could be recorded in the same way as transactions, by being included for a fee/reward in a child block.

1Actually, the probability increases ever so slightly when no blocks have been discovered yet, and only a fixed minimum of bits are altered such as when only the nonce field is increased; but the difference is so small as to make no matter, given the astronomical number of possible hashes meeting the current difficulty.

Miners using one might have no idea how close to a discovery they are, but they would know that they are "getting closer".

Yes, this is possible.
Instead of requiring one block header with difficult A, you could require 16 block headers with difficulty A/16. This would make it possible to figure out how far along you are in the process.

In contrast, stochastically dependent proof of work could allow for efficient implementation of parallel confirmations; thereby greatly reducing transaction waiting time, since rediscoveries could be expected to follow shortly after the first discovery of a block. Assume a cryptocurrency using such proofs to reward not just the first discovery of a block, but also the first X of its rediscoveries.

That's possible too. You could do this by having each block in Bitcoin have 1 or more parents. You'd need some sort of way rule to decide which transactions to keep in a merge block (since some would inevitably conflict).
Drawbacks of the previous two changes:

Normally, a miner includes transactions as soon as they hear about them. Including a transaction doesn't mean that you lose any progress. But if you were getting closer, you wouldn't want to abandon that.
Only the X strongest miners and mining pools would stay in business. Everyone else may as well not bother with mining.
Full nodes would need X times more bandwidth to verify blocks. Once the blocks were verified, it would also take extra storage. If the blocks were very different, it could take X times more storage space. If the blocks were identical, it would be only an extra ~350 bytes per block (coinbase and block header).


What is the correct term for bitcoin market cap? Market capitalization is a term that is usually used to refer to the total value of the shares of a company. Given that bitcoin is not a company, is there a better term than market cap that we should be using to describe the total value of all bitcoins?

The value of a commodity expressed by its exchange rate in dollars is sometimes referred to as "Total Dollar Value" (example).  That's probably the most commonly used term for referring to the value of all assets at the current valuation.

Incidentally, money stock refers to the amount of bitcoins themselves.  So currently (Feb 2013) there is about 10.8 million BTC.

There is another concept called purchasing power which might be used as well.  Because the value fluctuates, prefixing that definition and referring to it as "current purchasing power" might be an even better term.  Discussion on this was initiated in a forum thread.


Can corrupted unspent transaction outputs list leading to higher than expected fee be seen as an actual threat? Let's imagine, an attacker managed to corrupt your local list of unspent transaction outputs (or a blockhain explorer you use) in a way that certain unspent transaction outputs seem to hold less coins than actually. When you proceed to make a new transaction to send 1 BTC and load your list of unspent outputs, you happily take as an input an output that seemingly has 2BTC but actually it has 100 BTC, but you don't know it since you have fake information. Therefore you set your transaction outputs to be 1 BTC for the receiver and 0.99 BTC as change, believing to pay a fee of 0.01 BTC and you happily sign and submit that transaction. But to your big dissapointment, you find out the next day that you actually paid/lost 98 BTC as a fee! The attacker did not gain anything, but he made you lose a significant amount of BTC.

My point is that the transaction inputs in the serialized transaction cointain only the output index and hash of the transaction where the output comes from. But since you do not broadcast to the network, which size you believe the input to be - you can sign and submit a valid transaction despite not agreeing with it, had you known the actual size of the inputs involved.

I know - you can verify the hashes of the transactions where the inputs come from and if something seems off, reject the transaction, or the transaction will be rejected by the network, since it is not practically achievable to "crack" the transaction hashes, but I'm not sure if lightweight clients/hardware wallets actually verify the origin of unspent outputs and I have a suspicion that TREZOR, for example, does not do it, since in the protocol you just send the transaction inputs and outputs.

So can you tell me, how and if current lightweight clients and hardware wallets are protected against the attack described above?

A simple fix to the issue above would be including the amounts explicitly in the transaction inputs, so when you sign the transaction you say "I believe that input x has y coins and reject the transaction if you think this is not true", but currently there is no way to do this AFAIK.

Therefore you set your transaction outputs to be 1 BTC for the receiver and 0.99 BTC as change, believing to pay a fee of 0.01 BTC and you happily sign and submit that transaction. But to your big dissapointment, you find out the next day that you actually paid/lost 98 BTC as a fee! The attacker did not gain anything, but he made you lose a significant amount of BTC.

Indeed, this would work, and it is a known issue.

  I know - you can verify the hashes of the transactions where the inputs come from and if something seems off, reject the transaction, or the transaction will be rejected by the network, since it is not practically achievable to "crack" the transaction hashes, but I'm not sure if lightweight clients/hardware wallets actually verify the origin of unspent outputs and I have a suspicion that TREZOR, for example, does not do it, since in the protocol you just send the transaction inputs and outputs.

Actually, they do verify this. For legacy transactions, you have to send the TREZOR all transactions whose outputs you are spending from, to prove the amounts involved.

  A simple fix to the issue above would be including the amounts explicitly in the transaction inputs, so when you sign the transaction you say "I believe that input x has y coins and reject the transaction if you think this is not true", but currently there is no way to do this AFAIK.

That is indeed a solution, and that is one of the changes that were included in the SegWit protocol change. When spending a SegWit output, a new way to compute signature hashes is used, which explicitly includes the amount you're spending.

This means that if you would somehow lie to the hardware device about the amount being spent, the resulting signature would be invalid.

You can read more about this change in BIP 143.


Buying selling of cryptocurrency. Where does the coin come from and where does it go? I am a novice trying to understand selling and buying of crypto currency. I could not find it on google so asking, please do not be harsh.

Say, I have an account with coinbase and want to buy bitcoins or other cryptocurrency, how does/where from an exchange gets those coin to sell to me? and If I want to sell my coins whom does the exchange sell it to.

Is there an article on how this trade work on the internet?

I am a novice trying to understand selling and buying of crypto currency. I could not find it on google so asking, please do not be harsh.

No worries, we all start out here.

  Say, I have an account with coinbase and want to buy bitcoins or other cryptocurrency, how does/where from an exchange gets those coin to sell to me?

They already have a good stock of Bitcoins ready to sell you.

  and If I want to sell my coins whom does the exchange sell it to.

It is different for some exchanges. Some will buy them directly from you to get stock of them, and others will put them up for other users to buy, and the exchange will act as a middleman.

  Is there an article on how this trade work on the internet?

Yes, a simple search should provide you with many resources.

Hope this helped!


How I can earn money with bitcoin? I need advices about the earning with bitcoin
I also need help with this

Bitcoin is not a money machine.

It is a currency created on computers through "minning" using computational power.

Due to its deflationary feature i.e the having and the hard cap of 21 million coins.  The value will theoretically go up due to basic laws of supply & demand.

So if you want to make money from bitcoin.

The most straight forward options are;

a) Buy and hold BTC, then sell incase of a profit(if the price appreciates).

b) Invest in minning infrastructure and sell minned bitcoins on exchanges  to cover maintenance costs + profit


Wallet.dat Corrupted help please? I bought bitcoins about a year half ago and my hard drive broke and i managed to recover them using a recovery tool that found wallet.dat from a deleted wallet on another hard drive but its courrped and wont work at all. i tired something to do wtih python dbdump.py --wallet but it failed, is there anything i can do any help would be great.The wallet.dat is only 112kb i dont know if that matters.

You can attempt to launch the client via the command line and add the -salvagewallet option this attempts to recover and dump the private keys from the wallet.


Are altcoins private companies? As far as I have understood, Bitcoin is the Internet of money, using blockchain technology that is open, transnational, neutral, censorship resistant and there is no third-party controlling the network.

As far as I have also understood, altcoins usually always have founders, they have developer teams, they are basically closed, private, non-neutral, non-censorship resistant networks with a trusted third-party. Please, correct me if I am wrong.

So, my question is: Are altcoins private companies with private interest to make as much money as possible? Or have I understood something fundamentally wrong? I have tried to Google the answer to this question but I can't find anything. I hope someone could enlighten me a little bit on this issue.

I think you are confusing the monetary function of "coins based on blockchain technology" with the technology itself.  Blockchain technology, and thus any "alt-coin" using that technology, is used to prove the chain of ownership of a some item.  In the case of Bitcoin, that item is money, however it might just as easily be used to prove ownership of oranges.

Blockchain technology can be used by anyone to create a proof-of-ownership chain.  Therefore, a private company might choose to use it for whatever purpose they desire; that may make it closed, private, non-neutral, and non-censorship resistant.  That doesn't make it wrong, per se.

In the case of "alt coins", always perform due-diligence before making an investment.  Unless a company is designated as "not for profit", practically-speaking the only reason for it to exist is to make money for its owners.


How to get the input address from an txid with bitcoind I want to get the input addresses of a transaction with a known id. If I use getrawtransaction I get something like:

"vin" : [
{
"txid" : "470a499101b7042b225dab4f15fa252cdc7f3a16153e33d66d0c8c53b1d83aaa",
"vout" : 1,
"scriptSig" : {
"asm" : "304502206917b333161de796bed7770615ebf66669092a53877b3dba2582bad7dfc0b56c022100f9926a5e82d15666122b1f8703d94116eec0c98ddbf922a72467b05953532e1a01 03864670304932f91c85f38e80aebcd6c37fa36529b7135f7fa21b36585df5ab49",
"hex" : "48304502206917b333161de796bed7770615ebf66669092a53877b3dba2582bad7dfc0b56c022100f9926a5e82d15666122b1f8703d94116eec0c98ddbf922a72467b05953532e1a012103864670304932f91c85f38e80aebcd6c37fa36529b7135f7fa21b36585df5ab49"
},

If I want to further look of the transaction 470a499101b7042b225dab4f15fa252cdc7f3a16153e33d66d0c8c53b1d83aaa with getrawtransaction I get a:
"No information availabe about transaction (code -5)"

So is it at all possible to get the input addresses of a random transaction (not belonging to your wallet) with bitcoind?

You need to pass the option -txindex=1 at the command line, or include txindex=1 in bitcoin.conf.


How do you install blackcoin on a headless server or VPS? Could somebody tell me the commands to get blackcoin installed over the terminal?

You may need to slightly modify the following steps for your needs:

ssh or log into the machine
Make sure that git is installed.

sudo apt-get install git
Clone the github repo

git clone https://github.com/rat4/blackcoin.git
Follow the instructions from the installation documentation  which are:
Install the dependencies.

sudo apt-get install build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev
Run the makefile which will compile the program from the source we just downloaded.

cd blackcoin/src
make -f makefile.unix
Run the newly created binary.

./blackcoind

There is also a #blackcoin irc channel on freenode where there are friendly blackcoiners happy to walk you through installation.


Can someone explain how does Bitshares market pegged assets work? I'm reading up on Bitshares and they say they have market pegged assets that are linked to USD and Gold (BitUSD and BitGold)

They say it holds a stable price and fluctuates somehow to make sure you still have that exact value. What I'm assuming they mean is that if you have 100 BitUSD that is equal to $100 USD. And if BitUSD dropped in value to say $90, your bitUSD will fluctuate to 110 or something to compensate the change. So the coins/asset are the #'s that are actually moving not the value.

Now the question I have is say if you have 1000 BitUSD and you want to cash out to USD. Who is going to be the one giving you actual dollars? Sure if you put in $1000 USD and purchased 1000 BitUSD. Say if you wanted to sell that 1000BitUSD now, who is going to buy that back from u at $1000?

This is what I'm confused about on the Market Pegged Assets.

Abstractly spoken, what you have in the current BitAsset 1.0 implementation is that in the market two parties meet that have different estimations for the future price.

Let's define the price to be the price of a bitAsset (i.e. bitUSD) denominated in BTS (base base currency in the BitShares network). For example 0.1 BTS per bitUSD. We need to clarify this here, because every market in BitShares can also be flipped, i.e. we can trade BTS:USD or USD:BTS.

Going Short

Let's say Mark thinks the price (i.e. 0.1BTS per bitUSD) will go up in the future while Nanny expects the price to drop soon. Nanny wants to a bet for this and goes short on bitUSD. Going short on a bitAssets means, that you lend it from the network (i.e. the network creates them for you) and sell it to a buyer (here, Mark).

The collateral

In order to go short, you need to lock up some of your funds (here BitShares) as collateral, you can see this pretty much as a security that you will be able to give back your lent bitUSD eventually. The total collateral is 200% the amount your short payed by both parties of the trade. This means that:

In order to short 1 bitUSD, the amount of BTS worth 2 USD has to be locked up.
The shorter pays half of the collateral and the buys pays half.
If you want to short-sell 1 bitUSD you will have to lock away 1 USD worth of BTS and will not get anything from the trade.

Price movment

If the price (say to 0.09BTS per bitUSD) goes down then the market moved according to Nanny expectations and she should make a profit from the prediction. How is this achieve? As a short-seller, she has to give back the lent bitUSD eventually, so she can decide to do this at a price of 0.09 BTS/USD. This means she needs to buy bitUSD cheaper from the market than she sold it earlier in the short-sell. With the bought bitUSD, she can close her short order (i.e. cover) and give back the lent USD which will free up the collateral, which, considering that she had to buy bitUSD with BTS, should leave her a profit of 10%.

However, if the price goes up she can do one out of three things:

Wait for the 30 day short limits to arrive. The Network will put a buy order for bitUSD and close here order automatically giving her what is left from the collateral
Wait for the price to go up even further and risk a margin call. This will be triggered from the network if the collateral is only 150% (in contrast to the 200%). The network will force (i.e. it does this automatically) you to buy up bitUSD on the market and close the order.
The short seller can decide to cover on her own buy buying up bitUSD and closing the order herself.

All of these options will make the short-seller a loss as the prediction was wrong.

Market Peg

In the end, the market peg is achieved by a social consensus in such that 1 bitUSD should be worth 1 USD. Hence, trading against the peg should make you lose money because someone else will make a profit from trading towards the peg. Wouldn't you want to trade if someone offered you $1 for $90c?


How should I get all transaction history in a format that I can analyze? I want to download the entire bitcoin transaction history and store it in a database at my end to perform certain analysis. How do I get from the blk*.dat files to a useful format?

I wanted to do a similar thing to put all the transactions in the database (it was PostgreSQL for me, but you can use anything). After some research ended up using bitcoin abe and it worked great for me. Be patient though, it does take a long time - was several days in my case.


BTC and BCH receiving addresses UPDATE ONE:

It seems I might have answered my own question.  I took an address generated on bitcoin-core 0.17.1 to a BCH ATM and it would not get accepted as a valid address.  I then took the same address to a BTC ATM and it was accepted as a valid address.

Therefore, is it safe to assume that the addresses generated by bitcoin-core 0.17.1 are not compatible with BCH?

If it is not copatible with BCH, why does it show up as a valid address on blockchain.info for both BTC and BCH?

ORIGINAL QUESTION:

I've just created a new receiving address in bitcoin core 0.17.1 and noticed that it starts with a 3.  I then posted this address into blockchain.info to make sure no one else has miraculously generated the same address.  It was a new address.

But I noticed, that the address were appearing as both a BTC and BCH address.

Does this mean I can send BTC and BCH to this address?

When Bitcoin Cash was forked they used the same address format as bitcoin. A new address format was later proposed (CashAddr) so as to lower the confusion amongst people, but legacy addresses continue to be used and people can send funds to those addresses provided.

  Does this mean I can send BTC and BCH to this address?

Yes, if you control the private key related to the address you control the funds. However, care must be taken while doing that. BCH supports legacy addresses of P2PKH starting with 1 and P2SH addresses starting with 3. However, BCH does not support segwit types. By default Bitcoin Core generates a segwit address of P2SH(P2WPKH) form. BCH supports P2SH addresses (ones that start with a 3) but it doesn’t support segwit address of P2SH(P2WPKH) form which also start with a 3. To avoid ambiguity, the ATM must have shut off sending it to addresses starting with 3


Does the satoshi client always send the change of a transaction to a newely generated address? Experimentally, this seems to be the case, but is it always like this or depends on some details?
Also, does it generate a new address each time this is done, or first searches the wallet if there is an empty address there already? (And uses that in that case)
Is it likely that this behaviour will change in a later version of the satoshi client?

When you generate a wallet, then the wallet contains by default 100 bitcoin addresses. This is good for many reasons, e.g. old backups of your wallet might be able to recover all loses in case of a harddrive failure, etc.

The "privacy reason" is that someone looking at the blockchain can't see which bitcoin go to the receiver and which is the change of the inputs.

And last but not least, the "security reason" is because every bitcoin addresses is just a hash of a public key, so someone with a working quantum computer can't attack the public key (as he can only see a hash of the key, not the key itself). But whenever you need to spend bitcoins, you need to reveal the public key, so all addresses that have previously spend bitcoins will be "vulnerable" (but new addresses wont).


OP_CHECKLOCKTIMEVERIFY non-mandatory-script-verify-flag I have two addresses in my regtest.

A address is the P2SH-P2PKH. (sender)

B address is the P2SH-P2PKH, but with OP_CHECKLOCKTIMEVERIFY block height 201. (receiver)

My regtest doesen't have any block before it, Then I create some blocks (101) for A and transfer some bitcoins to B. A Wants that the UTXO is available after block with height 201 for that reason B creates this kind of script

$ bitcoin-cli decodescript 04C9000000B17576a914697c78eb51aadd3d977c1407e99baf9fe772240588AC
{
  "asm": "201 OP_CHECKLOCKTIMEVERIFY OP_DROP OP_DUP OP_HASH160 697c78eb51aadd3d977c1407e99baf9fe7722405 OP_EQUALVERIFY OP_CHECKSIG",
  "type": "nonstandard",
  "p2sh": "2N9X4FL8mg9Tc88FuHgPzBqFXa6U1etuUck",
  "segwit": {
    "asm": "0 30ff9dbf6bab02945016f39e95aa5d67e0f2e6adc7392d1066a1e171513bcb33",
    "hex": "002030ff9dbf6bab02945016f39e95aa5d67e0f2e6adc7392d1066a1e171513bcb33",
    "reqSigs": 1,
    "type": "witness_v0_scripthash",
    "addresses": [
      "bcrt1qxrlem0mt4vpfg5qk7w0ft2javls09e4dcuuj6yrx58shz5fmeves2tkaxf"
    ],
    "p2sh-segwit": "2MtXn1EgzySHEw8BQXLG8n58dxss6NGRsGU"
  }
}

B wants spend his bitcoins, it's the UTXO

[
  {
    "txid": "8cfc83e28fa520fed13a4199b72f588bf95fa84679d44b94efdff5d1f9f7812f",
    "vout": 0,
    "address": "2N9X4FL8mg9Tc88FuHgPzBqFXa6U1etuUck",
    "label": "",
    "scriptPubKey": "a914b2808972cf93673354475ece46820a2b3060978487",
    "amount": 49.99100000,
    "confirmations": 600,
    "spendable": false,
    "solvable": false,
    "safe": true
  }
]

And the current tip

$ bitcoin-cli getchaintips
[
  {
    "height": 701,
    "hash": "1967a98ea0cca367a3699d09a30d046d31ed711989bc6f1a2ae61d7ade910866",
    "branchlen": 0,
    "status": "active"
  }
]

Then B creates the transaction like this

02000000012f81f7f9d1f5dfef944bd47946a85ff98b582fb799413ad1fe20a58fe283fc8c000000008B47304402204cdc56d5be942d05edc218e40de872c9f50e78e018bbbbc9c11a05590aa54e8d02204163ce5796789fe4a7c9d1b1f0b3145ccca1eabb9489b92a4c6bc05508d5cbe6012102839f6ea8422639336f208a2cd2c199872f3e628bff39545eda72d8f71d4b45e42004C9000000B17576a914697c78eb51aadd3d977c1407e99baf9fe772240588ACfeffffff01c07aea290100000017a914d872ea0250c832eca1d7a75434db807397670ccd87C9000000

and uses C9000000 in Locktime field

{
  "txid": "d45d54d3cdae6c22f44cacfd705b2c1234658759f390d387186794240a77b16c",
  "hash": "d45d54d3cdae6c22f44cacfd705b2c1234658759f390d387186794240a77b16c",
  "version": 2,
  "size": 222,
  "vsize": 222,
  "weight": 888,
  "locktime": 201,
  "vin": [
    {
      "txid": "8cfc83e28fa520fed13a4199b72f588bf95fa84679d44b94efdff5d1f9f7812f",
      "vout": 0,
      "scriptSig": {
        "asm": "304402204cdc56d5be942d05edc218e40de872c9f50e78e018bbbbc9c11a05590aa54e8d02204163ce5796789fe4a7c9d1b1f0b3145ccca1eabb9489b92a4c6bc05508d5cbe6[ALL] 02839f6ea8422639336f208a2cd2c199872f3e628bff39545eda72d8f71d4b45e4 04c9000000b17576a914697c78eb51aadd3d977c1407e99baf9fe772240588ac",
        "hex": "47304402204cdc56d5be942d05edc218e40de872c9f50e78e018bbbbc9c11a05590aa54e8d02204163ce5796789fe4a7c9d1b1f0b3145ccca1eabb9489b92a4c6bc05508d5cbe6012102839f6ea8422639336f208a2cd2c199872f3e628bff39545eda72d8f71d4b45e42004c9000000b17576a914697c78eb51aadd3d977c1407e99baf9fe772240588ac"
      },
      "sequence": 4294967294
    }
  ],
  "vout": [
    {
      "value": 49.982,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_HASH160 d872ea0250c832eca1d7a75434db807397670ccd OP_EQUAL",
        "hex": "a914d872ea0250c832eca1d7a75434db807397670ccd87",
        "reqSigs": 1,
        "type": "scripthash",
        "addresses": [
          "2NCyhc6DkujYJE6ui1sVFCJAiSa79BDWqKv"
        ]
      }
    }
  ]
}

But When I try to send Transaction I get that error:

non-mandatory-script-verify-flag (unknown error) (code 64)

With help of btcdeb I can see that error "error: exception thrown: non-minimally encoded script.
number". The same logic BUT with date works.

One more question: Is it correct flow? B(receiver) creates P2SH with 201 OP_CHECKLOCKTIMEVERIFY OP_DROP in order to satisfy A (sender) requirements?

The problem is with your script. If you want to push 201, you should use 02C900 rather than 04C9000000. The argument to OP_CHECKLOCKTIMEVERIFY is a number, not a byte array, so you must use the shortest encoding possible for it.


How to free up the space taken by bitcoind? I am trying to create a wallet on my computer with bitcoind following this guide. I installed it, ran it, and monitored the process with bitcoin-cli. It went on for about 15 hours, at which it failed with an error message: "Error: Error: Disk space is low!". bitcoind had taken up the whole 160 Gb available in my home disk.

How can I safely free up the space taken by bitcoind? Should it be uninstalled? Or delete files (which?) will suffice?

The quide you followed is 3 years old. Since then, there was an option added called prune - add it to a line in your bitcoind.conf, like so:

  prune=50000

And restart bitcoind. This would effectively limit your blockchain size to only 50Gb of recent blocks.

In case you need to have a full blockchain available for research & analysis, there is no other way but to buy a bigger HD.

In case you don't need the local blockchain at all, then there is very little reason not to use a lightweight client like Electrum which does not store anything on your HD but instead relies on proprietary servers.


How to exchange bitcoins held in electrum to ethereum? How to exchange Bitcoins to Ethereum through shapeshift.io or changelly.com, from Electrum bitcoin wallet to Jaxx ETH wallet?
In electrum wallet do I need to subtract the Bitcoin mining fee manually, or I can send all my bitcoins in the wallet to shapeshift/exchangelly?

In electrum wallet do I need to subtract the Bitcoin mining fee manually, or I can send all my bitcoins in the wallet to shapeshift/exchangelly?

You just send Bitcoin with sufficient fee in a same way that you send Bitcoin to a standard address.

Here is the quick way to exchange BTC for ETH at Shapeshift.io
1. Paste your Bitcoin and Ethereum addresses in the filed below

Send some Bitcoins that you want to exchange to the address where shapeshift gives. It depends on how fast you want to get the transaction done. If you want to get it done in 10 mins, you probably have to pay approximately 500 satoshis/byte for the mining fee.


How would a P2P "Collective Transaction" be implemented (to increase privacy) In this thread, Luke Jr mentioned Collective Transactions would be a way for clients to increase anonymity when issuing transactions.

How would such an implementation work?

(Please provide technical details or references as available)

Dark Wallet is probably the closest to actively implementing something along these lines in a client.

See:

https://wiki.unsystem.net/index.php/DarkWallet/Alpha#Mixing

  When sending, the transaction is sent to an internal mixer, that
  starts announcing on the coinjoin channel, if another peer answers,
  both will negotiate a shared transaction that includes both peers
  inputs and outputs. If successful the final transaction will be sent
  into the network.

  You can see how a transaction from the mixer looks
  https://blockchain.info/tx/c38aac9910f327700e0f199972eed8ea7c6b1920e965f9cb48a92973e7325046

And also the multisig section that follows:

  Multisig funds are special bitcoin addresses that can be spent from
  only by a number of participants signing the transactions. This means
  accounts can be held among several people or devices, and several
  signatures (above some threshold) will be needed to spend.


How trade engine works? How cryptocoin trade engine works? Is there any open source project available other than buttercoin. I want to build a simple trade engine in ruby on rails for cryptocoins. what are the essential parts needed other than API?

You can code a trade engine in language like C++ or any other which ever is suitable for you. What actually happens in the back-end is an script keeps on repeating after particular interval for new trades or deposits that script can be coded in any language which can communicate with the database. Following is the example of a PHP script which checks for new trades and then update the database if any new trade took place:

<?
$sell = mysql_query("SELECT * FROM trades WHERE `From`<>`Type` LIMIT 1000000000000");
$num = mysql_num_rows($sell);
echo $num;
for ($i = 0; $i < $num; $i++) {
$id = mysql_result($sell,$i,"Id");
if($id != 0)
{
    $trade = new Trade($id);
    $trade->GetEquivalentTrade();
    $trade->ExecuteTrade();
}
}
?>


What is the advantage of running a Ripple masternode? There is one thing that I cannot stop wondering about:
Why would someone run a Ripple masternode?
Before you mark this as a duplicate, I understand how the transaction fees work in Ripple and also the mechanism of distributed consensus.
The point is - for other currency types, the usual rewards for providing services keeping them alive are transaction fees. If the masternodes don't collect any fees, what is the reason to operate one and bear the associated costs?

The same reason someone would run a bitcoin full node. If you want to transact on the network, you either have to run your own node or use someone else's. If you choose to use someone else's, you are relying on them to give you a proper view of the network and run their server reliably. If you run your own, you are independent. You also help improve the stability and reliability of the network for everyone.

Strictly speaking, you could just run a node that's not a validator. But there is almost no additional effort to running a validator -- it's literally just one extra command you enter once. It's nothing like mining.

If nobody is using the XRP Ledger or deriving any value from it, then it makes no difference who validates or, for that matter, whether anyone validates at all. If there are people using the XRP Ledger and deriving value from it, then they have a stake in ensuring that the network continues to operate reliably and that its rules continue to be the rules that make the network useful to them. This acts as incentive to run a validator, considering that there is no additional cost.


Where do i get a good hands-on Bitcoin learning experience as a newbie? I understand that bitcoin is a virtual form of money. It fascinates me. I have been to the site and seen numerous videos on youtube, but none seems to capture the vast enormity of the workings of bitcoin.

I would like to know how bitcoin is used, whether i can see the blockchain (since it is open source), how bitcoin to currency rates change, where and when and how bitcoin was created, why it is so successfull, if there is a way to see every step of a bitcoin transaction AND everything else that concerns the real life application of bitcoin.

I am a newbie, and i find most of the introductory documents of bitcoin working online too technical or too simple. How can i begin?

Probably a duplicate question, but I'll try to be as helpful as I can.

First, go download bitcoind: https://bitcoin.org/en/download

Next, run bitcoin in regtest mode (-regtest): https://en.bitcoin.it/wiki/Running_Bitcoin

Try some commands that create transactions: https://bitcoin.org/en/developer-examples#transaction-tutorial

You should have a decent grasp of how bitcoin works from playing with that and can then proceed to read some more heavy-weight documentation: https://bitcoin.org/en/developer-documentation


Can one GPU mine on Mac OS X using cgminer? I succesfully installed cgminer on my mac but every time I try to run it I get the message

[2013-09-16 15:03:49] clDevicesNum returned error, no GPUs usable

why is this? Is it that you cannot mine with the GPU on a mac, or am I just doing something wrong?

Specs:

Macbook Pro (2011)
Mac OS X Lion 10.7.5
Intel HD Graphics 3000 384 MB

That generation of Intel integrated graphics does not have OpenCL support, which is needed for mining.


Which framework is best for eWallet bitcoin development? What are the advantages/disadvantges of various web frameworks like Django, Ruby on Rails, Flask, etc when it comes to Bitcoin? Are some better at interfacing with the daemon than others? Do some implement security better or have holes that make them inappropriate for bitcoin development? Which is the best?

Bitcoin wallet development usually involves communicating with either bitcoind through HTTP JSON RPC, or otherwise with other Bitcoin Clients through the Bitcoin Protocol over TCP. On top of that, there are the usual requirements of authenticating users, securing data and so forth. All of those security issues are not Bitcoin specific, thus I think this question would be better asked elsewhere.


Bitcoin client won't connect to the network I installed Bitcoin QT yesterday and it was very slow to connect to the network. It didn't actually get there for over an hour.

Today I opened it again and it won't connect to the network at all. Any ideas why?

I'm running a Macbook Air with all software updated.

You should get the best results if you port forward port 8333 to your laptop. It is also advised to leave your computer on for a long time the first time you connect to the network, as it has about 1GB of data to download and check. After that the operation should be easier.


How fast can a LN payment be over TOR? I wonder how fast a LN payment can be over TOR if all possible optimizations have been implemented?

Basically as fast as a regular payment. The encrypted onion is being transported from node to node and will most likely leave the TOR network pretty quickly as many connections in lightning happen with direct IP connections.

The path calculation is happening locally on your node and does not need communication with your peers at the time when the payment is sent (before to download gossip information you need to talk to your peers)

And then of course the first hop sending the onion to your partner will now happen via TOR and go trough a couple of TOR nodes taking potentially a more complex path than a direct IP package to your peer would take.

I would argue that this extra IP traffic from TOR can be neglected in comparison to forwarding the onion and probing several paths.


How Do I Fix: "Safe mode: Warning: Displayed transactions may not be correct!" While trying to retrieve the private key from satoshi bitcoin client i'm getting this error code:

Safe mode: Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade. (code -2)

Does anyone know how to fix this?

It is QT VERSION 4.8.2 & v0.7.2-beta in the lower right hand corner it says it is catching up but has not added any blocks for a really, really, really, long time, it sitting on 90.13% . What else do you need to know?

I am Technically inept so I need to be clear so I dont screw up. I NEED THE PRIVATE KEYS for 2 ADDRESSES generated by this bitcoin-qt, when I type in dumpprivkey address I get the above error message. Will upgrading cause a conflict?  What is the proper way to upgrade as I dont see that as an option?

Typically, this is caused by a corrupted block chain database - it causes your client to consider the real chain invalid, and try to find another one. Since the real chain remains the longest obviously, it shows this warning, as it notices its opinion differs from the rest of the network.

The solution is deleting blkindex.dat/blk000?.dat and let redownload the chain. In case you're running 0.8 (if not, upgrade), you can just use -reindex to rebuild the database (no downloading necessary in that case).


Sending from address to address in bitcoind I'm programming the back-end for an ecommerce solution, Bitcoind API gives me one way of sending money to a bitcoin address: sendfrom <fromaccount> <tobitcoinaddress> <amount>

If I understood well, this will transfer money from one account to an address, but I don't see any way of sending from address to address. I didn't implemented accounts on my backend system, and don't want to do it as it's an aditional layer of complexity that I don't want to deal with right now.

So, I supose this will grab money from whatever address/addresses asociated to the account and send them to the bitcoin address provided. Any way of doing what I want to do?

To find the transaction outputs you can spend

listunspent 0 99999999999 "[\"addressYouWantToSpend\"]"

Then create the tx

createrawtransaction "[{\"txid\":\"txIdToSpend\",\"vout\":n}]" "{\"destinationAddress\":amountToSend, \"changeAddress\":changeAmount}"

Then sign the tx

signrawtransaction <hexStringProvidedBycreaterawtransaction>

Then publish the tx

sendrawtransaction <hexStringProvidedBysignrawtransaction>


How to generate a public key from a private key using Elliptic Curve Digital Signature Algorithm I'm trying to understand the graphical basis that underlies the discreet logarithmic Elliptic Curve Digital Signature Algorithm (ECDSA) introduced in Chapter 4 of "Mastering Bitcoin" by Andreas Antonopolous: https://github.com/aantonop/bitcoinbook/blob/develop/ch04.asciidoc

Andreas says a point in an elliptic curves can be added to itself by drawing a tangent, finding the intersection, then reflecting the new point on the x-axis. This makes no sense to me, but for now I'll just blindly believe. Then K = k * G, where k is the private key, G is a constant "Generator Point" and K is the public key.

Then he shows the attached figure which graphically shows how to get from G to 8G.

Is "8" the private key in this example?
Given K and G, it doesn't seem like this function would be irreversible. Am I missing something or does it only become irreversible in the discrete logarithmic equivalent.

Yes.
Imagine that all you can see is the point at G, and the point at 8G. You're trying to determine how many times the point was added. And the number isn't 8, it's somewhere between 1 and 2^256.

  Am I missing something or does it only become irreversible in the discrete logarithmic equivalent.

I have no idea what that means; I'll leave that for someone else to answer.


$40 of peercoin mined per day: possible? I have a friend who tells me she mines $40 worth of PPC per day per machine.  She has around 5  Cointerra ASIC servers working all day long.  One server is part of a pool.

I don't know enough about the rates.  But to me, it sounds very unlikely.

Is this, in fact, possible?

It would take around 1.6 TH/s to mine that as BTC and then exchange it, or 2 TH/s to mine that much PPC (not counting minting the PPC that you're mining, which is supposed to work out to 1% per year).

Cointerra sells a 1.6 TH/s miner for $3,500. With this $17,500 investment (plus any computers, electricity, maintenance, time, etc. associated with that), yes, she is mining $200/day on average currently (but ever-decreasing as the difficulty goes up), subject to market volatility. If only one is part of a pool and the rest are solo mining, that means she's taking the chance that she might never get anything of value from those 4 servers. That is a pretty high stakes gamble, if you ask me.


How to get addresses from scriptPubKey in segwit transactions? I'm running through raw transaction data, and I'd like to be able to gather addresses (where possible).

So far, I've made this diagram to help me understand when it's possible to figure out addresses from the scriptPubKey of each output:

However, as you can see, I'm not sure how I can work out an address from a P2WSH.

Is it possible to get addresses from the scriptPubKey alone, or can I only get them when the witness is revealed when the output has been spent?  (as shown here):

witness:      0 <signature1> <1 <pubkey1> <pubkey2> 2 CHECKMULTISIG>
scriptSig:    (empty)
scriptPubKey: 0 <32-byte-hash>
              (0x0020{32-byte-hash})

EDIT: Also, please let me know if you notice that any of my pattern matching in this diagram is incorrect (or if I'm missing any patterns that allow me to find out more addresses).

There currently exists no native address format for witness outputs, so the answer for P2WPKH and P2WSH is simply: you can't, and shouldn't. If you convert the 20-byte hash inside a P2WPKH output to a 1xxxxxx, and show the result, people may think that is an address more money can be sent to. However, that would result in a P2PKH output, which a pure segwit wallet may not understand.

However, most segwit outputs initially will use the P2SH wrapper (resulting in P2SH-P2WPKH or P2SH-P2WSH programs), which just look like (and behave like) P2SH addresses.

A new native segwit address format is proposed in https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki. That can only be used when both the receiver and sender software support it however.


Multibit Classic Wallet broken - Ballence unspendable I loaded in my multibit classic wallet the other day, into a fresh install with the intent of migrating it to multibit HD, however when i tried to spend some of this bitcoin, the transactions never chose to confirm. In fact blockchain.info shows them as pruned from database. It seems this has corrupted my wallet in some way as it shows my spendable balance as $0 when this is wrong, it's ~$130. How can i clear these bugged transactions and spend the rest of my coin? I don't care even if i have to loose the bugged transactions. I have tried resetting the blockchain transactions in multibit, and it's done me no good what so ever. This was all 3 days ago. I would try using bitcoin core to see if that would remove the fault except i don't really want to tie up 122 GB of space over this.

How can i fix/remove/ignore these transactions to spend the rest of my unaffected bitcoin? Or has the damn thing just wasted all my money?

I had the same problem.
But it is not directly the fault of the wallet.
The wallet sends the transaction with the standard miners fee, not that high.
So miners won't focus on your transaction, because of the low miner fee. This has becoming a more frequent problem since Bitcoin is becoming so big.

But there is a solution!
Try this website ViaBTC

I recommend reading there service statement first.
Than just insert your transaction ID fill in the captcha and press submit.


How to tell which account an unspent output is in? When I go to send coins, I want the transaction to ignore the unspent coins in a certain account.

I think I can do this in wallet.cpp, but I'm not sure how.

Maybe in the AvailableCoins() function? Make it continue if the coins are in this account? I guess I need to create a function like:

bool isInAccount(string strAccountName, CWalletTx *wtx)

How can I go about doing this?

Your question is based on a misunderstanding of the account system. It's a very common misunderstanding, though.

Unspent outputs are not associated with accounts.

Incoming transactions credit the balance of the account associated with the address the transaction is received with. But accounts only have a balance - they don't 'own' the coins sent to them. Account balances can go negative, and can be modified through the move command, without changing the coins.

The unspent outputs belong to the wallet as a whole, and accounts just keep track of who/what owns which amount of them - not which ones specifically. It is like keeping a wallet around with money that both belongs to you and to a friend. You keep track of how much you owe your friend, but you don't keep track of which specific notes or coins in the wallet belong to them.

To do what you want, you either need to use separate wallets (which keep the coins separately entirely), or use coin control or the raw transaction API, which allow you to specify manually which coins to use.


What happens if I force quit a bitcoin wallet application before it finishes synchronizing? I ask because upon initial install, this program (newest version) is PAINFULLY slow, and slowing down my system extremely, toward the end of the 6k block mark. I'm wondering if you force quit the application before it is completed, it will start all over again, or do something else.

The QT client at least should gracefully resume from where it left off.

I have done this many times with no issue (running a reasonably recent copy of the client in Windows 7).

I'm not sure whether the MultiBit or Armory clients work the same way though; can anyone vouch for them?


Minimum tx amount where amount = fee What is the absolute minimum amount which when transferred over a tx its value equals the tx's suggested fee? Is it the dust amount of 0.00005430 BTC? How is this value affected when that amount is the only unspent output spent in the tx and when there are more unspent outputs than just this one?

Relevant question:
What's the minimum transaction with bitcoin?

There is no minimum amount. You can send 0.00000001 btc and even 0.0 btc without fees and there is a possibility that this transaction would be mined by some miner. But the probability is very low, because "standard nodes" (by bitcoin devs) do not relay such transactions.

You should add a fee if you want to send less than 0.00005xxx (I do not remember the exact value). The fee is 0.0001 per kb for clients running 0.8.x and 0.00001 per kb for clients on version 0.9.x

Here you can see transaction which transfers small amount of btc with a higher fee. https://blockchain.info/ru/tx/b07f23ce5d6a3746a3f8bd5202daa1084686812aa4ecce290208fbe84e68f564


Can I remove the initial bitcoin folder after installing its binaries to /usr/local/bin? I know this's kinda a noob question, but I really want to be sure I'm not making a mistake.
I want to install Bitcoin Core GUI on my Linux by the following steps:

Download bitcoin-0.20.1-x86_64-linux-gnu.tar.gz into the Downloads folder
Extract it tar xzf bitcoin-0.20.1-x86_64-linux-gnu.tar.gz
Copy binaries into the /usr/local/bin: sudo install -m 0755 -o root -g root -t /usr/local/bin ~/Downloads/bitcoin-0.20.1/bin/*

Each step is exact the same as described here: https://bitcoin.org/en/full-node#linux-instructions
The question is: Can I now remove the extracted ~/Downloads/bitcoin-0.20.1 folder after installing the contents of its bin subdirectory into the /usr/local/bin?
Is it enough to have only binaries into the /usr/local/bin to run the program?

Yes, after you've checked if bitcoin is properly "installed" by checking its version you can remove the ~/Downloads/bitcoin-0.20.1. Be sure to double-check the processes and be careful before putting funds in without backup.


Bitcoind rpc AddLocal(ip:port) and Disover: IPv4 eth0: ip missing Amazon AWS CentOS I have a server at DigitalOcean with Ubuntu installed and bitcoind with rpc which IS working.

With my Amazon AWS CentOs server bitcoin-cli is working but not EasyBitcoin-PHP, it's returning 0:

$bitcoin = new Bitcoin('username','password','myipaddress','8332');

echo "Status: ".$bitcoin->status;

Bitcoin.conf

server=1
daemon=1
rpcuser=username
rpcpassword=password
rpcport=8332
rpcallowip=myipaddress

Checkout this image. On the working DigitalOcean Ubuntu server it includes AddLocal(192.81.219.224:18333,1) AND Discover: IPv4 eth0: 192.81.219.224

I also tried to add -discover=1 to the AWS CentOS but it didn't do anything new and still isn't working.

I'm guessing it may have to do with Amazon's Elastic IP's or something?

The fix was:

setsebool -P httpd_can_network_connect 1

Amazon AWS apparently limits httpd network connections initially.


Create a wallet from the HD recovery phrase Is there a way to create a wallet from a Hierarchical Deterministic recovery phrase in Bitcoin Core 0.21.0?
I'm using the x64 Windows cli version, in case that matters.

No, bitcoin-core does not support bip39 mnemonic phrases.


How to remove unconfirmed, non-existent transaction from QT wallet I transferred 10 btc from my Coinbase acct to my wallet.  The transaction appears twice in my wallet, one went right through and confirmed within minutes, the other has 0 confirmations (after 2 weeks), and the transaction ID does not show up on blockchain.  So I got my bitcoins, but now I have this "phantom" unconfirmed transaction in my wallet.  How do I get rid if it?

The command line option is -zapwallettxes

This will clear unconfirmed transactions from your wallet.

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


Programming API for Lightning Network I am trying to learn how to work with Bitcoin and the Lightning Network from a programming perspective.

I saw that bitcoin-core was using: https://bitcoin.org/en/developer-reference#bitcoin-core-apis in order to allow one to work with RPCs (or APIs).

Is there something similar for the Lightning Network? When using an API for the Lightning Network, would Authentication/Authorization be necessary?

TIA

For lnd, it's at https://api.lightning.community

Note that there are additional resources at https://dev.lightning.community


Can RBF be done by a third (or second) party I've been thinking about the following usecase:
could a retailer/merchant offer clients a "no bitcoin fees" option when paying with bitcoin? i.e. if something costs 1 BTC on the site, the user will pay ONLY 1 BTC, and the merchant would pay the tx fee.

As I understand RBF is a doublespend of the same utxo that, as it has a higher fee, invalidates the original tx simple for being confirmed first.

Or would it be possible for someone else to bump up the fee without having to have access to the utxo owner's private keys (in order to sign the RBF transaction)

Thanks!

No, without knowing the private key it is not possible to create valid transaction and pay additional fee. There are some other complicated ways to force the transaction be included into a block, for example CPFP or creating non-final transaction ANYONE_CAN_PAY.

The simplest solution is seting the cost to 0.9998 BTC, user will pay 1.0 BTC with 0.0002 fee. This will produce the same result as in your example but without any additional actions.


How do I use electrum on multiple computers? I would like to use my electrum wallet on multiple computers. Is it just a matter of using my seed to recover the wallet on the other computer, or do I have to do something special to set it up?

As you have suggested, all you need to do is to restore the wallet from your seed on each computer and you'll have all your Electrum instances synced.

Labels can also be exported and imported on each PC in order to avoid having to re-write them; or you can use the plugin LabElectrum (Label Sync) to store them in the cloud and update them at your convenience.

Transactions will remain synced as they are received from the network.

Imported keys are not derived from your seed, so you'll need to manually import them on each computer. Or if you have many imported keys you can copy the electrum.dat file to each computer you'll use.


What does allowhighfees in sendrawtransaction actually does? lets say.

i have created a raw transaction with inputs = outputs aka setting 0 fees.

so when i do

bitcoin-cli sendrawtransaction <signed_hex> 1

1 is for allowhighfees

what it actually does ?
if it increases fees ? then how much ?

how much fees does it sets per byte ?

What if there is not much satoshis in input to cover the fees ?

The fee is whatever you define in the raw transaction, based on the difference between inputs and outputs.  sendrawtransaction never changes it.  However, as a safety measure, it will normally reject your transaction if the fee exceeds a certain "absurd" threshold, so that you don't accidentally lose a lot of coins by miscalculating your raw transaction.  If you set the allowhighfees parameter, this check is disabled, and you can send a transaction with fees as high as you wish.

The threshold value can be set with the maxtxfee command line / config file option.


Build an online wallet service with Bitcoind, can it scale? If not, what can be done? I would like to build an online wallet service. I thinks it will be easy to implement all the functionalities if I go with Bitcoind. Here is a possible workflow:

New user with email bob@g.com can obtain a new account (in Bitcoind) with new address by calling getnewaddress bob@g.com
We can then start polling listsinceblock xxx to get all new transactions. If we receive a new incoming transaction, store txid in database, then iteratively call gettransaction txid on all unconfirmed transactions. When the number of confirmations are bigger than a certain threshold, credit the account in database, then call move bob@g.com safe, just to make the next step easier.
When safe account exceeds say 50BTC, send them to offline wallet.
When user wants to withdraw, refill safe if necessary, send the coins from safe, and update user's balance in the database.

However, in all the related questions I've read, most people say Bitcoind won't scale. Even the Bitcoin wiki says so. Now, if we are only to use the JSONRPC to interface the network, I can imagine the following workflow:

We generate say 1M addresses in database. When user signs up or require new address, we assign one address to them.
We enable blocknotify to get new block hash blkhash.
Call getblock blkhash to get all transaction hashes in the new block.
Call getrawtransaction txid to see whether we received an incoming transaction to our addresses. If so, keep the txid and keep polling gettransaction txid to update the confirmation number.
Call signrawtransaction, sendrawtransaction to move funds to offline wallet.

My questions are,

Do you think my proposals are reasonable?
What are the nuances in the operations above? For example,

by moving all funds to one account and then send money, does that count as one transaction or one transaction for each account? Are transaction fees the same?
when doing getrawtransaction, in the vout array, each object represents a destination, but each of them has an addresses array. There are cases where it contains multiple addresses. Does it mean it's a "multisig" transaction? Or is it related to reqSigs field? How do we handle such cases?

I've read following questions, but didn't find my answer:

Does the original Bitcoin client scale to contain millions of addresses?

Bitcoin Client API-RPC: Efficient way to list transactions from a list of addresses

Please help.. Thank you very much!

I hate to be this guy but if you're struggling with this chances are that you'll struggle to secure the private keys. Those private keys are the keys to your empire in a way you don't even want to think about.

Think very seriously about outsourcing this to a company with insurance for it. Or get insurance yourself. The outsourcing also takes the performance hassle away from you.

If you don't, please don't forget to make (really) cold wallets. Just place that cash elsewhere.

Perhaps more directly, there's several bitcoin daemons out there. You could make your own, too, with something like bitcoinJ. I met the guys behind btcd ("BitcoinD in Go") https://github.com/conformal/btcd at Bitcoin2014, their lead coder made a good impression.

I'm afraid there's no shelved answer for this question yet. Perhaps the best advice is "Do it, once you run into trouble you're successful already. Time enough to solve it later.".


Limited, but not fixed multisignature transactions, is that possible? Is it possible to have a multisignature transaction where N signatures are required and their inputs are limited in value, but not fixed?

The use case would be for a pooled acquisition, where the total amount to be spent is just roughly estimated, but not know. Every participant wants to just specify a maximum value to be used (probably the same for everybody).

The exceeding money, if any can go to a shared account or be returned to each of the "bakers".

Restrictions on the btc value of a transaction cannot be enforced via a transaction script. The btc value is not a property accessible from a script.

I think it would be possible though to create a protocol on top of bitcoin which does have such properties.


sent bitcoin to bitcoin cash address on coinbase Accidently sent bitcoin from blockchain wallet to coinbase, but used a bitcoin cash address for the transfer, by mistake.  Can I fix this so I can get my bitcoin?  On my coinbase wallet,  i don't see the bitcoins anywhere.

It sounds like you sent your bitcoin to an address that you do not own, and is not associated with your Coinbase account.  If this is the case, it's important to understand what has happened.  Forgive me if this is review for you, but others may find it useful.

Bitcoin and Bitcoin Cash addresses are the same in structure.  These addresses are a hashed and checksummed representation of the public key of a asymmetric key pair.  In order to spend them, you need the private key.  If you have the private key, you control any money paid to the address on either blockchain.

It appears as though you copied a Bitcoin Cash address generated by Coinbase, and sent Bitcoin to it thinking it was a Bitcoin address tied to your Coinbase account.  I'm not sure how this happened, but the result is that your Coinbase Bitcoin account knows nothing about the transaction.  You transferred your Bitcoin to an address that Coinbase may not even realize exists on the Bitcoin blockchain.

Here's the problem: You don't have the private key, only Coinbase does.  Coinbase may only recognize this private key as a key to a Bitcoin Cash address, but it is also a key to a Bitcoin address.  You will need to get them to use this private key to generate a Bitcoin address that is tied to your account.  You cannot do this without their cooperation.  You don't own the private key, and therefore, you technically don't own the Bitcoin.

As a general rule, do not consider any Bitcoin held by a third party to be your Bitcoin.  It's not.  Bitcoin is owned by whoever controls the private key.  In the case of a Coinbase wallet, Coinbase owns the Bitcoin on your behalf.  They are nice enough to give you a web interface to let you use their Bitcoin that you paid for.


get offline Bitcoin transaction id, chain multiple offline transactions let's say i create a valid transaction (offline without sending it, such as like this: http://brainwallet.org/#tx. let's call this "A"

a)before having sent A, can i get the transaction ID of A?

b)I wish to create a new offline Transaction (called B), using the outputs from A as inputs for B.Still, A has not been sent to the bitcoin network. Is this possible?  For example, A sends money from account x to account y.  B sends the same bitcoins sent from x to y, from y to z.

c) if part b) is possible, and I send A, then immediately send B to the bitcoin network. what would happen?

before having sent A, can i get the transaction ID of A?

Yes, you can calculate the TXID without any connection to the network.

  I wish to create a new offline Transaction (called B), using the outputs from A as inputs for B.Still, A has not been sent to the bitcoin network. Is this possible?

Yes, but there's a small technicality when working with nested unconfirmed transactions. If you build a large number of them on top of each other, and one of them is never confirmed, then the entire chain of transactions will disappear. That is to say, if you build A, B, and C, and A had an incorrect fee, none of the subsequent transactions will ever confirm and will eventually drop from the network.

That being said there's nothing stopping you from making chains of infinite lengths, they just have to be broadcast in order for the nodes to be able to see the previous inputs. If you make them out of order (C, A, B) they will likely be rejected.

  is possible, and I send A, then immediately send B to the bitcoin network. what would happen?

This is completely valid and a reasonably normal flow for some applications, it's not invalid or unrecommended if the fees for each input are properly paid.


Construction of unowallet url I just tried to use unowallet.
It seem that the private key is somehow encoded into the url.
Isn't it some known type of representation?
Wouldn't it be possible to create an url for my private key?

Or maybe its just the seed of the bitcoin address generator.

My only observation is that it is not a base58 because there are 'l' and 'O's, it may not be base64 because it does have bad number of characters (but maybe '=' are ommited).

e.g:

URL: https://uno-wallet.com/wallet/WXG7M59EniYuAm39ildMv7lUDc2L5khVLDpMPic2dOo1mJDiLJ

Address: 1BjECXazZUZdd8zAj7VoxppoBA73aZ1KrX

Private key: 5JWXyvz2DcEKQFm7pa6j8Gp1M5A8cgNhx4F2ZjM2R14MHy3D2NQ

It's probably hashed. Any URL is valid.

https://uno-wallet.com/wallet/0


When building bitcoind from source, how to specify stable build? I managed to build bitcoind on arch linux after downloading the source from github, but after running bitcoind getinfo command, I am told:

  "errors" : "This is a pre-release test build - use at your own risk -
  do not use for mining or merchant applications"

How can I remove that message and use a stable build, instead of the pre-release one I downloaded?

I assume I have to do something with the information found here: https://github.com/bitcoin/bitcoin/tags

If you got the source via git, you can checkout on the latest stable release tag, currently v0.8.1 using the git command git checkout v0.8.1.

When you did not setup git, you can simply download the source from that tag version from the webpage you suggested using either the .zip or .tar.gz link underneath the tag name. vX.X.X releases are stable ones, while the vX.X.XrcX releases are release candidates, meaning that they can still contain a few bugs.


Is there a bitcoin market for CPU time / memory space / disk space? Bitcoin mining pools are like lending / borrowing cpu time, but it's only for hashing.
Is there something more general; a market where you can lend and borrow cpu time, disk space and so on?

Maybe not exactly what you are asking for but CoinLab have a mining pool that intends to use the computing power of their members for jobs other than hashing.

From the Bitcoin talk forum topic:

  We’ve identified a number of opportunities to monetize our growing GPU cluster at a higher rate than Bitcoin mining, particularly for NVIDIA cards:  Protein Folding, Computational Finance, and Big Data Analysis, just to name a few.


Standing Orders, Is it possible with Bitcoins? Is there a service out there, or is there any intention to integrate Standing Order type transactions into the client ? (Every 30 days transfer 0.2BTC to a specific address for example).

One way to accomplish this today is to run Bitcoin with the -server switch. Then, create a cron job (Linux) or scheduled task (Windows) that calls bitcoind with the proper arguments. Something like...

bitcoind sendtoaddress <address> <amount> <comment>

The up side of this method is that you can run a lot of different commands this way. See the wiki for a full list of available RPC calls.


Does private key belong to one public key in Bitcoin? More address belong to one wallet in Copay. I have a 12-word mnemonic to my old Copay wallet, but not the private key. If I would infer the private key of the 12-word could I reach all the public adresses with that private-key and start withdrawal?

Each private key corresponds to one public key, but a mnemonic key contains the master private key which describes how each private key is generated.
If you want to withdraw from it, I would use Electrum. It can show you the addresses and you can export individual private keys.


Is Bitcoin Cash more secure? I found in https://www.bitcoincash.org/index.html that this technology is
the world's most robust blockchain but searching for the details that explains why it is so secure I don't find any information. Some one knows a source that probes why this technology is secure and some technical information about the security implemented on it ?

Bitcoin is secured through proof-of-work mining using SHA256 as the mining algorithm. Bitcoin Cash uses the same algorithm, so the specialized ASIC hardware used to mine one coin, could also be used to mine the other.

PoW coins are susceptible to ‘51% attacks’, which are possible when a bad actor controls a majority of the network’s hashpower.

So generally, when considering ‘how secure’ a blockchain is, we consider how possible, or likely, it is for a single entity (or a group of colluding entities) to gain control of a majority of the hash power available for a coin. The more hashpower a coin has pointed at it, the more secure we can consider it to be. This is because an attacker would need a larger amount of hashpower under their control in order to enact an attack.

From fork.lol, we can see that over the last 7 days, the BTC hashrate has been approx 47.3 exahashes/second, while the BCH hashrate has been approx 1.6 exahashes/second.

By this measure, Bitcoin Cash is most certainly not ‘more secure’.


Most of the Bitcoin exchanges, are they using 3rd party API like blockchain.info or running their own node? I'd like to know how the bitcoin exchanges work. It's not about big exchanges like binance or bittrex. I'd like to know people could make an exchange solely relay on third party apis and are they safe ?

Most of the Bitcoin exchanges, are they using 3rd party API like
  blockchain.info or running their own node?

They're running own nodes.

  I'd like to know people could make an exchange solely relay on third
  party apis and are they safe ?

In my own opinion it's not safe to delegate service to third party services in case of money, especially if you can create and run that's service byself.


Where can I find a full list of all Bitcoin mining hardware ever used? I want to know where I can find a full list of Bitcoin mining hardware. I don't want a list of the most profitable hardware, I just want a list with the greatest number of Bitcoin miners (don't care if it mine at low hashes p/ second or is very old).

The objective is to include this list in a tutorial where I explain mining to newbies and where I can show the viewers a "complete list of Bitcoin mining history".

Have some ideas about that?

https://en.bitcoin.it/wiki/Mining_hardware_comparison and https://en.bitcoin.it/wiki/Non-specialized_hardware_comparison are the canonical lists. I'm not sure that will be useful to you; there's approximately 940 products across the two lists.

If you're making a visual presentation of how mining hardware evolved, you might also find this thread useful.


What happens if I don't "pick up" bitcoins with a Bitcoin client? Say I want to save ten bitcoins could I send them to myself and just not 'pick them up' with my client? In a way would I be storing the bitcoins in the blockchain and when I want them just start up the client? Or would it be possible for someone else to 'pick them up'? Or are the private keys already in the wallet file as soon as the payment is 'sent'?

Everything is already stored in the blockchain, and there is nothing to "pick up".

The blockchain stores: "A generate a block (25 btc now)" and "A sends 2 btc to B".

When you want to send bitcoins, you proof that you are "B" and sign a message saying "I own these coins (A->B) and want to send all of them (2 btc) to C".

Now "C" owns 2 bitcoins.

(This of ofc simplified alot, e.g. I am missing confirms/etc but you really need to understand the basics before you start learning the advanced)


CPU vs GPU Mining (FTC) - CPU wins? How? I've read many times over a long period of time that GPU will win out against CPU every time if you use hardware of a similar tier/age. However, i've been toying around today with some FTC mining and noticed what appears to be the opposite.

My rig:

i7 4770k (no overclock currently)
570 GTX Twin Frozr
16Gb RAM + SSDs

I'm mining using the latest versions of Pooler's CPU miner + CudaMiner.

When i mine with the CPU on 4 threads (no hyperthreading), i get 67kh/sec with an increase of 64w power, measured using Asus AI Suite (motherboard software).

When i mine with the GPU, it runs @ 71% average load (measured in GPU-Z), gets 145kh/sec and the power from this rise should be around 151w, according to official and unofficial power spec/stats.

By my maths, i make this out to be roughly:

CPU - 1.05kh/w
GPU - 0.9kh/w

The kh/sec numbers also seem similar to other numbers i've read for my hardware, such as forum posts and this list - https://litecoin.info/Mining_Hardware_Comparison

I think i've done a decent amount of testing here, but i'm sure i must have made an error somewhere along the line. But so far, my numbers indicate that while the GPU gets more per second, it gets less per watt... thus, less cost efficient. I know i'm using Nvidia, which is less efficient for mining than AMD, generally, but these numbers go against everything i've read before now.

Can anyone explain this, or dispell my numbers? I'd love to work out what's going on.

Cheers.

The problem with your math is, that nvidia is far away from being optimal for GPU mining. If you would compare your CPU with an "older" ATI graphic card like my HD 6870  (about 150$) with max TDP 200W you would surely come to the opposite conclusion. I am mining with that card at ~280 to 300 kh/sec on average. Well I did not measure the extra power usage while it is on 100%, but it cannot be more than 150 Watt, since max usage is 200W. Besides: it runs really steady on 100% GPU load (measured with gpu-z) and drops only sometimes to 99% for a second. Not to mention that nowadays cards can get the double amount of kh/s.

I hope I could help you a bit. If you plan to invest into a new/second graphic card then you should go for ATI.


Mysterious transfer of BC Sent coins from one online wallet of mine to another
Coins were immediately credited from the first wallet which now has a balance of zero, but did not appear in the second wallet. Mt initial thought was that I stuffed up and entered the wrong address, but
There was no record whatsoever of the transaction OUT of Wallet 1 on the Blockchain, until
Finally, TWO DAYS later, a transaction record appeared on the Blockchain from Wallet 1 to dozens of different addresses, spread across 4 different payments approximately totalling my initial amount

Basically I would just like to know what happened, I'm confused as to whether this is my error or something else

If you were using an coin mixing service it would have sent your coins to many different places, to try to make it harder to trace.

Since the blockchain allows us to see where all coins go at any time, this is really the only way they can do it.

Without seeing the transaction (which defeats the point of you making it) I would say the system is working as intended.


Syncing node to usb 3.0 drive taking ages I'm trying to make a bitcoin app and would like to use a full node so I purchased a 128gb usb 3.0 drive to store it on. I use an early 2014 macbook air: 1.4 GHz Intel Core i5, 8 GB 1600 MHz DDR3. Is processing being throttled by the usb connection? Drive is formatted as mac os extended journaled.

Using bitcoin core, it is syncing very slowly. After almost 24 hours it says last received block was generated 2 years 3 weeks ago. The sync bar is about 1/8 of the way done. Any thoughts or recommendations would be helpful.

Increasing the database cache should help a lot to reduce disk I/O. For example dbcache=400 (100 MB is the default).


What is the chance of someone (randomly) finding the private key for an existing Bitcoin address? Say I have created a paper wallet with one bitcoin address in a vault. What are chances that someone else will find the private key for this wallet?

Related: what are the chances of vanitygen address - private key pair collision?

Essentially zero. They would have to find a private key whose public key hash matched yours. The public key hash is 160 bits long. If they had a billion computers, each of which could try a billion keys a second, and they tried for a billion years, they'd have much, much less than a one in a billion chance of getting it.


How to import address with private key using importmulti Problem. importmulti function has a lot of parameters and they are more difficult to understanding then the parameters of another Bitcoin RPC-API functions. Those who are not profi in modern cryptographic achievements have difficult with understanding how to use importmulti function.

Here is the task that demonstrates the problem.
There is 2 wallets with the Bitcoin Core v.0.19.1:
wallet1 - the wallet with private key for export.
wallet2 - empty wallet into which we need to import the PK+address from wallet1.

So in the wallet1 we have the bitcoin address created by getnewaddress.

[root@wallet1 ~]# bitcoin-cli getaddressinfo 3M5e4QMBUYtpEewwuuoWCArpiM2fT4KEDy
{
  "address": "3M5e4QMBUYtpEewwuuoWCArpiM2fT4KEDy",
  "scriptPubKey": "a914d4b1b498c8be8813273937b834be6d9d1f488b9087",
  "ismine": true,
  "solvable": true,
  "desc": "sh(wpkh([675dc179/0'/0'/0']02607cb6c05a575fd040498ec8c44eabfa2a4f0fc320aeacf494a77b3a408d84af))#r6dvu4wk",
  "iswatchonly": false,
  "isscript": true,
  "iswitness": false,
  "script": "witness_v0_keyhash",
  "hex": "00144c88353345f2e03abc8e96b818fd030c3c9f59ab",
  "pubkey": "02607cb6c05a575fd040498ec8c44eabfa2a4f0fc320aeacf494a77b3a408d84af",
  "embedded": {
    "isscript": false,
    "iswitness": true,
    "witness_version": 0,
    "witness_program": "4c88353345f2e03abc8e96b818fd030c3c9f59ab",
    "pubkey": "02607cb6c05a575fd040498ec8c44eabfa2a4f0fc320aeacf494a77b3a408d84af",
    "address": "bc1qfjyr2v697tsr40ywj6up3lgrps7f7kdtvw6mnu",
    "scriptPubKey": "00144c88353345f2e03abc8e96b818fd030c3c9f59ab"
  },
  "label": "",
  "ischange": false,
  "timestamp": 1589545405,
  "hdkeypath": "m/0'/0'/0'",
  "hdseedid": "7cf768d4050dc142a69a149666798cc434045c6c",
  "hdmasterfingerprint": "675dc179",
  "labels": [
    {
      "name": "",
      "purpose": "receive"
    }
  ]
}

[root@wallet1 ~]# bitcoin-cli dumpprivkey 3M5e4QMBUYtpEewwuuoWCArpiM2fT4KEDy
Kwngf5FSYmHM5oPHjSoKxtHWUxXiQ5YN5ZR6shmzkYpMMftBh92c

I've tried to import that address to wallet2 but have failed.

[root@wallet2 ~]# bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "3M5e4QMBUYtpEewwuuoWCArpiM2fT4KEDy" }, "timestamp":"now", "keys": { "Kwngf5FSYmHM5oPHjSoKxtHWUxXiQ5YN5ZR6shmzkYpMMftBh92c":0 }  }]' '{"rescan": false}'

result
[
  {
    "success": false,
    "error": {
      "code": -1,
      "message": "Missing required fields"
    }
  }
]

What the correct way to import that address using importmulti? Show the example please.

$ bitcoin-cli help importmulti
importmulti "requests" ( "options" )

Import addresses/scripts (with private or public keys, redeem script (P2SH)), optionally rescanning the blockchain from the earliest creation time of the imported scripts. Requires a new wallet backup.
If an address/script is imported without all of the private keys required to spend from that address, it will be watchonly. The 'watchonly' option must be set to true in this case or a warning will be returned.
Conversely, if all the private keys are provided and the address/script is spendable, the watchonly option must be set to false, or a warning will be returned.

Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls
may report that the imported keys, addresses or scripts exist but related transactions are still missing.
Note: Use "getwalletinfo" to query the scanning progress.

[...SNIP..]

Examples:

> bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }, { "scriptPubKey": { "address": "<my 2nd address>" }, "label": "example 2", "timestamp": 1455191480 }]'
> bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "<my address>" }, "timestamp":1455191478 }]' '{ "rescan": false}'

As for your specific import you are passing the keys array (specified as such in the help, see the command above) as an object so bitcoind could not give you a helpful message :
$ bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "3M5e4QMBUYtpEewwuuoWCArpiM2fT4KEDy" }, "timestamp":"now", "keys": [ "Kwngf5FSYmHM5oPHjSoKxtHWUxXiQ5YN5ZR6shmzkYpMMftBh92c" ], "redeemscript": "00144c88353345f2e03abc8e96b818fd030c3c9f59ab"}]' '{"rescan": false}'

[
  {
    "success": true,
  }
]


What precisely does the commonly reported network hash rate refer to? Specifically, does it refer to SHA hashes per second, or does it refer to nonce-iterations per second, because to check a nonce requires the application of SHA twice.

The number reported is an estimation of the number of block headers iterated through by all miners on the network.

This means it refers to double-SHA256 hashes performed, not broken down to individual SHA256 operations. This makes the most sense, because even in the very early days (2010, perhaps before), no full SHA256 instances were being computed. Several optimizations let you skip parts of the computation.

It is an approximation, because the actual hash rate is not observable. It can be computed by looking at the created blocks on the network, and treating each as (2^256 / target) worth of attempts (so approximately 4.3 billion hashes per difficulty per block). That is the expected number of necessary hashes.

By looking at the blocks, another inaccuracy is introduced: only blocks that end up in the main chain are counted. Some blocks end up on temporary forks because another miner produces another nearly simultaneous competing block that wins. This is only a fraction of a percent today, but it does waste a small amount of hashrate, which also ends up not being counted.


Now that the hard fork is coming Will replay attacks if not dealt with destory the coin's value? As we all know there's a hardfork coming our way this November.
My question is now that the hard fork is coming Will replay attacks if not dealt with destory the coin's value?
Because if this issue won't be fixed and fast and people could make this so called "Replay attacks" there won't be any point of making a bitcoin transaction since it won't be as "safe" and one coin could lose it's entire value.
Are prices going to drop? and what's the possibilty of these attacks to actually being a reality?

Thanks.

I think that breaks down to a few questions, both difficult to answer, so here's my thoughts:

1) Are there going to be issues relating to replay attacks?
Possibly, which is why people have been pushing 2x to implement replay protection (it's not possible to do this on the current version without making your own fork).  Core have attempted to mitigate this by rejecting BTC1 nodes in the latest release of Bitcoin Core.  But now we have the possibility of BTC1 nodes pretending to be something else so they will be recognised by the Core nodes (which makes little sense as far as I am concerned).  Replay protection may be as simple as waiting for the fork to happen, then transacting with a specific node type you want your transaction on (some light wallets allow you to effectively "pin" trusted nodes), if the network is already segmented then your transaction shouldn't be broadcast on both.
Another option is to get some freshly minted bitcoin post fork (either one will do), move your coins and include this post fork bitcoin, this will be rejected as invalid on the other chain (those coins don't exist there).  You can then safely move the coins on the other chain as the first chain would have those coins as spent (and therefore the transaction would be rejected also).
As to "destroying value", maybe, for some people it could be an issue, however any coins sent on the wrong fork would still be recoverable by the receiving party as the address format hasn't changed, so they could just claim the coins on that fork.  It's a massive hassle though, more confusing than technical issues however.

2) How will the fork affect price?
Hard to say, some expect it to increase the price (as it appears to have done in the run up to the fork) as people will be getting 2 potential tokens, however once it's live, one of the forks may drop in value, with the money migrating to the other fork.  It's safe to expect some volatility, with one side emerging on top, how long this takes, who knows?  As long as one side doesn't have all the hashing power, difficulty will adjust (will likely be slow on the Core chain as most big miners support NYA) and the coin will become usable again.  One of the chains will be slow though, as there's no "EDA" as implemented for BCH.


Was the 51% attack a real threat in the early days of bitcoin existence? The hypothesis of 51% attack is based on a malicious entity is able to control more than 50% hashrate of all mining nodes. It's understandable that there's huge amount of mining power existing nowadays, however, they grew up gradually since 2009.

I'm wondering when there were only a few of people who knew the bitcoin back to the 2009, therefore, surpassing 50% of mining nodes was fairly easy(for instance, assuming there were only 10 participants in the early days of bitcoin). Because controlling more than 50% of mining power probably just needed to control more than 10 computers in the earliest days since bitcoin birth.

As a result, do I need to worry about the 51% attack possibly happened in the blocks of which the height number is small and are those blocks trustable?

Yes it was easier back then, that is why ASICs are a good thing and keep the network much safer. But no you don't need to worry about it, even a 51% attack can only do a limited number of things to the network, blocks and transactions must still be valid. So if a 51% attack had occurred, for example double spending a transaction, that is long in the past and would definitely not affect you now.


What are some examples of companies that have abandoned Bitcoin payment processors in favor of in house Bitcoin integration? What are some examples of companies that have abandoned Bitcoin payment processors in favor of in house Bitcoin integration?

For example which companies previously relied on Coinbase or Bitpay that now accept Bitcoin directly without the assistance of any 3rd party payment processors?

Some companies who have left cited privacy and security related concerns as their primary reason. It is therefore not surprising that some who have left the largest (and arguably most highly regulated) Bitcoin payment processors (Coinbase and BitPay) have chosen to remain anonymous:

https://www.reddit.com/r/Bitcoin/comments/3glqsx/after_using_bitpay_since_2013_to_run_my_online/

Here is a post from a Bitcoin Foundation member citing a need for improved privacy policies and more decentralization:

http://bitcoinfoundation.org/forum/index.php?/topic/1132-open-letter-to-bitcoin-businesses-why-im-closing-my-accounts/

Others may have moved to other providers that support more currencies than Bitcoin. This could be part of the reason Coinbase recently announced they will be adding support for Ethereum and Litecoin:

https://twitter.com/SatoshiLite/status/733531564852699136

My Google search revealed more merchants having accounts (involuntarily) closed by Coinbase, Bitpay, Circle, etc than merchants requesting a closure.  Since most businesses that accept Bitcoin online still convert it to fiat, the major payment providers offer a lot of convenience in terms of integration and currency conversion.


What are protocols in Crypto? What are token protocols? I understand how Consensus protocols work. They are essentially rules that nodes follow in order to validate transactions and blocks. It seems as if all tokens are their own protocols.

So what are protocols, and protocol tokens?

If DogeCoin and Litecoin are forks of Bitcoin, does it mean they are using the Bitcoin Protocol? Or do they have their own blockchain?

The bitcoin code creates a network, which follows a consensus protocol.

The bitcoin code can be forked, and parameters tweaked, in order to create similar, but separate and distinct networks (such as dogecoin, litecoin, etc). Each network will maintain it's own blockchain.

In cryptocurrency, the word 'token' is generally used to describe a special type of non-fungible cryptocurrency asset. It is essentially like a special 'earmarked' piece of cryptocurrency, that can be specifically tracked on the network. A token does not have it's own blockchain, it exists on some parent cryptocurrency blockchain. As an example, the ethereum network hosts many tokens, such as TRX, REP, or BAT. The bitcoin network can also support tokens, through the OMNI protocol.

Tokens follow the protocol rules of their parent chain, but could have additional token-specific rules programmed into them as well.


btc-e current btc withdrawal fee Hello can anyone answer me whats the current btc-e withdrawal fee?
The only source of information i can find is this which says it's set to 0.01 btc. Is it still valid?

You can see current fees only after registration on the btc-e.

Follow to "Finances", click "Withdraw" in the Bitcoin line.

Or login and follow the link:
https://btc-e.com/profile#funds/withdraw_coin/1

  Min amount for withdrawal - 0.002 BTC.
  Be patient, transfer of funds will be before the first confirmation.
  Fee for withdrawal is 0.001 BTC.
  Daily limit on withdrawal - 100 BTC.

Ways and fees to withdraw and to deposit are often subject to change on btc-e, thought for a long while (longer than 2 years) the Bitcoin withdraw fee is stay the same: 0.001 BTC.

When btc-e change rates, add new withdraw or deposit method - they usually tweet about it.
https://twitter.com/btcecom
Sometimes they also can add a piece of "news" when a fee is changed: https://btc-e.com/news


Could CHECKSIGADD be used on new ECDSA multisignatures instead of CHECKMULTISIG? The proposed Taproot soft fork (BIP 342) defines the new opcode OP_CHECKSIGADD to verify Schnorr multisignatures whilst OP_CHECKMULTISIG (and OP_CHECKMULTISIGVERIFY) are disabled for Taproot spends (SegWit version 1). Could we use the OP_CHECKSIGADD opcode for verifying new SegWit version 0 ECDSA multisignatures? Obviously you don't get the same batch verification benefits if the individual signatures are ECDSA but it would still be more efficient to use the counter system of CHECKSIGADD?
For an explanation of how the opcode CHECKSIGADD works see this presentation from James Chiang. Or see Tapscript BIP 342.
"The opcode 186 (0xba) is named as OP_CHECKSIGADD"
"OP_CHECKSIGADD is functionally equivalent to OP_ROT OP_SWAP OP_CHECKSIG OP_ADD"

No because the opcode 186 (0xba) is undefined for SegWit version 0 spends. You can only take advantage of this opcode in SegWit version 1 spends. If you included this opcode in your SegWit version 0 transaction script any attempt to spend it would encounter this script error.


Where is the code of chain reorganization in Bitcoin Core I'm trying to understand how Bitcoin Core works in-depth. Can someone tell me where is the code executed during a blockchain reorganization in Bitcoin Core?

Any explanation would also be greatly appreciated.

Block tree is stored on-disk. During startup, is read into memory. When read, BlockManager::m_block_index field is filled with data - CBlockIndexes. Every CBlockIndex contains memory-only field arith_uint256 nChainWork, which is a total amount of work in the chain up to (and including) current block.

Best chain is selected as maximum among all nChainWork of all tips and saved to CChainState::m_chain - currently active chain.


How exactly do transactions work? When I search for transaction in bitcoin I am able to find explanations which tell me that there are e.g. two persons A and B and A wants to tranfer a number of bitcoin to B. Imagine A wants to pay 2 Bitcoin to B and owns an private key for 1.5 Bitcoin and 1.3 Bitcoin.

First Question: private key for what exactly? What is signed/encrypted with a public key - which system validates that I am a private key owner? (I don't need explanations for public key cryptography RSA, ElGamal and GMR are well known to me)

Now these two amounts of bitcoins are taken by a system X (what is X?) and it will be created an output with amounts 2 Bitcoin (i) and 0.8 Bitcoin (j). Where will the public and private keys for i and j are generated? How and from which holder (after generation) to which (new owner) will they be transmitted? What kind of message do they sign/encrypt (content).

First Question: private key for what exactly?

For the scriptPubKey that locks/encumbers the coins from being able to be spent.

  An output contains instructions for sending bitcoins. Value is the number of Satoshi (1 BTC = 100,000,000 Satoshi) that this output will be worth when claimed. ScriptPubKey is the second half of a script (discussed later). There can be more than one output, and they share the combined value of the inputs. Because each output from one transaction can only ever be referenced once by an input of a subsequent transaction, the entire combined input value needs to be sent in an output if you don't want to lose it. If the input is worth 50 BTC but you only want to send 25 BTC, Bitcoin will create two outputs worth 25 BTC: one to the destination, and one back to you (known as "change", though you send it to yourself). Any input bitcoins not redeemed in an output is considered a transaction fee; whoever generates the block can claim it by inserting it into the coinbase transaction of that block.

See https://en.bitcoin.it/wiki/Transaction#Output.

  which system validates that I am a private key owner?

When transactions are submitted, nodes on the network validate the signature with the scriptPubKey before including them in their mempool for miners to include in the next block.

  Now these two amounts of bitcoins are taken by a system X (what is X?) and it will be created an output with amounts 2 Bitcoin (i) and 0.8 Bitcoin (j).

The transaction is created and signed using wallet software, and the transaction is submitted to the nodes on the network, it is propagated to all nodes (given it passes the validation checks).

  Where will the public and private keys for i and j are generated? How and from which holder (after generation) to which (new owner) will they be transmitted? What kind of message do they sign/encrypt (content).

The private keys are generated by the user usually in their wallet software and usually the pubkey and scriptPubKey (which is encoded into an address) are also created by the user for people to send them Bitcoin. The message that is signed is the new transaction data itself.


Bitcoin regtest mining I wonder if I can do mining with Bitcoin-0.16.1 in regtest mode, just for simulating mainnet situation where there are new blocks coming in constantly.

I am aware that I can use generate to generate blocks almost instantly after every transaction and thus confirm the transaction. But can I use a miner program to automate that process and simulate better the real-world situation, i.e. new block coming in constantly in small number?

I have tried cgminer connecting to my regtest solo mining but it does not seem to mine anything, it just sits there and hash rate is always 0. Any advice on how I can mine on regtest or should I set up some automated scripts to call generate from time to time?

You can build your miner with a bash command:

$ while true; do bitcoin-cli -regtest generate 1; sleep 300; done

You'l get a block every 5'. If you want a better simulation of mainnet you could use a rndom sleep


Can you send partial amounts of zcash to a zaddress or do you have to send all of it to a zaddress? Reading the tutorial online, they say to use: z_sendmany to send to a z address. But can one send partial amounts to a zaddress from a taddress? Also what if one wanted to send partial amounts from a zaddress to a taddress/zaddress? Is this doable without using z_sendmany option?

z_sendmany can send from either a t or z address to a t or z address, and yes you can send any fraction of the amount from the source t-addr

-@radix42, zcash contributor


How to sweep private extended key from mycellium for bitcoin cash coins? I have my coins stored in mycellium, but when I try to export my private key I get a private extended key. How can I import this into coinomi android wallet? I see there is a sweep option in conomi, but it doesnt state that it supports an extended private key. Do I have to extract my single private keys and import them one at a time into my coinomi android wallet? screenshots would be great!

How to transfer unspent Bitcoin Cash from Mycelium to Coinomi?
or: How to identify the internal and external addresses which hold unspent output and transfer/sweep the funds to another wallet?
or: How can i get hold of my Bitcoin Cash?

Be sure you know what you are doing with your private keys ;)

Recommendation: Transfer your BTC funds from Mycelium to another wallet you have control of (e.g. Coinomi) and wait for the confirmations before starting to move your Bitcoin Cash

Go to https://iancoleman.github.io/bip39/
Enter your 12 BIP39 Mnemonic words (or enter the extended private key)
(Default: Selected Derivation Path BIP44)
Use "External / Internal" Default which is: 0 (0=External) and scroll down to the first address of "Derived Addresses"
Hover over the private key to the right so the QR code shows up
Optional: Open second browser tab at http://blockdozer.com/insight/address/YOUR_ADDRESS where YOUR_ADDRESS is the address shown in the second column and display the BCC funds available - or enter the copied address in the search field
In your Coinomi BitcoinCash Wallet select .../Sweep wallet (... = upper right menu)
Scan private key QR code shown in 5)
Click "Next" to the lower right and wait for the funds to be retrieved (if there are some left at that address)
Continue with 5.) until your addresses have not been used (as seen in the blockdozer browser)
Scroll up on the BIP39 page and enter "External / Internal": 1 (internal - internal to Mycellium); If value = 1 in second loop go to 13.)
Continue with 5.) going back to first address shown
Wait for the transactions to be confirmed and the price to raise or sell or ShapeShift your new Bitcoin Cash to e.g. BTC

Please note: Presently Aug 14th, 2017 there is a bug in Coinomi related to scanning a Bitcoin Cash QR code. You should only copy/paste the Bitcoin Cash address into Coinomi and then you can select if it is a BTC or BCC address.

Additional background: coinomi.freshdesk.com/support/solutions/articles/29000013719-how-to-get-bitcoin-cash-from-many-wallet-software-services-with-coinomi


Does cgminer have to be on for me to solo mine for bitcoins I see my antminer has cgminer built into it.
Do I need to have cgminer on my computer screen while "solo mining" for bitcoins ? or can I just have the antminer on and hashing straight through the router ?

cgminer is just the client software to control your ASICs. Where cgminer gets it's work from is your question and that depends ...

You can run your own full node and point your hashing power there
or way easier would be to just use some hosted solo pool like http://solo.ckpool.org/

On the website you finde further information on how to solo mine.