Solar Flare wipes all hard drives... What happens? Imagine, for a moment, that a massive solar flare wipes out all hard drives on planet Earth.  All hard drives are wiped clean and with them all records of the Bitcoin blockchain.

Would we be able to recover?  Is there some alternate backup of the blockchain?  Do we hope that at least one computer is protected beneath ground?

I assume everyone's personal wallets would be lost unless they used paper wallets.  Certainly a big blow to the Bitcoin community.

All hard drives are wiped clean and with them all records of the Bitcoin blockchain.
Would we be able to recover?

Recover what? You stated all hard drives are wiped clean, so obviously we would not have a backup to recover the network from.

Is there some alternate backup of the blockchain?

Perhaps someone has printed the blockchain out onto paper. In an event like the one you've described, we should hope that there are many copies of this paper format blockchain, so that we don't have to trust that one person to have provided us with a copy of the blockchain history.

Do we hope that at least one computer is protected beneath ground?

If there was, then your premise of all hard drives being destroyed would be violated. Same as above, we should hope for many independent copies to surface, stored underground (or whatever) all around the world.

I assume everyone's personal wallets would be lost unless they used paper wallets.

Even if you used a paper wallet, if every record of the blockchain history was destroyed, your paper wallet would be useless. A paper wallet simply holds the private key capable of spending the bitcoin stored at it's corresponding address. If the blockchain record were lost completely, there would be no network to agree upon how much bitcoin is stored at that address. So a paper wallet that held 100 BTC before the catastrophe would be no different than one that held 0 BTC. With no blockchain to make a claim against, they would both be effectively worth 0 BTC.

Certainly a big blow to the Bitcoin community.

Sure, but any event catastrophic enough to knock the bitcoin blockchain out would be devastating FAR beyond that. Bitcoin is highly distributed, to destroy it would take an event of unbelievable magnitude. While I believe Bitcoin is important, there are many other systems more critical to our everyday life that would be affected also.


Extended keys and signing TX I have couple of keys of path  m/0/0

TPriv- Extended private key (pvt key+chain code)

TPub- Extended public key (public key+chain code)

Now I generate an address of of the TPub key and revived funds

Question -
To spend the funds how do I sign them I mean do I sign them using the TPriv key or I need to derive a private key from the TPriv key ?

Or can I remove the chain code from TPriv and then sign

Question - To spend the funds how do I sign them I mean do I sign them using the TPriv key or I need to derive a private key from the TPriv key ?

To spend the UTXO of a child address (derived from either your xpub or xpriv), you will need to use the xpriv key to derive the child private key that is related to that address. The child private key will be used to sign the transaction, the parent private key cannot sign for child UTXOs (with or without the chaincode).


Can I use same bitcoin address for Mt.Gox deposit multiple times? They say they will generate new address for each deposit. If I want to split my bitcoin transaction in multiple parts but send one after another, can I use the same address more often?

Of course you can. The reason for using different address every time is:

to provide you more anonymity. It will be harder for people to
associate your with your other addresses (but not impossible)

But if you need to make many transactions, it might be a little bit tedious. So it is up to you to decide what exactly do you want.


Where can one convert their bitcoins to Liquid LBTC bitcoins on Blockstreams Liquid Network? Is there a place where one can convert their Bitcoin to Liquid BTC? Which exchanges? Is there even a mobile wallet that supports it if one wants to withdraw it?

According to the documentation, anyone running a Liquid node can generate and fund a peg-in transaction. And anyone can run a Liquid node.

You'll need a participant, which can be an exchange, to peg-out and exchange your L-BTC for BTC though.

The peg-in is explained in more details here.


Equation for mining profit I'm a newbie.

What is the basic equation for computing profit from mining given gigahash per second of the miner, timeframe, miner costs, and current bitcoin economy stats like mining difficulty and dollars per coin?

And what are some URLs that have these stats always up to date?

I'm looking for the equation, not an online calculator.

The average amount of time (in seconds) to find a single share is:

difficulty * 2^32 / hashrate

In that equation, difficulty is the difficulty of a share and hashrate is your hash rate in hashes per second.  A day has 86,400 seconds in it, so the number of shares you'll find in 24 hours is:

86,400 / (difficulty * 2^32 / hashrate)

A slightly more complex formula, using PHP:

$hashTime = ((float) $difficulty) * (pow(2.0, 32) / ($hashRate * 1000.0)) ;
$powerCostPerYear = 365.25 * 24.0 * $powerConsumption / 1000.0 * $electricityRate;
$blocksPerYear =  (365.25 * 24.0 * 3600.0) / $hashTime ;
$coinsPerYear = $blockCoins * $blocksPerYear;
$revenuePerYear = $coinsPerYear * $conversionRate;
$profitPerYear = $revenuePerYear - $powerCostPerYear;
$netProfit1st = $revenuePerYear - $costHardware - $powerCostPerYear;
if ($profitPerYear <= 0) $breakEvenTime = -1;
else $breakEvenTime = $costHardware / ($profitPerYear / (365.25 * 24.0 * 3600.0));


How to safely shutdown bitcoind ? Surprised this one hasn't been asked yet.

But how / what is the recommended best practice for shutting down bitcoind ?

Right now I'm manually killing the process with either sudo kill {pid} or if this is failing (like just now) using sudo pkill -9 -f bitcoind

I'm not sure if bitcoind stop still works as RPC with newer releases, since somewhere in help sections it says RPC funcionality removed from bitcoind.

Try bitcoin-cli stop.


How would I go about exploring Bitcoin's entire block chain? I'm trying to wrap my head around bitcoin/blockchain and from what I understand, every transaction that has taken place in bitcoin is placed into a block and after this block is validated it is added to the block chain in chronological order.

Is there some place that I could go to look at the first block of transactions for bitcoin?  Or any random block of transactions?

If anything I have said above indicates that I have misunderstood some part of the process - please don't hesitate to correct me.

The easiest way to look at the transactions in any arbitrary block would be with a block explorer.

As of the instant I'm answering this question, the newest block is block #456238, so you can peek at any block by creating an address for a web block explorer as follows (Blockchain.info for illustrative purposes):

https://blockchain.info/block-height/0

https://blockchain.info/block-height/456238


How the first succesful miner is ensured his reward With my still rather limited knowledge of bitcoin, I was wondering how the correct origin of proof of work is ensured. Specifically, when a miner successful computes a valid hash and is to broadcast this to others, how can he be sure that others do not alter the block now that they know the hash, rewarding themselves instead of the original successful miner?

By definition, by altering the block, the hash would have to be altered too. Thus the hash ensures the block can't be tampered with, and the miner safely receives his reward.

To modify the block, the attacker would have to recompute a new valid hash within the difficulty, i.e. mine the block again after the original miner, which would clearly not be part of the main chain by that point and thus basically ignored.


Simple GPU C++ mining I'm trying to mine a genesis block for an experimental Peercoin clone.

I've already written one using boost threads, and it's been really fun since this is the most processor intensive program I've ever written, but I'm only getting 1M hashes per second, so I'm guessing it's going to take about 72 minutes based assuming initial difficulty 1 and this equation is correct.

Is there a relatively simple way to send the functions to the GPU?

All I'm doing so far is using a "silent" (returns false instead of writing the error to debug.log) CheckBlock() to verify if the nonce is valid or not.

Please show me a simple library that can use the GPU to verify the nonces.

This looks like a great lib that acts as a OpenCL wrapper, at least based upon the short example given on vector sorting.

All libraries seem to treat the GPU as if it's some foreign CPU, and while this is no exception, it seems to be the most direct and intuitive.

I haven't been able to test, but if it works as advertised, it looks perfect.

Note: I've tried to sort out CUDA and OpenCL by myself, and I'm just not good enough.  This appeals to my laziness.


How do I transfer btc from Core that never finishes syncho to another wallet? My Core finished sychro after 4 months, the transaction was visible finally (then I moved all data from one file in the computer to another) and Core started synchro again with 3 yrs remaining. It shows no transactions now.

How do I get the funds from there to another wallet, I have the receiveing address from BTC.
?

Even though your wallet is still syncing you can use the debug console or bitcoin-cli along with dumpprivkey to get the private key of one of your wallet addresses. You can then import the key to an SPV wallet.


Sign PSBT for 2 of 3 multisig Creating an unsigned PSBT:

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "walletcreatefundedpsbt",
    "params": [
        [
            {
                "txid": "8b7e8c1898d473fe0229d1adf58aca6299df781e0ff77622a6d6f73273322942",
                "vout": 1
            }
        ],
        [
            {
                "tb1qv49u5nkg3y3nma4jmhp8ppl5mj4vyyattlhfyh": 0.005
            }
        ],
        0,
        {
            "includeWatching": true,
            "changeAddress": "tb1q3lkrtkwnt0txka5te0gt02vuk47trssaaxvhml",
            "feeRate": 0.0001
        },
        true
    ]
}

Result:

{
    "result": {
        "psbt": "cHNidP8BAHECAAAAAUIpMnMy99amInb3Dx5435liyor1rdEpAv5z1JgYjH6LAQAAAAD/////AjaaBwAAAAAAFgAUj+w12dNb1mt2i8vQt6mctXyxwh0goQcAAAAAABYAFGVLyk7IiSM99rLdwnCH9NyqwhOrAAAAAAABAP0hAQIAAAAFLYKKRQsSgx1v3UqETLYL4JCJWenWEn1pB7w/Tz96TdMAAAAAAP3///8tgopFCxKDHW/dSoRMtgvgkIlZ6dYSfWkHvD9PP3pN0wIAAAAA/f///1v4E5Wd/iNzkoNsZsQFQPAj2iRHlmxxmnjaPdEa7TEtAQAAAAD9////LYKKRQsSgx1v3UqETLYL4JCJWenWEn1pB7w/Tz96TdMBAAAAAP3///8pCFtwy3cF4hAMEihbDo3FVncbOKOTqx/LaoVTo1y9hwEAAAAA/f///wLOgi4AAAAAABYAFAv2sYJ4ALY+wb56YP2cI99/Y5biQEIPAAAAAAAiACBdKDYRhxYlihF1dZCM7Kobi25NNKylHThp1cWjEjTxDnsVHQABAStAQg8AAAAAACIAIF0oNhGHFiWKEXV1kIzsqhuLbk00rKUdOGnVxaMSNPEOAQVpUiEDe68lJzJ5hEVUKScCjod3qtntXQ9gMg4qa6g2LDMwhVQhAlKXOTSX1IxzZ37WAglDONf6o41uMvUm2k/Oniqutlu6IQNs3xVmKT6xvTJLTc4jB+JwmQmnPSZFCX6JMkA+neL4Q1OuIgYCUpc5NJfUjHNnftYCCUM41/qjjW4y9SbaT86eKq62W7oEN8HtHCIGA2zfFWYpPrG9MktNziMH4nCZCac9JkUJfokyQD6d4vhDBCnQwHAiBgN7ryUnMnmERVQpJwKOh3eq2e1dD2AyDiprqDYsMzCFVARbIBXQACICAuNOa3WDX2adJy31UOYgFUi2M79B12ijzcvzjVTG0mbsEJGMV+YAAACAAAAAgAcAAIAAAA==",
        "fee": 0.00001770,
        "changepos": 0
    },
    "error": null,
    "id": "curltest"
}

