Do these new ASIC miners really pay for themselves in 5 days?

There's a factor called Difficulty, the more hashing power exists on the network the more difficulty exists, therefore it's harder to mine coins. Right now The difficulty factor would let you recover your money fast  because almost no one has ASIC chips, when they ship in bulk the difficulty factor will rise to 30-120 million during the year. To know by how much the difficulty will rise it's impossible, so it's your call.


Armory 0.95.1 is incompatible with Bitcoin Core 0.14.1. Use Bitcoin Core 0.13.2 instead.


OP_Return in transactions at json_rpc_api at blockchain.info

Blockchain.info and bitoind/qt out of the box doesn't support pushing transaction out with the OP_RETURN op code. They will mark the transaction as invalid and refuse to broadcast it.

I have an open source project with a program that will push out transactions to the network directly at https://github.com/kaykurokawa/pushtx.  It doesn't do any error checking on the transaction so transactions with OP_RETURN will get relayed.

I've successfully used this in combination with pybitcointools for crafting a transaction with OP_RETURN in it.


How does the ECDSA verification algorithm work during transaction?


What is point of encrypting wallet, if Bitcoin API's sendtoaddress needs passphrase?

The wallet passphrase is there to protect the wallet file on disk. It is not an authentication mechanism or a security measure against anyone who can see what is sent to it. It does however prevent private keys from hitting disk in readable form.


What possible explanation could there be that Bitcoin Core on Linux Mint claims to but does not save the wallet backups?

Possible explanations include:

The path to the saved file is not what you think it is

using a relative path rather than an absolute path
using a chrooted program

Some higher level of security is preventing you seeing the files

SELinux?

There is a bug in Bitcoin core. This seems unlikely but if you can reproduce the behaviour on another machine you could document the exact circumstances in a bug report.

footnote 1
All normal Linux systems have a large number of default users and not just the one you use to log in normally. If you cat /etc/passwd you'll see a list. It will include a root user (and around a dozen others) unless the system has been substantially modified from the typical arrangement.

footnote 2
You can make your own backups of the wallet.dat but, for extra reassurance, you could practice extracting the private key using the debug-console then importing the data into a new wallet (of any type) on another computer and verifying that you can create spending transactions there.


Is this calculation of mining probability using the Bernoulli trial formula accurate?

The formula is a reasonable approximation.  It looks to me like your calculation is right, and the blog author has made an error.

There is a minor inaccuracy in that the number of blocks per month is not fixed at 6*24*30, but is subject to random variation.  So a slightly improved solution is to work out the average number of terahashes needed for one block (h = 11000000 * 600, assuming that the network hash rate is stable and the block difficulty has adjusted accordingly).  Then your probability of winning a block on each of your hashes is q1 = 1 / h, and you will perform M = 12.5 * 60 * 60 * 24 * 30 hashes in one month.  If you treat the number of blocks you win as a Poisson distribution, the probability of winning one block in a month is given by λ * exp(-λ) where λ = M*q1.  This yields the slightly larger number 0.005273.


You should call their support. They did not make the payment that receipt says that they made.


Can PUSHDATA/OP_RETURN be used to break a trail of transactions permanently?

Can this effectively be used to break/hide a Bitcoin transaction chain?

No, the block explorers you've mentioned simply do not include code that is capable of decyphering the nonstandard transaction you've linked to.

Importantly: Bitcoin transactions do not include a 'from address', instead they reference a valid unspent transaction output (UTXO) that they are spending. That said, the majority of transactions throughout history can be decoded to present the user with a 'from address', so this is simply a user-friendly abstraction that block explorers make. The 'from address' is not inherent to the Bitcoin protocol.

So in a simplified sense, rather than trace the transaction history via "this address, and then this address, etc", you would say "this UTXO, and then this UTXO, etc".

Thus, using bitcoin-cli you can easily trace the transaction history. Here is the output when using the getrawtransaction RPC for the transaction you mentioned, with verbosity=1:

user$ bitcoin-cli getrawtransaction 54fabd73f1d20c980a0686bf0035078e07f69c58437e4d586fb29aa0bee9814f 1
{
 "txid": "54fabd73f1d20c980a0686bf0035078e07f69c58437e4d586fb29aa0bee9814f",
  "hash": "54fabd73f1d20c980a0686bf0035078e07f69c58437e4d586fb29aa0bee9814f",
  "version": 1,
  "size": 159,
  "vsize": 159,
  "weight": 636,
  "locktime": 0,
  "vin": [
    {
      "txid":
"a60143eb3f8d3cd1f42cca874f35736186d67c488efd3c1b7214bbd74b310e0c",
      "vout": 0,
      "scriptSig": {
        "asm":"3045022100d92e4b61452d91a473a43cde4b469a472467c0ba0cbd5ebba0834e4f4762810402204802b76b7783db57ac1f61d2992799810e173e91055938750815b6d8a675902e[ALL] -1",
        "hex":"483045022100d92e4b61452d91a473a43cde4b469a472467c0ba0cbd5ebba0834e4f4762810402204802b76b7783db57ac1f61d2992799810e173e91055938750815b6d8a675902e014f"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.09000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 a86e8ee2a05a44613904e18132e49b2448adc4e6 OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914a86e8ee2a05a44613904e18132e49b2448adc4e688ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1GMaxweLLbo8mdXvnnC19Wt2wigiYUKgEB"
        ]
      }
    }
  ],
  "hex":"01000000010c0e314bd7bb14721b3cfd8e487cd6866173354f87ca2cf4d13c8d3feb4301a6000000004a483045022100d92e4b61452d91a473a43cde4b469a472467c0ba0cbd5ebba0834e4f4762810402204802b76b7783db57ac1f61d2992799810e173e91055938750815b6d8a675902e014fffffffff0140548900000000001976a914a86e8ee2a05a44613904e18132e49b2448adc4e688ac00000000",
  "blockhash":
"000000000000000c15dfb68cc1abead192f718cf8b772977d79938f3a4259afa",
  "confirmations": 299789,
  "time": 1378742541,
  "blocktime": 1378742541
}

So we can see that the input is the first output created by the transaction with id:a60143eb3f8d3cd1f42cca874f35736186d67c488efd3c1b7214bbd74b310e0c. Using the same method as above, we can look up that transaction:

user$ bitcoin-cli getrawtransaction a60143eb3f8d3cd1f42cca874f35736186d67c488efd3c1b7214bbd74b310e0c 1
{
  "txid": "a60143eb3f8d3cd1f42cca874f35736186d67c488efd3c1b7214bbd74b310e0c",
  "hash": "a60143eb3f8d3cd1f42cca874f35736186d67c488efd3c1b7214bbd74b310e0c",
  "version": 1,
  "size": 212,
  "vsize": 212,
  "weight": 848,
  "locktime": 0,
  "vin": [
    {
      "txid":
"c079314b17b7a2c3fbe879e6fc610291c685f6f7819d70bef785295c774b1e04",
      "vout": 1,
      "scriptSig": {
        "asm":"3045022100d4f73a357e323a3f0666264bd018f25296682bd7db12979890b3952b159337d7022039ebfd0d3deeb6236545e6d05d65e9fa395544f69e5275fab2e4f73cc7c20286[ALL] 0223a6fbf80fe06efa9a8707620a1215cf6a5834e6f81ca6592b0e7195fe92eae7",
        "hex":"483045022100d4f73a357e323a3f0666264bd018f25296682bd7db12979890b3952b159337d7022039ebfd0d3deeb6236545e6d05d65e9fa395544f69e5275fab2e4f73cc7c2028601210223a6fbf80fe06efa9a8707620a1215cf6a5834e6f81ca6592b0e7195fe92eae7"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.09000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_DUP 0 OP_LESSTHAN OP_VERIFY OP_ABS 1 16 OP_WITHIN OP_TOALTSTACK 0378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71 OP_CHECKSIGVERIFY OP_FROMALTSTACK",
        "hex":"76009f69905160a56b210378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71ad6c",
        "type": "nonstandard"
      }
    }
  ],
  "hex":"0100000001041e4b775c2985f7be709d81f7f685c6910261fce679e8fbc3a2b7174b3179c0010000006b483045022100d4f73a357e323a3f0666264bd018f25296682bd7db12979890b3952b159337d7022039ebfd0d3deeb6236545e6d05d65e9fa395544f69e5275fab2e4f73cc7c2028601210223a6fbf80fe06efa9a8707620a1215cf6a5834e6f81ca6592b0e7195fe92eae7ffffffff0140548900000000002d76009f69905160a56b210378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71ad6c00000000",
  "blockhash":
"0000000000000026c3b45ad70e4622dcdaffc8cad2b202d1d5a4254625166ec9",
  "confirmations": 306793,
  "time": 1375519263,
  "blocktime": 1375519263
}

And we could continue following the transaction history in this way, so you can see that this type of nonstandard transaction does not break the transaction history. Keep in mind that a bitcoin is fungible, so while we can trace a general transaction history, we cannot trace an 'exact coin' through time, as such a thing does not exist. This allows for privacy and fungibility enhancing techniques such as 'CoinJoins' to function.


Why not simply have some random numbers in place of RK_A and RK_B that only A and B knows and which are later exchanged when TX_A and TX_B need to be invalidated??

Let us assume, the transaction is structured wherein A and B generates random secrets. For every revocation that happens, the nodes will have to store the secret for each commitment that is signed. Each HTLC offered and redeemed, involve 2 commitment revocations. So, a node will have to store a huge database of all the secrets, ordering them in the way the transaction is signed. With the current method, we have a basepoint from which the secret is generated so that we do not have to store each key individually, but derive it based on the revocation_basepoint and per_commitment_secret which are generated deterministically and saved compactly.

  Why commitment transactions can't simply be HTLCs instead of contracts revocable by having the second half of the Revocable Private Key?

All lightning transactions are constructed in a way that they are completely valid on the  Bitcoin main chain. If you simply create transactions wherein the outputs are unlocked with a pre-image, then it opens itself up to men-in-the-middle attacks. In case of an on-chain settlement, when the transaction is broadcasted containing this input which is spent only with a pre-image, then the the node relaying or the one mining, will know this preimage and just change the outputs of the transaction to the ones paying themselves. That is the reason, we use signature verification, so that the person spending the input signs the entire transaction so none of it can be modified.

