chain.com Bitcoin API: Does not provide “making wallet” feature? chain.com's Bitcoin API is super easy to implement Bitcoin function into my iOS App. Checking the balance of a specific bitcoin address and retrieving transactions are very convenient. However, unlike luxstack.com, chain.com seems not to have "Creating Bitcoin Address" feature. Is it right?

Thanks.

FYI https://chain.com/docs

It looks like they don't support wallet features, only querying the blockchain for addresses, balances and transactions.  From the docs:

Get Bitcoin Address
GET /addresses/{address}
Returns basic balance details for one or more Bitcoin addresses.


Question about nondeterministic wallet I was reading https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch05.asciidoc#user-stories and ran into this statement.

  In the first bitcoin wallet (now called Bitcoin Core), wallets were
  collections of randomly generated private keys. For example, the
  original Bitcoin Core client pregenerates 100 random private keys when
  first started and generates more keys as needed, using each key only
  once. Such wallets are being replaced with deterministic wallets
  because they are cumbersome to manage, back up, and import. The
  disadvantage of random keys is that if you generate many of them you
  must keep copies of all of them, meaning that the wallet must be
  backed up frequently. Each key must be backed up, or the funds it
  controls are irrevocably lost if the wallet becomes inaccessible. This
  conflicts directly with the principle of avoiding address reuse, by
  using each bitcoin address for only one transaction. Address reuse
  reduces privacy by associating multiple transactions and addresses
  with each other.

In the first part, it says multiple keys are generated and used only once. But in the second part, it says that the address reuse is a problem.

But if each key is used only once, how are they being reused?

That is what Andreas is trying to convey. He is saying that the traditional way of generating random private keys for each transaction in order to prevent address reuse is a poor choice of wallet principle. That is because every time you generate a new random private key, you would have to make sure to keep a backup of it so that you can recover bitcoins tied to that private key in case your wallet software becomes inaccessible. If you are transacting multiple transactions a day, generating a new address every time, you might find it tedious to back up your private key every time. The other way you get around this would be people using the same address so as to prevent the hassle of backing up the keys.


blockchan.info payment processing, how long? I try to implement the payment processing API from blockchain.info
I created a request by the example of their website, and receive a generated bitcoin adress:

See an example here: https://blockchain.info/address/1Jv2S3iMo71c1WZEuE25Gemx7qjmqcVqNX
I send 0.001 BTC to that adress. It has already 8 confirmations atm. But when are they send to my adress? How much confirmations does blockchain.info needs?

Thank you

I've had the same issue. Sounds like you are using blockchain.info's receive payments API. This is a free service they offer where BC.info even pays the transaction fee. The payment forwarding used to be almost instant, then it went down to one confirmation. Sometime over the last month or two during the "stress tests" and the SPV mining fork it is taking about 24 hours before the transaction is forwarded.

Is this permanent? I don't know, but I suppose there has to be some take-away when you use a free service.

If you are looking for an alternative I suggest you try blockcypher. However with blockcypher they do not pay the transaction fee, so the receiving address will receive 10,000 less satoshis as a mining fee on every transaction.

http://dev.blockcypher.com/#payment-forwarding


getting bch out of my paper wallet Hi anybody who can honestly and simply tell me how to get my bch out of my paper wallet. I went to blockchain.info and transferred my bitcoin which I had on my paper wallet before Aug 1rst--into their wallet, then safely exported it to an exchange I use--all went well. But I haven't the foggiest how to retrieve my bcc from the same paper wallet now, which I've been told still has the bcc on it. blockchains website is not for a newby like me. I sent their support requesting step by step directions and haven't heard back from them--can anybody give me simple directions on how to get my bcc out of my paper wallet and into my exchange? Please don't assume I know anything and I especially only want to deal with my pc to accomplish this---I have no clue what an app is and don't want to know----Is there someone who's right for this question please?

You could download a full client of bitcoin cash like Bitcoin ABC (https://www.bitcoinabc.org/).
After that you can import your private keys from the paper wallet with the console (help > debug window > console) and enter

importprivkey <yourprivatekey> "label of address"

The optional "label of address" is just a description for you and not visible for anyone else.

After entering the importprivkey command, the wallet has to rescan the wallet for transactions, which may take a few hours depending on your system. After that, your address is fully spendable from within your wallet.

If you want to import multiple private keys, you can disable the rescan option until you entered all private keys with an additional argument. For example, to import 3 private keys you can use 2 times "false" to skip rescan and on the last import "true":

importprivkey <yourprivatekey-1> "label of address 1" false
importprivkey <yourprivatekey-2> "label of address 2" false
importprivkey <yourprivatekey-3> "label of address 3" true

Beware: Ensure that you claim your Bitcoin (BTC) first, and only after successfully sent them to another address use key for claiming your Bitcoin Cash (BCH), because BTC is way more valuable than BCH and I don't know how safe Bitcoin ABC actually is.

This procedure is a bit cumbersome, because you need to download the whole blockchain. But you are not dependent of any third-party applications or websites and don't reveal your private keys to anyone online.

This method can also be applied to any other Bitcoin Fork, assuming that there is a QtWallet for that Fork available.

After claiming your coins I would suggest to never use the address again. Get a new Paper wallet address if you want to use one again.


GUIMiner Won't Start I am trying to mine Bitcoin on my CPU in Windows Server 2008 R2 Datacenter. I know about the consequences of CPU-only mining. I have downloaded GUIMiner - title bar looks like this:

However, when I configure it (more info below) and hit 'Start mining!', nothing happens - bottom bar looks like this:

My Setup

Miner: Ufasoft CPU miner

Other Info:

If anyone can help get this working, it would be much appreciated!

According to mining.bitcoin.cz, getwork protocol is removed. Use the stratum protocol instead. stratum.bitcoin.cz:3333

  08.07.2013
  Getwork protocol support ended. Please be sure your miners support Stratum protocol. You can still use your old getwork miners with Stratum proxy installed on your mining rig.


How did Bitcoin Cash fork from Bitcoin? I was wondering how it was possible because of the following thinking:

Let's assume that Bitcoin Cash's hashpower is smaller than Bitcoin's. Then they would start mining at the same point in the Blockchain and one of them would find the next block. If it were Bitcoin's, both would mine from this new block because both would accept the new block. If it were Bitcoin Cash's, then Bitcoin would ignore the new block and a fork would happen.

But, as Bitcoin would, on average, find more blocks than Bitcoin Cash, and their blocks are accepted by Bitcoin Cash, the fork would never really occur because the longest valid chain would be Bitcoin's.

Bitcoin Cash miners would be flipping between their and Bitcoin's blockchain.

What am I missing?

The blocks Bcash miners find are not compatible and are thus completely ignored by Bitcoin nodes. Might as well not exist at all.

Any node that tries to pass a Bcash block to a Bitcoin full node will immediately be banned.

Bcash software was also altered to ignore Bitcoin blocks, otherwise it would indeed still have a problem.


Setting up BFGMiner with Devices I have a Dell Poweredge Server R200 set up with BFGMiner.  Now I know this is old and not very powerful, but I am curious as to how I should use BFGMiner.

When I ran it initially, it was not able to find any devices (unless I am doing something wrong).  I have an Advanced Micro Devices [AMD] nee ATI ES1000 VGA compatible controller but I dont know how to use this or the CPU for BFGMiner.

Hopefully, this following quote from the Github Source will help to shed some light on your trouble to get BFGMiner to use your CPU:

EXECUTIVE SUMMARY ON CPU USAGE:
By default, BFGMiner will NOT mine on CPUs unless it is explicitly compiled with
support and told to do so. CPU mining for bitcoin is generally considered to be
obsolete as it requires considerably more power per hash computed than either
GPU, FPGA or ASIC based mining. If you still wish to mine using CPUs you will
need to build a custom binary with support enabled (refer to the build notes in
README for further information).

The page continues to enumerate flags for the usage of BFGMiner with CPU.


What are the chances of someone coming up with a new and simple/out-of-the-box solution for the double-spending problem? The proof-of-work solution is simple but has many drawbacks (waste of time, energy and uncertainties about its security in the future).

The consensus solutions proposed by Ripple/Stellar are too complex, and with complexity also comes uncertainty/risk. (See Stellar catastrophic failure!)

What do you think are the chances of someone coming with a simpler solution, out of the box, something much more straightforward that no-one has thought about it?

The double-spending problem had been unsolved in decentralized protocols for decades. It seems unlikely that a second (different) solution would suddenly materialize.

It never was a problem in centralized setups, where the central entity would provide a referee function.


Possible to create a double spend attack by replacing a Tx in the merkle tree? This question on crypto.SE describes how preimage attacks are avoided in the Bitcoin network.

  For a second preimage attack:

  hash(x) = hash(y) implies hash(hash(x)) = hash(hash(y))

  So it wouldn't protect against a direct preimage attack. Bitcoin
  builds a Merkle
  tree
  for a b c like this:
  hash(hash(hash(a)+hash(b))+hash(hash(c)+hash(c))).

  You can see again that if someone found a c' that has the same
  SHA-256 hash as c, they could substitute it and the final result
  would still be the same.

  While it's true that this might improve resistance to first preimage
  attacks, there aren't any obvious cases where those would matter -- an
  attacker typically would have the plaintext that generated the hash.
  (And preimage attacks on addresses seem far fetched, given that the
  ECDSA operation is in there.)

Suppose two offline transactions are generated with the same c' hash.  Assume it takes several months/years to create each Tx.   Then:

The attacker creates a Tx to a merchant
The attacker creates  a second Tx with the same inputs as #1.  Then a private key is regenerated until the Tx hash equals the hash of c'.

Question

How does the Bitcoin network respond to these competing transactions with the same hash?
How would the outcome be different if the transaction was non-standard, and therefore not replicated across miners?

You should also know that the task of finding an SHA256 collision (same hash for two different byte arrays) is a pretty complex one. Miners are spending terahashes per second to find a hash which is smaller than a target. An exact match would be very hard to find.

Also, the attacker in this task is required to be a miner with enough power to solve and broadcast a [special] block to be included in the main chain.

In short, I can say that this task requires so much hashing power - so if someone has enough power for that, he may perform a less complex 51% attack rather than this one.


Import private key ripple Is there a way to import private key with rippled?

Same as bitcoin core impoertprivkey with RPC calls?

Tnx

Looking through the rippled API documentation it would seem that there is no import private key call - https://developers.ripple.com/rippled-api.html

However other ripple clients can do this task.  I know of the https://toastwallet.com/ as a stand alone Ripple wallet but it seems some people have had issues importing private keys.

https://gatehub.net/ is another alternative for a desktop ripple client and in here you can import the private keys and import addresses into your wallet.

Your private key is your account. You can access your account from any wallet that is a portal to the xrp ledger.

Gatehub will easily let you restore your private key. People have issuings restoring with toast cause the toast backup requirement.


Is there a plug in for credit card charges to be converted automatically into bitcoin Is there a trusted payment processor that is secure and is able to do the sequence of actions detailed below?

Accept credit card transactions from customers and apply them to purchasing bitcoin & then
Send the newly purchased bitcoins through a series of e-wallets
Before converting the bitcoins into USD and making a final deposit into the Merchant's bank account of choice

In addition, if there is a more suitable cryptocurrency than bitcoin than I am happy to use an altcoin.

No, and there likely will never be. The reason for this is that bitcoin transactions (and all other crypto currencies as far as I know) are none reversible while credit cards transactions are, for up to about a month at most banks. This means that if someone buys bitcoins with stolen credit card information and you give them the bitcoins, and then a week later the bank tells you the transaction was fraudulent, you will have to return the money, but you are never getting the bitcoins back.

A way around this would be for the seller to hold on to the bitcoins for a month and wait for the credit card transactions to definitely go through before dispersing the coins, but with the price of bitcoin as volatile as it is, I don't see this happening.


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

Is there an easy to understand step by step guide

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

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

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

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

The doublespending transaction is the transaction which uses the same input set, but has another outputs/fees. You do not need to do two steps (a) reverse original transaction (b) send another transaction with higher fees, because this is one step.

As far as I know, some wallets contain Replace-By-Fee features, but I use my own program. It is not "easy-to-understand", but it works


no IPv6 peers connecting to my node getnetworkinfo says IPv6 is working on my node:

{
"name" : "ipv6",
"limited" : false,
"reachable" : true,
"proxy" : "127.0.0.1:9050"
}

Yet why don't I get any IPv6 peers connecting to my node? Sometimes I get many connecting to it, but right now I have only IPv4 peers.

The issue was that bitcoind was discovering my wrong IPv6 address. (It mistook my link IPv6 address for my public one.) I set --discover=0 and set my IPv4 and IPv6 addresses manually with --externalip.


How to generate a Bitcoin Private Key Checksum I want to understand how a bitcoin private key is made up.

Looking at this graphical generator
https://royalforkblog.github.io/2014/08/11/graphical-address-generator/#hello

I understand step 1, how the private key is generated:
2CF24DBA5FB0A30E26E83B2AC5B9E29E1B161E5C1FA7425E73043362938B9824

I can see the prepended version number 80, and that I should append the compression flag  01

My question is around step 4, which is simply detailed as "Append checksum. Checksum is the first 4 bytes of double sha256 hash of whatever is being checkedsum'ed."

So I take 802CF24DBA5FB0A30E26E83B2AC5B9E29E1B161E5C1FA7425E73043362938B982401 and double SHA-256, and I don't get anything like the expected checksum of F29E9187

Can anyone help me understand how F29E9187 is derived?

F29E9187 are indeed the first four bytes of the double sha256 of the bytes:

802CF24DBA5FB0A30E26E83B2AC5B9E29E1B161E5C1FA7425E73043362938B982401

In order to check this, you need to compute the double sha256 of this array of bytes. However, as already discussed, passing the string 802CF2... to the hash function will not yield the right answer, as this string is not the array of bytes itself (it is a hexadecimal encoding of the array). So let us create a binary file which corresponds to the hex encoding above:

$ echo -n 802CF24DBA5FB0A30E26E83B2AC5B9E29E1B161E5C1FA7425E73043362938B982401 \
   | xxd -r -p > temp

Let us check our binary file temp has the correct bytes:

$ hexdump -C temp

00000000  80 2c f2 4d ba 5f b0 a3  0e 26 e8 3b 2a c5 b9 e2  |.,.M._...&.;*...|
00000010  9e 1b 16 1e 5c 1f a7 42  5e 73 04 33 62 93 8b 98  |....\..B^s.3b...|
00000020  24 01                                             |$.|
00000022

So far so good. We can now compute the first sha256 hash of these bytes:

$ sha256sum temp
08a9d3e1296633b2a4071316eaf597f1c93a0ec2f4b68b24c6e0ad2e7c06540c  temp

Again, we are faced with a hex encoding which we need to convert to actual bytes:

$ echo -n 08a9d3e1296633b2a4071316eaf597f1c93a0ec2f4b68b24c6e0ad2e7c06540c \
  | xxd -r -p > temp

Checking once more:

$ hexdump -C temp

00000000  08 a9 d3 e1 29 66 33 b2  a4 07 13 16 ea f5 97 f1  |....)f3.........|
00000010  c9 3a 0e c2 f4 b6 8b 24  c6 e0 ad 2e 7c 06 54 0c  |.:.....$....|.T.|
00000020

