text:
Error when sending transaction: "Signature is found in scriptCode"
I'm trying to send transaction with scriptSig: OP_PUSHDATA<Sig> OP_PUSHDATA<Data1> OP_PUSHDATA<Data2> OP_PUSHDATA<Data3> OP_PUSHDATA<RedeemScript>
But I get error:

mandatory-script-verify-flag-failed (Signature is found in scriptCode)

Why am I getting this error? What is wrong?
Raw transaction:
020000000001012f15356f4dfb7f48a91a72f5ff1071f72cb5fe4acc29e98ff5ae17a008a01dba000000007C160014ac09dd336a6fc10034fc44dcb706855668921ce7141f8b0800ffc1765400038d78055c545df3ff5d4a141f8b0800ffc1765400038d78055c545df3ff5d4a141f8b0800ffc1765400038d78055c545df3ff5d4a246d6d2202ada9884dbd1e8bd90968ba66246f017cd77d83595027f7929ae3537f98c92d4aacffffffff01c005d9010000000017a914738292fc46dd7af803bd56035d0988af96a3168187024830450221009108d4e65a34fb50cd3283b6386a679f0dfc2b5fe97e3b3c3f6b8320814b3a2902204631daf2bb93605c9e079750092f304966b69fe28ce7701f4bc677714bca23af012102ada9884dbd1e8bd90968ba66256f017cd77d83595027f7929ae3537f98c92d4a00000000

{
  "result": {
    "txid": "441cf52028ee0acc8b4076681c7fd46dad03501be62c6b0050ca59090fa52973",
    "hash": "dad2b4c56556b74d87243149ca3384ce04584d3bd8d21d80e291c4f9eed7e3f8",
    "version": 2,
    "size": 317,
    "vsize": 235,
    "locktime": 0,
    "vin": [
      {
        "txid": "ba1da008a017aef58fe929cc4afeb52cf77110fff5721aa9487ffb4d6f35152f",
        "vout": 0,
        "scriptSig": {
          "asm": "0014ac09dd336a6fc10034fc44dcb706855668921ce7 1f8b0800ffc1765400038d78055c545df3ff5d4a 1f8b0800ffc1765400038d78055c545df3ff5d4a 1f8b0800ffc1765400038d78055c545df3ff5d4a 6d6d2202ada9884dbd1e8bd90968ba66246f017cd77d83595027f7929ae3537f98c92d4a OP_CHECKSIG",
          "hex": "160014ac09dd336a6fc10034fc44dcb706855668921ce7141f8b0800ffc1765400038d78055c545df3ff5d4a141f8b0800ffc1765400038d78055c545df3ff5d4a141f8b0800ffc1765400038d78055c545df3ff5d4a246d6d2202ada9884dbd1e8bd90968ba66246f017cd77d83595027f7929ae3537f98c92d4aac"
        },
        "txinwitness": [
          "30450221009108d4e65a34fb50cd3283b6386a679f0dfc2b5fe97e3b3c3f6b8320814b3a2902204631daf2bb93605c9e079750092f304966b69fe28ce7701f4bc677714bca23af01",
          "02ada9884dbd1e8bd90968ba66256f017cd77d83595027f7929ae3537f98c92d4a"
        ],
        "sequence": 4294967295
      }
    ],
    "vout": [
      {
        "value": 0.31,
        "n": 0,
        "scriptPubKey": {
          "asm": "OP_HASH160 738292fc46dd7af803bd56035d0988af96a31681 OP_EQUAL",
          "hex": "a914738292fc46dd7af803bd56035d0988af96a3168187",
          "reqSigs": 1,
          "type": "scripthash",
          "addresses": [
            "2N3mz7o8v3YT4arXdQ5p8So6q3FUGjhUpEE"
          ]
        }
      }
    ]
  },
  "error": null,
  "id": "curltext"
}

What you're spending is a P2SH output. To spend those, the last element of the ScriptSig must be the script (encoded with a push opcode, not the script itself) that produces that P2SH address when hashed.
See BIP16, especially rule #1.

Validation fails if there are any operations other than "push data" operations in the scriptSig

trying to follow: the redeemscript is the last PUSHDATA structure (246d6d2202ad...), which is shown as last item in OP's raw transaction in the "asm" value of the "vin".
This hex value would be sha256'd and ripemd160'd. This should be the equivalent of the hash, that we see in the funding transaction as TX_Out[0] ("141a75cd53e9..." as part of the OP_Hash160  OP_Equal)?
(when I try to follow this logic, I get different hashes. Maybe the provided redeemscript is incorrect?)


text:
How to add a signature to a transaction which I can broadcast
I am using ledger and multi sig to sign a transaction I got signature hash where both party signed the transaction. How can I attached this signature to the transaction so that I can broadcast it to network?
any code reference will be welcome. Currently I am referencing electrum code.

How can I attached this signature to the transaction so that I can
  broadcast it to network?

This is more agnostic to any particular wallet software, but I hope it's helpful. When you sign a transaction, you then put the signatures in the scriptSig field of the input it corresponds to (the tx may have multiple inputs).
For a m-of-n multisig transaction, the scriptSig format is:
0 <sig1> ... OP_m <pubKey1> ... OP_n OP_CHECKMULTISIG
To broadcast it to the network, you can use the broadcast command in electrum:
cat signed.txn | electrum broadcast -

If successful, the command will return the ID of the transaction.

Alternatively you can use the sendrawtransaction RPC on a node running Bitcoin core.
sendrawtransaction "hexstring" ( allowhighfees )
Submits raw transaction (serialized, hex-encoded) to local node and network.

Also see createrawtransaction and signrawtransaction calls.

Arguments:
1. "hexstring"    (string, required) The hex string of the raw transaction)
2. allowhighfees    (boolean, optional, default=false) Allow high fees

Result:
"hex"             (string) The transaction hash in hex

Examples:

Create a transaction
> bitcoin-cli createrawtransaction "[{\"txid\" : \"mytxid\",\"vout\":0}]" "{\"myaddress\":0.01}"
Sign the transaction, and get back the hex
> bitcoin-cli signrawtransaction "myhex"

Send the transaction (signed hex)
> bitcoin-cli sendrawtransaction "signedhex"