If you are wondering, then how HTLCs are offered for lightning payments, it is not that simple as a simple private key. Below is a script that shows the commitment that the other party signs to a transaction I am holding when I am offering the HTLC.

# To remote node with revocation key
OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL
OP_IF
    OP_CHECKSIG
OP_ELSE
    <remote_htlcpubkey> OP_SWAP OP_SIZE 32 OP_EQUAL
    OP_NOTIF
        # To local node via HTLC-timeout transaction (timelocked).
        OP_DROP 2 OP_SWAP <local_htlcpubkey> 2 OP_CHECKMULTISIG
    OP_ELSE
        # To remote node with preimage.
        OP_HASH160 <RIPEMD160(payment_hash)> OP_EQUALVERIFY
        OP_CHECKSIG
    OP_ENDIF
OP_ENDIF

If we have all outputs constructed in this way, then the transaction size will be unnecessarily large, and also will have inefficient key management as I mentioned in the previous section.


Is there a list of existing businesses that have started to accept Bitcoin?

I created this page on the Bitcoin wiki, please add to it.

(BTW, the wiki is extremely slow for the last day or so)


Why does Bisq claim that my earliest receive address has been used in 10 transactions?

Was it some kind of bug?

Yes, so it seems.

See https://bisq.community/t/privacy-address-reuse/5899

torte
1 Aug '18
When looking into my bisq account under
funds --> Receive funds
I see that usually new addresses are used. But on the bottom there is one address 1A… used already more than a dozen times and I wonder why

...

ManfredKarrer
Founder
Aug '18
Do you have the latest version? If there is a reuse of old addresses it is a bug. In older versions there was a bug with that but it should have been fixed a while back.

...

torte
Aug '18
Upgraded to version 7.1 and did the same type of transaction where I saw the address reuse before. This time no address was reused, so everything worked fine.
Great job, thanks to the team!
As well I’m pleased that I can manage the addresses in the wallet one by one (as far as I know not a new feature but a good one for privacy reasons).

The release notes for version 0.7.1 on  4 Jul 2018  say

Fix reuse of change addresses

Which refers to Issue 1540

the first address generated by the HD wallet gets reused repeatedly, other addresses were used, only once per address, but these are clustered around the first address (e.g. with oxt.me) , allowing transactions to be linked. this also discloses disclosing balances etc to counterparties who may have personally identifying information due to the nature of the transfers


How is Simplicity better suited for static analysis compared to script?

For this answer, I will mainly focus on static analysis of computation resources such as memory use and time.

In Simplicity, we have a separation between the Simplicity language and the language of the Bit Machine with a formal translation from the Simplicity language to the Bit Machine language (see Figure 2 from the whitepaper).  This translation has been formalized in the Coq proof assistant. Only the Simplicity language is exposed at the blockchain's consensus layer with the Bit Machine technically being an implementation detail.  This means that only the Simplicity language needs to be analyzed.

Because Simplicity subexpressions can only manipulate their local data (i.e. from the point of view of the Bit Machine implementation, Simplicity subexpressions can only manipulate the top of the read and write stacks), we can write a simple recursive analysis to determine computation costs such as memory use (see Figure 3 and Figure 5 from the whitepaper) and similarly for time resources (not yet implemented).  Furthermore, the Simplicity combinators are extraordinarily simple, which makes the static analysis practical.  One form of the memory static analysis algorithm is already verified correct with the Coq proof assistant.

On the other hand, Script comes with a few wrinkles that can impede static analysis.  In particular DEPTH is non-local (i.e. it isn't a simple function of a fixed number of stack elements), and IFDUP leaves one or two items on the stack depending on the runtime value of the top stack item.  Nothing in Script guarantees that when exiting an IF ENDIF block that the number of stack items left would be identical in either case (compared this with Simplicity's case combinator that requires the resulting type of the two branches to be identical).  And lastly while ROLL, PICK, and CHECKMULTISIG are usually used with a constant n (and m) parameters, nothing guarantees this is the case.

All this makes static analysis of memory use that much more complicated to do for a generic Script program, though for specific normal Script programs that do not use/abuse the above OP codes, analysis is probably feasible.

The story for time analysis is a bit better since Script just iterates through the code.  Though ROLL is  problematic since it requires O(n) work.  (Recently the implementation of IF was repaired so that it now only requires O(1) work).  Simplicity combinators only require constant amount of time each, with the exception of iden, which copies a statically known number of bits when implemented in the Bit Machine.  Because the amount of work for iden is known statically, we can incorporate that into our analysis.

Simplicity aims to make static analysis of computation resources easier than for Script while at the same time increasing the practical expressiveness of the language.

For reference, the SCRIPT Analyser that I am aware of makes simplifying assumptions about Script operations (e.g. that values passed to OP_IF are either 0 or 1).  On the other hand, the SCRIPT Analyser does a full symbolic analysis rather than time and space resource analysis.  Such a symbolic analysis probably isn't practical for Simplicity programs. Instead one is expected to use the formal semantics of Simplicity to directly reason about Simplicity expressions (for example we have a proof of correctness of the SHA-256 implementation in Simplicity).


How long should I expect to wait for payout on p2pool

Just needed to be patient, is sorted now.


How to send portion of funds from a private key programmatically?

You can either use your own bitcoind server or you can use a 3rd party API service.

Let's do a few examples of what you are asking.
I'll use short fake addresses and private keys as examples to make things easy.

PHP with a bitcoind server

<?php
require("easybitcoin.php");
$bitcoin = new Bitcoin("username", "somepassword");

//add the private key (label, key)
$import = bitcoin->importprivkey("5KL3cN..SOME_PRIVATE_KEY", "Satoshi1");
?>

What we did here was import a private key and give it a specific unique label.  This part might take a while as your node will need to rescan as you added a new private key and it needs to check for transactions.

Once the node is rescanned you can send the funds.

<?
require("easybitcoin.php");
$bitcoin = new Bitcoin("username", "somepassword");

//send the funds from the Satoshi1 account/label
$send = $bitcoin->$bitcoin->sendfrom("Satoshi1","1receivingAddress", 0.5);
echo $send ? $send : "Oops an error: ".$bitcoin->error;
?>

What we did above was use the sendfrom() JSON RPC command to send 0.5BTC from the account/label Satoshi1 to the 1receivingAddress. If successful it will respond with the transaction ID, or if an error it will print out the error.

This is just the code, you'll still need to set your VPS with bitcoind or you can run a node on your home computer and experiment locally using something like xampp.

PHP with a 3rd party API

Here's an example with blockchain.info wallet API. You can import the private key using their create wallet utility, and then later send from that specific address.

$private = "5KL3cN..SOME_PRIVATE_KEY";
$url = "http://127.0.0.1:3030/merchant/YOUR-GUID/create?password=YOUR-PASSWORD&api_code=YOUR-API-CODE&priv=".$private;
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //change to true if your host can verify SSL
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$ccc = curl_exec($ch);
$json = json_decode($ccc, true);
echo "
";
var_dump($json);
echo "
";

Then once created you can send from that specific new address that was imported.

$from = "1fromAddress";
$to = "1receivingAddress";
$url = "http://127.0.0.1:3030/merchant/YOUR-GUID/payment?password=YOUR-PASSWORD&api_code=YOUR-API-CODE&from=".$from."&amount=1000000&to=".$to;
//amounts are in satoshi so 1000000 is 0.01BTC
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $url);
$ccc = curl_exec($ch);
$json = json_decode($ccc, true);
echo "
";
var_dump($json);
echo "
";

If you need help setting up bitcoind or blockchain.info's wallet API I suggest you check out my tutorials on youtube. The hardest part with the 3rd party route is getting an API key; I hear blockchain.info has been strict with these lately.

bitcoind server method: https://www.youtube.com/watch?v=cMM-t7azzJE
blockchain.info 3rd party method: https://www.youtube.com/watch?v=X8jsaf4sEgs


Total number of Bitcoins generated by pool mining

http://coinmarketcap.com/ states there are ~13.330.000 bitcoins generated.
you can have a overview of the shares on mining bye pool here: https://blockchain.info/pools

blockchain.info gives most information on bitcoin available, you will find what you need there!

have a nice


non spendable bitcoins

That usually means either

a watch-only address in a cryptocurrency wallet
an account with a custodial service with some withdrawal restrictions.

In either case, you are not the owner of those Bitcoins so far as the Bitcoin network is concerned. The watch-only address is a favourite trick of scammers/conmen. They like to set up accounts and wallets that look like they contain money but which, in a non-obvious way, don't give the victim any control over money - that helps them to trick people. The conmen then ask the victim for a series of invented special "release" fees or extra deposits.

  Someone helped me trade

Usually a sign of a scam. Unless its someone you met in person in real life and have known well for years.

  a trading account, IQ options ... an account manager that traded for me

Very often the sign of a scam

I'm pretty certain your money was taken by a scammer and not used in the way they claimed.

  blockchain account

The only recourse in this situation is to report this theft to Blockchain.com, to the police and if the "helper" is identifiable and located in the same country, explore pursuing it through the courts. It is extremely unlikely the money can be recovered and attempts to recover the money through the legal system are likely to cost more money.

  I have my backup phrases

I would use that to recreate a clean wallet on a clean freshly installed PC (not one your helper has ever known about) and see if it actually contains anything. Most likely it is an empty wallet. Probably the watch-only addresses in your wallet were added separately and any money shown there is not under the control of your recovery phrase.


Why a Bitcoin transaction that refers its own output as an input is computationally infeasible?

A transaction input is an unspent transaction output from an existing transaction.

A transaction's output is the creation of an unspent transaction output from one or more inputs.

It's computationally infeasible because an input MUST exist before an output.

The tricky part is the terminology, input vs output. They are both outputs but in different states.  Essentially everything is an output existing in the ever-changing Unspent Transaction Output (UTXO) set, inputs are simply referring to a previous UTXO. An output cannot exist without coming from an input, which can be validated all the way back to its coinbase transaction.

EDIT:
To dig a little further why it's technically not possible, when building a basic raw bitcoin transaction you need the transaction ID, and N out value of the input being used. Creating a transaction with an invalid or non-existent transaction ID would be rejected if broadcast to the network. Since we know an input must come before an output, one cannot refer to its input as its own output as the transaction ID would not exist yet.