The UTXO that I am trying to spend is 2 of 3 multisig address: tb1qt55rvyv8zcjc5yt4wkggem92rw9kunf54jj36wrf6hz6xy357y8qgpk8xa
I created multisig with this request:

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "createmultisig",
    "params": [
        2,
        [
            "037baf252732798445542927028e8777aad9ed5d0f60320e2a6ba8362c33308554",
            "025297393497d48c73677ed602094338d7faa38d6e32f526da4fce9e2aaeb65bba",
            "036cdf1566293eb1bd324b4dce2307e2709909a73d2645097e8932403e9de2f843"
        ]
    ]
}

Address was added to wallet using this request:

{
    "jsonrpc": "1.0",
    "id": "curltest",
    "method": "importmulti",
    "params": [
        [
            {
                "desc": "sh(multi(2,037baf252732798445542927028e8777aad9ed5d0f60320e2a6ba8362c33308554,025297393497d48c73677ed602094338d7faa38d6e32f526da4fce9e2aaeb65bba,036cdf1566293eb1bd324b4dce2307e2709909a73d2645097e8932403e9de2f843))#t9xkhn5c",
                "timestamp": "now",
                "label": "gg1936",
                "watchonly": true
            }
        ]
    ]
}

Now I want to use the unsigned PSBT and sign it. Which RPC call should be used for it and what should I mention in arguments?

The command you want to use is walletprocesspsbt. The only argument you need is the PSBT itself.


Generating private key/bitcoin address based on a "password" Since the private key is basically a random large number, would I be able to pick a password and have that converted into an address?

For example: pick "mysecretpwd". Have it sha256ed, obtain a large integer that is the private key from which I can easily derive the public key and the bitcoin address.

Then for spending any funds received at that address I only need to remember "mysecretpwd", no private key storage on paper, mnemonics or anything, basically the funds are stored in my brain.

What are the security/privacy implications?

What you are describing has been done before, and is known as a "brain wallet".

In earlier days, some wallets and online website did use this system. However, it has proven quite insecure, as humans are terrible at picking secure random data for the "password", and computers are great at guessing them. Many BTC have been stolen from insecure brainwallets, and at this point we have much better and safer means of easily accessing wallets, namely BIP39 seeds.


What roles of WIF(Wallet Import Format)? I am reading "Mastering Bitcoin" written by Andreas and I found this explanation about "WIF(Wallet Import Format)"

  Key Formats

  Both private and public keys can be represented in a number of
  different formats. These representations all encode the same number,
  even though they look different. These formats are primarily used to
  make it easy for people to read and transcribe keys without
  introducing errors.

  http://chimera.labs.oreilly.com/books/1234000001802/ch04.html#base58

I have two questions:

I agree with that a private key as decimal numbers is not easy to use for people. However, the hex format and WIF are very similar. I think that WIF has two advantages compared to hex. One is starting with 5 and the next one is having checksum. Are there any good points of WIF.
Can I sign on a transaction by using WIF without the private key?

I'm keen to know about inside bitcoin. Any information will be helpful for me.

Thanks,

Are there any good points of WIF

It is shorter than decimal/hex representation. And, yes, there is checksum.

  Can I sign on a transaction by using WIF without the private key?

WIF is a representation of private key.


Getting all transactions that ever occurred for a bitcoin address I know you can use various APIs to get the balance for a given bitcoin address, but is there a way to total all the bitcoin that were ever received at a given address?

A so-called "transaction history" for a given address?

BlockTrail's address API will do what you're looking for.

Calling URL:

https://api.blocktrail.com/v1/btc/address/1NcXPMRaanz43b1kokpPuYDdk6GGDvxT2T?api_key=MY_APIKEY

Result:

{
    "address": "1NcXPMRaanz43b1kokpPuYDdk6GGDvxT2T",
    "hash160": "ED12908714FFD43142BF9832692017E8AD54E9A8",
    "balance": 49497392,
    "received": 115015000,
    "sent": 65517608,
    "unconfirmed_received": 0,
    "unconfirmed_sent": 0,
    "unconfirmed_transactions": 0,
    "total_transactions_in": 4,
    "total_transactions_out": 10,
    "category": "donations",
    "tag": "blocktrail"
}


I withdrew my BTC coins to a NEO wallet Did i lose my coins? How can i recover them? After a long corrospondance with Bittrex support staff i was given the following information.

"If you have sent BTC to a NEO address, these wallets have addresses that validate to each other, but the wallets are not compatible for receiving coins. You'll need to research how to remove a private key from a NEO address and import it into a BTC wallet to recover these coins. You may want to contact someone from the NEO community for help.  We can be of no further assistance on this issue."

How can i reverse this?

The response it pretty clear , you need to find a way to extract the private key of the neo wallet and import it into some other BTC wallet which allows you to do that.

What wallet are you using for NEO?

I cannot comment if this will work though as i have no idea how the Private,Public keys are generated for NEO.


Configuration file is not found for bitcoind I'm running bitcoind in ubuntu. When I pass password as argument, it shows no configuration file found. Somebody please help

You can see it here,

  cd  $HOME/.bitcoin/


Can't download bitcoind mac I can't seem to find the bitcoind binaries for Mac--just the bitcoin-qt GUI application. Can someone give me a link, please?

Download git and clone it from the repository. you can find instructions here:
https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md


synchronizing after many years Several years ago, without really understanding the mechanics relating to bitcoin, I believe I might have managed a bit of mining. The "Bitcoin-wallet" and other files, including my wallet.dat file have been sitting on an old PC that I only found during a recent move! So am now playing catch-up and have a few questions (noting that I have copied over the relevant files and wallet.dat to external drives).

When I first tried to open the wallet there was an error/warning about corruption but asked if I wanted to proceed.  I did.  After updating the time and date of my old PC to today's date/time, the wallet started to work.  That is while my wallet indicated that it is "out of sync" and showed a balance of zero, it did start syncing with the network.  It is now telling me that it is over 10% done and that are "XYZ" blocks remaining.  What does this mean? And will my wallet be updated only when the synchronization is complete?

Also, at towards the top of the wallet is there is a message "alert key comprised, upgrade required"

Thanks for your patience.

It is now telling me that it is over 10% done and that are "XYZ" blocks remaining. What does this mean?

The bitcoin network works by continuously adding new blocks onto the blockchain. Each block is full of transactions, and each transaction can be traced back to earlier transactions, creating a verifiable record of ownership for all coins in the system.

So to show your balance, the wallet needs to synchronize with the blockchain, so that it can accurately determine what (if any) coins you own.

  And will my wallet be updated only when the synchronization is complete?

Yes, though if you want to find out your address balance more quickly, you could look up the addresses controlled by the wallet, and then use a block explorer website to check the balance of each individual address. Note that if your wallet has a large list of addresses, this may be a hassle to do.

  Also, at towards the top of the wallet is there is a message "alert key comprised, upgrade required"

This message relates to the retirement of an alert messaging system that was built into the original clients, it is meant to alert you to the fact that the key that allows alert messages to be sent is now publicly known. This is not critical to the function or safety of the wallet.

If you upgrade to a newer version of the client, your sync time may improve greatly (depending on how old the software you're using is). If you post info about what version of the software you're using, someone may be able to provide more help in regards to this.


How to obtain trades from the websocket transaction feed? I am having a hard time figuring out how to extract trade information (i.e. a payment relative to an offer) from the Ripple websocket transaction feed.

From my current understanding, I guess there would be a way to match a payment to an offer, or maybe to know that an offer has been cancelled because it has been successful. This would probably work.

But I can't see a way to achieve any of this currently.

For a program (a client, a charting site, a simple order book display, etc) to efficiently track changes it can subscribe to a stream of transactions related to just what it's interested in, a set of accounts, a set of order books, etc. Alternatively a system can subscribe to all transactions or fetch individual closed ledgers and their associated transactions.

Whatever way a program gets transactions, each transaction includes a set of meta data describing all the changes it made within the ledger that included it. For any transaction that executes any part of a trade offer it will included meta data that references the trade offer, and describes how it is changed (how much is consumed, if the offer is to be removed, etc).

Here is an example recent transaction with meta data. These can easily be looked at via a site like https://ripple.com/tools/info/ or https://ripple.com/tools/api/

{
  Account : "rGTfnwAqmPG5CN9vgzfubDQA4CkCpeK9zZ",
  Amount : { /* currency, issuer, ... */ },
  Destination : "rMDnTSD3TUizf2qvd9oGdCz3BXLheJyYtP",
  Fee : "15",
  Flags : 0,
  LastLedgerSequence : 6005165,
  Paths : [ /* 3 items */ ],
  SendMax : { /* currency, issuer, ... */ },
  Sequence : 3539,
  SigningPubKey : "02A25443D8FC411A395B626760062F506BF44FDA7CBFE004B1F2A7D2052CCEBC33",
  TransactionType : "Payment",
  TxnSignature : "3046022100D806A3FF5F2002F55BA48C4824CF8AEC70741411383CD79037012A85C3F92A9502210084335505CA91F28DDE04290FB7A46318F6337E2522D46731403BE686176F3A12",
  hash : "14A60155B276A78ED29FF11A9EE8E63AC1FCBED50CCE1AB30642B06E8D0E00D8",
  inLedger : 6005158,
  ledger_index : 6005158,
  meta : {
        AffectedNodes : [
              {
                    ModifiedNode : {
                          FinalFields : {
                                Account : "rH1hbPUfvhmqkEE3AWi77CZNexJyTGE6SF",
                                BookDirectory : "4627DFFCFF8B5A265EDBD8AE8C14A52325DBFEDAF4F5C32E5D04F0F1A6DD3F05",
                                BookNode : "0000000000000000",
                                Flags : 0,
                                OwnerNode : "0000000000000000",
                                Sequence : 71,
                                TakerGets : {
                                      currency : "USD",
                                      issuer : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
                                      value : "221.8195734530501"
                                },
                                TakerPays : "30851122872"
                          },
                          LedgerEntryType : "Offer",
                          LedgerIndex : "0346EED5470F7A69B0A8DBF4B403DDD5CFD80F4A588555A934F00B09B4CE7AD2",
                          PreviousFields : {
                                TakerGets : {
                                      currency : "USD",
                                      issuer : "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
                                      value : "222.82157345305"
                                },
                                TakerPays : "30990483095"
                          },
                          PreviousTxnID : "B8613D4BE0C6EAA9F970CC2D580534B8A2B53F1BD844518BED4A73AA0FA52DFB",
                          PreviousTxnLgrSeq : 6005141
                    }
              },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ },
              { /* DeletedNode */ },
              { /* ModifiedNode */ },
              { /* DeletedNode */ },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ },
              { /* ModifiedNode */ }
        ],
        TransactionIndex : 0,
        TransactionResult : "tesSUCCESS"
  },
  validated : true
}