As a json rpc call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "sendrawtransaction", "params": ["signedhex"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
is there any way to get derivative path from public key and xpub?
I have an xpub derived from m/44'/0'/1' can I get that path again from generated xpub or pubkey?  something like
def get_path(xpub):

   return derivative_path

No, you can't, apart from trying various paths and re-deriving it.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Mutlisig tansactions with trezor with multiple inputs and outputs not able to broadcast
I am trying to do a multisig
here is my final hex
0100000002ac55020798f18acf9354c2e8ced3b00ba7950590992b70adfcd566ec7c10525000000000fc004730440220281525305913c55bd9559c3bd5fdd61ea35783725e0b6b08b291b52c5bc6cd6302206dca418325d8a2d6972056813fc37cb4079fdf7026fd072b3840040fee39ad360147304402201756981e916c2611160fa3b34f7f3f274e21027f543aae55d52038aed82d3dee022048f86ca2b0c36d3333f3113e425c244a1ccd9e27a44d55cb131629fe14fece6f014c695221020c81e690eace25dfc949b85109256769a6a6051412b72ec739886e265c6dd8a7210210bcb0788c50f89122ff912bce2dec291aa41ed22a7f447c1a8f638cbf0d9d5d2102842d33deb2139b78260bcd3e0962c28963c3f08a6a378a4f4eb9e1d352447edb53aeffffffff8d0c5abf19ec4cbd61344bbde265fe426ab4aaed4445c89f350580ef330e56ac00000000fc004730440220281525305913c55bd9559c3bd5fdd61ea35783725e0b6b08b291b52c5bc6cd6302206dca418325d8a2d6972056813fc37cb4079fdf7026fd072b3840040fee39ad360147304402202e137d2123e6b5bbbc996884af591b70e00e33c6274f9ad7143237b7796aaeb1022066b1842fecba09cbb72bad841aea68d58637b02b5ad0c4b2fa6c9a756aa348fe014c695221020c81e690eace25dfc949b85109256769a6a6051412b72ec739886e265c6dd8a7210210bcb0788c50f89122ff912bce2dec291aa41ed22a7f447c1a8f638cbf0d9d5d2102842d33deb2139b78260bcd3e0962c28963c3f08a6a378a4f4eb9e1d352447edb53aeffffffff02a08601000000000017a9148624340a6f5cd0117bcd237af85f7ef303257d0a87a08601000000000017a9148624340a6f5cd0117bcd237af85f7ef303257d0a8700000000

and here is the script I am using
https://pastebin.com/Nvcui563
error I am getting when broadcasting
Error validating transaction: Error running script for input 1 referencing ac560e33ef8005359fc84544edaab46a42fe65e2bd4b3461bd4cec19bf5a0c8d at 0: Script was NOT verified successfully..

@Sunny, looks like you just broadcast a valid TXN on those UTXOs, so I assume you figured it out.
For those reading at home, the problem was that there were three addresses in the redeem script:
48'/0'/2'0/0
48'/0'/3'0/0
48'/0'/1'0/0

But only one address is used (twice) to sign the TXN
48'/0'/2'/0/0

The result is that your script hash is correct, since you used the proper three addresses, but you don't meet the 2 of 3 requirement to spend since you've only proven ownership of the private keys for 48'/0'/2'/0/0
I assume you simply corrected the error and added a second address to your script.

yup that is correct. I got it working.

what I found interesting looking at the failed TXN is that even though you signed with the same key twice, the signatures were different.  I'll have to go back through the spec and see what info changes on subsequent multisig signing paths.  I would have thought that the serialized TXN would look the same on the first pass as it did on the third.  Apparently not.

pls post your findings. I would also like to know. thanks

I'll plagerize your work if you don't mind.  Just leave your pastbin up, as well as this thread.  Easier to reference.  I'll make a new SE question later when I've done my research just to make sure its not already known

@Sunny, I figured it out, the reason the sigs are different is because they are signing different inputs.  From the wiki on OP_SIGCHECK (steps 7 and 8) you will see that extra script bits are added to the input your signing.  So when you change from signing inp1 to inp1, even though you use the same key, the extra script bits are in different parts of the signature.


text:
What will be the fee in $ for a 500$ transaction?
What will be the fee in $ for a 500$ transaction ?

Without a lot more detail, it is impossible to provide even a cursory answer.  Realize that you've not even told us what coin this is for.  Also, fees change minute-by-minute and can be specified by the user.

Fees are not based on the amount being transferred, but instead on the amount of space the transaction occupies.
For a very simple transaction with one input and two outputs, you would occupy a few hundred bytes of space.
Moreover, fees are decided by you (or the exchange/hosted wallet service you make a withdrawal from). The fee paid is simply the difference between the total input, and the total output.
For example, if you have an input of 1 BTC, and an output of 0.99 BTC for a transaction that occupies 100 bytes, the fee is 0.01 BTC, or 0.00001 BTC per byte, which is known as the fee rate.
The fee rate is continuously calculated by most wallets as network conditions change, and can be as little as 0.00000001 BTC per byte during times of low network congestion.


text:
How i can create new wallet
I want to create new own wallet without using ready wallet. But there are random generator that create random number and then private key builds from it. How I can realize that there is no two equal private key in the world?

If I was writing wallet software I would use BIP 39 for generating private keys from seed phrases.
Generally I would use standard algorithms (as defined in the BIPs) and standard libraries rather than invent my own.
You avoid generating duplicate keys by using sufficient numbers of words from carefully prepared lists of words and using publicly vetted algorithms carefully designed for the purpose. For example hashing algorithms are designed to minimise the chance of "collisions" (two different sources producing same result).
Choosing a large number of seed words using a properly initialized random number generator should minimise the chances of two users generating the same seed phrase.

thanks, but it may that two standard bip generate same private key, true?


text:
performance of new wallet address
I study bitcoin and don't exactly understand that how new wallet generate?
The documentation write below sentence:
"For generate new wallet, first search that there is no such wallet"
How we can found that the new wallet didn't generate before?
What is complexity of search?

Documentation for what wallet service or software? Do you have a link to said documentation?

The bitcoin.org documentation

Please update your question with an actual link.

The phrase you quoted exists only in your question - it is not a quotation from any documentation indexed by Google.

I study bitcoin and don't exactly understand that how new wallet
  generate?

I think you mean address, not wallet. A wallet is a software application that manages your addresses, and let's you view/spend the Bitcoin associated with them.
Address
A Bitcoin Address is a shortened form of Bitcoin script that locks the funds associated to it. In order to spend the funds, you must provide the necessary input to the script so that it equates to true when the script is executed by nodes on the Bitcoin network. This usually includes a signature of the transaction by the private key associated to the address. Here's an example of a Pay-to-Public-Key Hash (P2PKH) address:
P2PKH
16JrGhLx5bcBSA34kew9V6Mufa4aXhFe9X
Steps to generate the address:

Generate a random 32 byte private key. For example (do not use this): a966eb6058f8ec9f47074a2faadd3dab42e2c60ed05bc34d39d6c0e1d32b8bdf
Calculate it's corresponding public key using secp256k1 elliptic curve
023cba1f4d12d1ce0bced725373769b2262c6daa97be6a0588cfec8ce1a5f0bd09
Calculate the hash = RIPEMD160(SHA256(public-key)): 3a38d44d6a0c8d0bb84e0232cc632b7e48c72e0e
Encode Base58Check(hash): 16JrGhLx5bcBSA34kew9V6Mufa4aXhFe9X

See How to Generate a Bitcoin Address

How we can found that the new wallet didn't generate before? What is
  complexity of search?

You want to make sure you don't use a private key that someone else might have. There is no way to search all the addresses that might be known because only addresses that have received coins are on the blockchain. Also, many addresses can be derived from the same key pair using different scripts, so you can't be sure you don't have a duplicate just by checking the address.
Since a private key can be nearly any 32 byte number, there are on the order of 10^70 possibilities. You will never have a collision with another key as long as you choose a sufficiently random source for key generation. This is the most important thing to remember. For example, don't use a Brainwallet or any other low entropy source to generate a private key because it makes it easier for someone to guess.


text:
Can i use the same hardware mining for bitcoin and Zcash?
I use bitcoin hardware mining. Can I modify the hardware to mine Zcash cryptocurrency or I should buy Zcash mining hardware?

ZCash uses Equihash algorithm for proof of work rather than SHA256, so if it uses ASICs, the hardware would definitely not be compatible.

No, hardware compatibility issues will rise if you try to mine ZCash on an ASIC miner. Both ZCash and bitcoin are mined using different algorithms so you cannot use the same hardware for mining.


text:
Why haven't a large number of cryptocurrencies copied Primecoin's mining algorithm?
According to my understanding, generating an ever-growing list of prime numbers benefits mathematics and society in some mysterious way.  Given this, why have more recently created proof-of-work focused coins largely ignored Primecoin's mining algorithm in favor of Bitcoin's, which yields no epiphenomenal benefits?

One of the most important functions of mining is to secure the network, meaning that a user can be reasonably sure that their transactions are immutably recorded in the chain. With this in mind, it becomes very important that the game theory of mining incentivizes the miners to remain in consensus, and behave in the expected, 'honest' way.
In a simplified sense, this means that the cost of 'behaving well' (ie the way users want miners to behave, staying in consensus and securing the blockchain) must be less than the cost of 'behaving badly' (ie causing forks, withholding blocks, reorgs, etc). Likewise, the benefits of behaving well should outweigh the benefits of behaving badly.

why have more recently created proof-of-work focused coins largely ignored Primecoin's mining algorithm in favor of Bitcoin's, which yields no epiphenomenal benefits?

There is simple answer: if the hardware and algorithm used for mining provide external benefit, then that hardware will have value outside of it's use as a cryptocurrency miner. Thus, if a miner behaves badly and attacks the chain, their hardware will still have value, even if the chain dies. This lowers the cost of behaving badly, compared to a cryptocurrency which uses an otherwise useless mining algorithm. The net result is that the blockchain has a lower security guarantee, because the miners are not as invested in maintaining the chain.
Currently, we see that Bitcoin miners are spending huge amounts of energy to secure the network. The naïve understanding is that this is wasteful, the nuanced understanding is that Bitcoin itself benefits humankind in ways that make this cost worth it.
For more information related to this, see this question.


text:
15 day funds hold on Coinbase
I've linked my Copay wallet to my Coinbase account. I wasn't aware of the 15 day hold from my bank account on the funds I purchased.
Has anyone had that happen before? If so, did it take the full 15 days or did it clear sooner than that?
Also, my Coinbase account shows that my Copay account is connected to it when I'm logged in on a computer but not the app. And the Copay app doesn't show my Coinbase account is connected to it. I've completed the authorization process and I still don't see my Coinbase on my Copay app.

I would recommend to call coinbase support. They will point you in the right direction, usually its dramatic time saver :) Happened with me before that they would clear/release funds right away for some cases (unfortunately had a bunch within the last year). Their support staff is very responsive, doing its best since the platform has problems with scaling and code quality.


text:
Inbound requests after opening Electrum
A few days ago, I was exploring Electrum (Android) out of curiosity. A few moments later, I get notified by our firewall that it flagged several suspicious inbound requests. The source IPs came from various countries, all of which use port 50002. The destination was my phone, at seemingly random ports. I disconnected my phone from the internet, and the requests would stop. They'd start again if I connected and used Electrum.
Initially, I thought Electrum was P2P and was doing peer discovery, which would conveniently explain why a machine over the internet would attempt to talk to my machine. But reading ElectrumX's docs and several other online resources, Electrum is a client-server setup - wallets talk to servers. The only P2P component I see is when servers talk to other servers to find other servers or advertise their presence to other servers. But this would not explain the inbound connection to my machine.
So what's going on? Is this normal behavior? Is the wallet also a "peer"? Or is this some malicious attempt to break in? Everyone coming from port 50002 and Electrum servers using port 50002 is probably not coincidence though. Thoughts? Did I miss some detail in the docs?

Were the inbound requests trying to connect to port 50002 or were they specifically trying to connect to some open port on your phone? Are you sure that it wasn't the Electrum servers responding to the Electrum app connecting to them?

I think you’re misreading, those are outbound connections.

As @Anonymous said Electrum servers listen on port 50002 so that's what you are seeing here. Your phone is connecting from a random local port to remote 50002 on the servers.
Electrum gets blockchain data from electrum servers run by volunteers. These servers see your addresses + transactions but they don't see your private keys or seed. So you lose privacy compared to using a full node like bitcoin core but you still have exclusive control of the secrets that let you spend your bitcoins. The upside of using electrum over a full node is that you don't have to download the 200GB blockchain. You can get up and running straight away.


text:
Where in the source code are transaction validation checks implemented?
I understand that consensus (mining) and transaction validation are different concepts. Correct me if I'm wrong, but I believe each full node validates transactions and puts the valid ones into its own memory pool. Miners select transactions from the mempool and carry out the mining/consensus process to create a block.
Are there additional checks carried out by miners? If so, where are they in the Bitcoin source code? So far, I've found that transaction validation is carried out by some functions in main.cpp like AccepttoMemoryPool, while mining is implemented in miner.cpp. However, miner.cpp apparently also contains some checks.

Neither of those functions are part of modern bitcoin core, try looking at some more recent source code to begin with.

main.cpp indicate that he's looking at severely outdated code, but miner.cpp is totally still a thing, as as AccepttoMemoryPool.

Your general understanding is correct.
Mining doesn't perform any additional checks then any other full node.  Mining serves the function of giving transactions an ordering which is difficult to undo, but validation is just a function performed by every node.
Some tests are in miner.cpp because creating a block that matches some set of rules needs different code than checking if a block matches those rules. For example, some space needs to be set aside for the coinbase transaction (which is produced externally in normal use).


text:
What does "Estimated BTC Transacted" mean?
I view a sample transaction, would you please see the sample image?
It's very clearly that Total Input is 0.1B, Total Output is 0.0995, and Fees is 0.0005 BTC; 0.1=0.0995+0.0005
Estimated BTC Transacted display 0.015B, what does "Estimated BTC Transacted" mean? how can I calculate "Estimated BTC Transacted" ?
Image