So let's compute the sha256 hash of these bytes:

$ sha256sum temp
f29e9187a566a24502d7cd2eae948e74bc4dfafc7deff44cce80e1256ef12a3e  temp

you can see that the first 4 bytes are indeed F29E9187.


Which cryptocurrency exchange provides a trailing stop limit orders? There so many exchanges as of today (2017), but they all seem to only provide a basic stop limit order, but are there any exchanges that provide a trailing stop limit order?


Creating blocks while more transactions arrive and proof of work mechanics I am having a hard time understanding the details of how blocks are getting created by miners while many transactions are being received by various nodes at slightly different times and what information from these broadcasts get combined with a nonce to find the target to satisfy the proof of work.

Let's say that Alice sends Bob 1 BTC. This transaction gets broadcasted to the entire network of miners who will then verify that transaction is correct and proceed to try and find a nonce to create a block with all other transactions that they have received.

However, there are many transaction broadcasts happening simultaneously. Transactions can arrive at different nodes at different times due to latency. How does each individual node know how many and what transactions to include in the block? What happens to transactions that arrive to the node while the block is being "mined"? Or do new transactions get added to the block while it is being mined? What data from the transactions gets combined with a nonce and hashed to find the target?

The miner picks what transactions they want to include in the block, out of the ones they have received when they start working on that block, yes. Once they start mining a candidate block, it's usually inefficient for them to add more transactions, so transactions received during the mining process are more likely to be included a block later. Once the block is mined, the list of transactions included in it are broadcast through the network so all nodes can see which ones were included, request any they don't have, and verify its a valid block.

The block header is what is hashed, it contains a version number, merkle root of transactions (basically a cryptographic summary of them all to commit to which ones are included), timestamp, the difficulty target, and the hash of the previous block. See: https://en.bitcoin.it/wiki/Block_hashing_algorithm


Asymmetric revocable commitment's revocation key I am reading 'Mastering Bitcoin' to study for bitcoin and blockchain. At page 295-296, Author described that two parties should exchange their revocation key before signing new commitment transaction to punish when either party tries to cheat.

But, if we use this method, either party can redeem prior commitment transaction by using revocation key whenever it wants. This mechanism is being used by lightning network now. I wonder how this method prevents either party from cheating.

The revocation key is actually a blinded key that is calculated from the two parties' revocation basepoints and generated per commitment keys.

So for A's revocation key for a commitment, the public key is calculated from B's revocation basepoint and A's per commitment basepoint. B does the same but with A's revocation basepoint and B's per commitment. This results in a revocation public key who's secret requires a component from each party so each party individually does not know the key.

When a commitment is revoked, the two parties will exchange the per commitment secrets so they will only be able to know their respective revocation keys. Since the revocation basepoint secrets are not shared, each node cannot know the other revocation key.

The full details of the key derivation algorithm can be found here.


Why bitcoins not reflected in bitcoin wallet after being transferred from Web based wallet to its address even after ten confirmation? []
1I have purchased bitcoins worth  12$ using localbitcoins.com and send it to my wallet address(bitcoin developers).  In blockchain.info it is showing it has ten confirmations yet it is not being reflected in my wallet? I have updated the wallet. Its been six hours.
My wallet and my blockchain.info information  is shown
Please help me.

The address shown in Bitcoin Wallet App is a different one than the recipient address shown on the blockchain.info screenshot. Unless you created a second address with Bitcoin Wallet App, that would explain why Bitcoin Wallet App doesn't show the above payment—it went somewhere else.


What's an example of an ExtraNonce2 value that would be considered invalid? I've been learning about mining as part of a pool and using the Stratum protocol to submit completed work back to a pool -- https://en.bitcoin.it/wiki/Stratum_mining_protocol .  There is this parameter, "ExtraNonce2," a value that the miner keeps changing.  Could someone tell me a scenario where a pool worker submits a nonce that correctly hashes the data it was given according to the difficulty, but it submits an "ExtraNonce2" value that causes the mining pool to reject the submission?

There is no such a scenario. The ExtraNonce2 is part of the data that is hashed. So if a miner finds a valid nonce, he must also have the corresponding ExtraNonce2 that is part of the data that is hashed in order to produce a valid block hash.


How do I find the hash "market share" of P2Pool? P2Pool is a peer to peer mining pool, offering some advantages over centralized pools:

There is no central node to take down (assuming the pool is indeed fully decentralized). Pools have suffered from DDOS attacks in the past.
An open source P2P pool should theoretically be able to operate with zero fees.

How can I find out how many people are using P2Pool?

In concept, P2Pool is much stronger than centralized pools. Unfortunately, most centralized pools still hold a high hash-rate.

You can see the global hash rate, and its distribution at http://bitcoinwatch.com/

My opinion is that miners are used to using slush, deep bit, and btcguild - and are either unaware of the incentives of P2Pool, or don't care.


Why the amount of listunspent and getbalance is not the same when each data is called by API? When I called listunspent, it returned the following array. From the array, I thought the balance "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf" is 0.1097. However, when I called getbalance of mknGW629wzSkfWvgXF23d8eTrqibnhTcrf, it returned 0.000000.

Why sum of amounts of listunspnet is not equal with balance of address?