How To Create a Raw Transaction


I think this is what you are looking for: https://coinomi.com/recovery-phrase-tool.html
Cheers.


What regulations are in place for Bitcoin in California?

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

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


I was able to answer my own question through the Nxt dev forum.

https://nxtforum.org/general/peer-protocol-tcp-or-http/msg181766/

Adding it  here for others that may have the same question:

Up to version 1.4 Nxt used HTTP for peer communication. Starting with version 1.5 they are moving to WebSocket for peer communication


Why does ScriptSig contain public key, since it can be recovered from the signature and message?

it is possible to recover the public key

Yes. But this operation is slow (comparing with other bitcoin script operations). May be Satoshi Nakamoto did not know about it. Anyway, the hard-fork required to implement it. So, you are welcome to create hard-fork or altcoin with this feature implemented.

Have a look to this discussion: https://bitcointalk.org/index.php?topic=6430.0 I can not explain better


Why not multiply "six confirmations" and divide Time-Between-Blocks and Reward by the same factor?

In consideration of replacing the 1 block with N blocks in the same time frame, N > 1, I see the following points:

Advantages

Expected time until first confirmation is reduced
Mining revenue is distributed smoother among pools
Capacity of network is increased
Smaller peak traffic than increasing blocksize by N

Disadvantages

A hardfork is required to adjust the block interval
Increased chance of chain forks and higher stale rate due to block validation taking a larger portion of block interval
Thin clients need to store a larger amount of headers
Slightly bigger bandwidth usage than larger blocks

Still, it may be that 10 minutes is too conservative and a smaller block interval would provide an overall benefit. For example, at Scaling Bitcoin Milan, Arthur Gervais presented simulation results that he interpreted to suggest that Bitcoin could safely use 1 minute blocks.

CoinDesk covered the topic in A Lower Block Time Could Help Bitcoin Scale, But Will It Work?.


Dogecoin Core Wallet 1.10 - Help - Encrypt Wallet Option not available to allow staking

Staking is only used with proof-of-stake cryptocurrencies. Dogecoin uses a proof-of-work algorithm, so there is no staking in Dogecoin.


Is the time value in transaction or block information the time it arrived at my client?

Blocks have timestamps, transactions don't. The time of a block creation is known, the time of the transaction can only be guessed. Most clients use the block's time for transactions, and if they're still in the transaction mempool (not in a block) they use the time the transaction was first seen by the client.


You should get out your recovery phrase and install copay on the new phone when they ask you for recovery phrase (usually 12 words) add it and your wallet should work as the old phone.


How to create an application which constructs a transaction using `bcoin` (javascript)?

This is a very complicated question. bcoin already has a built-in wallet that can do all of these operations for you. There is a well-documented RESTful HTTP API you can read through here: http://bcoin.io/api-docs/ to get an idea of what's available. You can also write your own wallet application using the bcoin object classes directly.

Very broadly however, here's some tips that might interest you:

Enable Address indexing. This is a feature that is not currently available in bitcoind yet (so far I think only indexing by transaction ID is supported). This is switched on with indexAddress: true in bcoin.conf or --index-address on the command line. The address index will enable you to request the transactions associated with a specific address: http://bcoin.io/api-docs/#get-tx-by-address
You will want to process that transaction data and maybe cross-check the UTXO set (so you know what has been spent already) with the API call http://bcoin.io/api-docs/#get-coin-by-outpoint
Check out the MTX and Coin objects to construct a transaction from the UTXO you recover. We have several guides on transaction handling, maybe read through this: http://bcoin.io/guides/working-with-txs.html
Signing transactions with private keys: I'm not sure how your application will work but it sounds like the users will have to sign the TX themselves?

I recomend you read through the bcoin API docs and the guides (and of course, the codebase!). And just focus on the default wallet process for coin selection, transaction composition, signing, and private key handling.


cgminer fails to start with error "error opening terminal: dumb"

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

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

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

echo %TERM%

I hope this will help you :)


unable to route payment to destination: TemporaryChannelFailure

Figured it out!

This error showed up on node C, but I opened (and thus loaded) the channel from node A. What was happening was this error is returned if an intermediate hop does not have enough balance on their side to forward your payment. In this case all the coin was set in a way where payment was only possible from A -> B -> C but not A <- B <- C.

All I had to do was send money from the node that opened the channel


Using the main Bitcoin-Qt Client, can you change where it stores the block chain?

You surely can. Just add -datadir parameter to the command line, when starting bitcoin-qt.
For example:

  bitcoin-qt.exe -datadir=D:\BITCOINDATA


Is it possible to shift/modify a ECDSA keypair by a scalar where the public key can be computed using only public information?

I believe simple Elliptic Curve addition should accomplish what you are looking for. The process is similar to how child private and public keys are derived from parent keys in BIP32 (HD) wallets.

def FPub(K, B):
    block_pub = hash(B)*G
    // Note that the below addition represents ECC addition
    return block_pub + K

def FPriv(k, B):
    block_priv = hash(B)
    // Note that the below addition is addition mod curve order 'n'
    return block_priv + k

Note that hash(B) is used instead of B itself because B is not sufficiently random (it starts with a string of 0 bits).

With this scheme, any observer can very the chain of public keys, but only the owner of the original private key can derive the private key for any step in the chain.


What files do I need for backing up my wallet?

Yes.  The wallet.dat file is all you need to be able to keep your coins backed up.  You'll also obviously need your password if you've encrypted your wallet.

However, backing up the entire folder may be advisable if you're on a slow internet connection.  The blockchain is getting rather sizable and can take a significant amount of time to redownload from scratch.  I recently needed to do that and it took almost 2 full days.


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

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

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


Where to stop key derivation when looking at balance of a deterministic wallet

The gap limit is the maximum number of consecutive unused addresses in your deterministic sequence of addresses. Electrum uses a gap limit to stop looking for addresses, it is set to 5 by default, so the client get all addresses until 5 unused addresses are found.

https://electrum.org/faq.html#gap-limit

If you used a different gap limit when creating the addresses, then you need to keep record of it or remember it. Addresses that appeared beyond the gap limit won't be found unless you set the gap limit you used.

For example: Using MPK on a web server you used gap limit 40 to create 40 addresses for your web store. Then you had 39 open orders that are not paid and the address number 40 has a payment.

When you restore with gap limit 5 (default in the client) you'll have 5 unused empty addresses, you won't see the other 34 that are also unused but related to open orders neither you'll see or have balance for the address number 40 that has a payment on it.


Bitcoin Core keeps coming up with the error: "error reading from database, shutting down"

To fix this problem you will need to reindex. You have already begun that process by delete the chainstate folder. Bitcoin Core will appear as if it is syncing from scratch, but it is not. It is simply reading through all of the block files already on disk and building its databases. If the reindex does not fix your problems, then you may need to actually resync the blockchain, and if that also fails, then you likely have a hardware error.


After reading the fine manual, I added these lines to bitcoin.conf:

server=1
rpcport=8332

and it appears to be working.


How many txid gets added to mempool per second?

On a long term average the number of transactions is limited to the number of transactions that can enter the blockchain-- so roughly 7tx/s before segwit and 14tx/s after segwit activates.

But on a short term basis while the mempool fills or with transactions being replaced the rate can be as fast as your node can process transactions.  On reasonably fast hardware this can easily hit a few thousand per second.

But you won't normally see rates like this in practice unless someone attacks you or someone does something strange, especially since most nodes limit their instantaneous relay rate to a small multiple of the long term average transaction rate.  When a new node starts up it only gets newly arrived transactions, though a misguided or malicious peer to could advertise every transaction they know to you as soon as you come online in order to hit that peak rate (at least until your mempool fills).


You should be able to just upgrade your bitcoin-qt.  Your wallet.dat file can just stay in place.  Back it up just to be safe but you shouldn't have any need to use the backup just because you are upgrading.


It's true, there is a bit of a Tragedy of the Commons going on here. All miners want transaction to be propagated to them so they can include them and get the fees, but why would they expend their own bandwidth to help others hear about those transactions?

Fortunately, though, miners are not the only ones on the network. There are currently almost 6,000 reachable full nodes on the network, and a small subset of these are actually miners. So, even if all the miners stopped propagating transactions (they still have to propagate their solved blocks to get paid), information would still spread fairly quickly throughout the network.


What is the smallest fee you can pay for an on chain transaction?

From what I understand, the smallest fee you can pay to miners per transaction is 1 Sat/byte.

It's not true.  A transaction can contain a fee of any amount.  There is nothing to stop you from creating a 250-byte transaction with a fee of 1 satoshi, or 17 satoshis, or even 0 satoshis (no fee at all).  Of course, it will depend on market forces as to whether miners would actually decide to include such transactions in a block.

Many wallets ask you to choose a transaction fee in satoshis per byte, but that's just a convenience for the user (since most miners look at the ratio of fee to transaction size in deciding what to confirm).  It's not an inherent feature of the blockchain.  Under the hood the wallet just multiplies this number by the transaction size to determine the absolute transaction fee.  You could patch the software to set an absolute transaction fee directly, or perhaps even just enter a fractional number of satoshis per byte.