In this example, you can see that the transaction happens to be of type Payment but it modified a node with LedgerEntryType: offer. Those are what you'd look for (from any and all transaction types, "OfferCreate", "OfferCancel", "Payment", etc). Fields such as "BookDirectory" are mostly for internally finding the node with the ledger, a simple tool processing these JSON blobs could just look at the Account and Sequence fields to uniquely identify a specific offer. In this example the there is both a final TakerGets/TakerPays fields as well as previous; subtracting tells you how much of the offer was taken. (Such fields without a listed currency/issuer pair are XRP in drops, divide by 1e6 to get the amount of XRP.)

If a payment or crossing offer were to fully consume an existing offer, then you'd see a "DeletedNode" entry for it and would again need to use the previous/final fields to see how much of the offer was consumed (which could be zero if the offer was removed for other reasons, such as no longer funded or expired).

If you're trying to assemble all the ways a specific offer has changed through it's life you can track backwards via either the PreviousTxnID or the PreviousTxnLgrSeq fields.


can man in the middle change transaction before its broadcast? i'm very new to bitcoins (started learning it today). i hope i get the question right:

i understand when a transaction is created, using my private key i sign the transaction, but i also provide the public key with it right?

if so, what denies a man in the middle to take it, re-sign using his own private key, and provide his own public key?

regular https handles this issue using a root CA, which i understand doesn't exist in bitcoins concept
encryption is usually used using the public keys, to avoid someone else changing the transaction and re-encrypt it (as it doesn't have the private key to open the data)

so, i don't quite understand what makes it secure as the bitcoin wallet creates a data that is not encrypted, and anyone else can take this data, and alter whatever it wants before it leaves the network

thanks!

In order for the transaction to be valid it has to have valid signatures from the public keys associated with the funds being transferred. It is regarded to be computationally unfeasible for a middleman to forge a signature if he does not possess the private key.

These signatures are specific to the transaction and ensure its integrity, i.e., if the transaction is modified (by replacing recipient, amount, ...) then the signature becomes invalid.

There is a small exception to the last point: a signature cannot ensure the integrity of the signature itself, hence we have some minor problems with transaction malleability in which the transaction signature can be modified, but not its effects.


How to fully decode a coinbase transaction? After reading this What is the format of the coinbase transaction? I was wondering about a few things.

decoderawtransaction of a random Litecoin coinbase transaction:

"coinbase" : "038abd07062f503253482f048725ee5208083865a409000000092f7374726174756d2f",
...
    "scriptPubKey" : {
    "asm" : "OP_DUP OP_HASH160 975efcba1e058667594dc57146022ec46560a63c OP_EQUALVERIFY OP_CHECKSIG",
    "hex" : "76a914975efcba1e058667594dc57146022ec46560a63c88ac",
..
    "addresses" : [
    "LZ2L61M8rCoZmK7SemTBqfxuFZv5Uj4peR"

Is the asm field the outgoing address? If yes how is it encoded and what is the hex field for? Same question goes for scriptSig asm field in a normal transaction. It contains the public key and the signature but how is it structured/encoded. Because I have a Tx with to vins from the same address and I don't see the same public key in the asm field.

How do I read the coinbase? Hex2asic  gives me "?????/P2SH/??%?R??8e??????/stratum/". Is that all I can do if I don't know how the pool operator has structured the coinbase?

coinbase, scriptPubKey, scriptSig - they are all scripts. You can read in wiki about how to decode script https://en.bitcoin.it/wiki/Script.

Coinbase can contain any data, even invalid script. But typically, it contains valid scripts. Examples of decoding:

coinbase: 038abd07062f503253482f048725ee5208083865a409000000092f7374726174756d2f
03 - length opcode
8abd07 - data with length 03
06 - length opcode
2f503253482f - data with length 06
04 - length opcode
8725ee52 - data with length 04
08 - length opcode
083865a409000000 - data with length 08
09 - length opcode
2f7374726174756d2f - data with length 09

scriptPubKey: 76a914975efcba1e058667594dc57146022ec46560a63c88ac
76 - OP_DUP opcode
a9 - HASH160 opcode
14 - length opcode
975efcba1e058667594dc57146022ec46560a63c - data with length 14 (20 in dec)
88 - OP_EQUALVERIFY opcode
ac - OP_CHECKSIG opcode


Transaction generator with payment fee optimization for large number of small coins I have a large amount of money in a lot of small coins in my wallet (most of them like 0.0002 BTC).
But whatever I do, I loose about 15% due to transaction fees, because transactions are too large.
Is there any tool for optimization of transactions, which could combine those coins into transactions with minimal or zero fee?

If the coins are in the same wallet then you should be able to send your "large amount of money" in one transaction.

If your coins are spread across multiple wallets in the same client then you would need to take the 15% loss. Or not pay a transaction fee and hope your coins get validated by a very friendly miner. (I would advise the former.)

In the event that your coins are spread across multiple wallets, you should bite the bullet and send them all to a single wallet so you don't continue losing money in the future.

It also might be a good idea to have slightly larger transactions, so you don't pay as many fees.


How to be assured a wallet is on a blockchain? How could I check that a wallet or any app I download from Google play or Apple store or a website is truely runs by a blockchain and be certain that producing company can not manipulate the private key?

That's impossible. The only way you can be sure is that you compile the wallet from the source code by yourself. In practice, you should only use wallets that are famous (some of those are Blockchain.info wallet, Bitcoin.com, CoPay, Coinbase, Electrum, BRD,... I can count at least 20 of them). You can search online with the name of the wallet software you want to download and refrain from downloading it if there isn't enough of convincing reviews.


Where is SIGHASH_TYPE serialized in SegWit? When preparing or verifying a signature, a transaction pre-image is created in memory. This pre-image exists purely for the purpose of creating a signature and is not published to the blockchain. At the end of this pre-image is a 4 bytes SIGHASH_TYPE.

When serializing the resulting transaction, the SIGHAH_TYPE is truncated to one byte and added at the end of each signature. The remaining 4 bytes are not put at the end of the final transaction (here's why, probably).

How does this work with SegWit? Is 1 byte appended to the signature in the the same way, but in the witness data rather than the legacy part of the transaction? It's not immediately obvious to me based on the examples in BIP143.

Is 1 byte appended to the signature in the the same way, but in the witness data rather than the legacy part of the transaction?

Yes. The signature serialization (which includes the sighash type) remains exactly the same.

Look at the first example in BIP 143, the generated signature (before serialization) is 304402203609e17b84f6a7d30c80bfa610b5b4542f32a8a0d5447a12fb1366d7f01cc44a0220573a954c4518331561406f90300e8f3358f51928d43c212a8caed02de67eebee. When it is serialized, it becomes 47304402203609e17b84f6a7d30c80bfa610b5b4542f32a8a0d5447a12fb1366d7f01cc44a0220573a954c4518331561406f90300e8f3358f51928d43c212a8caed02de67eebee01. Notice how when serialized there is an additional byte appended to the signature; that is the sighash type.


LTC source code cloning to a new cryptocurrency? How do I edit the code to make my own currency, while changing the name?

Hey, I have downloaded LTC source code from its official github link. I want to create my own cryptocurrency identical to LTC, I might add some features later on, but for now it's not an issue. I am not a python programmer, and I have looked around to see if there was any tutorial on making a cryptocurrency by editing code.

Which file is the code for wallet? How can I make my own cryptocurrency's wallet identical to most popular LTC(or BTC) wallets?

How do I sell my cryptocurrency?

Let's say the coin's max supply is 50 million. When I create the currency how many coins should already be on the market? The purpose of my crytocurrency is to let people exchange money completely anonymously and secure in my country. Do websites(which sell cryptocurrency) have their own special wallet when they sell some currencies for dollars? Also do they sell the total tokens that they own as a company? Would they ever run out of tokens? How do they supply them?

When I make my own cryptocurrency, to make it more useful&convenient and popular I want people to be able to sell them whenever they want to in turn of my country's own currency (like dollars for example). How do I make that happen? Are there companies which would pay for it? I know I can submit my currency to exchange website and let people turn it into BTC then sell it for real money, but I want to sell it directly for real money. How do I accomplish it?

When the coins first get published, what are the factors which will be effective on deciding its price in the first place? How does it get decided? Does the founder decide it? How was LTCs or BTCs price was determined?

You will want to familiarize yourself with the code that you have downloaded, which should give you an idea of what you will need to change.

How many coins should already be on the market?:
People often refer to how 'fairly' a cryptocurrency was launched. Most people consider a fair launch to be a launch where the creator or anyone else does not own a significant amount of the currency before it is publicly released. If a large amount of the currency was pre-mined, there is an argument to be made that the creator only launched the project in order to net themselves a profit by selling off their coins once they are worth a decent amount.

Do websites have their own special wallet when they sell some currencies for dollars?: I assume you are asking about the wallet used to store the new cryptocurrency, in which case this would likely be a modified version of existing software wallets that transacts with the new coin type.

Do they sell the total tokens that they own as a company? Would they ever run out of tokens? How do they supply them?: How many of the tokens that they hold are sold is up to them. How the new token is introduced into the economy is dependent on how the protocol functions. It could be the case that one specific key pair that belongs to the creator of the currency is allowed by the protocol to generate new coins at any time, in which case supply would not be an issue, and the creator could generate new coins as needed. If the token was able to be mined, then the creator could mine a large amount of the token to be sold before launching it.

When I make my own cryptocurrency, I want people to be able to sell them for fiat currency: If your token was listed on an exchange that deals specifically in fiat currency instead of only Bitcoin, users would be able to sell it that way, otherwise, you'd be looking at setting up your own exchange or platform where users can buy and sell the token, though there would likely be a great deal of legal licensing that would need to be taken care of for each jurisdiction where customers would be able to transact from.

When the coins first get published, what are the factors which will be effective on deciding its price in the first place?: If you had a pre-sale or Initial Coin Offering, then you would decide the initial sale price. If you launched the currency publicly without selling amounts of it, then the laws of supply & demand and other market forces would determine the price, as was the case with Bitcoin and Litecoin.


How are public and private keys related to the wallet? I understand that all the Bitcoin protocol is based on an asymmetric cryptography.

A user gets 2 keys (public and private). How do these keys connect to the Bitcoins?

How are the keys are related to the wallet? How can I decide how many Bitcoins to transfer when using my private key?

Thomas' answer is correct, but I think an easy version may be appreciated as well.

I suppose you know the concept of public key cryptography? If you don't, here is a very short explanation (or read the wikipedia page): Public key cryptography (as used in Bitcoin), allows you to hand people a public key and use the corresponding private key to prove the ownership. So you can create any random private key (keep it secret) and calculate the corresponding public key (give it out to public for verification). Using this private key, you can sign a message and other people can verify that you own the private key by using your public key.

So, applied to Bitcoin.

A Bitcoin address is just a shorthand notation for a public key. When someone makes a transaction to an address, he states that "I give the right to spend this money to the person who owns the private key corresponding to this address".
The person who has received this transaction will in turn be able to spend the transaction by signing the transaction using his private key. With this signature he can prove that he owns the key, without disclosing it. Others can verify the signature using the public key.

As for the second part of your question, it gets a little more advanced. An easy way of viewing it is that every transaction takes a number of inputs and generates a number of outputs. Inputs in this case are outputs from previous transactions. For each input, the user will have to provide verification he is allowed to spend that output by adding a signature.


How to explain blockchain in terms of OSI 7-layer model? Is it based on service in the transport layer I am newbie to block chain. AFAIK, blockchain is a distributed database that maintains a continuously-growing list of records called blocks secured from tampering and revision.

How does this technology be explained in terms of OSI 7 layer model?

Thx

JT

The blockchain is a data structure that every node in the network independently builds, based on messages that are exchanged in a network.

Blockchains don't prescribe what this network protocol looks like. The OSI model is a way to describe layers in a network, not data structures.


Public Addresses: '3' vs '1' in front [Bitcoin] I just wanted to confirm, is it true that for a bitcoin (public) address it should always have a '1' in front of it. For certain transactions though I see that there is a '3' in front. How is this possible, and why is it a '3'?

A Bitcoin address prefix is a function of the locking script type for a particular transaction output.

Older Bitcoin Pay-to-Public Key Hash (P2PKH) scripts are associated with addresses that start with the number 1, resulting from a one byte version prefix prior to base58check-encoding being set to 0x00.

Newer Pay-to-Script Hash (P2SH) transactions start with the number 3, resulting from a one byte version prefix prior to base58check-encoding being set to 0x05.

Examples of P2SH are singe single P2SH signature addresses, multisig addresses, and nested P2SH(P2WPKH) that resulted from segwit to maintain backward compatibility with older wallets that are not explicitly segwit-enabled to wallets that are segwit-enabed. Such addresses conform to the BIP 49 hierarchical deterministic scheme.


I can't connect to RPC from python. JSONRPCException: -342 Tryed to run this code :

from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import logging
import json

logging.basicConfig()
logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG)

rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:18332"%('user', 'password'))
print(rpc_connection.getinfo())

with my pass and my username but I have this error:

DEBUG:BitcoinRPC:-1-> getinfo []
Traceback (most recent call last):
  File "/home/conio/Scrivania/conioclass/conio/components/provaRPC.py", line 9, in <module>
    print(rpc_connection.getinfo())
  File "/home/conio/Scrivania/conioclass/conio/components/bitcoinrpc/authproxy.py", line 139, in __call__
    response = self._get_response()
  File "/home/conio/Scrivania/conioclass/conio/components/bitcoinrpc/authproxy.py", line 187, in _get_response
    'code': -342, 'message': 'non-JSON HTTP response with \'%i %s\' from server' % (http_response.status, http_response.reason)})
bitcoinrpc.authproxy.JSONRPCException: -342: non-JSON HTTP response with '401 Unauthorized' from server

Can you help me?

Indeed to use bitcoinrpc, you need to set the username and password in bitcoin.conf by:
rpcauth=user:salt$hash of password

which you can generate using https://github.com/bitcoin/bitcoin/blob/master/share/rpcauth/rpcauth.py. Simply shutdown bitcoind, add this to bitcoin.conf, restart, and you'll immediately be able to run commands in python like
print(rpc_connection.getinfo())


Are there Miners (or Mining Pools) that accept below standard fee transactions? Let's say I create a transaction of 0.0005 BTC with a fee of 0.000005 BTC. From looking at the bitcoin source I find that this transaction would be considered non-standard and therefore not accepted and relayed by any node running the satoshi bitcoind.

Are there any Miners or Mining Pools where I could directly relay this transaction, which would accept it and place it into a block? Would the resulting block be considered standard and accepted in the block chain by other nodes?

Turns out there is a Bitcoin.it wiki site dedicated to this topic: Free transaction relay policy

Currently the only mining pool is eligius that accepts below standard fee transactions. Hopefully there is more to come :)