$./bitcoin-cli listunspent

{
    "txid": "a82bf11b72d6ef2f5eaa62190914a4c80b8749e075015fda513b899f54d29e06",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 367,
    "spendable": true
  },
  {
    "txid": "b8f8d20946ca52283fbf192c7ebfb817deba260c54911938d59bb64bbb8cb8a7",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 366,
    "spendable": true
  },
  {
    "txid": "b8f8d20946ca52283fbf192c7ebfb817deba260c54911938d59bb64bbb8cb8a7",
    "vout": 2,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.10968200,
    "confirmations": 366,
    "spendable": true
  },
  {
    "txid": "b66513ae7aab964e5374d97be206b94e529055523a35d2249ad2917745c921f8",
    "vout": 0,
    "address": "mknGW629wzSkfWvgXF23d8eTrqibnhTcrf",
    "account": "",
    "scriptPubKey": "76a91439be11328b909d0327ef53ae923a9b4dd47420f788ac",
    "amount": 0.00000600,
    "confirmations": 370,
    "spendable": true
  }
]

$ ./bitcoin-cli getbalance mknGW629wzSkfWvgXF23d8eTrqibnhTcrf
0.00000000

Because Bitcoin Core does not support "balance of address".

The wallet has a single balance, and addresses are treated as separate input gates into that balance, so you can distinguish what is being paid for (by allowing you to give a different address to each payer).

The argument to getbalance is an account name. Accounts are just bean counters: they don't correspond to actual coins in the network. You can change their balance using the move RPC command, which does not even create a transaction. They're a purely local abstraction. You can associate an address with an account so that receives on that address credit the account, and you can use the sendfrom RPC to deduct the sent funds from a given account (but the actual transaction outputs used are still drawn from a pool shared by the whole wallet).

Accounts are a confusing feature however, and they're hard to use in a correct way. That's why they're also scheduled for deprecation in Bitcoin Core.

Perhaps you're looking for the getreceivedbyaddress RPC?


Address Reuse vs. Coin Selection I have read at length that address reuse should be avoided, for instance the bitcoin wiki describes numerous reasons here. I have also read Murch's master thesis on coin selection. These two concepts seem to be at ends with each other. That is, if all bitcoin users follow the instructions to never reuse an address, there should only ever be one UTXO associated to an address, and then it is abandoned once the UTXO is spent - thus only one input to any given transaction. Does following the address reuse recommendation render the concept of coin selection useless?
Some smaller related questions that I don't feel deserve their own questions:

Do the instructions to not reuse an address include change? That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?
If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?
Terminology - does the term "wallet" refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the "wallet" and each 3-tuple (private key, pub key, address) also considered a "wallet"?

EDIT:
My question has been sufficiently answered - I failed to understand that when conducting a transaction with multiple UTXO inputs, they do not all need to be associated to the same address/private key. Good news Murch, your masters thesis wasn't in vain :)

Do the instructions to not reuse an address include change? That is, should I generate a new key pair for any transaction that needs to receive change, and then manually specify my change be sent to the newly generated address?

Wallet software will do this automatically for you. Whenever change is created, the wallet will construct a new keypair, compute its address, and send the change there. You shouldn't ever do anything manual.

If I make a new address for every transaction, and let us say I have one key pair associated to a 1 btc UTXO and another key pair associated to a 1 btc UTXO and I want to send Alice 2 BTC, then following the address reuse policy I would ask her to provide me 2 seperate bitcoin addresses, and I would make two separate transactions, 1 btc sent to each address?

No, you (or your wallet) will just create a single transaction that spends both 1 BTC UTXOs, and send 2 BTC to Alice's address. No reuse.
The advice of no reuse just means that if you later want to send more money to Alice, you'd ask a different address of hers, and don't send again to the same one. This is generally good practice for other reasons anyway, as Alice may have moved to a new wallet setup, and prefer not be paid to old one anymore.

Terminology - does the term "wallet" refer to a key pair, or to software/hardware etc. that could contain many key pairs. For example, thinking of a Nano Ledger S, is the device itself the "wallet" and each 3-tuple (private key, pub key, address) also considered a "wallet"?

You'll hear conflicting opinions on this, but in my view it's closer to the second. A wallet is something that manages a collection of addresses, coin selection, helps constructing transactions, ...
In my view, a "hardware wallet" is badly named, because it is not managing any of these things. It is a hardware transaction signing device, which needs communication with an actual wallet to be instructed what to do.


Flooding mempool with fake high fees transactions Suppose, A is a malicious attacker. He wants to flood the mempool with fake transactions. I know if an attacker broadcasts fake transactions with no fees, then mining nodes will simply increase the transaction fees to be accepted.So, that type of transactions won't be accepted. But, suppose, if an attacker broadcasts fake transactions with high fees. Is it possible to flood the memory pools with this type of transactions?

I see the question you have, and thought I put some more info in this reply, cause comments are too short.

You seem to postulate, that it might be possible to spam the net, by sending messages with high fee, and you consider this as a possible attack vector (with "fake transaction").

To understand how the network works, it is essentially necessary to look into the validation rules of transactions, when they are sent over the network. The fees are calculated by substracting the output value from the input value. If it is above 0, then ok, else invalid.

As a particular person anyone can craft a malformed tx. The question is now, how could you do this? Again, looking at the rules, it seems impossible. When you send it, the receiving nodes and all other full nodes will verify this tx. If the tx is malformed, they will reject it, and your node will be marked as a node, which sent wrong data into the network. At a certain point in time your node will get added to the blacklist of each full node, so this malfunctioning node cannot disturb the network further.

So you would need to find a way on how to send invalid tx to other full nodes, and as Andrew and Osias replied, to the current knowledge this is impossible.


Bitcoin Cash to CoPay Bitcoin Wallet - How to Recover? We have an eCommerce website and a customer is purchasing an item using Bitcoin.

We provided the customer with our business Copay Wallet address, however the customer sent "Bitcoin Cash" - how can he, or we, recover his payment?  The Copay wallet is of course Bitcoin only.

how can he recover his payment?

He can't. Bitcoin Cash transactions are not reversible and generally cannot be cancelled.

  how can we recover his payment?

Create a Bitcoin Cash wallet using your Bitcoin private keys. Then refund him (less transactions fees, agreed handling fees etc)

Given that this involves putting your private keys into an unfamiliar piece of software, there are security issues (you need to be sure you trust it and obtained it from the right place and know how to use it properly etc) there may be significant man-time costs that some businesses may be reluctant to commit to help a small one-time customer.


Novice has bitaddress.org-generated wallet with .08 BTC in it... how can i exchange them for a fiat currency? I have the wallet ID and the private key. My wallet contains a fraction of one bitcoin from a single transaction in 2014.
I made an account at blockchain.com, but I'm unable to import my wallet into that account. ("Invalid Wallet ID")
If I wanted to sell, for example, what would I need to do?

The "wallet ID" is specific to blockchain.com account and correspond to its login, if you have generated your address on bitaddress.org you can't have it, you should have instead the bitcoin address and it's private key.
These are the steps to import an external address from blockchain.com support:

To import a bitcoin address from a third party platform, click on +    Import Bitcoin Address and select Existing address generated outside this wallet. Enter the private key of the bitcoin address you want to import. Next, add a label for the address (optional) and select an existing sub-wallet to transfer the funds to, or leave this blank if you want the funds to remain in Imported Addresses. Click Import to complete the process.
In the mobile app, press the three horizontal lines in the upper left    corner to open the menu and select Addresses. Tap the + to the right    of Imported Addresses and then scan the private key's QR code. Next,    assign the address a name and press Save Name, or press No Thanks if    you do not wish to give the address a name.

Anyway, if you have a bitcoin address private key you can import it on any other wallet (you have just to know in which format is).
Once you have imported the address/private key in a wallet then you can send your bitcoin to an exchange and sell them for the currency of your choice.
Here you find info on private keys format and how to import them:
https://en.bitcoin.it/wiki/Private_key
https://en.bitcoin.it/wiki/How_to_import_private_keys


What are tainted coins exactly? I've come across the term of a tainted coin several times now.
I understand that coins, or better, the origin of a coin can be traced throughout the blockchain.

I've read that bitcoins can be disassociated from an address, by sending it to a sufficiently large enough wallet which handles many transactions, thus making a transactions origin "untraceable".

This collides with my understanding of the blockchain, where each transaction can be tracked back to its origin.

What does the concept of a tainted coin mean in this context and how can a coins taint be measured?

You can trace the coin back to its origin, the question is whether that information is meaningful.

Say I steal 50 bitcoin. I can pass them around between several different Bitcoin accounts, all mine, and you can trace them. The problem is, you don't know whether any of those transactions are real.

Say Jack has 50 bitcoins that come from a block reward and are untainted. Now, say Jack and I both deposit our 50 bitcoins in a web-based wallet. And say Jack withdraws his 50 bitcoins from that web-based wallet and he gets my 50 bitcoins.

Jack now has 50 bitcoins that you can trace to a theft and are therefore tainted. But Jack has done nothing wrong and it doesn't do any good to be able to track his bitcoins because I, the bad guy, now have untainted bitcoins.


Ho do I generate the output script of a bitcoin transaction? When I mean output script I mean the output script from step 11 from this question:
Redeeming a raw transaction step by step example required

Then the actual output script: 76 a9 14 a2fd2e039a86dbcf0e1a664729e09e8007f89510 88 ac ( this is transferring funds back to address 1FromKBPAS8MWsk1Yv1Yiu8rJbjfVioBHc )

In this example the responder used Pkscript from the input of the previous trasaction. However there is no explanation how the hex "a2fd2e039a86dbcf0e1a664729e09e8007f89510" is generated itself. I'm asking because, I don't know what I would insert if I want to use another address as output. As I understand (maybe not) this hex is somehow generated from the bitcoin address "1FromKBPAS8MWsk1Yv1Yiu8rJbjfVioBHc". Is this correct? And how is it done?

This is a P2PKH (Pay-to-public-key-hash) address which means a2fd2e039a86dbcf0e1a664729e09e8007f89510 is the hash of your public key. Here is a step by step guide on how to go from public key to address