Please see the question I marked this duplicate of. For the specific transaction you referenced, we can see that one of the outputs has the same address as the input, so it should be somewhat obvious this is the change address, and the other output (0.015 BTC sent to 1Gdk...) is the 'payment'. Note that 'estimated BTC transacted' is a guess at best: in many cases, as an outside observer it is impossible to discern what the nature of a transaction's outputs are.

Thanks!  I have read  How does blockchain.info calculate the “Estimated Transaction Value?” , but It's not clearly

Do you mean that "Estimated BTC Transacted displays 0.015B" is only a guess?

I mean that when looking at a transaction, it is often not possible to know who controls each newly created output, and that info is needed in order to know 'how much bitcoin was transacted'. The 'Estimated BTC Transacted' statistic you can see on that page is simply blockchain.info's best guess at which output is the 'payment'. Sometimes, you can make a good guess, but often you cannot.

Thanks! I'm strange why Bitcoin provide  "Estimated BTC Transacted" and let users to guess!

Its not that bitcoin provides, it’s blockchaininfo calculations and not provided by bitcoin protocol, it is by design that one cannot know how much bitcoin is “spent” and how much returns as change.

@HelloCW the users involved in the transaction would not have to guess, because they will know who controls each output. But anyone else looking at the transaction will not have that information, and so they will have to guess. Blockchain.info is just a block explorer website, there are many such services that exist with similar websites.


text:
Why isn't the description field synchronized at different Electrum wallet?
I use Electrum as my BitCoin wallet, and install it on both home PC and office PC.
I fill in "Description" field and send some Bitcoin on the office PC BitCoin wallet, it's OK.
The Electrum wallet on home PC can display the record except "Description" field, why?
1:  Is "Description" field  only for local record on Electrum wallet ?
2:  Doesn't a Bitcoin transaction record incude "Description" field?
Image 1

Image 2

A Bitcoin transaction holds no Metadata beyond what is required for moving coins. Any descriptions, labels, or other such information is purely handled by the wallet, and synchronizing it is up to the wallet.
Electrum does not synchronize any such data, so you will only see it on one device.


text:
Wants to send my bitcoin to another wallet

I’m having issues trying to send my bitcoin to another wallet...it been asking me to confirm a whr code which I don’t really understand cos I have enough money on my wallet

The address you have is a watch-only address, meaning you can only watch it, but not send it without the private key. The private key is something you HAVE TO have in order to send it.
It's 32 bytes in size and starts with a 5

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
I need details explaination about " BLOCKCHAIN BITCOIN ADDER BOT"
I saw this file titled "
BLOCKCHAIN BITCOIN ADDER" on facebook and i tried to follow the process by importing the wallet that was given. On doing that I received a lots of bitcoin that i never dream i can earn. At the end of the file the private key was given without the password. Payment was asked in order to give the password. As per me i don't have upto 2dollar worth of bitcoin not to talk of the 20 dollar that was asking.
I want to know if this method of earning of bitcoin is possible. More than 3BTC is sucked in blockchain wallet. Another curiosity is that payment is keeping on entering the wallet. There is no day i won't received a payment to the wallet.
Is this possible, real and genuine  ? Is it possible to get the password? If not, how can I remove those balances from my account?
Thank

It's a scam. They are showing you addresses that they don't actually have private keys for in order to trick you into thinking that you will be able to make money. It's practically the same thing as the traditional Nigerian Prince scam.

Think about it: if someone had all of that money and could give you the private key, why wouldn't they just take it themselves? Why would they give it to someone else in exchange for a small payment?

TL;DR IT'S A SCAM

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
No inputs found when using Electrum to sweep private key from Bitcoin Core
I'm trying to move my bitcoins from Bitcoin Core to Electrum in order to not have to store the blockchain. My starting position is a fully synced Bitcoin Core and a newly created standard Electrum wallet (without any imports).
I'm using the debug console in Bitcoin Core to execute walletpassphrase to unlock my wallet, and dumpprivkey together with the address obtained from File > Receiving addresses...
Once Bitcoin Core spits out a private key I'm following the instructions here http://docs.electrum.org/en/latest/faq.html#can-i-sweep-private-keys-from-other-bitcoin-clients and pasting into the sweep input box and leaving the default address intact.
The exact error message I receive is:
No inputs found. (Note that inputs need to be confirmed)

Am I doing something stupid here? Is this even the best migration procedure?

The process looks okay. Not all receiving the addresses will necessarily have a current balance if that is what Electrum means to tell you. It is not necessarily necessary to use Sweep if your Bitcoin Core wallet addresses are not compromised (and your private keys continue to be protected in the future) then you can just use Import which will save paying transaction fees, although, if you do use sweep it is better to put all private keys in the box, one per line with enter in between, so that only one transaction is necessary.

what version of bitcoin core are you using? can you share the address and transaction?

@willtech sweeping is better because you can easily backup your wallet by writing down the seed.

Take a look at the private keys from your Bitcoin Core client. They should look like mine (the following are keys from the testnet):
cQHjhLkGQHQZUZFZYHfXjsXkfdNPoAd2X58sa2x95vEWssrvpPLi
cVXThnV4XgJP7q1v3aVQacTkxHq96BpyoSCGPqMAyyJcVaGn93Zh
cVCAYjR4E5qvzCa3f6VYZhsZNCgWQUDikfFCg4Fom6fnecRXxKM5

Now go to your Electrum and take a look at your keys there (Wallet>>Private keys>>Export, you will find them to the right from your addresses). The should look more or less like mine:
p2wpkh:cNs6rHM6cd7iY3YizmpG2GHxctjKxFtLV9WANCLgtcCRzcQ8AC1b
p2wpkh:cSGaa8sWKSvSty6bR36XZzEQsMr5bNW78XYCaTs3h4xqbsoLGghx
p2wpkh:cTERSrc4euSox7Wtk75vVFwLBpf7oqbpwQPTxNGoEjLxjwL8JrMJ

They look like of a different type than the ones from your Bitcoin Core wallet.
A single private key can lead to different addresses, depending on the script it is used in - these include p2pkh, p2wpkh, p2sh-p2wpkh. To realize that it is true create a new wallet in Electrum (File>>New/Restore>>Create..,choose option Import Bitcoin addresses or private keys) paste the unprepended private key from your Bitcoin Core wallet. Electrum should create a new non-HD wallet for you with only one address. This adrress will be a different one from the one from which you derrived your private key in Bitcoin Core client
Electrum prepends the script type to the private key during export and import so that it knows which address to derive and check for outputs on.
Before sweeping prepend the private key from your Bitcoin Core wallet, that you got from the output of dumpprivkey "address", with p2wpkh:, like so: p2wpkh:cNbxok3SkFuSsbiiTqLj56Hp6bAhr2uJtr8aTkViBB3ghBMzQH3Y. Such prepended key paste into the sweep box and follow the instructions. You can replace the address given to you by Electrum with the one of your choice - it will work as well.
What is convenient in sweeping is that it will work even if you do not have any Bitcoin in your destination wallet. The fee will be taken from the source, in your case the UTXO from the address of your Bitcoin Core client.

Your coins are likely in a change address. You could do a dumpwallet in bitcoin core and then sweep all the private keys. But this is going to be slow going in electrum and you're going to have to do it in batches. Instead I suggest extracting the addresses which have unspent outputs in them by using the listunspent command in bitcoin core and then sweeping only those addresses' private keys. You can also do this via the cli and then use standard text processing commands to extract the addresses (jq, grep). To get it via the cli run bitcoind -daemon and then use bitcoin-cli listunspent

Why would the coins being in the change address matter? Do I have to have a balance in Electrum in order to pay the fee? Or can the key be subtracted from the Bitcoin Core's UTXOs?

@JerzyBrzóska Change addresses don't show up under receiving addresses in the GUI which is what the OP was using. The fee will come from the bitcoin core UTXOs.

Change addresses may not be given to the user when they do in the GUI:  Receive>>New Address. Nevertheless, they are readily available for the user in the Addresses tab, below receiving addresses. Nevertheless, if the swiping attempted by @h0dges succeded he would not have received No inputs found. from Electrum, and the transaction would have increased their wallet's balance. From my understanding of their question none of the two was the case.

Adding complementary information :
If the address which holds the amount starts with a "3", therefore the script to perform the sweep shall be "p2wpkh-p2sh:" followed by the private key.
As long as the script is not correct, you get either "No Input Found" or "Unknown script".
I've struggled several hours to found out in the Electrum user manuel.


text:
Is it safe to share bitcoin address and signature generated from electrum wallet
Some bitcoin airdrops are asking to prove ownership on bitcoin address by sharing signature.
My question is if one shares bitcoin address and signature is there any risk of a attacker to compute the private key with this knowledge.
Note I am using electrum wallet to generate the signature

My question is if one shares bitcoin address and signature is there any risk of a attacker to compute the private key with this knowledge

While signing, the public key becomes exposed. The primary assumption is "It's impossible to find the private key which relates to a known public key", and this assumption isn't likely to be disproved (in other words, cracked) in the next 10 years.
The process of signing a message to claim airdrops is absolutely safe, as you can move your coins to a different address after claiming your airdrops.
The only risk is your privacy: They'll know how much money you have. If that's an issue, you can just mix your coins after you're done.

No, there is no way to get the private key from a signature.
But someone (person B) could force you to sign a special message so that person B can pretend to person C to own that amount of bitcoins.


text:
Can someone please find the private key to this bitcoin address?
I need help this is URGENT! find the private key and send it to me.
3PbacVZwS2L5i9C2Cmz9rPu8s4qjyYkufk
I really need this to pay for a bill. I have a deadline and have been trying to figure it out but cant. PLEASE HELP ME.

this is probably a hoax, there are roughly 50 bitcoin on the address, and it is highly suspicious to have such a request of "ownership" from a new member in the forum. Also the address shows more than 150 bitcoins going in and out only in February... This is nearly one million (EUROs, USD, CHF, ...) if this is for real, you don't need the help from a public forum. This would require specialists in analyzing your PC, the surrounding security model, and if not in place, the mental health. (and yes, I am aware that this comment qualifies for a downvote)

Possible duplicate of I need to recover private key?,

It is not possible to work backwards from a bitcoin address to the private key, sorry. If this was possible, the bitcoin system would be incredibly broken.
You will need to find the wallet software that generated this address, or a backup of the keypair / mnemonic seed phrase for that wallet, otherwise you will not be able to recover the private key and spend those funds.
Best of luck