What are the benefits of using btcd instead of bitcoind? btcd 1.0 was released October 3, 2013. Why use it instead of bitcoind?

EDIT (2014-09-05): I have updated this answer to the most recent information.  The previous answer was outdated in regards to the cons.  It was accurate as of version 0.3.0-alpha, however btcd is now in beta, up to version 0.8.0-beta, and nearly all of the previous cons have since been addressed.  Also, I've updated all references to bitcoind to Bitcoin Core to reflect their name change

I'll try to answer this as unbiased as possible, but, as a disclaimer, I am the lead developer for btcd.

First, a small correction.  The initial release is version 0.3.0-alpha (https://github.com/conformal/btcd/releases).  It is not yet up to version 1.0 as we first want to get a ton of public testing from early adopters before claiming it is production ready.  We fully understand the importance of avoid block chain forks and are making herculean efforts to do everything we can to prevent that from happening.

I'll provide a list of pros and cons that I can think of for btcd relative to Bitcoin Core below, but one thing I'd like point out isn't specifically related to btcd or Bitcoin Core, but rather the Bitcoin ecosystem as a whole.

Diversity is something the Bitcoin ecosystem is in dire need of.  Diverse, inter-operating implementations make the Bitcoin network more robust against several things such as denial-of-service attacks, vulnerabilities, and individual application bugs.  History has shown that for any protocol to thrive and gain wide-spread acceptance, multiple implementations on multiple devices is inevitably required.  One prolific example is TCP/IP.  TCP/IP would not be where it is today if only a single implementation existed.

Pros

btcd offers a unique architecture in that it separates the chain services from the wallet services (see NOTES [a])
btcd is written in Go which has several advantages over C++ (See NOTES [b])
btcd is a clean refactor of the entire Bitcoin protocol rather than one that is monolithic
the btcd codebase strives to provide easy to follow and well-commented code (Bitcoin Core is definitely improving in this area, but there is still a lot of undocumented "magic")
the btcd core packages provide more extensive unit test coverage to help prevent regressions (for example btcwire provides 100% test coverage)
btcd incorporates a package that has been highly optimized specifically for the ECDSA curve parameters used by Bitcoin (secp256k1) making it faster than OpenSSL
btcd is capable of running as a real service on Windows (see NOTES[c])
btcd provides a compatible RPC interface with Bitcoin Core has which makes it relatively straight forward to use it in existing infrastructures
btcd is able to sync the entire block chain from scratch in around 5 hours on an Intel i7 with an SSD

Cons

btcd does not daemonize itself and instead relies on external tools such as daemonize and upstart to perform that function
The uPnP functionality is currently disabled by default and does not appear work with all devices, so it might be necessary to manually open ports on your router and use the --externalip flag

Notes

[a] A full discussion of the advantages of separating the chain and wallet services would require an entire blog post, but a few examples are that it opens a lot of opportunities for lower powered hardware, offers better multi-user support, and results in less waste in small networks which can share the chain services.

[b] Some advantages we believe Go has over C++

Integrated test infrastructure
Platform independent code
Simpler parallelism and excellent support for concurrency
No active memory management which leads to eliminating an entire class of the most common security vulnerabilities like buffer overflows
Built-in profiling and documentation facilities
Significantly faster compilation times

[c] The Windows installer does not provide the option to install or run it as a service, however btcd itself has command line options to do so.  To install it as a service: btcd.exe /s install


Can you be 100% certain that a payment was sent from a specific address? Reading this thread about determining the sending address of a bitcoin transaction. I'm a bit confused, how do you differentiate between the change address and the "receiving" address of the last transaction?

txid = <relevant transaction id>
addresses = []
raw_tx = decoderawtransaction(getrawtransaction(txid))
for(input in raw_tx['vin']) {
  input_raw_tx = decoderawtransaction(getrawtransaction(input['txid']))
  addresses.push(input_raw_tx['vout'][input['vout']]['scriptPubKey']['addresses'] [0])
}

Would addresses not include other outputs that are unrelated to the sending address? I'm trying to build a block explorer and I'm uncertain how to determine which address sent coins in each transaction. Is it possible to tell?

From the Bitcoin Wiki:

  An input is a reference to an output in a different transaction.

A transaction can have multiple outputs, e.g., a normal one and the change, which specify the recipient address in their scriptPubKey. So usually to each output belongs one address, and the input specifies which output it redeems.

If an output specifies multiple destination addresses (which is rarely the case), only one of those can redeem the transaction. You can find out which one by looking at the scriptSig of the input.


Verifying Bitcoin Core Integrity using PGP I downloaded the Bitcoin Core v0.20.0 from https://bitcoin.org/en/download

To verify, I first imported the signing key at https://bitcoin.org/laanwj-releases.asc and then ran command:

gpg --import laanwj-releases.asc

Then I downloaded the release signatures from https://bitcoin.org/bin/bitcoin-core-0.20.0/SHA256SUMS.asc and to verify I ran command:

gpg --verify SHA256SUMS.asc

Output was:

gpg:                using RSA key 90C8019E36C2E964
gpg: Good signature from "Wladimir J. van der Laan (Bitcoin Core binary release signing key) <laanwj@gmail.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 01EA 5486 DE18 A882 D4C2  6845 90C8 019E 36C2 E964

Now, it says "Good signature" but the next two lines are WARNING:  This key is not certified with a trusted signature! There is no indication that the signature belongs to the owner.

What did I accomplish then, till this point?

I also tried running gpg --verify SHA256SUMS.asc bitcoin-0.20.0-win64-setup.exe but got gpg: not a detached signature as the output.

Not sure if I was able to verify it correctly or not. I was stupidly quick enough to actually run the installer after noticing "Good signature" in output and matching the Primary key fingerprint on the webpage and it matched. Please explain what's going on here.

Also how does this signing even verify the integrity of the downloaded file when the malicious actor can also modify the file at https://bitcoin.org/laanwj-releases.asc ?

Thank you!

GnuPG is telling you that the signature corresponds to that public key (your file has a valid signature and wasn't tampered with in transit), but that it doesn't know if that public key is trustworthy.

If you trust your friendly neighborhood CA, then do the following:

gpg --lsign-key 01EA5486DE18A882D4C2684590C8019E36C2E964

then enter your private key password to locally certify the key.

If you don't trust the CA (good on you for being suspicious), ask someone you know who you do trust for the key fingerprint. If that key fingerprint matches what you imported, then you can run that command. If it doesn't, then something is up.


What is 'birthday' in the context of BIP39 / Lightning seed generation? In this talk about Lightning Network, roasbeef speaks about BIP39 as having no support for 'birthdays'. What does that mean?

https://www.youtube.com/watch?v=LXY0L8eeG3k minute 22

It simply means that BIP39 seeds have no way to tell you when they were created - If you need to check one for transactions, you have to start at the genesis block and work your way up to the present day.

This is in contrast to the traditional Bitcoin-qt wallet.dat, which maintains a date for when the address was created. Usually, it will not check for transactions for that address before that date (if the birthday is missing, it will check from genesis)


Would migrating my coins to a segwit (bc1) address reduce my fees as I send them out? Currently fees are a bit ridiculous when sending from mycelium. I'm thinking of migrating all my coins to electrum 3 as a segwit (bc1) address. Then, would my fees be smaller? And if I exclusively use electrum 3, would I be able to send my coins to legacy addresses (1...) without any issues?

I'm thinking of migrating all my coins to electrum 3 as a segwit (bc1) address. Then, would my fees be smaller?

When you send your coins to bech32 addresses, the fees will not be smaller. However the fees will be smaller when you spend from those bech32 addresses.

  And if I exclusively use electrum 3, would I be able to send my coins to legacy addresses (1...) without any issues?

Yes.


Set fee limit for Lightning Close Channel How does a Lightning Network channel initiator set a limit on the fee rate they are willing to accept for the channel close?
And a second question is how can the close fee be negotiated during a collaborative close?

As pointed out the funder of the channel is currently responsible for paying the fees and deciding them. BOLT 02 specifies the update_fee message to be used to signal the fee rate. There it says:

The node responsible for paying the Bitcoin fee SHOULD send update_fee to ensure the current fee rate is sufficient (by a significant margin) for timely processing of the commitment transaction. The node not responsible for paying the Bitcoin fee: MUST NOT send update_fee. A receiving node: if the update_fee is too low for timely processing, OR is unreasonably large: SHOULD fail the channel.

In the case of a collaborative close there is a an algorithm that is part of the closing negotiations:
The closing_signed message contains the follwoing fields
type: 39 (closing_signed)
data:
[channel_id:channel_id]
[u64:fee_satoshis]
[signature:signature]

I quote again:

The sending node: MUST set fee_satoshis less than or equal to the base fee of the final commitment transaction, as calculated in BOLT #3. [...] if the receiver agrees with the fee: SHOULD reply with a closing_signed with the same fee_satoshis value. otherwise: MUST propose a value "strictly between" the received fee_satoshis and its previously-sent fee_satoshis. [...]
The "strictly between" requirement ensures that forward progress is made, even if only by a single satoshi at a time.


Import / create a Wallet from a key with bitcoind or bitcoin-cli to use as a hotwallet? i've created a HD Wallet via (https://github.com/GemHQ/money-tree)

i would like to take the private key and throw that into my daemon so i can listen on incoming transactions and also transfer the funds to our coldwallet via RPC calls.

how do i create a wallet.dat via privatekey only so that my daemon can open it?

You can use the importprivkey and importmulti RPC calls in bitcoin-cli to do this.


Spending bitcoins - what happens to the change left in your address? How do I manage my wallet and addresses when spending bitcoins?

For example, let's say I have address abcdefgh, and I have 10 Euros there. I read that when I buy something worth say 4 euros in bitcoins, I must then spend the rest on another unused address, zyxcvbnm, as the first address becomes unsafe or the change is lost in mining fees or something. It this true? Are all spends a double spend? For example, once for the item you want and once to your savings address?

I assume you're using Bitcoin-Qt, i.e. the reference implementation.

Bitcoin-Qt works with accounts, not addresses. The balance of your wallet is the sum of each account balance. The purpose of accounts is to compartmentalize payments in labels such as "Savings", "Salary", "Friends", etc. for your own convenience.

Each account has many Bitcoin addresses associated with it, though you'll only see one at a time (the last one). As soon as you get a payment in the displayed address, its address will change. You can still receive payments at that address, though that is considered bad practice due to anonimity issues.

Now to answer your question: "I read that when I buy something [...] I must then spend the rest to another unused address [...] as the first address becomes unsafe or the change is lost in mining fees or something."

Bitcoin works a bit different than money. A payment is:

References to earlier payments you received (i.e. the sources of money)
A list of pairs of (address + amount) (i.e. destinations)

When you reference an earlier payment you must spend it as a whole. You can't split it, like you wouldn't be able to split a 10€ bill in two 5€ bills.

For example: let's say you receive 10BTC payment. If you want to spend 1BTC you can't split it in 1BTC (paid) + 9BTC (left in address). You have to spend it all!

On the other hand, that's pretty much like paying 1BTC to someone else and sending 9BTC back to yourself. You could pay yourself to your original address, but Bitcoin-QT is smart enough to create a new (invisible to you) address which receives this change. The advantage of this "change address" is that I can no longer link your payment back to yourself:

Did you spend 1BTC and sent 9BTC as change, or perhaps spent 9BTC and sent 1BTC back as change? If you reused the same address, the change is obviously the one with the same address. If you let Bitcoin-Qt take care of it both will be new addresses and the money can't be traced back to you. This is what you meant with "the address becomes unsafe".

The key is: don't worry about this! Bitcoin-Qt will take care of all this for you! As long as you understand your accounts, addresses are disposable.

Now... what happens if Bitcoin-Qt somehow didn't send the change back to you? Imagine you just said "I want to send 1BTC out of this 10BTC" but Bitcoin-Qt forgets to send the change (this WON'T happen using Bitcoin-Qt, it's just a thought experiment).

Transaction fees are the difference between input and output, i.e. input - output. If somehow you only send 1BTC but forget to send back 9BTC of change to yourself, whoever mines this block will get the leftovers!


Finding the timing of blocks, afterwards? I understand that the timestamps on blocks are not fully accurate. Given only that information, it's efectively impossible to do retrospective analyses of timing of blocks. (For example, this; http://scienceblogs.com/builtonfacts/2014/01/11/is-bitcoin-currently-experiencing-a-selfish-miner-attack/)

Is there a way to get data on when blocks actually were mined, or (at least) when some API provider received the blocks?

I've tested blocktrail.com and they do provide an arrival time. Any provider will only have so much historical data though.

If you are only interested in data moving forward you could run your own bitcoin node(s) and use -blocknotify= command switch to record your own time(s).

You would need to consider when this notification is triggered.  Normally would be after the block is validated and longest chain is updated, not immediately when the node sees it.

Output from BlockTrail

{"hash":"000000000000000015aab005b28a326ade60f07515c33517ea5cb598f28fb7ea","height":320000,"block_time":"2014-09-10T13:55:18+0000","arrival_time":"2014-09-10T13:55:47+0000","nonce":2145106612,"difficulty":27428630902,"merkleroot":"57c6d11085df633a848eecf78befcdbbab58c2830ca380d4089d5013ab53d0df","is_orphan":false,"prev_block":"000000000000000021ecc2772de2ce57c6bd327c4ceaea52a0ecd70548b8ca41","next_block":"00000000000000001bbfee4521419de4f79c19580027b00f9739ee7b2f0b5c57","byte_size":227086,"confirmations":71045,"transactions":357,"value":262417274672,"miningpool_name":"DiscusFish \/ F2Pool","miningpool_url":"http:\/\/www.f2pool.com","miningpool_slug":"discusfish"}


My spv node received in a nTx = 2 in headers message I am coding an spv node for dogecoin. I am syncing the headers and I am exceping to have nTx=0 for all the headers received but for one of the headers i have a nTx = 2 and some weird data following...

{ version: 6422786,
 previousHash: 'b7ac5cc3ca94d8b154661cba795fc4912f3b6ce83a3c5669053e7f677b360dab',
 merklerootHash: 'd55d5c789080a64707a528ce06c80b36708910d80126f0b0f5c5a73534333354',
 time: 1407228150,
 nBits: 503697504,
 nonce: 0,
 hash: '47cf9eaf17f37672ef610c15c6aeb5257c318e76943b809d79c6fb486fd36115',
 transactionCount: 2 }

I am doing something wrong ?

I have found what I was missing.

Dogecoin switch to merged mining so the header has a new structure which I didn't know about. I found this wikipedia page (https://en.bitcoin.it/wiki/Merged_mining_specification#Merkle_Branch) which explain everything.

I should have noticed also that my nonce is 0. When I see this and that the next bit is not null I can extend my structure to a merged mining header.

I hope it will help people.


I own some bitcoin, but forgot how and where i stored them. How can I find my lost bitcoin? I purchased one bitcoin back on 2/8/14 and now don't recall having any kind of account information.  I actually forgot about the purchase until recently.  My email address has not changed since I purchased the one bitcoin back in 2014.  Not sure how to access that one bitcoin in the event I would ever want to sell it or just know how to get to it.  Thanks for any guidance you can provide.

Without any additional information, it is tough to provide help. Bitcoin is a decentralized network, so there is no central authority that can do something like authenticate your identity and provide access to your coins again. Understand that if you lost your ability to access the coins, they are essentially unrecoverable.

Owning a bitcoin is equivalent to owning the private key that controls that bitcoin, (or in some cases, trusting a custodian to control that key for you). So you'll need to figure out what software or service you used to generate a receiving address (and thus, your private key). It is possible you used an online exchange and left the coins on your account, or that you used some web-wallet (eg blockchain.info), or that you stored the coins locally (eg. a paper wallet). I believe at the time of your purchase, there were very few options available for hardware or mobile wallets, but it may be worth considering these options as well.

I would try searching your hard drives, email inbox, financial history (bank / credit card records for that time), social media, browser history, notes, or anywhere else you may expect to find a trace of the transaction. Use keywords such as "bitcoin, address, blockchain, wallet, wallet.dat, exchange, btc, bit coin, etc", basically anything you can think of that may turn up a clue.

You can also search your physical space, it is possible to store bitcoin using a 'paper wallet' (a bitcoin keypair printed onto paper). You could also have a string of words written down (12, or 24 most likely), called a mnemonic seed phrase (this tech would have just been coming out at the time of your purchase iirc). If you find either of these things, DO NOT share the keypair / words with anyone! If you do, they'll have full access to your bitcoin, and can easily rob you.

Best of luck!


How many confirmations do I need to ensure a transaction is successful? As a regular user of Bitcoin, I often send bitcoins to other, or receive BTC from others, sometimes this might be a trade or deposit. Some traders require at least 6 confirmation, some require at least 3.

I want to how many confirmation is enough to ensure the transaction is successful?

It depends on your risk model.

If you can trust the person paying you, you can accept payment on 0/unconfirmed if you want.

As a merchant or trader, you want to use the configuration that is more secure (no incoming connections permitted, explicity connect to well-connected nodes).

With zero confirmations you are vulnerable to the race attack and the Finney attack, as well as the 51% attack.

With one confirmation you are vulnerable to the 51% attack.  There could also be a miner with a lot of hashing power who could get a couple blocks in a row, so three confirmations removes most of them.

With six confirmations it is essentially mathematically impossible for an attacker with less than 51% of all mining capacity to get six blocks in a row. and still surpass the longest block chain.  With 51% or a lot more than 51% the attacker can get six confirmations by creating a parallel blockchain in which only transactions approved by the attacker get included in blocks.

A merchant like a retailer can likely accept even on 0/unconfirmed in most instances (e.g., purchases up to $100 worth).     A merchant that ships e-commerce might hold off until the transaction has three confirmations.

A cash, face-to-face cash trade will probably be best if three confirmations for a large amount, maybe one confirmation for small amounts.

Any recommendation would need to come only after determining which risks are deemed acceptible.


One private key in different locations? Can I still use my key pair to receive and send bitcoins, even if I imported the private key in another location? I wondered about this, when I planned to import a backup of my online wallet in a pc-client, but still wanted to use my bitcoin in the online account.

Or is only the latest location where I imported my private key able to operate with the bitcoin? (I'm still trying to fully understand the bitcoin universe)

Bitcoin works in a way that you don't actually own any coins, but instead you have the key to unlock them and spend them - so that you can send them to someone else who can then unlock them and spend them.

Using that logic, anybody that holds your private key can unlock and spend the coins from any computer anywhere in the world with an internet connection.

In terms of wallet implementations, it's a bit tricker to use the same wallet on different computers as there will be synching issues between the various wallets. The "change" from a transaction will go into another address in your wallet, which might not be present in your other wallet. Please read Wallet on multiple computers

Again, this depends on your wallet implementation. If you're using just the raw private key to make transactions, it shouldn't matter how many copies there are or where you broadcast the transaction from.


% of full nodes running Bitcoin Core versus other node software Is anybody able to tell me a credible source (for an article) that can show me the percentage of all bitcoin full nodes that are running Bitcoin Core (as opposed to other software)?
I could not find this information at bitcoincore.org or at bitnodes.io.
Thank you.

bitnodes.io, in its user agents chart, show an "Other" category, but probably it will include also older versions of Bitcoin Core.

On blockchair.com you can find details of which clients are used by full nodes, but they are grouped by user agents, so you need to manually count Bitcoin Core version and other clients.
on coin.dance you find exactly what you looking for, but right now is in maintenance, here there is a snapshot from archive.org: https://web.archive.org/web/20210124183839/https://coin.dance/nodes


Historical Price API in AUD I'm looking for an API that displays historical data for cryptocurrencies. I have a list of requirements, in rough order of importance:

Price in AUD (I don't care about other currencies)
Multiple cryptocurrencies (at least the major ones, but the more the better)
Returns historical data, not just current price (just the last week/month is fine)
Updated hourly or more

I've found a bunch of APIs and they all do two, maybe three of my requirements if I'm lucky, but never all.

I'm going to be graphing this data in Python/Django website, so I could either use a native Python API, make an HTTP request to get a JSON or CSV response, or display someone else's graph in an iframe like this API I found that shows a pricebox for BitCoin:

    <iframe src="https://cryptocoincharts.info/webmasters/priceBox/btc/aud" style="width: 300px; height: 200px;" frameborder="0" />

Does anybody know of an API that would suit my needs?

For anyone stumbling upon this is the future, I ended up going with the Poloniex API. It has everything apart from prices in AUD. From there I convert USD to AUD for values as I need them.


Bitcoin private network on Amazon EC2 I am looking to set up a private network of Bitcoin nodes over multiple machines (e.g, on multiple VMs on Amazon EC2) for experimentation. I want to be able to control how the different nodes are interconnected to each other in this network. Is there a way to do this on Bitcoind? The regtest mode that is commonly cited as a solution for this seems to have the ability to create multiple nodes on a single machine. Can it also be used to interconnect nodes across different machines according to a specified topology?

I want to be able to control how the different nodes are
interconnected to each other in this network. Is there a way to do
this on Bitcoind?

As per bitcoin.conf I suggest setting up the connect = X.X.X.X flag on your nodes. It will enforce connecting only to the peers specified by you. Not sure if this is the answer you are looking for though?


How to split the funds and send X% to fee wallet and the remaining funds to another wallet? Anybody have any idea about how to do it?

User send the bitcoins
X% goes to fee wallet
remaining funds goes to service wallet

I'm trying to use the "sendfrom" but it's not working because he only send the fee amount (or the first call), never the rest.

$sendingFee = $bitcoin->sendfrom($account, $addFee, $feeFormated, 0);
$sendingRest = $bitcoin->sendfrom($account, $addRest, $restMath, 0);

This is my code:

<?php

require("easybitcoin.php");
$bitcoin = new Bitcoin("root", "000000", "localhost", "18332");

function fee($fee, $bal){
    $final = ($fee / 100) * $bal;
    return $final;
}

#account
$account = "pizza";

#fee address
$addFee = "2N9xQyV6itnZNBv5NSLUy8ffXcfopVvP19v";

#Rest address
$addRest = "2MtEzMsT9eedTms9ivEQnjuHPRWw1DHnxyT";

#% charged
$tax = 10;

#balance
$balance = $bitcoin->getbalance($account, 1);

#do a math to remove X%
$feeMath = fee($tax, $balance);

#I was receiving "invalid amount" error. Fixed with this, I was giving 9 instead of 8 after zero. See satoshis for more.
$feeFormated = number_format($feeMath, 8);

#remove the fee from current balance
$restMath = $balance - $feeFormated;

#send the fee to the address xxxx
$sendingFee = $bitcoin->sendfrom($account, $addFee, $feeFormated, 0);

#send the balance minus fee to the address yyy
$sendingRest = $bitcoin->sendfrom($account, $addRest, $restMath, 0);

$err = $bitcoin->error;

#Print message for control
print_r("Fee TXID = " . $sendingFee . " Amount sent = " . "" . $feeFormated . "

");
print_r("Rest TXID = " . $sendingRest . " Amount sent = " . "" . $restMath . "

");

print_r("It's not working because: " . $err);

echo var_dump($sendingFee) . "

";
echo var_dump($sendingRest) . "

";

?>

It's not perfect (far from this) but please understand, I'm not a php guy, even a programmer, I'm just working in a personal project as a hobby.

Maybe should I use "sendmany"? If so, how to use this with php? I saw some examples on internet but nothing showing how to use with php and variables.

Thanks in advance.

Problem solved using "sendmany":

<?php
#SENDMANY WORKING
require("easybitcoin.php");
$bitcoin = new Bitcoin("root", "000000", "localhost", "18332");

$account = "pizza";

$arrayRec = array("2MsWztzmaxnsU3xetrKsD4E9ep4r2gYtXj9" => "0.00111",
                "2Mt7dkQiyExrNQTXu9D3qoCpWg3J5TJy9Up" => "0.00222" );

$send = $bitcoin->sendmany($account, $arrayRec);

print_r($send);

?>


How many coins are needed to ensure stability i.e. neither inflation nor deflation? The key to currency stability is to have neither too many nor too few of a currency in circulation. So what is the "Goldilocks" area going to be if Bitcoin really catches on and everybody wants to use it?

Could it turn out that demand will outstrip supply of the coins, resulting in inflation? Has this already happened?

It seems to me that if a popular retailer like Newegg were to begin accepting Bitcoins then this could cause a spike in use and inflation.

This question would be better for Economics SE, if it was still around. But oh well.

You can't really prevent short-term inflation and deflation spikes, as anyone with substantial enough money supply could sway the economy until it balances itself out. Also, a similarly rich person could cause the Bitcoin to rise and fall in value in a pump-and-dump cycle by buying Bitcoins over a long period of time, and then spending them all at once for profit. Rinse, repeat.

For a long term, you'd need to generate Bitcoins at the same rate as the Bitcoin economy grows. As the value would be really hard to estimate, setting it in advance would be impossible.

The main way I can see Bitcoin having a stable-ish value while allowing for the economy to grow and shrink would be through the use of a system akin to Digital Coin. Generally, the idea is that everyone could be creating their own currency that would be exchangeable for Bitcoin at a varying rate. The rate would vary based on the supply and demand of the private currency. There are a few mechanics to encourage people to use the private currencies, which I won't go into detail here. In this scenario, Bitcoin will be used as a standard of value - meaning everything will be compared to Bitcoin, but actual Bitcoins wouldn't be spend under normal circumstances. This way, Bitcoin in most cases wouldn't undergo inflation, but the economy built around it could.


Bitcoin Cash: difference between addresses My BCH wallet prefixes the addresses with a "bitcoincash:" string and the hash itself (without the prefix) is 42 chars. Let's say I need to send some BCH to an old address (34 chars, unprefixed), will this work? If not, what do I need to do to make it work?

Yes.

If your wallet does not support this, you can use https://cashaddr.bitcoincash.org to convert the old addresses to new addresses, and send to new addresses.


How do I migrate my Bitcoin Core wallet to an HD wallet? I created a wallet before Bitcoin Core 0.13.0 was released so my wallet is not a HD wallet. How do I make my wallet a HD wallet?

Since Bitcoin Core 0.17, there is an automatic way to directly upgrade a wallet from non-HD to HD. Simply start Bitcoin Core with the  the -upgradewallet option and have no other wallets (i.e. remove all -wallet= and wallet= options from the command line and bitcoin.conf respectively) being loaded. -upgradewallet does not work when multiple wallets are loaded. This will automatically generate a new seed and keypool while also retaining all of your old private keys and transactions so nothing is lost.

Prior to Bitcoin Core 0.17, there was no mechanism for migrating non-HD wallets to HD wallets. If you don't want to upgrade to 0.17+, then migrating your coins to an HD wallet is possible, at the expense of invalidating your backups and a bit of work.

First you will need to backup your current wallet. Stop Bitcoin Core and back up your wallet.dat file. Now rename your wallet.dat file to something else, like wallet-orig.dat.

Now start Bitcoin Core again. Bitcoin Core will create a new wallet.dat file. This one will be HD and that will be the file that you want to actually use later.

Once Bitcoin Core has started, encrypt your wallet and restart Bitcoin Core. Once you have restarted it, you should see no transactions and no (or one) addresses. Now get a couple of addresses and write them down somewhere. Stop Bitcoin Core again and backup your new wallet.dat file. Rename your new wallet.dat file to something else, like wallet-new.dat and rename your old wallet.dat file (wallet-orig.dat) back to wallet.dat.

Start Bitcoin Core again. You should see your old addresses and transactions. Go to the Send tab and send your Bitcoin to the addresses that you wrote down earlier.

Finally, stop Bitcoin Core, rename your new wallet.dat file (wallet-new.dat) back to wallet.dat. Back it up again and start Bitcoin Core again. You should now see transactions from your previous wallet sending Bitcoin to your new wallet. Once those transactions have confirmed, you have successfully migrated your Bitcoin from a non-HD Bitcoin Core wallet to a HD Bitcoin Core wallet.


How does storing the witness outside of the block prevent malleability? I have some question on how segregated witness work.

I'm reading this post and in the answer exist this phrase

  Since signature data (witness data) is stored outside the transaction (and outside the standard block), it means that that data doesn't have to be counted towards the block size.

Now I have three questions on this argument

The data of the scriptSig is moved from TransactionInput to RawTransaction, so the RawTransaction doesn't have malleability? Maybe I can't imagine what really happened to non-witness transactions during malleability, can you give me an example?
Why is the witness data stored outside of the block? What do you mean? I think I don't understand the sense of this space-saving because the witness data is present inside the blk file
How (If I understand correctly) does Bitcoin Core use the Merkle tree for verifying the signature? (this question is related to the first, I don't think I understood the phenomenon of malleability as it happens)

The data of the scriptSig is mooved from TransactionInput to RawTransaction, so the Raw transaction doesn't is malleability? maybe I can't imagine what really happened to non-witness transactions during malleability, can you give me an example?

The transaction ID is a hash of the entire transaction data structure (the version, inputs, outputs, signatures, number of inputs and outputs, locktime, everything). Elliptic Curve signatures, such as the ones used by Bitcoin, contain a random number as part of the signature. Using another random number will also lead to a valid, but different signature. If the signature changes, the hash of the entire transaction object would also change.

In segregated witness transactions, this signature data is not part of the base transaction data structure - this means that changing the signature will no longer change the txid, since the rest of the transaction has not been altered.

  Why the witness data is stored outside the block? what do you mean? I think I don't understand the sense of this space-saving because the witness data is present inside the blk file

Moving the witness data outside the block allows Bitcoin to effectively pack more transactions into a block - The space previously used by all the signatures is now available to add more transactions.

  How (If I understand correctly) bitcoin core use the Merkle-tree for verifying the signature? (this question is related to the first, I don't think I understood the phenomenon of malleability as it happens)

Merkle trees having nothing to do with signature verification. Merkle trees are used to build a commitment to which transactions are included in a block, which is then placed in the block header and locked in using the proof of work system. Transaction malleability affected this, since altering a transaction ID within the transactions selected for the block would alter the merkle tree - this is no longer possible for the reasons stated above.


Bitcoind Node crashes after using -dbcache option I've been trying to speed up my node sync by increasing the dbcache. However my node tends to crash overnight. My system is running ubuntu 18.04, 4GM of ram bitcoin core v0.18.

I've tried bitcoind -dbcache=4000, also tried setting it to 3000 and 2500. All have crashed overnight.

Any thoughts on improving sync time using this or other methods?

You are allocating far too much dbcache. If you allocate 4000 MB to the dbcache, you will use up all of your RAM and it will crash. Your operating system needs RAM, Bitcoin Core itself needs RAM outside of the dbcache. I would highly recommend that you do not set a dbcache at all as 4 GB is really not enough RAM to handle a larger dbcache, Bitcoin Core's other RAM usage, operating system RAM usage, and whatever else may be running on your machine.

I suggest that you start Bitcoin Core without dbcache and check what your RAM usage is (using top or Ubuntu's system monitor). See how much RAM is being used and how much is free. Then you can set a higher dbcache if you have enough free.

Bitcoin Core has a few other suggestions for reducing memory usage. You can set maxmempool=<n> to a number less than the default 300. You can reduce the maximum number of connections by setting maxconnections=<n> to a number smaller than 125. Note that that only is helpful if you happen to have a lot of incoming connections. Lastly you can reduce the number of threads being used for signature validiation by using par=<n> and setting it to a number smaller than the number of cores your CPU has.


How do I withdraw bitcoins from my MtGox account? I've purchased a few bitcoins on MtGox. Now I'd like to spend them. How can I actually spend the coins I purchased on MtGox?

I've looked around mtgox.com for any indication of private keys, bitcoins addresses, hashes etc but didn't see anything. I'm fairly new to Bitcoin so there's probably something fundamental I don't quite understand yet.

Cheers!

Easy: you transfer them to other addresses. Go to Mt Gox, log in, select "Funding Options," select "Withdraw," select "Bitcoin" in the drop down box. You then can put in an amount, and an address of where you want to send your BC (bitcoins).

If you want to know where to spend them, check out https://www.bitcoinstore.com/ as an example. Personally, I am keeping mine as an investment - I have owned them for around 6 months and have made 150% returns. But you can also use them to pay friends around the world without paying a middleman.

Enjoy your cryptocurrency!


Bits target, Increase/Decrease in ease of mine I am currently studying Block Chain technology and at this moment studying the contents of blocks.

To my understanding; A block has to be mined every 10 Minutes.

If the Bit Target sees that Blocks are struggling to be mined every 10 minutes will it then decrease/increase the Bit Target?

If the Bit Target sees that Blocks are easily being mined in less than 10 minutes will it then decrease/increase the Bit Target

I know that the nonce is random I believe it starts at 0 and then is appended to the previous merkle root and then hashed and if its below the bit target then success and if its above then it increases the nonce +1 and repeats the process (Basically trial and error)

However the reason I found struggle is because I dont know if decreasing/increasing is making it more difficult/easier since I don't know the number ones its been hashed.

If somebody could answer my two questions and confirm the things I am saying are true/false really would appreciate it.

Decreasing the target makes finding the correct block hash harder because the range of possible values is smaller. There are less numbers for 1 to 10 than there are from 1 to 100. So by making the target smaller, it becomes less likely for the correct hash to be found and thus the difficulty increases.

Increasing the target makes finding the correct block hash easier because the range of possible values is greater. By making the target larger, it becomes more likely for the correct hash to be found and thus the difficulty decreases.

The relationship between difficulty and the target is inverse.


If bitcoin exchanges can be "scammed" why is bitcoin better? Reading a post about someone getting scammed in an exchange and thinking about becoming a bitcoin user, now I am wary about this form of currency exchange.

If the exchanges can scam you, see How to denounce a scam exchange, such as this exchange called BitNake, then why would I use this form of currency? At least with US Dollars we are insured up to $250,000 per bank account by the FDIC.

Because you and I are not exchanges and Bitcoin is Peer to Peer. Exchanges are irrelevant to the question whether Bitcoin is "better".

Before you start, make sure to read all the introductory material on www.bitcoin.org so you know what you're doing and are choosing the right wallet and exchange.

Some exchanges are scams. Some are not, but may go out of business at any time, just like any company. Hopefully the ones linked above are at least not scams.

Use a reputable exchange (or another method, like localbitcoins) to buy Bitcoins and immediately withdraw them to your own local wallet. Don't leave Bitcoins on an exchange or web wallet any longer than required.

I've never heard of BitNake, but just the name screams scam. Stay away.


Does bitcoin-core software/client connects with only same version number nodes? i am trying to connect to maximum number of nodes.

i noticed there are many receive version message in debug.log file

so i have question, does the bitcoin-core connects to only those having either same version number or in short range of version message of our bitcoin's version message ?

or does it connects to all and any nodes which completes the handshake ?

You can see from the Debug Window ("Peers" tab) that the Bitcoin Core client connects with multiple clients not only with different versions but different implementations.

So to answer your question: No.


Why is it impossible to derive public key from address? This is my first bitcoin transaction.

Why this transaction doesn't show my public key? help message on the same page says that,

  It's impossible to determine the public key from a Bitcoin address,
  but if the public key was ever used on the network, it is listed here.

I was thinking that my address is public key. Is it really impossible to derive public key from address?

other details, blockchain.info transaction & address details.

The address is only 160-bits. The public key is 257-bits. So there's no way to go from an address to a public key -- information is missing.

The shortest hash with sufficient security is 160-bits. So Bitcoin uses a 160-bit hash as an address to make the address as short as possible. However, there is no known public key scheme that is sufficiently secure with only 160-bit public keys. So the public key couldn't be used as an account address without making the account longer.

However, the public key is needed to verify a signature. So when you perform a transaction to claim coins sent to an account, you must provide the public key. When validating the transaction, the public key is checked to ensure it has the correct hash (matching the account) and then the signature is checked to ensure it is valid for the transaction and made with the supplied public key. From that point on, the public key corresponding to the address is publicly known.


How do traditional transactions take place (paypal, banks, etc) in comparison to Bitcoin transactions? Here we talk about bitcoins and blockchain. It is said they are more secured, and people ask questions about how they are implemented.

Since I am a complete newbie to blockchain, and I don't know neither how traditional transactions platform works, I would like to know if there is a comparison between blockchain and, for instance, paypal's transactions system.

A traditional payment with PayPal or a bank works like this:

You find the identifier of the intended recipient.
You request a payment being made in your name to the intended recipient.
The central entity checks your balance in their books.
The central entity deducts the payment's value and fees from your balance.
The value is then added to the recipient's balance (possibly by a cooperating third party).

→ The central entity is in control of your funds and transacts on your request.
→ The central entity has full information on your payments.

A transaction in Bitcoin works like this:

You find the identifier of the intended recipient
You signal your intention of signing over some of your funds to the intended recipient, you add a transaction fee to incentivize confirmation
The transaction's validity gets vetted by all other participants of the network
When the transaction is confirmed the recipient is in sole control of the assigned balance.

→ The users transact on their own behalf.
→ Only recipient and sender are aware of their involvement, the payment is private.


No sign of my private keys in Electrum wallet ... where do I find them? I recently downloaded an Electrum wallet (version 1.7.3) and made two Bitcoin purchases. The wallet shows the public receiving addresses (including those receiving addresses which I used to receive the coins) and the amount of coins received in these transactions. My problem is that I can't see the private addresses anywhere and don't feel confident that the coins are still in my possession (of if they ever were).

I am guessing that when (in the Classic Gui) I click on the 'Send' tab, enter the address for the intended recipient in the 'Pay to' slot, the 'Amount', 'Description' of the transaction for my own benefit, the 'Fee', and subsequently click on 'Send', the client might then perhaps disclose a private address along with an address for any change to go to. Is this correct? If not, can someone be good enough tell me how it does work?

I feel uneasy that I cannot see the private addresses anywhere. And, of course, I can't spend the coins until I have the private addresses. (I would like to commit my private keys to paper.)

In the 'Settings', there is a tab labeled 'Import/Export' and one of the options there is to 'Export' / 'Import' Private Keys. Does this mean to 'Export' the private addresses from the wallet to somewhere else (another file which one might create, perhaps), or to 'Export' them from somewhere else into the wallet? Does 'Import' the Private Keys mean to bring them into display somewhere in the wallet? I just don't understand and am afraid to try out either of these commands just in case I somehow lose my Bitcoins.

As you can see, I'm not exactly tech savvy and would really be grateful for help here from any Electrum wallet users on this forum.

Terrylei

You ask a lot of things, so I'll explain how Electrum works for you and hope it is what you need.

Electrum uses a seed (twelve words length password). Your private keys are derived from this seed every time you make a transaction.

The only thing you need to spend the coins received in your Electrum addresses is that seed. You can export the private key for one of the addresses in your wallet, but you should not do it. Keep your Electrum private keys PRIVATE.

You can also import a private key from another wallet, e.g Blockchain.info to be able to spend the coins in that address. It will be added to your wallet as a imported address, imported addresses behave kinda different to Electrum seed addresses. So keep a copy of the imported private key, just in case.

You will always be able to restore all your Electrum addresses using your seed, but not the imported keys, as they are not on your seed.


Lightning network Fraudulent Channel Close If a lightning network transaction between 2 participants, where the payment is routed by multiple channels, does it means that all full LN nodes that routed the payment should stay online to avoid Fraudulent Channel Close ?

No, a channel’s closing affects that channel only.

When routing payments, a channel’s state will be updated to account for that payment. When closing the channel, both participants will make sure that the most recent state is published.

This process does not involve any external channels/participants. Closing a channel will not affect the balance of any other channel, as each individual channel’s participants will have their own account of what that channel’s most recent state is. The closure of another channel does not affect this state, even if it is closed fraudulently.


What happened to my coins, balance account is zero ... hacked? Yesterday I was surprised to seen that my wallet drop to zero by this transaction id : 504ebc5aa9c6dcdbfadfd97ccd47a289a309d829530e529e558b715563c4ec3b
It seems the adress : bc1q8yl5pq7p0cg6dtd85lz3hznj30rhe8k2s5kxhm
has picked all my BTC, plus others small transaction from somebody else are also availlable
Right now the transaction has been 36 times confirmed
and my balance show zero BTC.
Seems to be hacked ?
Did someone can help as I'm a newbie
Thx

7,5 hours ago your funds were moved in transaction d25efe9d5f1f2cc1fc253e4b32631fdb99870fb29b34d06fb48f43fb0de7ae92 to address 13fgTXgdyNVrq9qUxrkGzjoBVjQVZ9nKx4 which belongs very likely to bittrex.com . So the exchange might have information about the sender.
I'd report it to both the exchange and the police a.s.a.p.


How to decrypt MultiBit private key with 128 bytes line and 52 bytes line? I want to recover my bitcoin private key stored by MultiBit. I've written down private key as text while using MultiBit classic. I don't remember how I get the text of private key. The text consists of two line. First line has 128 characters and starts with U and contains +. Second line has 52 characters and starts with q, contains /.
As far as I know, the text may be encrypted. And I also wrote down password, so I assume I can decrypt the text with the password, but I don't know how.
I've tried the instruction of Export and limited import of private keys with pasting the text to a file and executed the openssl command. However, I've got bad decrypt message and 64 bytes result file. It doesn't seem successful.
I want to how to decrypt my private key text and get valid private key.

I found an answer here: Decrypting keys from Multibit
The way Export and limited import of private keys  explained is almost right, but it's missing a parameter, -md md5. I added that and it worked.


Problems with Antminer U1 - why doesn't it work? I've got other Antminers working, this one just throws these errors in debug mode - is this fixable?

[2014-01-30 19:03:10] Bmsc send golden nonce
[2014-01-30 19:03:10] ANT0: GetResults (amt=0 err=-7 ern=110)
[2014-01-30 19:03:10] Bmsc Read: No data for 101 ms
[2014-01-30 19:03:10] Bmsc recv golden nonce timeout
[2014-01-30 19:03:10] USB uninit ANT0
[2014-01-30 19:03:10] USB free ANT
[2014-01-30 19:03:10] USB unlock Bitmain 1-5
[2014-01-30 19:03:10] RES: Bitmain (1:5) lock=0
[2014-01-30 19:03:10] USB res unlock Bitmain 1-5
[2014-01-30 19:03:10] BTM looking for ANT 10c4:ea60 but found 0e0f:0003 instead
[2014-01-30 19:03:10] BTM looking for ANT 10c4:ea60 but found 0e0f:0002 instead
[2014-01-30 19:03:10] BTM looking for ANT 10c4:ea60 but found 1d6b:0002 instead

I'm running cgminer 3.9.0 from the fractal branch, though all the versions that support the antminer-u1 seem to have the same results, so I don't think it's necessarily the miner software.  I'm running with these options to underclock:

--bmsc-options 115200:20  --bmsc-freq 0681 -D

I had the same error "Bmsc recv golden nonce timeout" after to try Windows10 Install. So I reinstall Zadig drivers, and reconect my U3. So works fine again.
I dont know if is your case, but:

To reinstall your Zadig (http://zadig.akeo.ie/):
1) choose Options | List All Devices
2) Select CP2102 USB..
3) Choose "Replace Driver"


Did Bitcoin Core relay blocks sequentially or in parallel to peers before Compact Blocks? As I can see in the Bitcoin code, currently a node sends a block in parallel to all its peers. This makes sense as the block sending time is relatively small compared to the P2P latency. However, my question is how this mechanism worked before BIP152 when a peer had to send 1MB block? In that case, it makes more sense to send the block first to 1 peer before start sending to the others. This is because if we finish sending the block to the first peer, we will utilize his upload bandwidth faster.

It isn't as simple as "sending sequentially" or "sending in parallel".  Each connection is its own socket and the kernel performs packet scheduling. The Bitcoin protocol doesn't have any acknowledgement. When a node sends a message it hands it to the TCP stack which often will just immediately accept the whole message. It's then up to the kernel to send it out.

So in one sense it's not even really possible to send it out 'sequentially' without some kind of massive redesign,  but it also wouldn't be generally desirable to do so: TCP won't send more than the current receive window without getting an acknowledgement. So if you were to wait until TCP has sent all the data to one peer before starting to send the next, you would find yourself waiting around sending nothing part of the time.  You would also increase exposure to tarpit attacks, where a malicious peer intentionally slows down reception in order to delay propagation to everyone else.

So Bitcoin has always gone through the peer list and handed whatever it had to send to each peer, leaving it up to the kernel to schedule the packets.   It has been proposed in the past to hand it to just a few and then wait for them to get it before hitting the rest, but it's not obvious how to robustly prevent tarpits,  and BIP152 largely moots the question.


How can I "redeem" a private key without downloading a client? Let's say that I have generated some private keys offline and use them for my savings. For my spending money I prefer to use an online wallet instead of downloading the client.

Is there any service online where I can enter

My private key
A destination address (the online wallet)

and simply click a button to send the whole balance to the destination address?

It [edit: was] possible to redeem a private key at MtGox. Under "Add funds", choose "Redeem private key" and pick the format that you want to enter the private key in. The full amount of the private key will be added to your MtGox account.

Update: It is also possible at My Wallet (blockchain.info).

Update2: Mycelium wallet for Android app has a "cold storage" feature.  You simply scan (or enter) the private key, then scan (or enter) the Bitcoin address t send the funds to.  Hit send and you are done.


Ethereum alternative to bitcoind A client have payment system that uses bitcoind wallet / daemon.

I know he can expand to litecoin / dogecoin by just copy litecoind / dogecoind then console commands are almost the same.

I am wondering if same possibility exists for Etherium?

What software I need in order to replace bitcoind? I googled already, but I can not find anything.

Ethereum nodes are geth and parity.

Unlike Litecoin and Dogecoin, Ethereum is not a derivative of Bitcoin. Thus, the RPC interface is completely different, and you will not be able to simply point an existing  Bitcoin based system at the ethereum node. You will likely need to rewrite whatever you require to work with Ethereum APIs.


If the sender address is known is it possible to find the recipient address? Let's say I give someone an address to send me some bitcoins, when I eventually use these bitcoins to send to someone else can the person that has my address somehow know the address of the person I sent the bitcoins to?

I'm asking this because I'm using a new address whenever I receive bitcoins (as recommended), but I want to collect my bitcoins in one place so I would only have to save one private key, and I wanna know if my privacy will be compromised.

The person you gave your address to wouldn't know if the address you subsequently sent the funds to was actually your cold storage or a merchant, or friend, etc. However if you did business with this person again in the future, and he sees that you again sent it to the same address you sent it to before, then he could assume it might be your address.

With that said, there are BIP32 wallets that allow you to only store one extended public/private key pair that will allow to restore the millions of private keys and address that you may ever generate. This way you wouldn't have to keep all funds in a single address, instead just a single extended BIP32 key chain.


Source of entropy for PoW hash How does bitcoin do it to generate an (upredictable) hash in each new block with sufficient randomness so that no one can precompute it?

Each block contains the hash of the previous, which is unpredictable. Also, the transactions in each block themselves are unpredictable because one can't tell who is paying who and how much.