Meaning of this part of the Bitcoin Ticker Display? When looking at the Bitcoin Ticker site: https://bitcointicker.co/stamp/btc/usd/1hr/
I see the part of the screen pictured below.  I'm having trouble understanding what this is presenting.  Can someone please help me understand it?

That’s the market depth and it’s not related to bitcoin, any exchange of any asset provides this information. One way to interpret it is if someone sent a big market sell order of 22.542 BTC to this exchange, the price would drop to $52554.


Is there a way to squeeze more hashing rate from a weak hardware? I have a computer has two graphic cards ATI Radeon HD 5450, which are almost not used at all.

The computer is running permanently and is used only for office work and data storage.

I tried to setup the minig there and I was i bit disappointed by the hashing power.

GuiMiner was hasning at 2 x 10Mh/s, CGMiner is a bit better, it does 2 x 14Mh/s.

Are those graphic cards so weak that it is not possible to squeeze a bit more out of that?
I can get a third of this hashing rate on the CPU of my 5 years old notebook.

I use just the default settings and I mine by executing cgminer -o host:port -u user -p password -l 1 -T

12-14Mh/s is about right for the 5450. It's not that the card is weak, it's just that you're trying to make it do something it was never designed to do.


How does merged mining work? How does the implementation of merged mining affect the global hash rate of alt chains?

Does one solution fit all?  Does one solution fit some?  Does the rate of "solutions that will fit" decrease the more forks that it is tested against?

An explanation of how merged mining actually works would be excellent.

Merged mining allows a miner to mine for more than one block chain at the same time. The benefit is that every hash the miner does contributes to the total hash rate of both (all) currencies, and as a result they are all more secure.

Starting with a high-level explanation: The miner (or mining controller in the case of pooled mining) actually builds a block for both hash chains in such a way that the same hash calculation secures both blocks. Work units based on this block are then assigned to miners. If a miner solves a block (at the difficulty level of either or both block chains) the block is re-assembled with the completed proof of work and submitted to the correct block chain (or both blocks are separately reassembled and each submitted to the corresponding network if it met both of their difficulty requirements).

The only confusing detail is how the same hash can secure both block chains. I'll use the example of Bitcoin and Namecoin, where Namecoin supports merged mining and Bitcoin doesn't:

First, the miner must assemble a transaction set for both block chains. He then assembles the final Namecoin block and hashes it. He then creates a transaction containing this hash that is valid in the Bitcoin chain and inserts it in the Bitcoin transaction set at the tip of the tree. He then assembles the final Bitcoin header with this transaction in it and sends out the work units.

If a miner solves the hash at the Bitcoin difficulty level, the Bitcoin block is assembled and sent to the Bitcoin network. The Namecoin hash does nothing and the Bitcoin network ignores it.

If a miner solves the hash at the Namecoin difficulty level, the Namecoin block is assembled. It includes the Namecoin transaction set, the Namecoin block header, the Bitcoin block header, and the hash of the rest of the transactions in the Bitcoin block. This entire "mess" is then submitted to the Namecoin system. The Namecoin system, supporting merged mining, accepts this as proof of work because it contains work that must have been done after the block header and Namecoin transaction set was built. (Because you can't build the Bitcoin transaction set containing that hash, and therefore the Bitcoin header that secures it, without that information. So it proves the work was done.)

Note that a miner can solve both chains simultaneously, and they will if they solve at the higher difficulty. One block can "win" in the public chain and not the other. They are fully independent -- only the mining is merged.

Three key points to remember:

The Bitcoin chain doesn't get junked up with Namecoin stuff due to merged mining. At most, one tiny hash is inserted in the transaction tree.
The two hash chains remain fully independent. The "Bitcoin stuff" that goes in the Namecoin tree is basically ignored and only used to validate the proof of work. (It will bloat the Namecoin chain a bit as it means some blocks will have an extra header and an extra hash.)
Lastly, no special support is needed from Bitcoin.

The benefit for Namecoin is obvious. A lot of Bitcoin miners will probably do merged mining, since it costs them basically nothing and gives them a greater return than mining Bitcoins alone. As a result, their block generation timing will be more predictable and their transactions more secure against a 51% attack.


How do i find out what city and whatwas posted with code? 065e7ad1111963cacd4e2ca978ff57023b8297c123911ffbb8a61011d29d1849 how can I see where that was posted and time

This is not information you can find in the blockchain and whatever information you do find is not considered terribly reliable.

That said, you can see from blockchain.info where this transaction originated:

https://blockchain.info/tx/065e7ad1111963cacd4e2ca978ff57023b8297c123911ffbb8a61011d29d1849

The IP address that relayed it was:

45.33.113.199

When you look up this IP address, you find that:

http://whatismyipaddress.com/ip/45.33.113.199

It's originating from Dallas, TX on a Linode server. This may or may not be the actual server that originated the transaction as there may have been several hops before blockchain.info saw it. Also, a user can have a Linode account and be pretty much anywhere in the world, so this information is probably not all that useful.

That said, if you want to speculate on where this transaction originated, this is one publically available way to do so.


How to Track if Payment is Received with API in Coinbase I am using coinbase api https://github.com/coinbase/coinbase-php and I successfully created order button but I didn't found anything to confirm or track that I have received payment.

<?php
    require_once 'lib/coinbase.php';
    require_once 'config.php';
    $coinbase = Coinbase::withApiKey(Key, Secret);
    echo $coinbase->createButton("Bullion Products", "10.00", "BTC")->embedHtml;
?>

With this codes I am able to show Pay with bitcoins its showing correct values but just want to track with API that someone send me bitcoins so I'll do some action according to it.

Thanks

Use the callback URL, it will load it on the first confirmation.
Just have it load a URL that runs a script to notify you or record the transaction somewhere.
https://coinbase.com/api/doc/1.0/buttons/create.html

Create a payment button
This will create the code for a payment button (and modal window) that you can use to accept bitcoin on your website. You can read more about payment buttons here and try a demo.
The method signature is public function createButton($name, $price, $currency, $custom=null, $options=array()). The custom param will get passed through in callbacks to your site. The list of valid options are described here.


Bitcoin-qt Show Transaction Details When looking at the details of a transaction (Show Transaction Details), the From: field is always set to 'unknown'.
Is it possible to add a 'From' parameter to the API so some meaningful description can be sent with the transaction? A 50 text character would suffice.

Bip 70 This BIP describes a protocol for communication between a merchant and their customer, enabling both a better customer experience and better security against man-in-the-middle attacks on the payment process.

On of the key features of this proposal is:

  PaymentRequests include a user-friendly description of what the
  payment is for

Will hopefully be released with Bitcoin-Qt 0.9


Bitcoin 0.18: how to send bitcoin from one address to another using Bitcoind? To transfer bitcoin from one account to another address, we have used sendfrom method and which got deprecated in the latest version Bitcoin 0.18.0

Bitcoin sendfrom method

On reading the document of Bitcoin 0.18.0, it is suggested to use sendtoaddress method.

sendtoaddress method has two required parameter

"address" - address to which we want to sent BTC
"amount" - amount in whole number

Unlike sendfrom method, there is no parameter where we can pass the parameter with account or address from which we want to send BTC.

Please let me know how can I define the account or address from which I need to send Bitcoins or is there any other method available.

I am using bitcoind to make RPC calls.

Please let me know how can I define the account or address from which I need to send Bitcoins or is there any other method available.

The listunspent and createrawtransaction commands together can be used to achieve what you are asking.

The listunspent command will give you all the UTXOs that your wallet controls. You can pass an address parameter to filter all the unspent outputs by address. The documentation of listunspent is available here. This command will return you the txids, output index, value and others.

Then use the createrawtransaction command and specify those txids and output indexes in the input, and the address and value that you want to send in the output.


Which file is the source codes of regtest net located? I try to compare the source codes between main net and regtest net of bitcoin. I am not sure where the source codes of regtest located. Would someone help me, please?

Because regtest is supposed to be test network, it has to be pretty similar to mainnet. Thus there really isn't separate code for regtest only, most of the code is shared between the two networks. The differences are really only defined by a few parameter changes which can be found in chainparams.cpp.


First multisig using Armory I hope that no such question already has appeared here. I've searched for a solution but cannot find one.

My problem is as follows:
I want to use multisig with Armory on Linux. I've created new wallet, new address and changed Armory to Expert mode, since that is the mode for using Multisig/Lockboxes etc. In order to that I need need my address' public key. So I've checked it - these are two numbers - coordinates of an elliptic curve (I'm a newbie here as you can see :3). I wonder - how can I obtain my address' pubkey in a starting with 02, 03 or 04, as a one string. I've tried ECDSA calc built it Armory, but it's not that. I suppose I need to express it in HEX or sth. I need it to obtain my multisig pubkey.

Please, help
Thanks a lot

Easiest way to do this is to first load watch-only wallets of the multisig lockbox you hope to create. Say, you want 2-of-3 and you have 3 watch-only wallets.

Go to Lockboxes -> Create Lockbox -> and click the address book icon next to each public key #1. Highlight the wallet you want the public key to be from and select an address below that hasn't been used yet. Repeat for public key #2 and public key #3. Generally, you should be choosing from different watch-only wallets.

Click Save Lockbox and you now have a new multi-sig p2sh address!


How to get address type(format). Need to calculate vsize and fee Help me please. I need to calculate vsize and multiply it by the function result  estimatesmartfee.
To calculate vsize, I implement a formula like this https://jlopp.github.io/bitcoin-transaction-size-calculator/
byt i cannot getting address type from Bitcoin API.
Please tell me how to get the address type by API for implementing this formula?

P2PKH: Starts with "1". Commonly known as "Legacy Address". They have a known vbyte size. Size to spend is predictable.
P2SH: Starts with "3". You would know if you made a P2SH address, since they're almost always involved with n-of-m multisig. Vary in size depending on how many parties are involved in the multisig. Size to spend is unknown unless the wallet you're spending from knows how to spend it or you created the transaction manually.
P2WPKH in P2SH: Starts with "3". Commonly known as "Segwit Address". Quickly becoming, if not already, the most common address type. They have a known vbyte size. Size to spend is predictable.
P2WSH in P2SH: Starts with "3". Likewise with P2SH, you'd know if you made this type of address as it's involved in n-of-m multisig. Vary in size depending on how many parties are involved in the multisig. Size to spend is known unless the wallet you're spending from knows how to spend it or you created the transaction mnually.
P2WPKH: Starts with "bc1q". Commonly known as "Native Segwit Address". They have a known vbyte size. Size to spend is predictable.
P2WSH: Just like P2SH but starting with "bc1q" and much longer than a P2WPKH address.
P2TR: No idea what this is unfortunately. Looks like it stands for "Pay 2 Taproot". But I admit that I don't know much about Taproot, and I don't think this has been implemented on mainnet yet.