Firstly, I want to clarify that it seems you may not be familiar with what a private key is. Secondly, this address is associated with the XAPO Wallet (https://oxt.me/address/3PbacVZwS2L5i9C2Cmz9rPu8s4qjyYkufk).
A private key is a cryptographic key used to sign transactions and prove ownership of a Bitcoin address. It should be kept confidential because anyone with access to the private key has control over the associated funds.
XAPO was a Bitcoin wallet and vault service designed to offer secure storage and convenient management of Bitcoin. However, XAPO underwent changes, and its services were acquired by Coinbase.

You can use vanitygen-plus for the underlying address to find private keys but, it will take an inordinately long amount of time. If your bill is urgent you shouldn't bother.
The rule with Bitcoin is it is up to you to keep your wallet secure, the same as a wallet is in your pocket nobody can open it unless you take it out and give it to someone. Bitcoin cannot be responsible for your computer security and cannot adjudicate as to the owner. The Bitcoin in your wallet belongs to anyone who has the password that can allow the signing of a transaction with the cryptographic signature proving ownership of the bitcoin. That way there will not be theft and it keeps Bitcoin matters from tying up the court.
The same there is pay and then pay. When you receive a pay envelope the pay is made up in the office to be your pay, but when it is in the envelope your pay is not received, at least if the standard is it must be able to be spent on something that is available because you have the money then it is not paid at least until it is received and counted. Then you are paid. The same with a Bitcoin transaction, a transaction is paid to make the transaction from the utxo but the recipient is not paid until they can sign for a transaction to spend the Bitcoin, so receiving notification of a transaction is not secure and you cannot spend until your transaction is included in a block that is an indelible part of the blockchain to prevent unspending after somebody supposes to receive. You pay the transaction and say that it is paid (with Bitcoin) but ultimately it is not paid until the bitcoin can be spent.

Why the downvote? The answer is specific and accurate. It is useful to understand how long an inordinately long amount of time is perhaps, an amount of time without ordinals?


text:
how can i query utxo to bitcoind(using bitcoin-cli) with public-private key not wallet
i want make a transaction to send bitcoin to others.
so i need utxo by someones' adfress.
but bitcoin-cli listunspent command only allows address in wallet.
is it any idea to query listunspent with address not in wallet?
using public, private key.

You do not need the uxto of the other address to be able to send it BTC. You just need the address.
If you want to list unspents of an address you don't have the keys for, I don't think bitcoind can help you. However, you can use explorers like blockchain.info: https://blockchain.info/unspent?active=35QEobWVUKjMY2HwKATYYQXRGzXJvdXQCy&format=html (there's also JSON if you want it).

thanks for reply :).  Yes, I already know about that site.
I am making wallets using some libraries.
I want to know total balance of addresses,
and  some libraries(bitcore-lib) needs to utxos values for making transactions.
so that's why i need that.

so if u wanna query utxo from address( not wallet ) using bitcoin library ( bitcore or something include bitcoin-cli ), do u have any ideas for that?

Not out of my head, you could look at https://github.com/eklitzke/utxodump


text:
Is there a way to retrieve lost Litecoin
one year ago, I transferred few litecoins to btc-e, which after few days were shut down, from my wallet.
At that time, my wallet was not fully synced with the network.
In my wallet I can still see that the transaction is unconfirmed (0 of 6 confirmations).
Is there any way to retrieve the litecoins?

Was your wallet not fully synced before the transaction? And still is in the same block as then?
If the answer to both of them are yes, then you may have a chance.
What you have to do is:
Verify the transaction in a Litecoin explorer
If you don't know the transaction, just input your address in the explorer and check it's balance.
If it still says you have balance, I recommend you to import your private key to some other lite client and use it however you want.
To retrieve private key from Litecoin-qt wallet, I would suggest this answer.

Thank you so much. It says I still have the balance. Can you please tell me how to retrieve it? And please give me more details on import your private key to some other lite client and use it however you want

Can you tell me which wallet were you using before?

It was core qt. version 0.8 something.

Updated the answer, hope you can retrieve the private key, after retrieving you can use Electrum for LTC to retrieve that balance. Accept and upvote my answer if it helped.


text:
How does LN solve the liquidity problem?
How do nodes in LN manage to provide 100% collateral to all the outgoing channels? I attached an example below that details my confusion about the lack of liquidity.

Whoever made that example doesn't seem to understand how the lightning network works.  I think the creator of this scenario is confusing how the lightning network functions with how traditional deferred net settlement functions.  With the LN, you don't hold accounts with the people you have open channels with.  Instead, you have money tied up in the channel with the other participant.
The lightning network works by chaining together unbroadcast transactions that spend the outputs of a funding transaction on the Bitcoin blockchain.  These transactions are shared between the two parties in a channel, and form a smart contract that allocates how the funds of the original funding transaction are split.  Neither party can violate the smart contract without the other party being able to back out of the contract, or take advantage of the violating party.
In this way, collateral never really enters into it.  All the funds promised to a party in a channel are provably real.  Yes, you have to tie up funds in every channel you have open, but that's the price you pay for having the channel, and which allows you to collect fees for routing transactions between your different channels.  The more money you tie up in a channel, the larger the transaction you can handle.  It's the common tradeoff in finance where you trade liquidity in order to obtain a better investment.


text:
Different coin pools in zcash
I would like to understand the cryptocurrency zcash a little bit better...
My understanding of it is that there are two address types t-addresses and z-addresses. Only transaction between two z-addresses are fully private. Transactions between t-addresses are working as transactions in bitcoin, i.e. the degree of privacy is exactly the same. Also there are two different pools: shielded pool and unshielded pool.
My questions:

Zcash is based on a base currency. As far as I know it is bitcoin, right?
I guess the coins in the shielded pool are zcoin, right?
How about the unshielded pool? Are they bitcoins or zcoins? (i.e. the marketcap of zcoins consists only of the coins in the shielded pool or both pools?

Thanks a lot for any kind of help!

Zcash is based on a base currency. As far as I know it is bitcoin, right?

Zcash is not based on a base currency; it is an independent block chain. The code was built on a fork of Bitcoin Core 0.11.2 (and since then has had numerous backports of subsequent upstream changes).

I guess the coins in the shielded pool are zcoin, right?
How about the unshielded pool? Are they bitcoins or zcoins? (i.e. the marketcap of zcoins consists only of the coins in the shielded pool or both pools?

All pools within the Zcash block chain contain ZEC. There are three pools within Zcash:

The unshielded pool (containing ZEC stored in transparent addresses).
The Sprout shielded pool (containing ZEC stored in Sprout shielded addresses).
The Sapling shielded pool (currently zero, but will start being used once Sapling activates).

ZEC is moved between the various pools when transactions send ZEC from one type of address to another, e.g. from a transparent address to a Sprout shielded address (see this blog post for more details).


text:
How can I track all trades at an exchange such as GDAX
Can I track all trades on an exchange, not just my own. Is it possible to assign a trade to an anonymous figure then continue to track that figure?

"Can I track all trades on an exchange, not just my own" yes. visit https://docs.gdax.com/#get-trades for additional information. this trades are afaik anonymous so you can not track who did which trade.

I was able to get client ID.... this is the person and it does not seem to change.
{
"client_oid": "d1a28cd9-4bee-4288-a11d-9d7af8d497f7",
"order_id": "a50d10fc-8e0b-4a1f-bd53-2fee46519711",
"order_type": "limit",
"price": "809.14000000",
"product_id": "ETH-USD",
"sequence": 3580533179,
"side": "sell",
"size": "6.00000000",
"time": "2018-05-05T09:18:40.274000Z",
"type": "received"
}

Anonymous is ok -- I'm tracking Client ID


text:
Up to 4 Different Points within ECDSA/Public Key Recovery technique
In the answer to this question, it is stated that:

Rearranging this equation you get rP = sR - mG, or P = (s/r)R - (m/r)G. Thus, it seems we can just compute the public key from the message and the signature. Unfortunately, there can be up to 4 different points R for which R.x mod n = r (in practice, the number is almost always 2).

How is it possible that there could be up to 4 different points for R? And why would it most often be 2 different points?

Negating an elliptic curve point means negating its Y coordinate (modulo the field size p), so -(x,y) = (x,-y). This implies that if you have a point R for which R.x mod n = k (where n is the curve order), then the same will be true for -R.
Furthermore, and with negligable probability, it is possible that both R.x and R.x + n are valid X coordinates (only when R.x < p-n). In that case, there are 4 possible points ((r, y1), (r,-y1),(r+n,y2),(r+n,-y2)).

Then, is the reason that R.x + 2n, R.x + 3n, etc. are not possible X coordinates because of a size constraint (I'm guessing they would be larger than 256 bits)? Perhaps this is also the reason for why R.x < p-n?

Yes, p and n are both very close to 2^256, but n is slightly smaller.


text:
How are keys for lightning channels currently created?
Keys for creating lightning channels seem to be derived differently than in usual bitcoin wallets. Lightning node data corruption, despite backup of master seed phrase, seems to prevent recovery of channel keys. How are channel keys currently derived, and why is recovering these keys with a corrupted node extremely difficult?
This question is in response to #3 of the following video (timestamped) https://www.youtube.com/watch?v=5fMv8MpzLgQ&feature=youtu.be&t=143

While I have experienced the same situation as the person described in the video the information is only partially true.
It is very well described in BOLT 03 how keys are being derived. The general derivation of the keys you are looking fore is described in this formula:

privkey = basepoint_secret + SHA256(per_commitment_point || basepoint)

so what you can see is that your secret is added with a per_commitment_point which contains information about the channel state. This is done to increase your privacy and is the reason why lightning nodes need the channel state in order to derive the keys from your seed.

I understand the need for privacy, but couldn't these keys just have been derived from a hardened path of the usual BIP-32 derivation? I'm sure this is a naive outlook, but what would break or what could not be done if we had all the different  keys attached somehow to one's seed? This would allow the recovery of funds from seed alone, which is pretty attractive.


text:
Nbitcoin node c#
Create a transaction to send money, then it needs to be "registered" in the system, before doing so :
using (var node = Node.Connect(Network.Main, node_address))//, node_address
  {
                try
                {
                    node.VersionHandshake();

                    node.SendMessage(new InvPayload(transaction));

                    node.SendMessage(new TxPayload(transaction));
                    Thread.Sleep(500);
                }
                catch { }
            }

sometimes the error "the node is not in a connected state" appears on the node.VersionHandshake (); but the money was sent, changing the node did not help.
Then changed a bit code :
using (var node = Node.Connect(Network.Main))//, node_address
{
    try
    {
        node.VersionHandshake();

        node.SendMessage(new InvPayload(transaction));

        node.SendMessage(new TxPayload(transaction));
        Thread.Sleep(500);
    }
    catch { }
}

I do not prescribe a node, but transactions are registered, but sometimes the error of the node is not in a connected state still appears, but since the money is successfully sent, I just catch exceptions, everything would be fine, but today, with the next test, this error came out again, but the money did not go. And here the question arises, what can be done? it is one thing if money would not always go with such an error, then it would be possible to catch an exception and change the node (somewhere I read that the error is on the side of the node), but the money is sent, though not always.


text:
Bitcoin transaction cpp
can anyone help me with the code to get transaction info of a block of bitcoin.
I have tried to extract the transaction using postman but did not come through properly


text:
At most two outputs according to Bitcoin whitepaper. Multiple outputs in real transactions. How come?
The original Bitcoin whitepaper mentions that there can be at most two outputs:

Normally there will be either a single input from a larger previous
  transaction or multiple inputs combining smaller amounts, and at most
two outputs: one for the payment, and one returning the change, if
  any, back to the sender.

However, I see transactions like this:
https://blockchain.info/tx/c18ff55d09c596ffbad30321719171c0d5b4d677d3554fc6ab3d12167ea8b9d6
that has many outputs.
Is this contradicting the Bitcoin paper or is there something I'm not getting?

Note the word normally at the beginning of the sentence.  This isn't imposing a restriction but merely describing a common use case.
It's obviously useful to allow more than two outputs, and there's no particular reason to impose any arbitrary limit on the number.  I don't think such a limit was ever contemplated.
In any case, the whitepaper isn't considered to be an authoritative description of the protocol; that would be the reference client.  For instance, the whitepaper describes a scheme for reclaiming disk space that I don't believe was ever implemented (the "pruning" feature came much later and is somewhat different).


text:
Pertaining to slushpool mining . What is the most lucrative way to vote ? Or does it matter
What is the most lucrative way to vote on slushpool? Or does it matter

Vote in what way?

It always depends on what the current vote is for. Your question can be improved with more details. Please see how to ask for assistance.

What does vote even mean in this context?

Voting doesn't affect earnings. Long before SegWit activated, the miners were voting, because it was about to choose Bitcoin's destiny: 40% of the network was voting for SegWit while the other 40% was voting for a block size increase.
The scaling debate is already over, so it doesn't have any effects, currently.

Choose "Pool decides" if you're a big fan of Slush or Prusnak
Choose "Bitcoin Core" if you're very thankful for what Core developers have brought to Bitcoin
Choose "Not Voted" if you like neither, since Slush has always been supporting Core developers.


text:
Bitcoin Core software on 2 hard drives with one Wallet
The answer to this may already be out there, I just couldn't find it.
The issue: My SSD has a few problems, I got the nasty "Disc Read Error" on boot up and while trying to sort that out, it occurred to me that my Bitcoin software is installed on that drive.
I did have the common sense to locate my Bitcoin wallet on my storage hard drive, so all that info is safe and I was able to boot off a spare drive that I use as a back up.  It doesn't have the Bitcoin Core software installed though.
The question: Can I install Bitcoin Core software onto my spare drive without any hick-ups and then access my wallet, or will I run into some issues? Will I have to go through the whole huge initial download thing again?
I didn't want to try until I asked, just in case there is something to look out for.
Thank you in advance

You should be able to download/install the software on your safe drive, and then specify as needed the locations of the wallet/data directory using the --datadir option (this should point to the repository containing the blocks directory as well as the wallet.dat file).


text:
C++ source code for bitcoin miner software?
Does anyone know where to get the C++ source code of one workable bitcoin miner?

Two popular Bitcoin miners, BFGMiner and CGMiner are open source and written in C++. The source code repositories for both are linked.


text:
Can can I identify my deposits to a wallet on a BTC (or LTC) blockchain (using the blockcypher api)
I'm trying to reconcile my deposits to a wallet (happens to be LTC) on an exchange account with the data on the blockchain.  I was using the logic:
if tx_input_n is -1 then
    transaction is a deposit
else
    transaction isn't a deposit

Which I now know isn't correct.  In this this wallet for example: http://explorer.litecoin.net/address/37GjCWCfLuxMaeKZz5yepLSS1Jpd3MfKmG, there are 20 blockchain deposits using the logic I've described.  5 of them however are (correctly) not represented in my exchange account because they aren't deposits:
2017-07-22T10:56:32Z b9ed3bbf129307b0a36fbb723e3a11d40959b4e109c01983a8ee2f0589cf52e5 0.02873313LTC
2017-07-28T14:40:44Z 2440d14ba777ac204b332f2e2043f415cb0d10670b4ca4f4b38284d3c8bbf9ef 4.61365117LTC
2017-07-28T14:51:26Z baf74fe93ade6f9dc8a15a2e5b6ac5923bb9cd40877a493933ffc21384538f24 18.03466901LTC
2017-07-28T22:46:47Z c55c669edf7bcd2c6a334269f13d93a00e1d6785304af4e389376ccfc3503261 5.89897287LTC
2017-07-31T14:42:27Z 6743cb062ab904a050adc90933f0cc02e4188073a7ff3f0e552576431230dc84 10.79192514LTC

What are these 5 transactions?  Or more specifically: how do I identify my deposits in the blockchain so that I can reconcile them with my exchange account?

An old post, but why not.
1st, the example address is MDUsWPcdJ2onP9bU5xxzdygqL1R51aAvva. It has 31 total transactions:
https://longhorn.bullpay.com/?gateway=6&data=MDUsWPcdJ2onP9bU5xxzdygqL1R51aAvva
The first transaction is this one:
https://longhorn.bullpay.com/?gateway=6&data=b9ed3bbf129307b0a36fbb723e3a11d40959b4e109c01983a8ee2f0589cf52e5+
45 LTC was taken from the given address and bundled with 16 other inputs. 48 LTC was snet to LSd8c9iv8JuyFbi3ejEAdpqPcdRyhsiF4H and the remaining .02873313 LTC was returned to the MDU address.
What you are likely seeing here is change. To send that 48 from MDU it had to bundle together enough to cover the 48 along with the ~0.68 fee. The remainder was returned to MDU as change.
In your second example,
https://longhorn.bullpay.com/?gateway=6&data=2440d14ba777ac204b332f2e2043f415cb0d10670b4ca4f4b38284d3c8bbf9ef+
This transaction took multiple inputs from the MDU address along with a few others to cover what looks like the Lgam transaction of 10.7 LTC. This seems like a sloppy way of handling the inputs as the change resulted in more than one of the MDU inputs. Seems like juggling the inputs for no reason only to have it come back to the same address. Waste of gas in my opinion. The 3.09299- MDU input could have been dropped completely and this transaction would have still been fine.
I could go through the remainder but at this point i'd prefer more information.

Which exchange are you using?
What does the exchange say are you deposits/withdrawals (line by line)?
What is your actual exchange "deposit" address?

I'm not sure you want to tell me exactly what your wallet is, if it is indeed this one. Ultimately exchanges in most cases don't let you "own" your wallet. You don't have the private key to it, it's shared among many other accounts. You "own" the number next to "LTC" and they juggle everything else as they see fit.


text:
How to make hardfork?
I understand what is hardfork in theory. Hardfork happens, when the consensus algorithm changes (if I'm wrong, correct me please). Ok, with theory everything is clear, but what about technical side of this question? How exactly hardfork occurs, how exactly chain divides? Thank you for your answers

I think this is a confused question. You don't "make" a hardfork. It occurs whenever a group of participants within a cryptocurrency intentionally or unintentionally end up enforcing separate rules, resulting in two currencies.

A new version of the software is implemented, which uses the new rules. The old software will see the new transactions/blocks generated by this new software as invalid after the fork date, while new software will accept it, so the old software and new software will disagree on the longest valid blockchain, creating a hard fork.

Thanks for your answer. So, to create new coin, I just need to clone bitcoin repo from github, after change something there, create new software client, which will work only with my chain and start it?

Or, I don't need to clone repository, I just need to create new software client with new rules and send a transaction to Bitcoin main chain, blockchain will understand, that this is not correct and create hard fork?

@TheWorldNode You also need to 1) choose a different network magic, 2) add replay protection if you want to create a hard fork the proper way.

@MCCCS Mmm, ok, replay protection I understood, but what is network magic?

Nodes connect to other nodes with the same network magic.


text:
Running Bitcoind on Windows 10
I'm getting the following error running bitcoind (latest stable, v0.16.0) on Windows 10 Pro x64:
C:\Program Files\Bitcoin\daemon>.\bitcoind.exe -daemon
Error: -daemon is not supported on this operating system

Anyone know why? According to the official docs it should run on Windows 10.
It's also mentioned here but no answer.

Possible duplicate of Windows 7 : Unable to start bitcoin server using daemon in regtest : bitcoind -regtest -daemon

Just like it says: -daemon is not supported on Windows.  The bitcoin.org instructions are wrong to suggest it.  I have opened an issue.

I understand the error - the docs are blatantly incorrect on indicating it is.


text:
What are the three values in the csv graph of price history?
I wanted to look up the price history of bitcoin on different exchanges (in order to compare them in one graph) and I found this site with the data organized in csv type files. What do the three values correspond to?
For example in coinbase BTC/EUR the first few lines are

1429753354,300.000000000000,0.010000000000
  1429766376,200.000000000000,0.010000000000
  1429831674,220.000000000000,0.010000000000
  1429841387,220.000000000000,0.010000000000
  1430156722,205.270000000000,0.035300000000
  1430156722,205.270000000000,0.064700000000
  1430156880,205.330000000000,0.100000000000
  1430159153,205.340000000000,0.010000000000
  1430177802,209.470000000000,0.014260000000
  1430192991,209.190000000000,0.022200000000
  1430192991,209.110000000000,0.048500000000
  1430192991,209.100000000000,0.029300000000
  1430193080,209.530000000000,0.099000000000
  1430220205,209.030000000000,0.100000000000
  1430252864,204.480000000000,0.010000000000
  1430261840,204.900000000000,0.356800000000
  1430261840,204.870000000000,0.167600000000
  1430261840,204.670000000000,0.156200000000
  1430261840,204.660000000000,0.979400000000
  1430263167,205.490000000000,0.010000000000

Unix Time, Price, Amount of Value in the Order Book at Corresponding price.
So the first line in your example translates to Thursday, April 23, 2015 GMT time, there was an order for 0.01 bitcoins at the price of $300.


text:
bitcoin addresses in one wallet
How do explorers like https://www.walletexplorer.com/ recognize all addresses in one wallet? What is the relationship between addresses in wallet?


text:
multiple input and output addresses in bitcoin transactions
I was checking transactions in blockchain.info. I have some questions about transaction information about input and output addresses.
block address:
https://blockchain.info/address/1NHv6qBxu6haWj8rqeLqw9eyJqm4JT26R6

why some of transactions have one input and one output? They don't have any change transaction?
If any transaction has two output, the second one is change transaction?
can we see fee transactions in output address?
Are multiple addresses in input part related to each address in wallet that has bitcoin?

and one more question about transaction scripts:
what is input and output script? do wallets produce them? how we can use them?

I'm new in bitcoin and I appreciate your clear explanations...

why some of transactions have one input and one output?

A bitcoin transaction can have many inputs and many outputs. Bitcoin has a transaction oriented logic, where amounts are transferred from previous transactions. As an example (neglecting the fees): to be able to spend 1 bitcoin, when the  wallet has 2 previous tx with amounts of 0.5 BTC, then a new tx is created with two inputs. Same logic would apply, if 4 previous tx existed, each @0.25 BTC. Then a tx with 4 inputs would be created.
For the outputs: you can create tx with one or more outputs. E.g. faucets pay to many outputs, instead of creating single transactions - this saves on the fees.

They don't have any change transaction?

If you are not the owner of a wallet, you cannot know, which is the "change". Normally you have an output address, and a return address (for the change, like in the second example of the screen shot). The transactions move from one pubkey to another pubkey address, and there we cannot see, which addresses belongs to the user's wallet, and which might be the change address. With this said, there are some activities to try to link addresses to real users. They create diagrams, and try to see the flow of tx, and derive the information. But when using addresses only once, you wouldn't loose your privacy...

If any transaction has two output, the second one is change
  transaction?

not necessarily. I can send a transaction with 0.5 BTC to my brother, and 0.5 BTC to my sister. So there would be no change address.

can we see fee transactions in output address?

hmm, no... Transaction fee is the difference between summary of input values and summary of output values. A usual case: you have one BTC, you send 0.5 to your brother, you send to your change address 0.4995, and the diff is the fees, which go to the miners.

Are multiple addresses in input part related to each address in wallet
  that has bitcoin?

Not necessarily. The bitcoin network doesn't know about wallets, and its belonging addresses - this is a layer to make it more comfortable for the endusers. The bitcoin network works with transactions, moving funds from address(es) to address(es). No wallet information is included. So multiple input parts can belong to different wallets.
A good overview of transactions is here, and of course in Andreas' book "Mastering Bitcoin", which is also online available.

thanks for your useful and complete answer. Would you please explain transaction scripts too?

There is a special tag [script] in the forum here, which has many related questions. E.g.here: https://bitcoin.stackexchange.com/questions/69062/why-does-bitcoin-uses-a-script-language/69077#69077 or here: https://bitcoin.stackexchange.com/questions/69062/why-does-bitcoin-uses-a-script-language/69077#69077. have a Look, search a bit in the forum, and feel free to raise your next question as a separate thread. It might also be interesting for other readers!


text:
How do I get rid of My so called bitcoin account
I was recently contacted by Brian from Bitcoin telling me I have registered but I did not. How do I delete the account and for them to stop phoning me

What account, where? It is likely a scam. The answer by Meni Rosenfeld is probably good advice.

There is no such thing. Either you misunderstood this person, or he was lying.
Bitcoin is a decentralized digital currency. It is not a company with representatives that contact you or that you can have an account with.
There are companies that provide Bitcoin-related services and you may have registered with one, but based on your description this is not likely the case.
Probably you are the target of some form of scam. Scams have existed long before Bitcoin, and it's quite common that scammers call people and ask for their money under all kinds of false pretenses. The fact that this particular scammer has chosen to specify "Bitcoin" as a pretense alters nothing.
If this persists, contacting your local law enforcement could be prudent.


text:
agregate bitcoin addresses with tiny amounts into single wallet
I've got a dozen of addresses (+private keys) with very small amounts on them (0.001 to 0.01 btc). I found many hints and suggestion like this one but I cannot realize how to implement this.
Can anybody tell which way I can aggregate those addresses in order to send their total to an exchange?

The only way to "aggregate addresses" is to create a Bitcoin transaction which spends all of the coins from those addresses to another one. Of course if you just want to send to an exchange, just send all of your coins to an exchange as aggregating will incur an additional transaction and thus transaction fees. Most wallets have some function which allows you to send all of your coins, so just use that to create a transaction which sends all of your coins to the exchange.


text:
Can a node exit the bitcoin network and return to his address and transactions?
I have read in Wikipedia that "Messages are broadcast on a best effort basis, and nodes can leave and rejoin the network at will " in bitcoin network. what does it mean that a node can leave the network-what will happend to its transactions? Can he get back to the same address and claim his transactions again (its bitcoin)?
thank you

Transactions are not directly sent to the node that holds the private keys for the addresses involving it. Rather transactions are broadcast to all nodes on the network and then recorded on the blockchain. When a node rejoins the network, it downloads and verifies the blockchain from its peers. When it does that, it scans the blockchain for transactions that pertain to it.
The process of receiving is completely passive; there is no direct sending to the receiver (the sender does not have that information) nor is there a claiming process.

will the node which rejoined the network  return to its previous private key and public key/address?

If by "return to" you mean that a node will have the same private keys and addresses, then yes. Private keys and their associated addresses are not assigned by anyone; instead a wallet generates locally the private keys that it uses. Furthermore private keys and addresses do not need to be registered anywhere in order to be used. So when a node goes offline, it holds onto its private keys because it generated them and stores them locally.


text:
What will happend when a certain node is not connected to full node?
what will happen when there are some full nodes in the network which are not connected to one client-how can he get new blocks updates?
thank you

can he get new blocks updates?

no. you can test this case. just run your daemon with the parameters -connect=127.0.0.1 -listen=0 and you would not get new blocks

Information in Bitcoin is chiefly relayed by a peer-to-peer gossip protocol between the participating nodes.
Generally, transactions are submitted to the network by the sender's node or via any service that has an open API to allow transaction submission. There's on-going work on a proposal to obfuscate the original source of a transaction in a proposal by the name of "Dandelion".
On the other hand, new blocks originate from the authoring miner and are quickly disseminated via dedicated relay networks such as FIBRE, and in parallel relayed via the regular peer-to-peer network.
The latest blockchain data is also broadcast via satellite.
Lastly, nodes can be initially synced up to the network by receiving the blockchain data by means of a conventional hard drive. Only the very latest information would then need to be acquired from the network.
In short, if your node is not connected to any other peers or the satellite broadcast, it will not keep up with the network as it has no means to receive the latest information.


text:
What happend with BCH SV and BCH ABC
I hope I ask in the right place. Since both are have same source. So, what's going on with BCH? Why before the hard fork the price is sky rocketing but after the fork. It sink like a sinking boat?

Price discussions are off topic for this site, please see https://bitcoin.stackexchange.com/help/on-topic

Looks like ABC win this rally. ABC have more hash power and more supporters.

I like this approach to explain:

BTC = real Bitcoin
BTCC = real fake
Bitcoin BCH = fake fake Bitcoin
BCHSV = real (?) fake fake Bitcoin
BCHABC = fake (?) fake fake Bitcoin

https://twitter.com/FedericoTenga/status/1063430370308354048

OK,  but how does the relative fortunes of the real fake fake vs the fake fake fake cause the price of the fake fake to sink like a sinking sink? Isn't that what the question was asking?

can you elaborate your answer. I still don't get it. Thanks.

Before hard fork the price is usually rising because people hope to get 2 coin in different network instead of one. We saw it before creation of Ethereum's DAO fork in July 2016 (Ethereum Classic story), Bitcoin Cash and some others. After hard fork people choose strongest network (much support of developers and services, more hashrate), which leads to dump the price.

The behavior formula is simple = You get some kind of entity > You wait until this entity clones itself and and sell the one (or both) you consider unnecessary in the hope of exceeding the initial investment > Possible but not guaranteed profit. I think there is no Bitcoin ABC in future, because the winner keeps the original ticker symbol. For example Kraken and Huobi already assign BCH ticker to Bitcoin Cash ABC.


text:
IPAD lost with Ripple wallet
Lost my Ipad with Toast ripple wallet. I have wallet address, recovery keys and phrase. Can I create a new wallet and send the coins from old to new?

You don't need to send the coins anywhere. Just recreate the old wallet with the recovery phrase.
Digital assets aren't literally in wallets. Wallets just hold the keys necessary to access to assets.

David, does ripple still use the secp256k1 curve, I heard that there were plans to change it? Ripple uses an account based model, so you would also not suggest using BIP32 with it right?

You can use secp256k1 keys if you want. You can also use Ed25519 keys. It may be wise to move the funds (or re-key the account) if you're worried about someone extracting the keys from the lost device. You can use deterministic key generation schemes if you wish.


text:
My coin - Proof-of-Action
I am writing a project on cryptocurrencies. As a part of this project, I thought of a new token for web services exchange. I tried to combine PoW and PoS and here is what I have. I called it Proof-of-Action - it works like Proof of Stake only it depends on a node's activity coefficient rather than how much money you have.
A server/ full node, just like a bitcoin: receives transaction messages, validates them, broadcasts them to the other full nodes to validate, and calculates its own and other full node's it knows activity record.
Then full node selects the best candidate it knows and shares with other full nodes. Once all the nodes agree on the candidate, that node will be able to create a block from transactions it received and mine it. The miner will get a reward. Once the block has been broadcast and added to the chain, the candidate's activity record resets and it gets the reward.
I wanted to make sure that new users have as much chance as the old ones and it should not matter how much money they have. Thus, the activity record should depend on: how many light-weight wallets the node is connected to, how many transactions the full node received from these wallets, how many hr it participates...
I thought in this case, it ensures more or less fair distribution of money and does not waste a lot of energy - no hardware for miners, plus, there is no need for transaction fees (until all the money has been released).
Thank you for reading this long text and please tell me what you think. Do you think it could work at least for a small network? Do you see any big flaws associated with it right away?

 Once all the nodes agree on the candidate

If you already have a way to achieve that, you don't need a blockchain at all. Just run the same algorithm to get all nodes to agree on which of two conflicting but otherwise valid transactions to accept.
If you don't, then perhaps you haven't solved anything.

Before all the nodes can agree on a candidate, they must first agree on who all the nodes are, otherwise there's no way to know when or whether they've all agreed. And you may have malicious nodes that might just refuse to agree.


text:
What happens to a node if .bitcoin/chainstate is corrupted?
I tried to search for answers to my questions, but didn't find any, but please forgive me if this is a duplicate question.
Suppose somehow .bitcoin/chainstate gets corrupted, e.g., a UTXO is deleted. I suppose that this node will then try to reject any blocks that contains a transaction that tries to use the deleted UTXO?
Or will the node somehow detect that its chainstate has been corrupted, and rescan the blockchain? If this is the case, how would the node detect this?
Finally, suppose all of the node's chainstate was corrupted in exactly the same way, a UTXO was deleted. Then is this UTXO effectively gone, even though it remains in the blockchain.
Thank you.

I found an answer by Pieter Wuille to another question that seems to be relevant here. The relevant part states:

"Please don't go download a chainstate from a random place on the Internet though. They can introduce arbitrarily many coins assigned to themselves, and your client would accept them. If many people started running nodes using the same chainstate 'copy' such transactions could even get into blocks, and cause forks in the best case, and theft in the worst case."

So, this seems to indicate that a node will simply not realize that its chainstate is modified.

That's correct. A consistency check is done at startup comparing the UTXO with the last few blocks, but if the corruption occurs in a UTXO that was not touched by those blocks, you're out of luck.

@PieterWuille Thank you for the confirmation!

@PieterWuille I assume the chain state does include a checksum as part of the consistency check, which would basically detect any accidental corruption?

@Jannes It's a LevelDB database, which has checksums internally.


text:
Explanation of probability of forks in the Bitcoin blockchain
I am reading this paper on how information is propagated on the Bitcoin network. The authors present a model to predict the rate at which forks occur in the blockchain which is given as below

Here, F is the number of conflicting blocks in the network, Pb is the probability of the network finding a block b in a given second (ideally, 1/600 since a block is expected every 10 mins = 600 secs) and f(t) represents the ratio of nodes that hear about the block b in t secs. However, what I cannot understand is how this entire expression is derived. I understand that the term in the exponent represents the mean amount of time it takes for the network to learn about a block (and this value can be derived from a graph given in the paper). I assume 1 - Pb represents the probability of the network finding more blocks in the remaining 599 seconds in the 10-minute interval. Why is this probability raised to the mean amount of time it takes for the network to learn about a block?
Any explanation would be appreciated.

I haven't read the paper, and I think the expression is only an approximation, but the basic idea is that this is an inhomogeneous Poisson process.
In order for a fork to occur, some unaware node needs to find a block. This is 1 minus the probability that no unaware node will ever find a block. Which itself means that no unaware node finds a block in 1st second, no unaware node find a block in 2nd second, etc. This probability is the product of the probabilities of the individual seconds (since they are all independent).
Each individual probability is roughly (1-P_b)^(1-f(t)) (if f(t)=0 then all nodes are unaware and the probability is the same as no block being found at all a block at all, if f(t)=1 then all nodes are aware and certainly no block will be found by an unaware node, and in between it interpolates. If it's not clear why the interpolation is via a power, keep in mind that for small P_b, the power is irrelevant since the expression is roughly 1-P_b*(1-f(t)).
The combined probability, as mentioned, is the product of probabilities, which is like (1-P_b) to the power of a sum of (1-f(t)), which is like (1-P_b) to the power of an integral.
If it was up to me I would have written the expression differently, but these are the general ideas.

That makes a lot of sense now given that the process of finding blocks is independent. In your answer, do you mean to write the exponential term with the integral, as in the original expression? (I know there's no support for MathJax on here unlike MSE; just making sure).

@an4s: Actually, there's a paragraph I simply forgot to write which addresses the integral. Added it now. An integral is like a sum, and (1-P_b) to the power of a sum is like a product of terms, each of which is (1-P_b) raised to some power.
This was a bit handwavy but may make more sense by reading up on exponential distribution, Poisson process so on. And I'll mention again that to me the expression seems only approximate, (1-P_b) should be replaced with exp(-P_b) where P_b is the block finding rate.


text:
Is there a testnet version of data.ripple.com -- the Ripple Data API v2?
I am looking for a testnet version of data.ripple.com -- the Ripple Data API v2. Does anyone know if there is such a thing?
Thank you!

At https://medium.com/interledger-blog/sending-out-of-the-interledger-network-9f42c1217c72 there was a link to https://testnet.data.api.ripple.com/v2/ which seems to be what I was looking for.


text:
What is Sentinel Chain? Is it a cryptocurrency scam?
What is Sentinel Chain? Is it a cryptocurrency scam?
Can somebody help me? Thx!!!

Why the downvote?

Update August 2020 - the URL in the question no longer exists. A different URL for sentinel chain has "latest news" etc dating from mid 2019. Whether or not it was a scam, it doesn't seem to have been wildly successful.

It looks to me like any other of those exchange like sites. That does not necessarily make it a scam.


text:
Can one tell which way the market goes from sell and buy orders?
Among other open access (i.e. public) data available in exchange API's are the open order books. They are given on exchange websites sorted by coin value. Is there a way to tell which way the market is going, as in up or down for a given pair, from sell and buy order books?
If the only way is by taking two snapshots of these data, would that be a good way to do it, or is there a better way, using public API's?

Market direction, as with any direction, only applies when you have more than a single data point.
So, the value of the trade at t-1 compared to the value of the trade at t can tell you if the market moved "up" or "down".  The value of t, by itself can only ever tell you the value of t.  There is no way to determine direction or velocity from a single point value.
If an individual API provides direction, then you could use that; however that is up to the individual API to provide.

All you're seeing in the order book are offers to trade at specific prices. There's no commitment there; they can be easily added or removed at a moment's notice. That leaves the order book as a very weak and gameable indication of future market price movement.


text:
Merkle root Vs transaction hashes
It is not clear to me, why not we can simply store transaction hashes in a block header instead of storing the Merkle root. I understand that storing transactions' hashes will slightly increase size of a block header. However, the transaction verification process will be greatly simplified as one does not have to compute Merkle tree. In that case, one can verify a transaction by simply searching that transaction hash in the header.
Noman Aslam

Storing the hash of every transaction in the block header could make the block header much larger than it currently is. Right now the whole header is 80 bytes, and the tx merkle root is 32 bytes of that. You can hash any number of transactions into a 32 byte merkle root, so it works very well as a cryptographically secure compression technique.
I can think of a few effects of larger block headers:

SPV wallets would be more resource intensive to run, they would require much more storage and bandwidth. I think computing the merkle branch is probably rarely the hardware bottleneck to be considered when designing wallets.
Miners would be incentivized to mine small blocks. This is because a larger blockheader would mean a larger input value for the SHA-256 hash function, so it would take longer to compute the hash. This is important: the fastest block hash a miner could compute would be one with no transactions in it (other than the coinbase).
You would be able to fit less transactions in a block, since more of the blockspace would be used by the header. A good implementation would not change the number of transactions you could fit in a block, see Pieter's comments below.

There are probably more, feel free to expand on this list.

The last argument does not hold. Just because the block header contains all txids does not make every store all of them. That's similar to how the Merkle tree itself is not stored anywhere, but implied by the transactions.

@PieterWuille I'm not sure I follow. At the most basic evel: if the max block weight remains the same, and including txids instead of a merkle root makes the header larger, then that leaves less space in the body for transactions, no? I interpreted OPs question as 'why not just a naive implementation that lists all txids in a row'

They could be part of the block header without storing them (in any situation where you're already storing the transactions too). We could do the same right now with just the root (as it too is implied by the transactiins), but for just 32 bytes it's not really worth it.

I understand, thanks. I edited the answer to be more accurate.

I understand that storing transactions' hashes will slightly increase size of a block header.

That's an understatement. According to this answer, the minimum transaction size is 60 bytes. A block full of these would make the txhash part of the block header 560kb instead of 32 bytes it currently is.

Just to clarify, I am talking about hashes of transactions to store in the header instead of whole transaction. In case a block has 2000 transactions (usually is kind of average these days)  then the block size will increase to 32*2000 = 64 KB when SHA-256 is used to compute hash. Hence it is no way near 560KB.

if the transaction is 60 bytes long (minimum size) then a block can fit 17476 transactions. Each txid is 32 bytes so 17476 * 32 bytes = 560kb


text:
Changed Merkle Root and Genesis Hash - Not Compiling
I am kindly asking the expert programmers of this wonderful forum to enlighten me on why the updated QT I have created, does not properly open when running ./stonecoin-qt , but rather dumps core and shows the incorrect genesis block for the -testnet flag
after updating all the parameters in the github repo below

https://github.com/advantage-project/stonedfork
./autogen.sh && ./configure && make

I have updated all the information inside the chainparams.cpp (public keys, magic bytes, spork keys, genesis, merkle, everything) and successfully recompiled to update and reflect the changes I have made
however when I attempt to run either the daemon or qt mainnet or -testnet it fails to properly open and instead aborts and dumps the core, however when I leave the original details in, it opens perfectly fine.
What do I need to do after changing the merkle and genesis in the src to successfully run the QT GUI or daemon without crashing?

**(also, when I run the ./stonecoin-qt -testnet , it shows the main net genesis hash, rather than the testnet genesis hash, which is different)
Thank you :)

Do you have all of the checkpoint blocks that are referenced within the source for the coin you are cloning commented out or removed?
I had a similar problem my first go at cloning a coin with it's own blockchain.
Also, what did you use to generate your genesis hash? What software/parameters.
I can recommend a piece of software if the problem lies within the parameters that make up your genesis block.
Also, the Assert error your receiving is due to the genesis hash for your testnet parameters not being valid for the rest of the genesis hash input values. I would double check under testnet in chainparams.cpp and make sure that ALL the values (nonce, timestamp, pzTimestamp, genesis reward, bits) are correct for the given genesis hash.

Can you please recommend which software you used for generating the genesis block

What hashing algorithm are you using? Also, can you provide a snippet from your main.cpp or chainparams.cpp, because depending on how it is structured you may be able to write in a chunk of code that can find the hash for you.


text:
Am I protected?
I've been asked to pay for a purchase in Bitcoin. Why would someone use this method instead of say Paypal and as a consumer am I protected in any way?
I have never used Bitcoin or looked into it so I'm completely new to how this works.

bitcoin is an invention to ensure merchant protection, so any consumer protection method involving it will be riskier/expensive than using paypal. If you want consumer protection, skip bitcoin, but remember a payee today is a payer tomorrow.

Why would someone use this method instead of say Paypal and as a consumer am I protected in any way?

Bitcoin provides protection in different ways, it can be used to pay for goods and services, but the nature of the payment system is quite different than something like Paypal.
With Paypal, the system is run by a centralized party (Paypal). This means Paypal can function as the arbitrator of any disputes, which is how they provide consumer protections. If a seller rips you off, you can open a dispute, and Paypal may decide to simply revoke the funds from the seller, and return them to you. As a user, you must trust that Paypal will act fairly on all accounts, and not restrict access to your money in any way.
Bitcoin is different: the system is decentralized, meaning there is no central party that can make changes to the state of the system arbitrarily. Once a transfer of bitcoins has been confirmed, the only way those bitcoins can ever be moved again is if the owner of the private key for that address signs a transaction to move them.
This means if you send your bitcoins to someone in exchange for some goods, and they rip you off somehow, there is no way you can appeal to a figure of authority to have your bitcoins returned to you. The only person who could authorize a return transaction would be the person that you sent the coins to.
This also means that you don't have to trust anyone to uphold your financial sovereignty. For many Paypal users, this is probably not an issue, since they use Paypal for 'regular things'. But for many others, use of Paypal may be restricted for political reasons, or because the sorts of transactions they do aren't allowed by Paypal's policies. For those users, a guarantee of financial sovereignty is very important!
As mentioned by others, if you are going to buy goods using Bitcoin, you should be diligent:

Do what you can to ensure the seller is legit. Does their website look legit? Does it include contact info for a legit business? Can you find many independent reviews of their business online?
Consider making your first purchase a small one, so you can build some trust that the business will deliver as advertised for a larger purchase.
Use an escrow service to complete the transaction. This essentially offloads the arbitration duty of Paypal to a neutral third party within the bitcoin ecosystem.

It is perhaps worth mentioning that while bitcoin can function as an online payment system, that is by no means the full extent of it's usefulness. Put differently, bitcoin's utility is not simply in being a 'Paypal 2.0', it is useful because it can do things that no other monetary instrument can. Bitcoin is a permission-less, censorship-resistant, decentralized, borderless, programmable system of value. What the implications of this are is a debate that is still unfolding.

Bitcoin is not considered a currency by most countries. Additionally, is no central authority who can mediate and reverse transactions if you are scammed.
While paying people with bitcoin or any cryptocurrency is definitely possible, and does happen, you should take steps to ensure that you are not getting scammed.
Make sure you know who you are transacting with. If possible, take delivery of the goods/service before completing the payment. If that's not an option, use an escrow service.

I've been asked to pay for a purchase in Bitcoin ... I have never used Bitcoin or looked into it so I'm completely new to how this works.

Do not rush into this. Understanding how bitcoin works takes a little study time. It does not work anything like other methods of payment that you are used to. If you rush into it, you may make costly mistakes.

Why would someone use this method instead of say Paypal

There are a variety of possible reasons, including:

The recipient may wish to remain anonymous and untraceable.
The recipient may want the payment to be irreversible.
The transaction fees may be lower.

and as a consumer am I protected in any way?

You are not protected in any of the ways you may be familiar with.
When you make a credit-card payment, if you accidentally pay the wrong person or the recipient does not provide the goods you purchased, you can report this to the credit-card company and they will reverse the payment. With bitcoin, only the recipient can make a repayment, there is no intermediary with the power to intercede.
If you lose your credit card, the company will issue you a new one. If you forget the PIN, the company will issue you a new card with a new PIN
None of the above apply to bitcoin, you have to make sure you know how to recover if you lose a "wallet" or if you forget a pass phrase. You cannot rely on other people doing these things for you.
The protections claimed for crypto-currencies include

protection from acts of governments (e.g. devaluing a currency)
anonymity

These are important to some people but may not be the kinds of consumer protection you had in mind.


text:
How does a new node get all the previous blocks in a blockchain?
From what I understand, when a new full node is started, it begins by fetching all the previous blocks in the blockchain from it's peers.
I want to know how exactly it does that? Does it ask for a local copy of the blockchain from other peers and save it? In case multiple peers have different chains, how does it resolve?

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.


text:
Does bitcoin core node relay those child-pay-for-parent transactions?
I am trying to understand how the relay mechanism works in bitcoin?
I understand how CPFP transaction works, but how those transactions get relayed to miner nodes in the first place? the reason is that some inputs of those transactions are not in UTXO. Should standard nodes discard it in the first place?

(updated based on Pieter's comments below)
There are (essentially) two sets of UTXOs at play. One is constructed from the blockchain itself, by reading the blocks on disk and updating with any new blocks that are broadcasted. This set is saved to disk, and can be reconstructed from the blockchain data if erased.
Another UTXO set is the mempool itself. Each output in the mempool is considered a valid UTXO, unless it is already spent by another mempool tx. Moreover, any outputs consumed by mempool transactions from confirmed transactions are considered spent in the other UTXO set. This mempool UTXO set is not saved to disk, and only exists when there are transactions in the mempool, while the node is running.
You can see existing CPFP transactions by calling getrawmempool with the verbose option. This produces a json array in which you can see if an unconfirmed tx depends on an existing unconfirmed tx:
...
"fdb9bed320457e8ff606bdf1e4a6fa980bc65d9ad8525e75abba30af1363ef8e": {
    "size": 256,
    "fee": 0.00001923,
    "modifiedfee": 0.00001923,
    "time": 1527988568,
    "height": 525693,
    "descendantcount": 1,
    "descendantsize": 256,
    "descendantfees": 1923,
    "ancestorcount": 4,
    "ancestorsize": 964,
    "ancestorfees": 7212,
    "depends": [
      "4b2541774140a6afe58606f8a97cca9d1aef0dff5f769ee1dcdcb834b50aeb97"
    ]
},
...

Small clarification: saying "the UTXO" is confusing, as there are multiple explicit and implicit UTXO sets in Bitcoin Core. Unconfirmed transactions do not affect the on-disk or cached chainstate UTXO set, but there is a separate UTXO set implied by the blockchain+all mempool transactions (which is not even materialized; it is just implied by the mempool).

@PieterWuille I didn't know that, thanks for the insight. I've update the answer to hopefully better reflect what's going on

(very much a nit) It's not "updated with any mempool transactions". It is the mempool. Every output of a mempool transaction that isn't spent by another mempool transaction is seen as an extra available UTXO for verifying incoming transaction. Every blockchain UTXO spent by a mempool transaction is seen as not available. There is no explicit data structure for this UTXO set; it's just defined conceptually by the mempool itself.

Made another edit, hopefully this one is better!


text:
Is this a genuine bitcoin minning app?

Please can someone explain if this is a  genuine app for bitcoin mining?

Almost certainly not.

No, a mobile device cannot mine bitcoin.
These days, mining bitcoin requires specialized computer hardware called ASICs. They are loud and hot, and incredibly efficient at computing the SHA256 mining algorithm. A mobile device is not like this at all, it is not optimized to compute SHA256, it is meant to be a general-purpose device. Trying to mine bitcoin using a mobile device would be a literal waste of money (electricity), and you would receive no bitcoin in return, because your device would not contribute a meaningful amount of hashpower to the network.
The app is likely malicious, I would remove it from your device.


text:
Does running a full node make rpc calls faster?
Hello I am running a pruning node on my VPS, and some of the RPC calls such as get balance take minutes to load. I need to check the balance every time the users access the website. I was wondering if running a full node would make these RPC calls faster.
The time command shows that bitcoin-cli is taking long due to I/O operations. What could I do?
~$time bitcoin-cli getbalance profit
0.00000000
real    6m16.762s
user    0m0.000s
sys     0m0.000s

You're already running a full node. Pruning does not affect RPC speed.

This has nothing to do with pruning.  RPC calls like getbalance only use data stored in the wallet and/or UTXO database.  They don't have any need to refer to the archive of old blocks, and having it available wouldn't help anything.
VPSs often don't have a lot of RAM, and bitcoind in its default configuration needs a lot - say a gigabyte or more.  Is it possible that you're short on physical memory and therefore having to swap?  This can make a system very slow.  You can reduce bitcoind's memory usage somewhat with different options (see How to run bitcoind in a low memory environment) but you may also have to configure your VPS with more memory (and pay more).
Another possibility is that your server is overloaded with other tasks.
Either way, running top will probably reveal something.


text:
Specification of REST .bin format?
I'm currently using the JSON Rest API to get lots of transaction data from bitcoin. Unfortunately thats quite slow. I know there is also a binary format (see Unauthenticated REST Interface), but I couldn't find any description of the bin format. Is there any description of that format available?

For transactions? https://en.bitcoin.it/wiki/Protocol_documentation#tx
This is the internal format, for communication between Bitcoin nodes. As such this won't be as useful as the JSON format, since you will need to parse it on your own.
This is also equivalent to calling the RPC decoderawtransaction with tx received in the hex format.

Thanks, that's exactly what I was looking for. I need to parse blocks, I don't mind decoding the binary data.