(There are currently rules preventing low- or no-fee transactions from being relayed over the peer-to-peer network, but that's not the only way to get your transaction to a miner; also, those rules are not part of the blockchain consensus rules, so they can be changed without a fork.)

It's true that if we ever get to a point where 1 satoshi is worth a lot of money, then a transaction would have to have either a large fee (>= 1 satoshi) or no fee (0 satoshi).  The former would be expensive, and miners have no incentive to confirm the latter (though they can if they feel like it).

There's been lots of discussion about what will happen if 1 satoshi ceases to be small enough.   One possibility is a lot more use of off-chain transactions.  Another is a hard fork to add more decimal places, which would presumably be uncontroversial.  See Will we ever need smaller amounts of Bitcoin than a Satoshi?


How does one lock their own Bitcoins for X amount of blocks and prove that you locked it?

You could send your Bitcoin to an address that has a redeem/witness script containing OP_CHECKSEQUENCEVERIFY (for a relative timelock) or OP_CHECKLOCKTIMEVERIFY (for absolute timelock). Once the transaction has confirmed, the output cannot be spent without the timelocks being met first.

By revealing the script, you can show that those outputs have a locktime and thus cannot be spent until after that locktime passes.


How to fix "Failed to resolve (?wrong URL) cgminer.exe --bmsc-options"

Had you read the page on Slush's Pool on how to set up CGMiner, you would have gotten it right the first time. Use this:

cgminer.exe --bmsc-options 115200:20 -o stratum+tcp://stratum.bitcoin.cz:3333 -u Starfleet.worker3 -p * --bmsc-freq 0781


Why isn't Bitcoin using public key extraction from signature to reduce the blockchain size?

The author of wxBitcoin was most likely unaware of the ability to do this, there's other inefficiencies like the original use of uncompressed points and BER encoding for signatures which also would have been good to eliminate.


How to clear invalid transactions from one's wallet?

This question was answered before for someone to clear a too low fee transaction that wasn't accepted by the network. https://bitcoin.stackexchange.com/a/2415/1461


How safe is it to use a Linux live CD to access my savings wallet?

Security is always an issue and complex systems like operating systems are prone to attacks. However, it is possible to use an offline machine to create the signed transactions and then export them to another machine.

For example a soft copy of those signed transactions could be copied on to a fresh USB stick, or printed out on paper as plain text or QR codes and so on. These transactions could then be imported into an online Bitcoin client that does not have the private keys, but can just transmit the transactions to the network.

Your private keys are always held offline and thus only exposed to physical attack vectors which should be sufficient to relieve your concerns.


Why does the decode function of the segwit bech32 encoder/decoder take a hrp (human readable part) as input?

The HRP is part of the bech32 encoded string, and in the bech32 decoding API, it is returned along with the payload by the decoder, after checking the checksum.

We still want to compare it with the expected HRP in BIP173, which encodes the chain the software is operating on.

Otherwise you could have a testnet node that accepts mainnet BIP173 addresses or the other way around.


Some mining programs (designed for use with mining pools) will mine on behalf of the mining software developer for a short time, before switching to the actual user account.

I've only seen this once and I don't even remember which coin it was for, so I don't know how widespread it is.


How to get the derived public key from xpub?

the btclib library (https://github.com/dginst/btclib) is a python3 type annotated library for bitcoin cryptography; it provides BIP32 functions, tested to successfully reproduce the BIP32 test vectors (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki).

Among the btclib functions you can find:

bip32.ckd(xparentkey, index) [child key derivation]
bip32.xpub_from_xprv(xparentkey) [neutered derivation]
bip32.derive(xkey, path) [child key path derivation]
bip32.address_from_xpub(xpub) [address derivation]
bip32.mprv_from_seed(seed) [master private key from seed]


Who set the rules for validating a block in blockchain?

The rules are set by the nodes on the network. The rules are coded into node software which users run. These rules are not necessarily set by the creator of the network as they can be changed if all of the users agree to change the rules by running different node software.


It seems that you figured it out yourself so I just want to add that we are going to add multisig support for mainnet as well in a few days and you will be able to use that as well.

BUILDING means that the transaction has been included in a block and it's confidence is "building". There is also a field confirmations which you can use as well.

The multisig functionality is pretty new to the site and that's why we haven't documented it yet. It will be done asap.


Are higher versions of segregated witness script non-standard?

See @Pieter Wuille's comment, currently all witness programs with versions other than 0 will be rejected as non-standard. See interpreter.cpp L1447

Edit: As of v0.16.2, it appears that all version bytes will at least enter the mempool, provided the rules for version 0x0 (if used) are followed. See BIP 141 - Witness Program, BIP 143 - Restrictions on Public Key Type and policy.cpp#L232

Currently, versions bytes higher than 0 will cause the VerifyWitnessProgram function to always return true (for future softfork compatibility). Currently version bytes 1-16 are reserved for future use, but, "for any version byte from 0 to 16, the script must fail if the witness program has a CastToBool value of zero."


16: mandatory-script-verify-flag-failed (Non-canonical DER signature) (code -26)

This error means your signature failed some sanity checks designed to prevent accidental network forks due to non-standard but still valid signature encodings. This function in the script interpreter performs the actual check.

However, I took a look at your signature, and I can't find anything wrong with it (looking at it manually, not actually running the code). Is it possible the preceding byte is wrong, so the signature isn't pushed completely onto the stack?

EDIT:

I actually ran the signature checking algorithm on your signature.
The code I used is here.

There is, indeed, nothing wrong with the signature itself. How did you generate it, and what does the rest of the transaction look like?


Lightning Invoice QR-Code minimum size/display resolution?

First of all yes it is possible to convert all characters to uppercase a trick some users of lightning already use.

If you look in the lightning rfc you can see that the length of an invoice can become quite large as the discriptions, routing hints and fallback addresses are not fixed I think there is not even an upper limit defined. For example this test invoice has 439 characters.

  lnbc20m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqhp58yjmdan79s6qqdhdzgynm4zwqd5d7xmw5fk98klysy043l2ahrqsfpp3qjmp7lwpagxun9pygexvgpjdc4jdj85fr9yq20q82gphp2nflc7jtzrcazrra7wwgzxqc8u7754cdlpfrmccae92qgzqvzq2ps8pqqqqqqpqqqqq9qqqvpeuqafqxu92d8lr6fvg0r5gv0heeeqgcrqlnm6jhphu9y00rrhy4grqszsvpcgpy9qqqqqqgqqqqq7qqzqj9n4evl6mr5aj9f58zp6fyjzup6ywn3x6sk8akg5v4tgn2q8g4fhx05wf6juaxu9760yp46454gpg5mtzgerlzezqcqvjnhjh8z3g2qqdhhwkj

QR Codes themselves come at different versions which define how much data can be stored in them depending on how many pixels are used.

What I can't tell u if one pixel of a display would be sufficient. I guess even with error correction this would not be enough. For example the RaspiBlitz uses a 320 * 480 display


After a month, BTC sent from trezor to coinbase never received after 5000 confirmations

Coinbase is custodial bitcoin wallet so they don't give you access to your bitcoin private keys or anything. they're just like PayPal. you have numbers in your account, and you can't go to the bank and withdraw these funds. unlike non-custodial bitcoin wallets. they're better for anyone who is looking for bitcoin wallet.

So, what I'm trying to say these types of issues could happen with those wallets and nobody in here can help you get your money back.

Contacting coinbase.com could be the solution and consider changing your bitcoin wallet.


How could the protocol or client be altered to mitigate a timejacking attack?

Solution number 1 would mitigate this problem, but the attacker could try creating enough nodes to flood the network anyway (see cancer nodes). It would not be likely that the attack would be performed, but it would still be possible.

Solution number 2 would help with this problem, although it would cause a lot more problems with everything else. Imagine the excess traffic caused by tens of thousands of Bitcoin clients dropping all of their connections each minute and reestablishing them with new peers. You would need to exchange a lot of information this way you wouldn't normally have to (version, verack and inv messages during each such reconnection at the very least). As the attack does not appear a likely threat for the Bitcoin network, such overhead would be unjustifiable.


Is there a bitcoin exchange accepting SEPA transfers?

EDIT This information is now out of date - voting to close this question

You could use Intersango

It's a well-trusted exchange that operates within the Eurozone (and in the UK). You see their current fee structure provides SEPA transfer:

Country             Accepting deposits  Processing withdrawals
GBP (domestic)      Free                Free
EUR (SEPA)          5 PLN (1.23 EUR)    5 PLN (1.23 EUR)
EUR (international) 10 PLN (2.46 EUR)   0.2%, capped: 9.5 PLN min, 180 PLN max
<snip>


Which altcoins have their own mobile friendly wallet created by the core devs?

The Dogecoin Wallet was created by Max Keller, who is the lead developer for Dogecoin.

This Litecoin Wallet purports to be created by a third party developer who "teamed up with the Litecoin Dev Team". I'm not sure if that counts for your purposes.


Recovering the public key from a transaction

There is no such thing as a public key for a user, but there is such a thing as a public key for an address.  The transaction that has been paid to you probably contains more than one address owned by the sender.  First, the bitcoin in the transaction likely came from multiple unspent transaction outputs (UTXOs), all of which were owned by the sender and probably have different addresses.  Next, the transaction likely had a change output, which would be yet another address owned by the sender.

Any of the UTXO's used as inputs to the transaction would have had the public keys of the addresses revealed in the scriptSig that was used for the input to sign the bitcoin over to you.  You can find these scripts by using a block explorer.  They will each contain a public key and a signature.

If the change output has already been spent by the user, you can find that transaction and look up the public key in the scriptSig there as well.

Keep in mind that none of this information is specific to your wallet, as it is all public information on the blockchain.  The only information you have that I don't have is the specific transaction you are referring to.  Given that transaction ID, anyone and everyone can look up this information.


Wait...
One private key <=> one address.
You can restore by import privkey to bitcoind.


SHA256 * 2 on header - what am I doing wrong?

You have the wrong block version number.  Block 300000 is a version 2 block, whereas 125552 was version 1.  So the first word in the block header should be "02000000" not "01000000".


Which online wallet has the least transaction fees?

Fees are calculated by adding the number of the unspent inputs used then multiplied by how much fees you would use with each unspent inputs.

So, in other words, fees are calculated in satoshi per Byte (sat/B) or satoshi per kByte (sat/kB). And there is 3 kind of fees: lower fees (for low transaction's confirmation), medium fees and higher fees (for fast transaction's confirmation).

Actually with the huge number of bitcoin transaction every day and with the fact that the block size is limited to 1MB, for now. The miners will pick the transactions with higher fees and include them to their blocks and leave the others transactions for other miners to include them in their blocs if they found any. You can look in this website in order to have an idea about how much fees miners are including in their blocks and within how much blocks your transaction will be confirmed (an approximation)

However, if you're looking for a wallet that uses the lower fees, you can do it in most of wallets (i don't know if coinbase support it or not, but blockchain.info and many others support it) by modifying the fees of your transaction before sending it. But, changing the fees to a small ones will have a huge impact in your transactions confirmations. Actually, blockchain.info uses the medium fees (about 120 sat/B) and users are stuck with their transactions for many days untill they reach one confirmation.


unable to read macaroon path (check the network setting!): admin.macaroon: no such file or directory on lncli getinfo

Found the issue, lncli needed to be set to testnet and you need to create a wallet as well

lncli --network=testnet create
lncli --network=testnet getinfo


bitcoin compile error on CentOS 6.6: ‘SIZE_MAX’ was not declared in this scope

So I found this thread that gave me the clue how to workaround this issue, basically insert the following at line 5 of src/leveldb/helpers/memenv/memenv.h and it compiles fine:

#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif


How to migrate bitcoin node from one computer to another

This method is used by Bitcoin Core (and few others) and comprises of backing up a wallet.dat file. It's a file that holds keys to spend outputs, addresses, transaction information, and other metadata such as contacts.

It has a different location based on an operating system.

  Windows: %APPDATA%\Bitcoin
   Linux: ~/.bitcoin/

  Mac OS X: ~/Library/Application Support/Bitcoin/

For backup Locate wallet.dat and copy it to another device only you have an access to. It may be a USB drive, CD, another computer or your private home cloud storage.

You may also copy it to a cloud storage such as Mega or Dropbox but make sure it's encrypted.

To restore the backup, simply copy your backed up wallet.dat over an existing one in the bitcoin data location.


Can I damage my computer by mining bitcoin?

It is possible to damage your computer by mining in the following ways:

the computer will degrade more, as it is used more (you will have to replace it sooner than normally)
the computer will overheat and some components will fail because of that (if for example, the computer is dusty. If the parts are well-maintained and the computer is not boxed in, this shouldn't be the issue)
you will overload some part of your computer with the mining and it will short circuit or blow a fuse (mostly relevant if your power supply is weak, this happened to me once)

Number 3 you should notice quite fast if you run your miner at top speed, full load. If you are already mining, this probably won't happen unless you increase your load, or are operating close to the limit of your hardware. If something flashes, smokes, or the computer doesn't turn on any more, this was probably the cause. Replace hardware.

Number 2 you should notice if you run your miner for about an hour, once everything heats up well. Again, if you are already mining and this doesn't happen, it probably won't if you keep your computer clean and give it some air. If your computer turns off suddenly, but runs fine after cooling down, this probably was the cause. Clean your computer chassis, possibly add some fans or replace hardware.

Number 1 you won't notice for months or years.

Mining with lower-end GPU should be fine in all the regards, asides maybe 1 (leaving your computer on for longer to mine will ear it down more). Usually it means you won't use as much power and generate as much heat, so you should be fine.


Bitcoin Core goes totally out of sync after pc crash

Normaly first I opened bitcoin core to resume the process but now the Core is completely out of sync, and the blocks in bitcoin qt folder are using 60 GB of space which means they are already builded..?

The blocks on disk aren't really processed at all in the way you are thinking, what Bitcoin Core is doing when it is syncing is building a secondary database of its own which contains the state of the network. In a very unclean shutdown the database (known as the chainstate) will be corrupted and has to be rebuilt from the block files. There's no way to know exactly how it was damaged so it must be built entirely from scratch again. It is inconvenient but at least the blocks don't need to be downloaded again from the network again.

If you are getting frequent BSOD you might need to check your hardware or drivers.


By physical wallet I assume you mean like a printed paper wallet. But your paper wallet should be an address and the corresponding private key (don't share this!). To access it all you need to do is import it to bitcoin-qt through one of the options. To do it through console:

importprivkey <private key>

Where  is your private key. It should take your client like 30-60 mins to rescan the block chain to update the balance.


What does 889271 represent in the blockchain index leveldb databases?

You are thinking of 889271 as a decimal number; it is not. It is a hexadecimal value that just happens to be composed of numeric digits.

That is the Variable Sized Integer serialization of the version number of the Bitcoin Core client that created that database entry.


The biggest problem with Quark (or any other "memory hard" algorithm) as a hashing algorithm is that verification is synchronous. So in order to verify things you have to do a lot of work, compared to the very small amount of work required to verify SHA256. This could lead to a DoS attack where an attacker sends you a whole lot of bad blocks and makes you tie up memory and CPU trying to verify them.


If a BCH is mined do those coins go against the total 21 million supply

The Bitcoin blockchain and the Bitcoin Cash blockchain are now two separate chains.  Even though they both originated from the same genesis block (and several years of common blocks), they have now forked and can never be reunited.  This means you should look at them as two separate currencies, each with their own similar but different rules.

As such, the Bitcoin blockchain can only ever support 21M BTC, and the Bitcoin Cash blockchain can only ever support 21M BCH.  So that does not mean anything has doubled; that would mean there can be 42M BTC...which isn't true.  It means there can be 21M BTC, and also 21M BCH.  Just like there may be X number of euros and X number of dollars, but that doesn't mean there are 2X euros or 2X dollars.  They are separate.


How can coinbase charge less than the average transaction fee?

Coinbase holds a large amount of Bitcoins. When you buy Bitcoin on Coinbase, they do not need to actually send it to your wallet, they just need to say on their servers that you own X amount of Bitcoins. They charged you $1.49 because of the payment you used and/or to take a small profit. If you were to move your Bitcoins to a wallet you actually own at home, you would have to pay the miners.


Full Bitcoin Node Download / Synchronization Takes very long

next time try to make it several questions, there is too much to answer...

  Why takes so long ?? Its just 150GB Max the Blockchain size...

The full node verifies each transaction for its validity, so that your local copy of the blockchain is safe to be used. More information on bitcoin.org. So this is normal, it is not "just downloading".

  ... but i get always an error and i must downlaod it again, cant i
  copy it to an new server?

You didn't say s.th. on your error, we cannot guess! If you have the same software, it should be possible though. I have done it many times with core client. Need to sav wallet files before though, just to be sure!

  I have copy only the blocks and chainstate folder. Can i download it
  faster?

See, it is not downloading a file, it is connecting to peers asking for tx to assemble "the blockchain" locally. And therefor verification process happens. You can use a pruned mode, which will not store the whole blockchain on your drive, but also this would have to read once all tx. It is faster, but again not done within minutes. Try to read about it on bitcoin.org or the online book of Andreas ("Mastering Bitcoin"). This helps to understand.


How to ./configure a built for Raspberry Pi?

You can follow the instructions for Debian at the build docs:

https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

For Berkely DB, specifically:

Berkeley DB

It is recommended to use Berkeley DB 4.8. If you have to build it yourself,

you can use the installation script included in contrib/

like so:

./contrib/install_db4.sh `pwd`

from the root of the repository.

Note: You only need Berkeley DB if the wallet is enabled (see Disable-wallet mode).


Adding «Donate» Bitcoin button in README.md file GitHub repository

1. Demonstration

Click to donate button on page:

https://github.com/KristinitaTest/KristinitaTest.github.io/blob/master/donate/README.md

Link must be opened in your Bitcoin client, example:

2. Relevance

This answer is relevant for April 2018. In the future, the data of this answer may be obsolete.

3. Redirect

You need to use redirect.

User click on Donate button → is redirected to Bitcoin-Redirect page in current tab → then opened bitcoin wallet of user → in current tab is opened page, on which Donate button is situated.

4. Details

4.1. Source of Donate button

[![Bitcoin Donate Button](https://i.stack.imgur.com/MnQ6V.png)](http://KristinitaTest.github.io/donate/Bitcoin-Redirect)

If you click the image, you will go to a page http://KristinitaTest.github.io/donate/Bitcoin-Redirect. See answer on Meta Stack Exchange, how use Markdown markup for this construction. Alternative worked HTML source:

4.2. Source of Bitcoin-Redirect page

Use JavaScript methods window.location.href and history.back.


In C-Lightning it is fairly easy. Just shutdown the server and make a full backup of the ~/.lightning folder. This folder contains in particular the HSM secret which is used for key derivation of later keys and it also has the sqlite3 database which is used to store all current states. This means that there is no need to close channels or anything.


Is there a comprehensive list of Gateways' IOUs and fees associated with using them?

There is no official list of Ripple Gateways because there is no such thing as an "official" gateway. Anyone can operate one without registering anywhere (other than as required by local laws in their jurisdiction). That hinders the creation of any kind of comprehensive list.

There are a few people that attempt to keep somewhat comprehensive lists but their list criteria for inclusion may differ or they may not hear of some new gateway for a while so I think they best you'll ever be able to do is to have a list of list of gateways.

Some places that attempt to list gateways:

DannyM's bitcointalk.org post, All Things Ripple (mostly up-to-date, lists all kind of niche gateways not listed elsewhere)
Ripple Gateway sub-forum (only indexes gateways discussed on the forums, does not claim to be exhaustive)
Ripple Federation has a Ripple Business Listing that includes a Gateways and Exchanges setion
The International Ripple Gateways Association's gateway list (they have some arbitrary requirements to join and don't actually police their members yet)

Of these, the only one I know that explicitly list the fees (or provides links to where the fees are listed) is the Ripple Gateway sub-forum topics.

The Ripple internal transfer rate for any issuer can be queried with the account_info API. The other gateway fees (for redemption, issuing, etc) are probably best determined by going to the fee page of the gateway's website.
Some other basic per-gateway information (such as issuing and hot wallet addresses) can be retrieved in a computer readable form from the sites's ripple.txt file, usually available from https://gateway.domain.name/ripple.txt.


What does one need to do to earn Decred through PoS?

Decred has a hybrid Proof-of-Work/Proof-of-Stake model, which means that block rewards are shared between the miners and the stakers (and the developers), with PoW mining earning the larger portion of the reward. (60% PoW miners, 30% PoS voters, 10% Decred development subsidy)

The way staking works in Decred is through a ticket system. You purchase a ticket, and it enters the ticket pool. Out of the pool, a few tickets are randomly selected along with every block, and these tickets vote on that block. Every ticket has a 50% chance of being selected in 28 days, and a 99.5% chance of being selected to vote in 144 days, after which it expires, and returns to your wallet. For all the time that your ticket is in the pool, the DCR used to buy the ticket is effectively locked.

You don't need a full node to stake DCR. You can just be a part of a staking pool. A stake pool allows you to stake your coins along with the pool, which will have full nodes of their own running at all times.They will vote on your behalf, and take a small cut of your earnings (1-5% depending on the pool). Note that you do not give up access to your private keys at any point during this process.

Coming to your questions,

Yes. There is a minimum number of DCR you need. It is called the ticket price. Currently it is around 75 DCR (you can check the current price here), and it fluctuates with demand and supply of tickets. The age of the coins don't matter. But the ticket itself takes about a day to mature before entering the ticket pool.
In case you are using a staking pool, the question of upload/download speeds is now irrelevant. But overall, it is not a question of speed, rather availability/uptime. So if you're running a full node all the time, the staking part should be trivial.
At this point you can only buy full tickets. There are several requests for ticket splitting, which would allow you to buy a fraction of a ticket and stake regardless of how less DCR you own, but that really isn't priority on the dev pipeline. Also, there is a 0.5% chance that your ticket is not picked, in which case the amount you spent on the ticket will be returned to you minus any transaction fees.

For a good introduction to the whole system, the PoS Documentation is a great place to start.
The FAQs are a great resource as well.


Can a malicious user recieve bitcoins by first finding the proof of work of his/her transaction then releasing it

What you describe is possible, but gives no advantage whatsoever to the "attacker".

Blocks build on top of their predecessor by referencing it in their header. Thus the attacker you describe would need to update his blocktemplate whenever a new blockchain tip is published. However, then he is doing exactly the same as every other mining entity, except that he's forgoing transaction fees worth one full block.


Are number of transactions in Merkle Tree always "even"?

If there are an odd number of nodes on any level of the merkle tree, the last node is duplicated and hashed with itself.n

If there were a Tx4, the diagram would look like this

                  Root (Hash01234444)
               /                      \
        Hash0123                 Hash4444
        /      \                    /     \
   Hash01      Hash23           Hash44     Hash44
   /   \        /   \             /   \
Hash0  Hash1  Hash2  Hash3     Hash4   Hash4


I expect that CHECKMULTISIG will call the CHECKSIG function and manipulate the stack to run CHECKSIG in a loop until it terminates and either has its M-out-of-N valid sigs or not?

That's not really how it's implemented internally, so there are a couple of pitfalls if you imagine it operating like that.

OP_CHECKMULTISIG

Here's the high-level description of how it works:

Pop n off of the stack (number of public keys)
Pop n public keys off of the stack.
Pop m off of the stack (number of required signatures)
Pop m signatures off of the stack.
Pop one more element off of the stack, and ignore it. (This is a bug, but it can't be fixed because this is consensus-critical code.)
Loop through all of the public keys, starting with the keys at the top of the stack.

For each public key, check a single signature.
For the first public key checked, start with the signature closest to the top of the stack.
If it fails to verify, go to the next public key and check the same signature.
If it succeeds, go to the next public key with the next signature.

Note that the signatures need to be in the same order as the key's that they're signing for.

If all of the signatures succeeded with one of the keys, CHECKMULTISIG returns 1, otherwise 0.

Your example

You've got this scriptSig:

    (sig2)
    (sig1)
    0

This scriptPubKey:

    3
    (pubKey3)
    (pubKey2)
    (pubKey1)
    2

When executing, the stack looks like this just before OP_CHECKMULTISIG executes:

    3
    (pubKey3)
    (pubKey2)
    (pubKey1)
    2
    (sig2)
    (sig1)
    0

This is what it looks like after initializing:

n->    3
ikey-> (pubKey3)
       (pubKey2)
       (pubKey1)
m->    2
isig-> (sig2)
       (sig1)
       0

It tries to verify pubKey3 against sig2, but that fails. Advance ikey, but not isig:

n->    3
       (pubKey3)
ikey-> (pubKey2)
       (pubKey1)
m->    2
isig-> (sig2)
       (sig1)
       0

Verifying pubKey2 against sig2 suceeds, so you advance both ikey and isig:

n->    3
       (pubKey3)
       (pubKey2)
ikey-> (pubKey1)
m->    2
       (sig2)
isig-> (sig1)
       0

...and so on.


No, it doesn't work like that.  The fee for a transaction can only be collected by a miner who creates a block including the transaction.  Creating a block also entitles a miner to collect the "famous" block reward (they could decline to collect it, but that would be stupid).  There is no easier way to collect transaction fees; you have to mine like any other miner (either solo or in a pool), and at least for Bitcoin, you can't economically do that with ordinary computer workstations.


Hash pointers: Are hashes of data used as addresses?

The hashes are not of addresses, they are of blocks. The "hash pointers" (in the blockchain, those are just hashes written into the header of a block, it doesn't actually point to anything) are the hash of the block that precedes the block that the hash is in.


The first one is correct.
https://blockchain.info/tobtc?api_code=000my0-api00-code-0000-000000000&currency=USD&value=1

However, the particular call you are using (/tobtc) is public and thus needs no api_code attached.

https://blockchain.info/tobtc?currency=USD&value=1


Bitcoin Core change derivation path with getnewaddress cmd 0.17

No. Bitcoin Core currently does not allow you to use a different derivation path.


I run bitcoind in linux centos server. but it give me error "sendto: Operation not permitted". why?

Most likely SELinux.

~/public_html is not the correct place to store binaries or even the bitcoin data directory.

Put the binaries in ~/bin/

The data files should end up in ~/.bitcoin/ if you haven't changed the configuration. That should be okay.

If it still doesn't work you might need to run restorecon -R ~/bin to fix SELinux attributes.


What does "deal with collisions" mean in the context of BIP32 fingerprints?

The fingerprint could be used as a unique identifier for a key (it is based on the longer hash160 of the key which is frequently used as a unique identifier). However because it is only 4 bytes long, it is not hard to find two different xpubs which have the same fingerprint. We would say that the fingerprint for these two xpubs collide with each other.

Note that these two xpubs would have different hash160s, just that the first 4 bytes of that hash (which is the fingerprint), are the same.

So any software that is handling multiple xpubs needs to be aware that there could be collisions in the fingerprint and implement ways to handle them.


Did Bitcoin founders know Bitcoin is not scalable at Base Layer?

If you look at the announcement of bitcoin and the very first response to it, you can read James A. Donald pointing out that bitcoin (which we today call the base layer) "does not seem to scale to the required size".
Partial quote of James A. Donald's response:

We very, very much need such a system, but the way I understand your
proposal, it does not seem to scale to the required size. [...] hundreds of millions of people are doing transactions, that is a lot of
bandwidth - each must know all, or a substantial part thereof.

This response was sent more than two months before the genesis block was mined. Thus, it is fair to assume that Satoshi was well aware of the scalability concerns.


Is there a site to monitor Bitcoin or Altcoin addresses if funds were received or sent?

bitnotify.com and even blockchain.info offer such services. Note, however, that you should still go check whether you actually have received the money (which you can also do on blockchain.info) because the fact that you received a notification only means that the transaction was broadcasted, not that it made it into the blockchain, especially not that it made it into the blockchain permanently.


Bitcoin-cli sendtoaddress error Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee

fallbackfee takes a fee rate as a parameter, not a boolean. The fee rate is denominated in BTC/kvB. For a 1 sat/byte fee rate, you would do fallbackfee=0.00001.


how do i programmatically find out whether this phone has a wallet with at least a certain arbitrary amount of bitcoin in it?

It is not possible, by design. Like Jestin said, the wallet's balance is not the business of other apps.


How to make genesis block transaction spendable?

It would be trivially easy to make the change.  Just a couple lines of code to add the include the genesis block tx in the utxo.

Understand however the hard part is that would create a hard fork.  Unless the change became part of a majority of nodes it would violate the consensus rules. If that output was ever spent any node running older code would be split from any node running newer code as some nodes would see the new txn as valid and some as invalid.  This is true for any hard fork scenario.  For this reason it is unlikely that hard forks for minor or trivially reasons will ever happen.


How does Electrum make a keypair out of a seed?

Wallets created by Electrum 1.x have seeds containing 12 words (24 words is also possible for custom-created seeds). Given a zero-based array of seed_words of that length, this pseudocode calculates the master_private_key:

i = 0
while i < length(seed_words):
    # convert each word into an int in the range [0,1625]
    # based on the word's position in the sorted word list
    seed_ints[i] = lookup_seed_word(seed_words[i])
    i = i + 1

num_words  = 1626
num_words2 = num_words * num_words
seed_hex_str = ""
i = 0
while i < length(seed_words):
    # (hex8 converts an int into an ASCII string of
    # exactly 8 zero-padded lowercase hex digits;
    # % is the integer remainder operator
    seed_hex_str = seed_hex_str + hex8( seed_ints[i    ]
                    + num_words  * (   (seed_ints[i + 1] - seed_ints[i    ]) % num_words )
                    + num_words2 * (   (seed_ints[i + 2] - seed_ints[i + 1]) % num_words ))
    i = i + 3

unstretched_seed = ascii_string_to_byte_array(seed_hex_str)
seed = byte_array()  # an empty byte array
i = 0
while i < 100000:
    # sha256 operates on and produces byte arrays
    seed = sha256(seed + unstretched_seed)
    i = i + 1

master_private_key = byte_array_to_int(seed, order=big_endian)

In case you're wondering, it seems that the reason the seed_ints calculation looks overly complex may be to avoid infringing on a patent.

For comparison, wallets created by Electrum 2.x typically have seeds containing 13 words, however they will on occasion have fewer. (It's technically possible to construct seeds of nearly any length which will be accepted when restoring an Electrum 2.x wallet.) Here's the pseudocode which calculates a BIP-32 extended master private key:

# Electrum 2.x doesn't separate mnemonic words with spaces in sentences for any CJK
# scripts when calculating the checksum or deriving a binary seed (even though this
# seems inappropriate for some CJK scripts such as Hiragana as used by the ja wordlist)
if language is CJK:
    space = ""
else:
    space = " "

seed_phrase = ""
i = 0
do:
    word = seed_words[i]
    normalize_unicode(word, normalization=nfkd)
    remove_unicode_combining_marks(word)  # e.g. accent marks
    seed_phrase = seed_phrase + word
    i = i + 1
    if i ≥ length(seed_words):
        exit-loop
    seed_phrase = seed_phrase + space

seed_utf8 = unicode_to_byte_array(seed_phrase, format=utf8)

if hmac_sha512(key="Seed version", message=seed_utf8)[0] ≠ 1:
    fail("invalid checksum")

stretched_seed = pbkdf2_hmac_sha512(password=seed_utf8, salt="electrum", iterations=2048, output_length=64)
seed_bytes = hmac_sha512(key="Bitcoin seed", message=stretched_seed)

private_key        = byte_array_to_int(seed_bytes[0..31], order=big_endian)
chain_code_bytes   = seed_bytes[32..63]
master_private_key = create_bip32_extended_private_key(private_key, chain_code_bytes)

BIP-39, an alternative derivation technique, is similar to Electrum 2.x but not identical.


What kind of random numbers source does getnewaddress in Bitcoin Core API (bitcoind) uses?

As others mentioned Bitcoin core uses OpenSSL random sources.

This means that it uses any random source available, like:

the operation system, i.e. interrupts
random sources of the CPU or the chip set
dedicated hardware for entropy generation

So in order to make sure your hardware random generator works with Bitcoin you must make sure it works with OpenSSL.


What BIP32 derivation path does Electrum use for Multisig?

Electrum uses BIP45.

m / purpose' / cosigner_index / change / address_index

Example for non-change of the first cosigner and first address: m / 45' / 0 / 0 / 0

See: https://bitcointalk.org/index.php?topic=1634517.15
and
https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki


I can answer the second part of your question regarding entropy.

Yes entropy absolutely is correlated with the number of seed words available to choose from. This should be easy to understand if you are familiar with the reason why alphanumeric passwords (letters, numbers and special characters) have far greater entropy than numeric passwords of the same length.

Regarding the 1st part of your question, please understand that understanding the meaning of every English word is not required to use English mnemonic seeds.  While adding a few more popular language may make some sense at some point the benefit of additional language support will increase security risks (from bad implementations, etc) and support costs more than the marginal benefit provided.


You can install your own wallet and use it ie. with RPC

Probably you will need some payment processor. There are several, just google for them and their developers guides.

Many shop solutions like ie. magento have several extensions using different technology, you can look up how they do it and build based on their implementation.

Here is one of many guides: https://code.tutsplus.com/tutorials/adding-bitcoin-payment-processing-to-your-website--net-33098

Blockhain.info: https://blockchain.info/api
Bitpay: https://bitpay.com/developers
Bitpay gateway guide: https://bitpay.com/bitcoin-payment-gateway-api
Bitpay's API Documentation: https://bitpay.com/api


Can we interpret a rolling average transaction count per block as the 'adoption curve' for Bitcoin?

The main problem I can see with using such a metric to measure adoption is that a tremendous amount of transactions take place on the various exchanges during periods of heavy speculative investment.

During the current downtrend we're probably experiencing a lower percentage of traffic from investors and a higher percentage of traffic from actual users of the currency. The problem is that there isn't really any feasible method of weeding out the MtGox, TradeHill, Britcoin etc traffic from the regular use cases.

The only way that I can imagine being able to weed out such transactions is if MtGox and their ilk actually provided a full list of the transactions they process each day. Armed with a list of transactions from at least the major exchanges we could mostly eliminate speculative use from our measurements and see something closer to actual adoption levels.

Unfortunately to my knowledge no such transaction list exists and without it, it's uncertain if such a rolling average is showing a decline in actual adoption or simply a decline in speculation. One of the big difficulties to be encountered in Bitcoin is that it's simultaneously quite open and extremely closed and can be very difficult to perform meaningful analysis on.


Needing a Private Key in order to receive profits in Blockchain Wallet

This is a variation of a fairly well-known scam. You never owned any bitcoins, there was never any profit, it is all fake. A watch-only address looks like there is money there, and profits accumulating but it's just a window onto someone elses money, not yours.

There are several similar stories on this website from other victims.

How to unlock private key of bitcoin
How can I get a private key for this address
Reg: Watch only Address
Bitcoin Mining as a Newbie (link wallet to another person's miner)

The Forexbitoptions.com website gives their address as 586 Mcardle Road Kinsey, Alabama 36303, USA. If you put that address into Google maps and check streetview, it looks like some random small rural home (2000 sqft, 3 beds, single storey).

That address is also used by 247bitminer.com so I guess these scammers just copy each others websites.


Where I've seen it, it refers to the mining payment method "Pay per share".

This question has an answer that describes what a "share" is.

On some mining sites that have existed, the earnings for a share have been essentially paid immediately. However, this method exposes the pool operator to a possibility of loss in the case that, on average, they find less that the expected number of blocks. This can be made much worse by a large miner participating in the pool and performing a block-withholding-attack. To prevent these problems, most pool operators prefer slightly modified pay-per-share methods of payment, such as SMPPS (Shared Maximum Pay Per Share).

A payment method is not strictly Pay Per Share if the earnings aren't available for payout immediately, or if risk is passed on to the miner. Note also that it may not always be clear how much of a fee is being charged by a pool operator; it can be as low as 0% or as high as 7% (but if they tell you the payment per share, you should be able to work it out by dividing the block reward of 50BTC by the current difficulty and comparing it with what the pool pays).

A pool would not payout 105% or 110% except perhaps as a promotion when it is trying to increase its number of participants and offers an increased reward such as 55BTC per block (ie 110% of what is earned) at its own cost.

Update: The discussion you linked to in your comment is regarding the issue of mining "bonds" where the issuer promises to pay 110% of the shares mined. Each bond appears to be selling for around 0.6BTC, and represents 2Mh/s of mining speed. Given that the bonds are "perpetual", presumably the issuer has allowed for equipment replacement and maintenance costs, and power etc. Payouts are advertised as "currently 110% of PPS", so it is presumably a promotional offer. The issuer must be earning a margin somewhere along the way to cover the cost.


How to check the balance of the list of 1 million Bitcoin Addresses?

Insight Block Explorer is the program.   It has an API you can query.

You'll need to install the block explorer.  It runs in a nodejs environment.


In order to use the Bitcoin API, you need to either run bitcoind, or run Bitcoin QT with a server parameter and also having RPC username and password set (in bitcoin.conf file). After that, you communicate with it over JSON RPC at port 8332 (by default).


How to setup a Bitcoin private net that can simulate the public net?

I would recommend using the testnet of your desired client (bitcoin/litecoin etc.) with it's own genesis block and thus it's own blockchain. Configure the testnet parameters in chainparams.cpp to fit your desired outcome, compile it on a couple of nodes on your LAN and configure them to connect to each other in your config file (your/data/dir/.yourcoin) by appending the line connect=IPADDRESS:PORT

You will also want to make sure that you have DNS seeding disabled. Once you have done this you will be able to mine coins on the testnet, grow the chain and eventually depending on how you've set your parameters the network will retarget difficulty and work as if it were on the main network but you will be shielded from the outside world.


Are there any feasible methods of maliciously reversing transactions?

This is not a possible thing to do at all without having over 51% of the network. All transaction are irreversable.

With 51% of the network hash power, it is really easy to reverse transactions.

Anyone with that kind of power would make a better profit just mining as attacking the network would cause a collapse in confidence and drop the value (with that kind of power its safe to assume you have a hoard of BTC)


I don't speak English well. Where can I get help with questions about Bitcoin?

A good starting point is Bitcoin.org website:

https://bitcoin.org

The site content is available in several international languages and provides a good overview of Bitcoin, and links to many helpful resources.


Public API to verify transactions to a unique address as they occur?

Yes you can.

If you're using a third party service to store your coins, they usually allow you to add a callback address when generating a new address, where they trigger a POST request to your server with a JSON object containing transaction details. Here are some examples:

Coinbase's API: https://developers.coinbase.com/api#callbacks
Blockchain.info's API: https://blockchain.info/api/api_receive

If you're rolling your own addresses, you can use some block explorers to notify you of new transactions to existing addresses. One I know of is Chain.com's notification system. I haven't used this, but Chain is quite a developer friendly service.

Personally, I've only used Coinbase's API, and It worked quite well for me. I trust Coinbase to take care of my coins better than myself, but if you're more paranoid and better at security than I am, use Chain.

IMHO I don't recommend Blockchain.info for anything. Their service really isn't that polished from all I've seen, and I just get a bad vibe from them. Coinbase has very nice support and a developer community where you can talk about all the problems you face.


Unspend just means that the part you received (this part is called a transaction-output) is not spend yet. Your transaction is complete.

It would show spend if you e.g. payed someone with your transaction-output. Then they would have an unspend transaction output.


Segwit, until BIP 173 is widely used, uses P2SH addresses. These addresses currently begin with a 3 and you can find them on the blockchain right now.

AFAIK, there is no software which will produce vanity P2SH addresses since there isn't just one thing that it can try over and over; the address is based on a script which could have anything, unlike the 1... Bitcoin addresses which are only based on one public key.

Since there are no P2SH vanity address generators, there is not one for Segwit. However it would not be hard to make such a software.


It looks like you have the bitcoind service listed as a forking service, but have not configured bitcoind as such. forking means that systemd expects the service to daemonize itself, i.e. the command it executes will exit once the service has started. However you have not configured bitcoind to behave in this way. So the bitcoind command that systemd runs will not exit as systemd is expecting it to. It is named forking because the process will call the fork() syscall and then the parent process will exit.

There are two solutions.

Configure bitcoind to daemonize itself. You can do this by adding either daemon=1 to your bitcoin.conf file or adding -daemon to the command in ExecStart.
Change your bitcoind.service file to say that bitcoind isn't expected to daemonize itself. To do this, change Type=forking to Type=simple. This instructs systemd to expect that the process configured with ExecStart will be the main process of the service.


What is the useful work done during the mining of Bitcoin?

Mining secures the Bitcoin blockchain and confirms transactions, solving the double-spend problem without the need for a central authority.


Intersango is on Github.  Here is a thread on a forum on how to set up your own bitcoin exchange - https://bitcointalk.org/index.php?topic=35812.0


how to use bitcoin blockchain be useful to authenticate documents?

You can make a transaction with the hash (of the document) as a comment.
That would proof that the file existed at that time.

It doesn't however magically proof that a document hasn't been changed.
Once you get the document, you can store the hash on the blockchain, then to check if it hasn't been changed, you can retrieve the hash and check if the current version of the file still hashes to the same value.

There will most likely be a library for this, I wouldn't know the name of a specific one however.


Where can I get a visual example of the entire bitcoin network starting from physical network to the overlay network

If I recall correctly, I believe there is a diagram like that in the O'Reily book Mastering Bitcoin by Andreas Antonopoulos.  It shows the different types of nodes and how they interact on the network.


What is the unit of time_lock_delta in LND?

The time_lock_delta is the minimum difference in the number of blocks between the CLTV of an incoming HTLC and the forwarded HTLC.

Full details are described in BOLT2 # CLTV expiry delta.


What is the difference between node, peer and mininode in the functional test framework in Bitcoin Core?

When you run P2P functional tests you are spinning up regtest nodes (running simplified Python code) that connect to your full node (running the full C++ code) to test P2P functionality.
As John Newbery outlines here:

A node is the bitcoind instance. This is the thing whose behavior
is being tested. Each bitcoind node is managed by a Python TestNode
object which is used to start/stop the node, manage the node's data
directory, read state about the node (eg process status, log file),
and interact with the node over different interfaces.
One of the interfaces that we can use to interact with the node is the
P2P interface. Each connection to a node using this interface is
managed by a Python P2PInterface or derived object (which is owned by
the TestNode object). We can open zero, one or many P2P connections to
each bitcoind node. The node sees these connections as peers.
For historic reasons, the word mininode has been used to refer to
those P2P interface objects that we use to connect to the bitcoind
node (the code was originally taken from the 'mini-node' branch of
https://github.com/jgarzik/pynode/tree/mini-node).

However, this PR 19760 (merged in August 2020) has removed all references to mininode and so no code or current docs in the Bitcoin Core repo currently refer to mininode. Obviously previous PRs and outdated documentation outside the repo will still refer to mininode.


Withdraw and deposit in cryptocurrency exchange website

So server need to do more than one transaction: 2 BTC from his own deposit address and the rest 3 BTC from another address that server manages. In this scenario we must pay fee for at least 2 transaction. [..]? What is the solution for this problem?

No, you can simply create one transaction, which spends the two UTXOs in question and pays to your customer (note: Bitcoin uses a UTXO-based model to keep track of coin ownership, not an account-based model).

  How an I generate new address for ethereum and bitcoin cash in block chain.com api?

Questions about altcoins, service-provider recommendations, and customer service issues are all off-topic here, sorry.


How does a new node get all the previous blocks in a blockchain?

The Bitcoin.org Developer Guide has a section about Initial Block Download (IBD) that goes into detail.

The basic principle in modern Bitcoin Core nodes is that the node connects to eight peers, tells them that it knows about the hardcoded Genesis Block (first block), and asks for the headers of subsequent blocks.  Headers are only 80 bytes per block (about 4.2 MB per year of blocks), so it doesn't take a lot of data for a node to get all of the headers up until the present.

Each header contains enough data for the node to see how much Proof-of-Work is contained in the corresponding block, allowing the node to select the block (headers) chain with the most cumulative proof of work.

Now that the node knows which chain has the most proof of work, the node requests each of its peers start sending it blocks from that chain.  Blocks are requested in order* from the earliest blocks to the latest.  If any block on the chain with the most proof of work is found to be invalid, that block and any blocks that descend from that block are considered invalid.  The node will poll its peers again, if necessary, and find which other block (headers) chain has the most PoW.  It will then begin downloading those blocks.

It continues to download blocks from its peers, validating each one, until it has all the blocks on the valid block chain with the most PoW.

* Modern Bitcoin Core nodes will receive blocks out of order, storing later blocks temporarily until earlier blocks are received in order to allow receiving blocks from multiple peers simultaneously.  Still, because most later blocks depend on data added to earlier blocks, some key parts of block validation can only be done in series.


Resources of a miner's reward in Bitcoin?

What is the reason to add this complementary reward?

The answer can be found in the original 2008 Bitcoin Whitepaper by Satoshi Nakamoto:

  6. Incentive

  By convention, the first transaction in a block is a special transaction that starts a new coin owned by the creator of the block. This adds an incentive for nodes to support the network, and provides a way to initially distribute coins into circulation, since there is no central authority to issue them. The steady addition of a constant of amount of new coins is analogous to gold miners expending resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.

  The incentive can also be funded with transaction fees. If the output value of a transaction is less than its input value, the difference is a transaction fee that is added to the incentive value of the block containing the transaction. Once a predetermined number of coins have entered circulation, the incentive can transition entirely to transaction fees and be completely inflation free.

  The incentive may help encourage nodes to stay honest. If a greedy attacker is able to assemble more CPU power than all the honest nodes, he would have to choose between using it to defraud people by stealing back his payments, or using it to generate new coins. He ought to find it more profitable to play by the rules, such rules that favour him with more new coins than everyone else combined, than to undermine the system and the validity of his own wealth.

In the beginning, every Bitcoin wallet was a miner. Every active Bitcoin participant was financially rewarded in order get the Bitcoin community to quickly grow to a sustainable size. After some years, the difficulty of mining increases (deliberately) and mining has become a specialised activity.

  How are those new coins minted? And how to calculate the amount of those new coins?

ecavero's answer covers this well.

This reward is part of the network consensus rules. Miners follow these rules and every full node (including many wallets) verifies the correctness of published blocks, discarding blocks that don't follow the rules.

See also

https://www.mycryptopedia.com/coinbase-transaction-explained/

  is there any documentation for this information (ex. 210,000 blocks, after 100 confirmations etc)?

According to Bitcoin Wiki - Controlled Supply

  Satoshi has never really justified or explained many of these constants.

...

  Speculated justifications for the unintuitive value "21 million" are that it matches a 4-year reward halving schedule; or the ultimate total number of Satoshis that will be mined is close to the maximum capacity of a 64-bit floating point number.

...

  This decreasing-supply algorithm was chosen because it approximates the rate at which commodities like gold are mined.


Import bitcoin address only with public key

If you are looking for watch only wallet, the Sentinel or BLuewallet watch-only would be the best option.

https://samouraiwallet.com/sentinel

https://bluewallet.io/watch-only/

They do import wallets based on the xpub(ypub/zpub). Blockchain.info in general is a very weak implementation with engineering flaws.


How to retrieve a public key from all types of transaction?

Is there a way to get sender's public key based only on the raw transaction data no matter the P2... type

Probably, if you exclude all current transaction types whose most popular names don't begin with the words "pay to ...":

Script type
Public Key in locking script
Public Key in unlocking script

Pay-to-Public-Key-Hash (P2PKH)
No
Yes

Pay-to-Public-Key
Yes
Yes

Multi-Signature
Yes
Yes

OP_RETURN
No
N/A

Pay-to-Script-Hash (P2SH)
No
Yes (in redeem script)

Transaction Puzzle
N/A
N/A

...
?
?

References:

https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch05.html
https://en.bitcoin.it/wiki/Script
https://www.quantabytes.com/articles/a-survey-of-bitcoin-transaction-types

The last of these is the most comprehensive of those listed, however it lacks full details.

The method that can be used to retrieve the public keys in each case (i.e. answer to How?) can be found by inspecting the detailed descriptions in the linked references above. Exact details depend on available tools and skillsets.


How to configure the official bitcoin client to conveniently use offline wallets?

You can use symbolic links to your bitcoin data folder or wallet.dat to the usb device location.  You will still have to run bitcoin -rescan when you start the bitcoin client, and you will have to remove the link if you want to run bitcoin without the usb devices.

Note, however that you do not need to have an offline wallet online at anytime ever unless you are spending the money out of it.  If you are only sending money to it then it can remain offline.


How to exploit the possibilites of blockchain for proof of authorship?

If expressing the (artistic) work in any kind of document (be it sheets, photos or audio/video recording) is good enough, then you can use something called proof of existence. This simple method allows you to store a hash of any document into the Blockchain, thus proving it existed at the time when a particular block was mined.

You can indlude the autor's name (or other identifier) into the document, making it clear that he (at least) knew about it back then. If nobody proves the possesion/familiarity with that particular file/work dated before, the author should be able to claim his rights.

One (perhaps the first) proof-of-existence service is proofofexistence.com.


Is there a Bitcoin exchange that accepts paypal and no registration needed?

What you are asking is economically impossible. Such an exchange doesn't exist or they are some sort of scams.

Paypal has very high fraud transaction rate due to high availability to obtain stolen PayPal credentials or stolen credit card numbers from darknet markets. Thus, exchanges allowing PayPal force strict Know-Your-Customer requirement on their users. It would be terrible, terrible, business decision to build such an exchange.


Wouldn't it be profitable to make an ASIC capable of calculating private keys?

You could in theory build an ASIC to brute force private keys of any cryptographic scheme, like EC or RSA.

But ASICs only give linear improvements. That means that they 'accelerate' some search only by a constant factor, like 2, 3 or 100. Even if your ASIC does something a million times faster than a normal CPU, it's still a linear improvement.

If guessing a private key takes the current age of the universe in a CPU, an ASIC a million times faster would still take 13 thousand years.

Cryptography relies on problems being exponential on the key size. Exponential growth beats linear growth. If some day a powerful ASIC or CPU could guess a ECDSA private key, users of ECDSA would only have to increase their key sizes.

To yield a better than linear improvement, you would need a better algorithm. Implementing current day algorithms in faster hardware only gives linear improvements. It's widely believed, even if we still don't have formal proof, that it's not possible to get better algorithms for prime factorization and elliptic-curve factorization. (At least in non-quantum computers.) In other words, they are considered intractable problems.


Looking for a tiny go/golang snippet to connect to bitcoin core json rpc

Ah... got there myself taking things from multiple sources!
Here's the code snippet:

package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "strings"
)

func main() {
    testRequest := `{"jsonrpc": "1.0", "id":"", "method": "getrpcinfo", "params": []}`

    req, _ := http.NewRequest("POST", "http://127.0.0.1:8332/", strings.NewReader(testRequest))
    req.SetBasicAuth("", "notmypassword")
    req.Header.Add("content-type", "text/plain;")

    res, e := http.DefaultClient.Do(req)
    if e != nil {
        fmt.Println(e)
    } else {
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
        fmt.Println(string(body))
    }
}


You sent X BTC, and you will eventually receive X BTC.

There is no profit or market condition involved here. You hold the same amount of BTC before and after.

You can of course choose to sell those BTC, and if the market value goes up, then yes you can sell at a higher price when expressed in another currency. But this is entirely independent from you transferring coins.


Why do some pools require a worker name with an underscore and others require a period?

These are just arbitrary rules. Made by the pool admin. Really doesn't matter.