Please tell me how to get the address type by API for implementing this formula?

I don't know what API you're referring to, but if you are running a Bitcoin Node you can run the command bitcoin-cli getaddressinfo "YOUR_ADDRESS_HERE" to get information about a particular address. Note that for addresses starting with "3", you will not be able to determine if it is P2WPKH in P2SH vs. P2SH, as they are indistinguishable from each other until spent. They will both have "isscript": true. For "bc1q" addresses, they will both have "iswitness": true and P2WSH will also have "isscript": true.


How likely is it that all the addresses involved in a SINGLE multisig transaction input/output belong to the same wallet/owner? I read from a paper that: "Since many transactions have multiple sending addresses, we can make the reasonable assumption that all these addresses have the same owner." (Quantitative Analysis of the Full Bitcoin Transaction Graph by Dorit Ron and Adi Shamir) So I wonder if the same could be said about the addresses taking part in a multisignature of a multisig transaction input/output.

Multisig is useful for both a single individual and for a group. Individuals can use it to secure their funds by using a 2/3 address and distributing the keys. Groups can use multisig to implement an escrow transaction for goods or services.

These, and other use-cases, for multisig are being used today, but it's impossible to know the proportion of individual-use and group-use. There is no way to know for certain if they are controlled by the same person, unless you have more information than just what is available in the blockchain.


Lightning Network wallet applications for different operating systems? What are the best / most secure wallet applications of Lightning Network for each of following operating systems/platforms ?

Windows
Mac OS
android
iOS
web browser extensions

Android Lightning Network wallets

https://github.com/ACINQ/eclair-mobile

https://lightning-wallet.com


What to do if my BitCoin Address is only 33 digits? I noticed that BitCoin addresses usually are equal to 34 digits and/or characters.
I decided to get an extra address and was a bit hesitant to use it since it's 1 digit or character short, is this usable or should I just get another address instead?

The wiki page on Bitcoin addresses mentions that addresses van be of length 27-34. So an address of 33 characters long is perfectly usable.


How did they generate these vanity addresses with 27 predetermined characters? A while ago, I read some news about a huge transaction on the Bitcoin blockchain. The first few addresses used were apparently created with some kind of vanity address generator. One example is 1Lets1xxxxxx1use1xxxxxxxxxxxy2EaMkJ.
However I recalled, when reading up on the topic a couple of years ago, that this process is very computation hungry, since it entails a brute force search for private/public keypairs. Finding a keypair with only a few predetermined public key characters would take a long time. And indeed, the Vanitygen article on the Bitcoin wiki seems to agree - finding a keypair with 12 determined public key characters would take 11,700,000 years...
So, how did they manage to generate the public key above with 27 non-random characters?
(They say that the task of finding a private key for a specific public key is futile, but extrapolating here makes you kind of wonder...)

Your observation is correct and indeed those addresses cannot be generated by vanity address generator in a reasonable amount of time.
Most likely, there is no secret key corresponding to that address and the person chose the p2pkh(and thereby the address) directly. Indeed, by looking at the explorer, there seem to be no outgoing transactions from that address.


What is the average amount of electrical power required to complete one Bitcoin transaction? Once a bitcoin has been mined, if I want to use it to pay for something, what is the average amount of electrical power required to process that payment or bitcoin transfer? Does this vary with the value of the transaction, and if so in what manner?

Please note that I am not asking about the electricity cost, as that would clearly depend on the location as well as what deal you've been able to strike with the power company. Hopefully the number of kWh, J, or whichever other unit happens to be convenient, will be easier to answer reasonably objectively.

Answers for any point in time during which Bitcoin has existed are acceptable, but more recent data is better. It is acceptable to exclude costs that are not actually related to the data being transferred being about bitcoins per se (for example, I see no real need to calculate how large a percentage of Internet core router traffic is for bitcoin transfers and account for that).

(I did find e.g. Energy to confirm one block? and Can it really be true that the Bitcoin system consumes almost $1.000.000 in electricity per day? as well as (on Skeptics) Does one transaction on Bitcoin require 215kWh? but all of these appear to conflate the total power usage of the Bitcoin network with the power required for a transaction using already mined Bitcoin by lumping the two together.)

Once a bitcoin has been mined, if I want to use it to pay for
  something, what is the average amount of electrical power required to
  process that payment or bitcoin transfer?

That a transaction is processed could mean it has gone all the way from its generation up to its addition on the blockchain within a mined block confirmed by all nodes.

The only significant consumption in the process is the guessing of the correct hash of the block that includes this transaction along with cca 2000 (meaning around 500 byte transaction size on average) other transactions included in it. This guessing (lottery) difficulty varies with time thus the energy consumption varies. Current guessing difficulty is 1,452,839,779,146 (https://bitcoinwisdom.com/bitcoin/difficulty), and the average number of guesses to make is 2^32 * difficulty (2^32 * 1,452,839,779,146 = awfully high).

Now you can find the energy consumption for example by examining some high end mining device like AntMiner S9 and checking its hashing rate (for this example 14,000,000  Mhash/s, https://en.bitcoin.it/wiki/Mining_hardware_comparison) and its power consumption (1,375 W).

Average_number_of_guesses / hashing_rate = Guessing_time
Guessing_time * power_consumption = Energy_spent_for_mining_a_block
Energy_spent_for_mining_a_block / number_of_transactions_in_block = Energy_spent_per_transaction

If I've done calculation correctly this should be around 85 kWh per average transaction. (Note that not every mining device on the network is AntMiner S9 so this figure should be used with reserve).

  Does this vary with the value of the transaction, and if so in what
  manner?

It does not vary with transaction value but the size of transaction in bytes and this varies by the number of inputs and outputs of transaction. If has more inputs and outputs it will be bigger in size thus allowing less transactions in a block and the last equation will change accordingly. For example if transaction is 1000 bytes big instead of average 500 used in last equation it will use around 170 kWh


Is it possible to copy BTC balances of only some addresses while forking I want to fork a Blockchain for private use, however I want to keep only balance of some known adresses
for example if my adresses are @A(10BTC), @B(20BTC), @C(30BTC)
I want to see same adresses with same amount on the new forked one
@A(10BTC), @B(20BTC), @C(03BTC), @D(5BTC), @E(6BTC)

Many thanks

This is possible, but will require a change to your fork's consensus rules to see the block that alters address balances as valid.

Essentially, you need to drop the utxos of addresses you don't want to have a balance on your new fork at the fork block, and leave the ones you want with a balance alone. This is of course an invalid block for regular Bitcoin clients, since utxos cannot arbitrarily disappear. You can get around this by assuming that the fork block hash is valid explicitly in your fork's code.


Recovery of possibly corrupted Bitcoin Wallet I have a very old wallet, which I am unable to open.
It is password protected, but I know what the password is.
Bitcoin Core says Salvage failed.

Booted LiveUSB Ubuntu and installed pywallet.

ubuntu@ubuntu:~/Desktop/pywallet$ sudo ./pywallet.py --recover --recov_device /dev/sdc1 --recov_size 1Gio --recov_outputdir /home/ubuntu/Desktop/recover/
Enter the passphrase for the wallet that will contain all the recovered keys: 123456

Enter the possible passphrases used in your deleted wallets.
Don't forget that more passphrases = more time to test the possibilities.
Write one passphrase per line and end with an empty line.
Possible passphrase: xxxxxxxx
Possible passphrase:

Starting recovery.
0.10 Go read
0.20 Go read
0.30 Go read
0.40 Go read
0.50 Go read
0.60 Go read
0.70 Go read
0.80 Go read
0.90 Go read
1.00 Go read

Read 1.1 Go in 0.7 minutes

Found 1 possible wallets
Found 221 possible encrypted keys
Found 0 possible unencrypted keys

Possible wallet #1
    with passphrase #1

Private keys not decrypted: 221
Trying all the remaining possibilities (221) might take up to 0 minutes.
Do you want to test them? (y/n): y

Private keys not decrypted: 221
Try another password, check the size of your partition or seek help
The wallet is encrypted and the passphrase is correct

Importing:

The new wallet /home/ubuntu/Desktop/recover//recovered_wallet_1513352751.dat contains the 0 recovered key
ubuntu@ubuntu:~/Desktop/pywallet$

So it recognizes the password as correct, but it doesn't decrypt the keys.

Please help.

Note there are two kinds of encryption for wallets:
Encryption of the wallet itself, and of just the private keys.
If your wallet is very old, it did not support wallet encryption at the time.  Only your private keys are encrypted.
Decrypting your private keys has failed because your passphrase is wrong.  pywallet is just not giving you a good error message.
I wrote a guide to corrupt Bitcoin Wallet recovery which has some other tools you can try.


How does Bitcoin read from/write to LevelDB I know that Bitcoin Core uses LevelDB since 0.8 version. However, I couldn't find detailed explanation about how Bitcoin stores and retrieves from LevelDB. E.g. If B transaction uses an output from previous transaction A as input, how does Bitcoin lookup this transaction and see if it's spent? After transaction B is spent, how does this transaction get updated?

In the specific example you asked, it does so by querying the LevelDB located in ./bitcoin/chainstate (there is where the UTXO set is stored).
UTXOs are identified by its txid (Little Endian representation) leaded by a c.
Example
Transaction
246c5a81b6ad0dfc0dbc0b2ff5bde65ee1913f75a47d409b8ff8074a27ec1000
is identified in the LevelDB by:
c0010ec274a07f88f9b407da4753f91e15ee6bdf52f0bbc0dfc0dadb6815a6c24
or what is the same:
630010ec274a07f88f9b407da4753f91e15ee6bdf52f0bbc0dfc0dadb6815a6c24
since the hex representation of the lowercase ASCII character 'c' is 63. Notice that when you query the database you should not do it using the string representation of the value, but the byte array one.
Each entry in the LevelDB contains two values, the identifier (explained avobe and used to query the data), and the value.
The value of each entry (the UTXO) is encoded in the LevelDB following the structure that follows (extracted from this comment from the source code):

Serialized format

VARINT(nVersion)
VARINT(nCode)
unspentness bitvector, for vout[2] and further; least significant byte first
the non-spent CTxOuts (via CTxOutCompressor)
VARINT(nHeight)

The nCode value consists of:

bit 1: IsCoinBase()
bit 2: vout[0] is not spent
bit 4: vout[1] is not spent
The higher bits encode N, the number of non-zero bytes in the following bitvector.
In case both bit 2 and bit 4 are unset, they encode N-1, as there must be at least one non-spent output).

You can find a better formated explanation and examples in the source code from the provided link.
Notice that, since chainstate database used to trigger anti-virus software, as you can check in this issue and in this question, the first lines of the chainstate contains the obfuscation key, a 64-bit value identified by 0e00obfuscation_key that should be XORed with each data value from the database. To do so, the key is concatenated with itself until it reaches the length of the obfuscated value.
Example
Lets o_k = '27c78118b7316105' be our obfuscation key, and
{"key": "63000002f414665fb03389dd19776732bf90883bcb399d23323747596e98dd1801", "value": "26c326d7353661dc7005d274976f458691f24f0f05d141335f4ad5927e41"}
be one entry from the database. As you can see, value does not follow the above introduced format, since it is obfuscated. value is 60 characters long, so if we extend the obsfuscation key since it reaches the same length, we get:
27c78118b731610527c78118b731610527c78118b731610527c78118b731

Now, if we perform the XOR between the value and the key:
26c326d7353661dc7005d274976f458691f24f0f05d141335f4ad5927e41 XOR 27c78118b731610527c78118b731610527c78118b731610527c78118b731

We obtain:
0104a7cf820700d957c2536c205e2483b635ce17b2e02036788d548ac970

That matches with the previous stated format, and it's indeed the UTXO value identified by 63000002f414665fb03389dd19776732bf90883bcb399d23323747596e98dd1801.


Why is blockchain necessary? I'm trying really hard to understand how bitcoin works.

I understand that bitcoin miners does proof of work, and creates blocks, and then transactions are sealed inside this block to become "confirmed". And this has something to do with double spending.. somehow..

So, my questions is, why cant we do a similar decentralized network, without proof of work/blockchain? In this network, we just keep a list of all transactions (akin to blockchain) (a copy for each node), and then use majority rule. Ie, if there is a dispute in the new transaction, we just go to every node, check their list of all transactions, and if the new transaction contradicts majority of list of all transactions, then the new transaction will be rejected etc. And nobody need to solve any hard math problems (ie proof of work)

And for new transactions, our protocol can be following: If nobody disputes the transaction over the next 60minutes, then we set confirmed flag of this transaction to be 1, and thus this transaction is now confirmed etc.

In other words, im struggling to understand the value of proof-of-work process in bitcoin.

I think the introduction of block has much more a security-related origin:

Currently, getting transactions confirmed costs a certain amount of work for which computer have to run a long time and cost some time, effort and money. Because of this, it is hard to manipulate the chain of transactions. It is hard to find a correct block with a certain set of transactions and cheating will result in your block being refused by the network.

However, when clients just keep lots of transactions, it would be much easier to f.e. set up thousands of false nodes that manipulate the network. A node that only requires memory is much cheaper than one that requires hashpower. With some resources it's easy to add thousands to hundreds of thousands of clients (these don't have to be separate machines but can be virtual ones) participating and entering bogus transactions or leaving some out.

The fact that creating the blocks is "difficult" add a lot of security to the network, making it extremely hard to falsely manipulate the transaction history.


Why is it important for checkpoints to contain well-formed blocks? In the source code of the standard client, checkpoints.cpp has this comment:

//
// What makes a good checkpoint block?
// + Is surrounded by blocks with reasonable timestamps
//   (no blocks before with a timestamp after, none after with
//    timestamp before)
// + Contains no strange transactions
//

Why should it matter? Presumably the client would have accepted it anyway if they were downloading it normally, and if you were to specify a later block, that would still force the client to download the strange block. I don't understand the point of this restriction.

There are two things :

Why are checkpoints needed in the first place,
Why do the checkpointed blocks need to adhere to the standards you are quoting (which is your question)

I don't think checkpoints are required at all or useful in any way, there has been some debate around this, the fact remains that checkpoints are still present in the Satoshi implementation.

I believe there is no specific reason why the checkpointed blocks must have "reasonable timestamps" or not contain "strange transactions". The only reason I can think of is to not confuse someone reviewing the checkpointed blocks. As you said, such a block would still be downloaded and properly validated. So I think it has more to do with cosmetics and clarity than with an actual technical constraint.

(Also note that "strange transactions" doesn't really mean much, it does not seem to be defined as a transaction that passes the IsStandard check)


FPGA mining setup with Altera DE2-115 I have an Altera DE2-115 FPGA and I want to try mining. I found this project
https://github.com/progranism/Open-Source-FPGA-Bitcoin-Miner/tree/master/src
but when I try to start it, it says

ERROR: Unable to getwork. Reason: key "result" not known in dictionary

I have registered with bitminter.com for a url and I provide the url like this in the config file

# Edit this with your details and save as config.tcl
# They are the same worker server, user/pass you use
# with other mining software.
#
set url "http://eu1.bitminter.com:443"
set userpass "rtz:123"

Essentially no software supports the getwork call anymore due to the speed of modern miners (they would call it 25,000+ times a second). You’ll need to use a very old version of Bitcoin Core from before this was removed if you’d like your software to work, but the FPGA miner is inefficient enough to never make this worth the time investment. The specific error you’re seeing from the miner is due to endpoint being removed from bitminter, and it not knowing how to handle the non response.


How to take advantage of the free transaction relay policy? I have about 0.027 BTC total, spread over 272 transactions.

Was going to send them to someone, and then the transaction fees hit me:  0.0245 BTC.  This agrees with the answer to this question -- (272 txns * 180 bytes each is 49 kBytes, or 0.0005 BTC per transaction).

Then I found out about the free transaction relay policy here, which looks like it will bring things down to a more reasonable 0.004 BTC.

I'm not understanding the mechanics of setting this up, though.  I can probably figure out how to do the following for the Eligius miner (I'm using the Bitcoin client with QT 4.8.3):

 Add the command-line parameter: -addnode=173.242.112.53

But the rest of the mechanics, I'm not sure.  Specifically:

How do I "broadcast the transaction to it"?  Can I do this within the Bitcoin client?
Does the person to whom I'm sending the BTC also need to add this same node?
Do I have to specify anything else within the transaction?

My goal would be to empty my wallet of all of these tiny transactions with this reduced fee.

Edit1: Is it possible to add node 173.242.112.53 using Electrum or one of the other clients?

By simply adding addnode=68.168.105.168 to your bitcoin.conf file then any transaction you send will automatically be broadcast and eventually make it into a block. No one but you has to add this node and nothing special needs to be done beyond this one configuration.

Now it may be true that the bitcoin-qt client will not actually allow you to send a transaction that is against its own rules, I'm not sure as I've never tried, but if this is the case you will need a non-standard client which is another question entirely.

Note: May 2015, 68.168.105.168 is the only Eligius relay IP I can find that's active


Compare altcoins in one chart Is there a website where I can compare several altcoins in one chart?

In particular, I am looking for a chart where each coin, that I want to consider, starts with the same value (say a value of 100$) at a certain date. With such a chart one could compare the performance of the altcoins.

Take a look at this website, They may be what you're looking for.


Unconfirmed transaction I made a transfer over 24hr ago and it's yet to be confirmed. Pls help. The link is https://blockchain.info/tx/35dd84368ffc04c49980f7816b667efb84dbfd974070d429edaadacb9cf13f13.
Thanks

It looks like you included fees of about 35 sat/B on your transaction.

Take a look at the table on this page, and you can see with that fee, many transactions with that fee take a VERY long time to be confirmed (nearly infinite).

You can not expect a transaction to be confirmed in 24 hours at that fee.  It may take over a week, or it may never get confirmed.

The recommended fee is currently around 420 sat/B, or more than 10x what you paid.


Does the Longest Chain Always Win the Mining Award? If the longest chain (i.e, the one that's the most difficult to produce or the most transactions) is always awarded with 12.5 coins (or whatever the current prize is), what happens if a specific node is aware of a certain set of transactions but doesn't broadcast them to  other nodes (the network) and includes them in it's own hash.

Wouldn't this automatically guarantee it will win the mining award?

what happens if a specific node is aware of a certain set of transactions but doesn't broadcast them to other nodes (the network) and includes them in it's own hash.

Nothing bad happens, but the rest of the network will check to make sure the transactions are indeed valid once they receive the new block. If everything is valid then they accept that block as the new chaintip, and miners will start mining on top of it. In this way, miners can add their own transactions to blocks they find without broadcasting the transactions to the network first.

  Wouldn't this automatically guarantee it will win the mining award?

No, the mining reward is claimable by any miner that finds a valid block. A block can be full of any transactions the miner would like (or none at all), but the exact transactions included will not alter the probability of a miner finding a valid block. If a miner fills a block with their own transactions that haven't been broadcast to the network, they will be at no advantage over a miner that is including only transactions that have been publicly broadcast.


bitcoind getinfo or getbalance freeze I am a bitcoin newbie. I am testing solo mining (I know it is not financial feasible in general). I installed bitcoind on Debian and it ran okay as far as I could tell. I've experienced a couple of problems. The size of the bitcoin data directory is still growing when I use:

du -ks .bitcoin/

I ran

./bitcoind getinfo

and got information like this:

{
    "version" : 80600,
    "protocolversion" : 70001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "blocks" : 225436,
    "timeoffset" : 0,
    "connections" : 9,
    "proxy" : "",
    "difficulty" : 4367876.00084220,
    "testnet" : false,
    "keypoololdest" : 1389424771,
    "keypoolsize" : 103,
    "paytxfee" : 0.00000000,
    "errors" : ""
}

When I ran

./bitcoind getbalance

I got 0.000000000

The problem is sometime,

./bitcoind getinfo

simply freeze and I have to use Ctrl-c to kill it.

Another problem is I cannot connect to bitcoind using

./minerd --url http://127.0.0.1:8332 --userpass username:password

The result I got is:

[2014-01-12 20:54:03] Binding thread 0 to cpu 0
[2014-01-12 20:54:04] Binding thread 1 to cpu 1
[2014-01-12 20:54:05] 2 miner threads started, using SHA256 'c' algorithm.
[2014-01-12 21:01:36] HTTP request failed: The requested URL returned error: 500
[2014-01-12 21:01:36] json_rpc_call failed, retry after 30 seconds
[2014-01-12 21:02:15] HTTP request failed: The requested URL returned error: 500
[2014-01-12 21:02:15] json_rpc_call failed, retry after 30 seconds
[2014-01-12 21:02:56] HTTP request failed: The requested URL returned error: 500
[2014-01-12 21:02:56] json_rpc_call failed, retry after 30 seconds
[2014-01-12 21:03:35] HTTP request failed: The requested URL returned error: 500
[2014-01-12 21:03:35] json_rpc_call failed, retry after 30 seconds

Again, I had to use Ctrl-c.

Any information is appreciated.

Usually this type of conf file works :

server=1
daemon=1
rpcuser=any_username
rpcpassword=any_password

if not then allow ip 127.0.0.1 in bitcoin.conf

rpcusername=your_usename
rpcpassword=your_password
allowip=127.0.0.1
allowport=8332

This may help, you may also try allowing ip 0.0.0.0 if both of the above does not works


Is auditing a BIP32 tree only possible if it is non-hardened? BIP 32 allows you to to implement the auditor use case:

  Audits: N(m/*) In case an auditor needs full access to the list of
  incoming and outgoing payments, one can share all account public
  extended keys. This will allow the auditor to see all transactions
  from and to the wallet, in all accounts, but not a single secret key.

If I want all my bitcoin transactions to be fully audited, then I would need to give my auditor my master node details. However I obviously don't want to give him my master node secret key since he would be able to steal my money. Thus I could only give the auditor my master public key and the chain code. With that he will be able to derive all public keys and see all my transactions.

But that means that my entire tree can only use non-harded BIP-32. Is that correct or am I missing something?

That is correct, you can only do this with non-hardened derivation. Only non-hardened derivation can use the master public key to derive all of the public keys. With hardened derivation, you must have the master private key in order to derive anything.


Difference between account balance and the sum unspent transaction outputs I have account in bitcoin-core (for example it's "maks") and there I have 0.00010884 BTC.

getbalance "maks"
0.00010884

But when I get UTXO:

listunspent 1 999999 [...array of addresses belongs to "maks" account...]

and sum all amounts up I get 0.00009824 BTC and I don't understand WHY??
I thought account balance is sum all unspent transactions outputs. Please help me!
Or maybe it's don't need me... I want to create raw transactions and for this I need unspent transactions. How I can get these transactions?

Accounts have nothing to do with UTXOs.

They are bean counters to help you determine who owns how much, in case you have multiple users sharing the same wallet.

An account is credited whenever a payment arrives to an address associated with that account. It is debited whenever the sendfrom or sendmany RPC is used while specifying that account. If you use any other means of sending, the "" account will be debited.

However, the UTXOs are always shared across all accounts in a wallet, and don't belong to a specific account. When you send out money, all UTXOs are always considered. Accounts can go negative even, if you use the move command (which just increments one account and decrements another).

The above is one of the reasons why the accounts system is deprecated, as it does not match people's expectations. If you want to have actually separated users, with independent UTXOs and balances, you should look at the multi-wallet feature added in 0.15.0.


Properties of Bitcoin as an Electronic Cash System I am studying the concept of Electronic Cash, and in several reference I found that the criteria describing the ideal electronic cash system are as follows:

Independence: The security of electronic cash cannot depend on
any physical condition. Then the cash can be transferred through
networks.
Security: The ability to copy (reuse) and forge the cash must be
prevented.
Privacy (Untraceability): The privacy of the user should be
protected. That is, the relationship between the user and his
purchases must be untraceable by anyone.
Off-line payment: When a user pay the electronic cash to a shop,
the procedure between the user and the shop should be executed in an
off-line manner. That is, the shop does not need to be linked to the
host in user’s payment procedure.
Transferability: The cash can be transfered to other users.
Dividability: One issued piece of cash worth value C (dollars)
can be subdivided into many pieces such that each subdivided piece
is worth any desired value less than C and the total value of all
pieces is equivalent to C.

Now, what of the above properties are achieved by the Bitcoin system? I guess 1, 2 and 5 are trivially achieved, and I think 3 and 6 are not fully achieved. I wonder if 4 is achieved, and I'm particularly interested in this off-line property.

When a user pay the electronic cash to a shop, the procedure between the user and the shop should be executed in an off-line manner. That is, the shop does not need to be linked to the host in user’s payment procedure.

Neither merchant nor customer need to be connected directly.

A customer can hand a merchant a previously-signed transaction without using a network connection. However, the merchant can only prove the validity of the coin(s) being spent by contacting the network.


how to monitor +20,000 addresses for new received transactions? I have around 20000 generated addresses which I want to monitor for new transactions. More addresses should probably come. Customers should use every address only once but I would like to monitor already used addresses if some of them decide to transfer coins to "used" addresses.

These addresses are not in the online wallet, I have only addresses in the databases. Private keys are held offline.

That means that I do not want to monitor addresses from the local wallet but the addresses from databases.

A command should executed after a transaction is received (with enough confirmations). There are some monitor services which can send an email or call url after receiving a transaction for an address on the watchlist.

I would like to implement the same feature for my application without depending on external service.

I saw some questions and answers like:

How to know there is a new transaction? or
  Monitor all transactions on bitcoin network - API

But what would be the most efficient way to do this? Is there a perl/php compatible way to do that?

One of topics from above links to https://bitcointalk.org/index.php?topic=89725.0 where Gavin is talking about some new features but I did  not get how could I or whether I can use anything of this to monitor a high number of addresses. Sending every minute a batch RPC call with a few thousands addresses to bitcoind is probably not a solution :-(.

I hope that there is a elegant way to monitor the whole information stream (all incoming transactions and other incoming information) and react if it matches what I need.

I am basically doing the same thing for bitcoinmonitor.net. I have a database of addresses to monitor and get notifications from bitcoind for any incoming transaction.

I maintain a patchset for bitcoind which allows setting an url which will be called with any incoming unconfirmed transaction, including transaction details in a json object. Also for any new accepted block a (different) url can be set up to be called with details on the new block.

So you will get a notification for any incoming unconfirmed transaction, then you can match this with the monitored addresses in your database.
If you want to trigger actions after a certain number of confirmations you need to hook up to the new block event.

Check https://github.com/TripleSpeeder/bitcoin for my bitcoind fork. I try to keep it more or less in sync with the current stable official client. This is running stable with bitcoinmonitor.net for around 10 months now.


Error on Installing Multibit for Windows 7? I recently found about Bitcoin through a friend and got interested to surf about it over the Internet. I was installing Multibit on my machine running on Windows 7 but as soon as I click on the downloaded file, I get the following error.

This forum is not letting me attach an image so i have to manually type in the text :S

"Error:java.lang.AbstractMethodError:org.apache.xecres.dom.DocumentImpl.setXmlVersion(Ljava/lang/String;)V"

Please help me fix it !

Regards, Maddy

Googling for that error there is a similar one at:
http://trac.jajuk.info/ticket/1549

There they suggest it could be something to do with the installed Java Runtime Environment. This is what the installer uses to run.

You could try making sure the Java installation on your machine is 100% by installing the latest version from:
 http://java.com/en/download/index.jsp

Then try the installer again.


What is 'ScriptCode'? I don't understand what the 'ScriptCode' thing is. Is it a part of transaction format? The wiki https://en.bitcoin.it/wiki/Transaction describes scriptPubKey and scriptSig, mentioning nothing about 'ScriptCode'.

When viewing an example P2WPKH transaction here http://n.bitcoin.ninja/checktx?txid=d869f854e1f8788bcff294cc83b280942a8c728de71eb709a2c29d10bfe21b7c

The "Script Code" field is displayed as "OP_DUP OP_HASH160 1d7cd6c75c2e86f4cbf98eaed221b30bd9a0b928 OP_EQUALVERIFY OP_CHECKSIG"(so the standard script used by ordinary P2PKH transactions), but these are not given by scriptSig or scriptPubKey(obviously, since those two have a very specific form required for SegWit transactions). Can someone explain where this stuff comes from?

The ScriptCode is the script that is evaluated for a witness program type. Each witness program type has a specific template for the ScriptCode. That is simply part of its definition.

For a Pay-to-Witness-Pubkey-Hash output the ScriptCode is

OP_DUP OP_HASH160 <pubkey hash> OP_EQUALVERIFY OP_CHECKSIG

The <pubkey hash> for the ScriptCode is taken from the witness program.


Can secp256k1 be implemented efficiently on a 8-bit processor and very limited RAM? We are trying to build a much simpler version of Trezor. We do have an finished PCB design from a previous project and would like to know whether this design can be modified, without changing the processor, to sign Bitcoin transactions. The current processor is a TI CC2540. Is it possible to get a minimalistic secp256k1 implementation to run on it, or are we just out of luck?

I don't see why not.  Most of what you need to do is just modular arithmetic with big integers (around 2^256).  There's no obstruction to doing this on an 8-bit microprocessor, it just takes a few more instructions.  You might even find some existing code for arbitrary-precision arithmetic.  256 bits is 32 bytes, so 8K of memory seems like plenty.


Got bitcoin on generated address, now my wallet doesn't have the address anymore I downloaded bitcoin.com wallet and immediately sent myself an email of my BTC address. Right after that I purchased some bitcoin through simplex. So the transactions (I made two, on the same address) went through, i can also see it on blockchain.info. The thing is, that I can't see it in my wallet. Also, the address I sent myself is also not visible in the wallet. I still have the email tho. I went back and forth with bitcoin support (one guy named Steven), i cleared my chache, generated all the new addresses, scanned for funds, I tryed everything he said. He also said that  the error message should not be showing, also stopped believing me about my issue. Ok, so here's the thing I want to know. How can I try to access my bitcoin just through the BTC address? Or at least, can I find out to wich wallet this address is linked to? Because if it is not linked to my wallet, which wallet is it linked then? Can a bitcoin address not be linked to a wallet?  If so, can anyone retrieve the money then? I will be very thankful for any response that could be helpful. Thank you in advance

How can I try to access my bitcoin just through the BTC address?

You cannot, you need the private key that controls the address to access any bitcoin stored on it. (Wallet software will control the private key)

  Or at least, can I find out to wich wallet this address is linked to?

Without any other info, there is no way to tell which wallet an address is linked to.

  Because if it is not linked to my wallet, which wallet is it linked then? Can a bitcoin address not be linked to a wallet?

It is possible to generate an address that is controlled by a private key no one know. For example see the 1BitcoinEater address.

  If so, can anyone retrieve the money then? I will be very thankful for any response that could be helpful. Thank you in advance

Unfortunately, no. If your wallet does not contain the private key for that address, the money is likely gone forever.

It is very strange that the wallet would display an address that it does not have the private key for, for any further help you'll likely need to continue with the bitcoin.com customer service reps. Sorry for your loss :(


How to calculate coins mined per day? Sorry for the noob question I'm pretty new to crypto coins and all this stuff. :)

I wonder why the formula <your hashrate> / <coin difficulty> gives the mined coins as a result...Formula mentioned on xmg.minerclaim.comQuote:

  "XMG/Day" is calculated by the current Hashrate/Difficulty. Due to the
  fact that difficulty is constantly changing, this is only a rough
  estimate.

Example (from altcoin Coin Magi):

If I have a hashrate of 3.211 MH/s and the coins difficulty is 2.599 (approximately) then my earnings per second (because it's H/s) should be

  3,211,000 / 2.599 = ~1235.47 coins per second

and

  1235.47 * ( 60 * 60 *24 ) = 106744608 coins per day

How can this be? The 'fastest' miner (highest hashrate) has 3.211 MH/s and is 'only' earning 32.892 XMG per day?

Did I do something wrong? Is minerclaim wrong? And what's a good formula to calculate mined coins per day?

Thanks in advance!

Average coins/day for a miner can be estimated by comparing the miner's hashrate with the hashrate of the network.

where,

Cm is total coins for the miner
subsidy is the number of coins/block a miner gets as a reward
blocktime is the average time per block
Hm is the miner's hashrate (Hash/sec)
Hn is the total network hashpower (Hash/sec)
1440 is minutes per day

Bitcoin

Since the total network hashpower is unknown, it must be estimated based on the current difficulty. This can be done by noting that Difficulty D

Because

difficulty = hashrate / (2^256 / max_target / intended_time_per_block)
           = hashrate / (2^256 / (2^208*65535) / 600)
           = hashrate / (2^48 / 65535 / 600)
           = hashrate / 7158388.055

see Relationship Between Hashrate and Difficulty

So, for bitcoin given a current difficulty of 5,949,437,371,610 an Antminer S9 with a hashrate of about 14TH/s:

Note: This is an average value, so with a large enough pool and enough days, your earnings will average to this formula (this does not account for the difficulty and network hashpower changing, of course).


Bitcoin Core 0.13.1 shutdown with I/O device error I downloaded Bitcoin Core 0.13.1. After starting the program it gives me an error:

  2016-11-09 18:38:17 IO error:
  C:\Users\PC\AppData\Roaming\Bitcoin\chainstate\304129.ldb: Impossibile
  eseguire la richiesta a causa di un errore di dispositivo I/O.
  2016-11-09 18:38:17 *** System error while flushing: Database I/O
  error

The error seems to translate to English as "Failed to execute request due to a I/O device error."

You may want to check the state of your disk to make sure there are no issues, also, that your data directory has the correct permissions set.

I hope this helps! :)


Who has admin privilages for the bitcoin wiki? Who has an admin user?
I know Stephen Gornick has. Who else?

Who besides MagicTux has technical admin credentials? (server access)

Any mediawiki installation have a special page giving you the list of all the admins .

For the bitcoin wiki,find it at :

https://en.bitcoin.it/w/index.php?title=Special:ListUsers&group=sysop

See also :

https://en.bitcoin.it/wiki/Special:ListGroupRights


Altcoin Wallet based on Litecoin source I create my own altcoin based on litecoin source version 0.15 . I have any seed seted,but i have in wallet config addnode=ip. Why my wallet don t sync with blockchain ? It sync if i mine.....

how many blocks you mined and how many wallets are connected?Mining is how the wallets get synced and if no one mines..there will be no syncing between the wallets.


Is the Bitcoin rewards formula flawed? This paper argues that

  the bitcoin 4-year reward halving system very disturbing. We see
  absolutely no reason and no benefit of any kind to have this sort of
  mechanism built in a crypto currency. On the contrary, we claim that
  this mechanism is unnecessary and harmful. It somewhat discredits
  bitcoin as a stable currency which could be a reliable store of value.
  At the very least it can seriously limit a wider adoption of bitcoin.
  Therefore we propose to change it as soon as possible and propose a
  modified reward formula.

Is the "4-year reward halving system" flawed?

From "The Unreasonable Fundamental Incertitudes Behind Bitcoin Mining" (page 40):
  With current bitcoin software [6, 7], at certain moments in time the reward for mining is divided by two in one single step. This is NOT compensated by the fact the the diffculty of mining increases all the time. It just adds sudden adjustments every 4 years to a diffculty curve which typically goes systematically up due to a steady increase in the production of new hashes. We predict that in the future the difficulty curve will have a discontinuity at the moment of the 4-year halving. Until now it has not happened because apparently only very small percentage of active mining devices were switched off on 29 November 2012.
  Inevitably, on one day many devices will stop being profitable and many people may lose their interest in bitcoin. We are talking about the human factor. Investors may decide that they are no longer going to give lots of money to a high-tech industry which has just decreased production of hashes per second and is binning many mining machines at a massive scale due to a strange rule which has no justification and could easily be modified. They might move their money elsewhere and invest in another cryptocurrency. Overall we expect that a sudden slump in profitability of mining is likely to provoke some sort of a much larger ripple in the bitcoin markets, potentially lasting up to 4 full years.

The paper appears to make the argument, that the miner compensation is already decreasing through the rising difficulty, and that the reward halvings will cause sudden drops in mining power which in turn will "provoke some sort of a much larger ripple in the bitcoin markets, potentially lasting up to 4 full years." As "people may lose their interest in bitcoin", when their devices stop being profitable. This is because "We are talking about the human factor.".

The presented argument is weak and thinly supported. While the taking effect of the reward halving is sudden, it is well-known and predictable years in advance within a reasonably small timeframe. Professional miners can easily plan their mining capacity and purchases to factor in the reward halving. There is likely to be a reduction in mining capacity, but it is not obvious, let alone inevitable, why the halving event should turn away people. Also, the mining equipment which will be obsoleted would mostly be comprised of less efficient older models, likely to present a smaller portion of the total mining power.

Further, it seems likely that corporate entities with a sufficient stake in Bitcoin would consider either some in-house mining or subsidy of global mining an acceptable cost to protect their previous investments by supporting the network, should the security of the network be in serious doubt.

Should Bitcoin become sufficiently pervasive, we might actually see Bitcoin mining financed as a public good, similar to other networks such as electricity and roads.

Conclusion: The paper does not comprehensively discuss potential effects of the halving, but rather asserts a specific scenario, which it supports unconvincingly.


What is bitcoin core developers solution to the increasing number of transactions? I was reading that BitcoinXT is created to increase the blocksize to accommodate increasing transaction volume, but bitcoin core developers were against to it as it make the currency more centralized. But what is bitcoin core developers solution to the increasing transaction volume?

BIP 100: Jeff Garzik Miners vote on blocksize, constrained between 1 and 32 MB.
BIP 101: Gavin Andresen Blocksize increases to 8 MB, and doubles every two years after that. (This is what XT implements.)
BIP 102: Jeff Garzik Blocksize increase to 2 MB. (Intended as a fallback that everyone can agree on.)
BIP 103: Pieter Wuille Blocksize increase by 17.7% each year, consistent with current technological growth.
BIP 105: BtcDrak Each block increases or decreases blocksize by up to 10%. The change stacks multiplicatively. Voting to increase blocksize requires more proof-of-work, but not voting to decrease. The result is constrained between 1 MB and 8 MB.
BIP 106: Upal Chakraborty If more than half of last 2016 blocks are 90% full, double block size. If more than 90% are less than 50% full, halve block size.
It's a feature, not a bug: Almost-full blocks will encourage people to raise their fees, increasing the reward for miners, and thus increasing the amount of hashpower applied to Bitcoin.


How do I calculate the sum of transaction inputs? I am attempting to calculate the mining fee of a transaction, given it's unsigned transaction hex by taking difference between the sum of the inputs and outputs.

I also have access to an array of Txout and Txin blobs.

Taking the sum of the the Txout array is easy, as first eight bytes is the value of the output, but I do not know how to get the value of an input for a Txin.

The format of the Txin blobs is that which is described on the bitcoin.it wiki --

Previous Transaction hash   ||  32 bytes
Previous Txout-index        || 4 bytes
Txin-script                 || 1-9 bytes
Txin-script                 || arbitrary number of bytes
sequence_no                 ||  4 bytes

How can I get the value of each input?

You have to look up the previous unspent transaction output using the hash and txout-index, and this output contains the amount in satoshis which is provided in entirety as input for the transaction.


Two identical transactions and hashes in Block Hashing algorithm As I was reading Bitcoin hashing algorithm, I see that a Block Header contains hashes in the form of fields like
hashPrevBlock , hashMerkleRoot . I have following questions:

1) Are the transactions 100% secure? If yes, then I am wondering if Hash is the reason behind it? Since moving forward in a hash is
easy than backwards.

2) Suppose there are two identical transactions happening at the same time, are those transactions are going to get differentiated
based on the Hashes ?

Please elaborate.

1) Are the transactions 100% secure?

No.

  2) Suppose there are two identical transactions happening at the same time, are those transactions are going to get differentiated based on the Hashes?

Yes. It's difficult, though, because each transaction must include the hash of the previous transaction, and so on.

It used to be much easier. A while back, it was pointed out that two coinbases could have identical hashes, and so create identical transactions down the line. See also: Why block height is required in coinbase?