Bitcoin Mining ASICs used for cryptographic application? Rainbow tables? What is the potential that the ASICs being developed for mining could be used for other cryptographic applications such as building rainbow tables? I know that for instance those that crack GSM with rainbow tables utilize systems similar to those for mining for building rainbow tables and decrypting GSM packets. Such systems are also used for building MD5, SHA, rainbow tables for traditional password/shadowfile cracking.

TLDR; forget about it.

The ASICs are optimized for bitcoin mining. Not just Sha256(Sha256(x)) hashing, but very specifically bitcoin mining. You can't even use them for the Sha256(Sha256(x)) hashing in the rest of the bitcoin system, like hashing transactions.

The ASICs are made for hashing 80 bytes, where you give them the midstate from hashing the first chunk (64 bytes), and 12 bytes from the second chunk. They then try all variations of the last 4 bytes to try and find a hash that starts with 4 zero-bytes. Only values that result in the 4 zero-bytes are reported at all. That's basically what mining is.

The ASIC could aid in password cracking if:

the hashes are generated with sha256(sha256(x))
salt + password = 80 bytes
the hash starts with 4 zero-bytes


Setting wallet directory independent to data directory Obviously with datadir=C:... I can chance the directory bitcoin uses. I would like to store my wallet on a different hard drive than the blockchain. Is there a command for that?

I don't think you can make bitcoin core look for the wallet.dat file outside of the specified data directory, but I think you can make a symbolic link called wallet.dat in the data directory and have it connected to the actual file on another drive. You can find info on how to do that here:
http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/


Bitcoin Core and Blockchain.info Can I use the wallet I created in blockchain.info with my local Bitcoin Core program ?

Or in other words, can I transfer the online created wallet locally ?
(by exporting or something similar)

You should be able to do this. You can retrieve your blockchain.info mnemonic seed phrase, and then enter it into the bitcoin core wallet to create a second instance of the same wallet.

It is worth noting that after doing so, you will still be able to access your wallet through blockchain.info. Because of this, if you are only planning on using bitcoin core from this point on, it may be smarter to just create a new wallet with bitcoin core, and then send all of your bitcoin from blockchain.info wallet to bitcoin core wallet. This will reduce the possible attack vectors for someone trying to steal your bitcoin. Remember to make good backups of your mnemonic seed phrases!


What are version bits? What does Pieter Wuille's version bits proposal change? How does a miner signal support for a particular fork? Can the version bits system be used with hard forks?

In the Bitcoin blockchain, each block has a 32-bit field called version. Right now, it takes on simple small values like 2 or 3.

As an example of changes, block version 3 introduced new rules about transaction validity, as well as anti-malleability measures. Miners with the new Bitcoin client create blocks with the version set to 3 to signal their capability to other network participants. Once enough v3 blocks are mined, the Bitcoin clients start enabling their incompatible (potentially fork-causing) new features, and also reject blocks with versions below 3.

The version bits proposal is a generalization of this concept. Suppose someone proposes an incompatible feature X and wants to see if they can gather support for it. They somehow agree on which bit to use in order to show support for this feature, and compatible clients will mine blocks with this bit set to 1. To fabricate an example as an illustration:

Version field: 00001000 00000000 00000010 00000000
                   ^      ^            ^
                   |      |            Supports large blocks
                   |      Does not support infinite inflation
                   Supports cat emoticons

This allows multiple features to be proposed in parallel rather than sequentially.

The rest of the article talks about consensus, recycling old bits, and other related pragmatic considerations.


Understanding Bitcoin Can someone maybe help me to understand the idea behind Bitcoin, because I really don't get it.

What I understand is the idea of mining, that there is the chain where each transaction is added to and it is decentralized which means that everyone is able to run his own instance of the chain (so no government or company can controll it completely).

But lets say I own one Bitcoin (an hash). What stops me to sell this one on different chain instances? As long as I understand, they are decentralized and dont have to synchronised at each transaction. Maybe they will find out when they synchronise at one point, but then it is to late.

Also the chain become bigger and bigger as more people start to make Bitcoin transactions. At the moment the chain has just a few GB as far as I know, but in the future it will have petabytes or more...and at this point still companies like Google or governments can store it, which destroy the idea in the first place.

You seem to understand the concept of decentralization, but also seem to be struggling with the concept of consensus.

  But lets say I own one Bitcoin (an hash). What stops me to sell this one on different chain instances? As long as I understand, they are decentralized and dont have to synchronised at each transaction.

What you are missing is that all the decentralized chains are really the same chain.  For the most part, there are no "different chain instances".  Yes, there can be a fork, where half the network thinks block A is the tip of the chain, and half think that block B is the tip.  However, this almost always gets resolved when the next block is found.  It is very difficult to pull off a double spend, and virtually impossible if the recipient is being cautious.  Most merchants/exchanges will wait for at least a single confirmation, often times more for larger value transactions.  Even before a single confirmation, double spends are very difficult.

Bitcoin is more than just a protocol for decentralizing a ledger.  More importantly, it is a protocol for coming to consensus on the state of that ledger, even when the participating nodes do not trust one another.  It is this ability to come to trustless consensus without a centralized source of truth that makes Bitcoin revolutionary.

As for the size of the chain, your personal blockchain can be pruned to require less data, an improvement is underway to allow it to be pruned even further, and the price/Gb of storage is still decreasing.  This is a concern, but it is being addressed, and is unlikely to become a major issue for some time.


Single tx included in two different blocks https://www.blockchain.com/btc/tx/a7bacce00e5df85d3547a3f83ac10c65eec30f715c1d77d8d4a7bc17fd470965

How is it possible that a single tx is included in two different blocks?

Isn't it considered double spending?

Occasionally, minor alternate chains emerge if multiple blocks are found for a given blockheight. Usually, these alternate chains only last for a single blocked, and are quickly dropped once another block has been found, allowing one chain to become longer (and thus have more work).

More rarely, these chains might last for a couple of blocks.

Block 525890 for this tx is not part of the main Bitcoin chain, and thus the tx was unspent when block 525891 was processed.

525889 ------ 525890 ------ 525891*
      \------ 525890*

The blocks marked with * contain the transaction in question here. As you can see, they occur on separate, parallel chains. Of these, only the chain extending 525891 survived, resulting in the version of block 525890 containing the transaction being dropped.


Blockchain.info returns "None Standard Script Output" when submitting a transaction? I dont know what is wrong

var insight = new Insight('https://insight.bitpay.com','livenet');
insight.getUnspentUtxos('1MkZVyKqNB5jpJDpfhp4TkDikFwdQM44he', function(err, utxos) {

if (err) {
        console.log('Error in getUnspentUtxos: ' + err);
    } else {
        console.log('utxos' + ' :' + JSON.stringify(utxos, undefined, 2));

        var transaction = new bitcore.Transaction()
        .from(utxos)
        .addData('pime')// Add OP_RETURN data.
        .to('1J4u97VGMz4GV7YFfRjtKLDchZ5zjiKLu4',15000)
        .fee(1000)
        .change('1AG1c1t3FAAEFdxmzm3wTg7XAnRGSwX5QA')
        .sign(privateKey);

        console.log(transaction.serialize());

        //console.log(transaction);

    }
});

This is the result: http://pastebin.com/raw.php?i=YNaHBcmU

There is nothing wrong with this transaction, the website you tried to submit it through (blockchain.info) is defective. I have broadcast it for you, and it is visible as a confirmed transaction on most block explorers.

bitcoin-cli decoderawtransaction is a useful tool which will let you decode and view the transaction have created prior to submitting it to the network, and bitcoin-cli sendrawtransaction will allow you to broadcast the transaction without relying on possibly faulty third parties.

{
  "txid": "63913178feb485db6f25c9f7940e3d17175ae7a51bf1ae58acf8f11ee95a2966",
  "version": 1,
  "locktime": 0,
  "vin": [
    {
      "txid": "f713e91b7df1dc4e4e85c7e2d9a050ca95408d1f578925f54aa93dc7bc98daa7",
      "vout": 0,
      "scriptSig": {
        "asm": "3044022012051ad672731cf555964c23d31defb67b06a85ea7de4843777d7058d3a084490220567864bf79669a8cb48e8de29f31fb29caef56f741ab9145424b3430af7b317001 038042cf5da3747c559e1d77e574eb81842958ef0cbc0461c1b783eda091afa782",
        "hex": "473044022012051ad672731cf555964c23d31defb67b06a85ea7de4843777d7058d3a084490220567864bf79669a8cb48e8de29f31fb29caef56f741ab9145424b3430af7b31700121038042cf5da3747c559e1d77e574eb81842958ef0cbc0461c1b783eda091afa782"
      },
      "sequence": 4294967295
    }
  ],
  "vout": [
    {
      "value": 0.00000000,
      "n": 0,
      "scriptPubKey": {
        "asm": "OP_RETURN 1701669232",
        "hex": "6a0470696d65",
        "type": "nulldata"
      }
    },
...
}


How to generate a large number of accounts via hw wallet and save addresses to file? I work in a company which uses a ledger blue hw wallet.  They need to generate bitcoin and eth accounts to send to users to deposit to.  Currently they have people generating one account at a time in ledger, copy the address, paste the address into our system.  We need thousands of addresses (whilst keeping the private keys safe on hw wallets) so this takes hundreds of hours.

I was surprised that neither trezor nor ledger blue have an app or utility which will spit out a CSV of accounts on the attached PC, keeping the private keys on the device.

Has anyone found such an app?

Ledger blue seems to have no api, but trezor does. Has anyone found a way to do something like this through the trezor api?

We could easily write a program to generate thousands of wallets, and run it on a new pc which was never connected to the net, but this won’t allow us to use the hw wallet to keep the private keys unfortunately.

Your best bet would be to export the xpub key for each account from your ledger. Once you have that, generating new addresses can be automated via any number of bitcoin libraries, such as bitcoinjs-lib. Similar options exist for ethereum.

I'm not entirely sure if they have a straighforward way to export the xpub, but I recall seeing it in the ledger live logs at some point. You can either use that, or connect to a wallet such as Electrum, which would export it for you.


Create Custom script from bitcoind I'm able to create multisig with bitcoin-cli with addmultisigaddress

bitcoin-cli addmultisigaddress 2 '["'$ADDR_MITT_1'","'$ADDR_MITT_2'","'$ADDR_MITT_3'"]'

But How can I add extra OP like CLTV or another OP? Can I use bitcoin-cli to generate redeemscript and address?

You cannot. Bitcoin Core cannot reason about arbitrary scripts and does not have the capability to sign for them. As such, it cannot create arbitrary scripts and store them.

You can create the script yourself and import it into a wallet using importmulti. This will only add the script to the wallet to be tracked. This will only let your wallet see transactions and compute a balance. Again, Bitcoin Core cannot sign for arbitrary scripts, it does not know how to. So importing a script does not mean that the wallet will be able to sign transactions that use that script. It is purely for transaction tracking.


How does SPV prevent double spending of UTXO? I am new to Bitcoins. I have read about how double spending is prevented in Bitcoins.

Suppose  A, a peer, receives 'B' BTCs from various transactions: B1,B2,B3, etc. Also, A had spent 'S' BTCs in various transactions S1,S2,S3, etc.  Now, whenever a new transaction is initiated from A to B (eg: A wants to transfer X bitcoins to B), the transaction has to be verified as follows.

Fullnodes have the Unspent Transactions Output (UTXO) database. A's address is scanned in this database and checked if A has any unspent bitcoins. If there are at least X unspent bitcoins against A's address, then the transaction is legitimate.

Q 1) Where does SPV and Merkel trees come into picture during the above-mentioned verification process? I have read elsewhere on the internet that SPV nodes will query for the previous transactions B1,B2,B3, .. and S1,S2,S3 & check if whether A's claim is valid or not.

Q 2) How many previous transactions do usually SPVs look into? My understanding is that SPVs have to look at all the transactions associated with A's address. What if A does not input all its previous transactions? (Eg: A hides its some of its spending transactions, say, S1)

In a bitcoin transaction, A's address is not scanned for spendable Unspent Transaction Outputs (UTXOs). Full nodes simply check if the inputs of the transaction are really unspent. There is no scanning of addresses involved.

UTXOs are stored as the transaction id (txid) and the output index of the transaction that created them. You cannot reference the outputs to be spent by address, the address merely specifies which private key must sign the input script in order to claim the UTXO.

Suppose you advertise addr1 for donations, and you receive 3 donations D1,D2 and D3 on that address. You have 3 UTXOs and not 1. The only thing is that they can be claimed by same private key. Hence, there is no looking around for previous transactions. Wallet has to specify which UTXOs it is consuming.

SPV allows a lightweight client to verify that a transaction is included in the Bitcoin blockchain, without downloading the entire blockchain. To verify that a transaction is in a block, a SPV client requests a proof of inclusion, in the form of a Merkle tree branch. It does not check for double-spend on it's own. Rather it relies on the full node servers it is connected to do so. To prevent from being cheated from single server, they connect to multiple servers to get the block headers.
From Bitcoin Wiki:

  The level of difficulty required to obtain confidence the remote node is not feeding you fictional transactions depends on your threat model. If you are connecting to a node that is known to be reliable, the difficulty doesn't matter. If you want to pick a random node, the cost for an attacker to mine a block sequence containing a bogus transaction should be higher than the value to be obtained by defrauding you. By changing how deeply buried the block must be, you can trade off confirmation time vs cost of an attack.

You might also want to look into Fraud Proofs which would allow full nodes to prove that information propagated on the network is invalid, e.g. allow full nodes to point out double-spends to thin clients.

Another Reference: Thin Client Security


Has consensus been reached regarding the block size? Many news from one week ago are reporting that transactions take longer to be processed because we are reaching the 1MB limit of the blocksize. Which causes transaction to be buffered, and prioritized depending on fees.
The news article report that there are tensions between two groups of developper, Bitcoin Classic and Bitcoin Core. One team wishing to augment the block size while the other would rather keep the soft unchanged.

By looking on https://tradeblock.com/bitcoin/ it seems that the blocks produced are still under 1MB but the mempool currently reports size of 4.53MB

Has consensus yet been reached regarding the block size ?
Are we still experiencing trouble ?
What has been decided ? Where can I get more info ?

There is and has been huge consensus since the scalingbitcoin.org conference in Hong Kong in December 2015 in favor of going with the Segregated Witness solution. SW had been implemented half a year earlier in a side chain but in Hong Kong Peter Wuille (starts around 35 minutes or later repeated here: https://youtu.be/NOYNZB5BCHM ) announced that a way to smoothly incorporate it into existing Bitcoin (via a Soft Fork) had been found.

The main goal of SW was to eradicate transaction malleability but it has many other advantages, as well as the nice side effect of making the effective block size larger. To around 1.8MB, although the exact amount depends on the type of transactions people do, it could be more.

The finishing touches are being applied to SW in a test network right now, while wallet software is also being updated to make use of SW transactions so their users will enjoy its benefits. Last I heard SW is scheduled to be rolled out in April 2016.

Pretty much everyone agrees, including on the opposing team, that SW is a great solution. Unfortunately for political reasons, the classic team have decided to keep spreading untruths and FUD about SW and the Core team. For example that SW is more complex than a straight up doubling of the block size through a Hard Fork or that such a Hard Fork could be rolled out faster. As well as unfounded conspiracy theories about ulterior evil motives of members of the Core team.

Fortunately classic is an irrelevantly small group of people who for the most part clearly don't know anything about Bitcoin.

Core has almost unanimous miner and community support and is streaming ahead with improvements, SW and many others.


How safe is BitcoinCore since it is using owner's passphrase? When I want to create a wallet with BitcoinCore by going File->Create wallet, it asks me to choose a passphrase for it. Over the mouths exploring Bitcoin I learned that it is very unsafe to use custom passwords since they can be easily cracked (if I'm not mistaken, this type of wallet is called Brain wallets). I'm assuming that the passphrase will be used as a seed for a random generator in order to create private key for that wallet, and all this seems pretty unsafe to me.  Also I noticed that there is a checkbox saying Encrypt wallet. Does this mean if I don't make this check, my wallet will be unencrypted and therefore unsafe?

No, not all passphrases are used to generate the private keys for a wallet. Only specifically brain wallets do that.
Passphrases in actual wallet software like Bitcoin Core and Electrum are used to encrypt the wallet. The private keys are still randomly and securely generated. Your passphrase is only used as an encryption key so that the private keys are stored encrypted on disk.
It is safe and recommended that you encrypt your wallet with a passphrase. If you choose to not encrypt your wallet, then the private keys will be stored unencrypted on disk and any person or malware with access to your computer can steal your private keys and thus your Bitcoin.


Looking for a comprehensive ICO dataset (prices & dates) I'm working on a short research project on the performance of ICOs and how that relates to the overall sentiment in the crypto market. Unfortunately, I've had no luck so far looking for the required data. I need data on ICO dates and prices as well as price series for the post-ICO period. I've so far only found disjoint sources and no comprehensive dataset. Can anybody point me in the right direction?

Thanks!

I'm developing an open source software to unify all these disjoint sources in one database. I've found an interesting free API service (IcoBench) that have a lot of information for ICOs, like prices, team, even ratings and a lot of more. The post ICO prices are not stored, but you can use coinmarketcap.com for search historical prices after the ICO was ended and be launched to the markets. I've developed an API wrapper and web scraper for that page that works in Python, check out.

I will advise when the project will be more advanced. Currently, this kind of open source unification is a huge neccesary work in cryptoworld. Cheers!


Replay protection HF or SF? I am naively under the impression that just about anything can be a soft fork nowadays, and that this is one of the benefits of Segwit.  Also, it seems that many claim in order for Bitcoin Core to implement replay protection, a hard fork is required.  This seems contradictory.  Perhaps someone could correct any of these assumptions?

Replay protection is only needed in the case of a Hard Fork.

To understand why this is true you should first understand what HF and SF are.

A great answer on the difference of Soft or Hard Fork can be found here


Why is the reward decreasing while the difficulty of mining is increasing? I was wondering why Bitcoin has been designed in a way that rewards are decreasing while the difficulty of mining is increasing.

To me this is counter-intuitive and leads to the situation when miners from the early era were able to gain substantially more coins for doing substantially less work. Isn't that unfair?

Early adopters or miners make more profit. One could call this unfair, but that's life. Why does it need to be fair?

The reward is decreasing because the total amount if bitcoins is limited of time and the idea is that the incentive for mining should shift over time from the reward bitcoins gained when creating a block (aka. the coinbase transaction) to the transaction fees of the transaction included in that block.


BTC Blockchain WALLET ACTIVITY Although I can see all transactions in my "wallet activity" I pasted my wallet address into Blockchain Explorer expecting to see the history of transactions in that wallet. It directs to a page that shows no transactions....what am I missing and how can I see this info on the Blockchain?

Many wallets that are designed to facilitate an easy user-experience will simply display one receiving address at a time. Once that address receives funds, a new address will be displayed. This helps adhere to the best-practice of only using an address once, which is very important for privacy.

With that in mind, if you're just copying the receive address as a means of looking up your funds on a block explorer, then it is expected that you'll be shown an address with zero balance. To view your addresses with a balance, you'll need to look up the receiving addresses of your past transactions (and, the change addresses of those transactions, if you've sent any BTC out).

Note: when you look up addresses on a block explorer, you are giving information to that service: for whatever reason, you are interested in that address. This can be a privacy concern, as the block explorer service can keep logs of devices/ips that query the service for specific addresses.


Bitcoin Gold Ledger Derivation path What derivation path for creating addresses is used in Ledger for BTG? Generated address from the device doesn't correspond the address from the path m/44'/0'/0'/0/0 that is shown for BTG in BIP39 for the first key.

UPDATE 1: (to clear up) I had following (test) mnemonic generated from ledger:

hurry essay possible egg idea outer poverty doctor sense lab guess gate arrow supreme cave grape sunny deposit erode lemon couch wild fantasy equal

When I derived key using m/44'/0'/0'/0/0 path (that is shown in BIP39), I got GTUDDiUvkFJtL24f3Bq3pGyTwULuyzMSV1 address (same as on the site), but Ledger expected GX1FXv2PrRSARyctabywsi5X58teAjYFU4.

Finally I found the answer: the path is m/44'/156'/0'/0/0, it gave me expected GX1FXv2PrRSARyctabywsi5X58teAjYFU4 address.

Address header should be 38, dumpedPrivateKeyHeader same as in BTC (=128).

For those, who is seeking parameters for different bitcoin-like altcoins: I found many of them in the Coinomi repository.

UPDATE1: As it was mentioned by @john-doe, if you want to reproduce the address this way, you should switch to BIP32 tab and enter the path without the last segment (it would be added automatically for generated addresses).


why is my p2sh raw transaction not being mined or erroring ERROR: 64: NON-MANDATORY-SCRIPT-VERIFY-FLAG (EXTRA ITEMS LEFT ON STACK AFTER EXECUTION? I created this 2-of-2 multi-signature address for testnet following the instructions on the book Programming Bitcoin. I tried to spend the funds in this address following the standard forms (OP_HASH160 1060f2fd6058cd100fe4e485455badf453bd63e1 OP_EQUAL) Everything passes the verification tests in the code, but when I try to broadcast my transaction it never gets mined or it is rejected with ERROR: 64: NON-MANDATORY-SCRIPT-VERIFY-FLAG (EXTRA ITEMS LEFT ON STACK AFTER EXECUTION).

here is my raw transaction:

01000000011af3ab90a1c274ecb1f5e6e499ed2d0b5b2ebc6bbcbab751836ea70c90656e9f00000000dc00483045022100e9a2b73ff95e3395034e910d5d69dd3e18e12a28e9dacfd5f3b2894afd5fbf3f022035b50d48506932020fcea1781a0c58e9011918bd2a9cbbb5693027035ca9502b01483045022100f7621bb014d53d8a97c0b5605317dd4a92b53e03dd22e71b1db85c12e92218ff02204b77ff2a5bc9f7921d8a17d36d04ca29cbe25b2061f7c2f5e227e449ba614ee5014847522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52aeffffffff0140f60e00000000001976a91452903efc1004de01883ba3687be2a8ea4f6b1b1988ac00000000

I have only one input, and I am spending it all. The commands for the script signature for this input are built following the standard (OP_0, Sig1, Sig2, Redeem_script):

0,

3045022100e9a2b73ff95e3395034e910d5d69dd3e18e12a28e9dacfd5f3b2894afd5fbf3f022035b50d48506932020fcea1781a0c58e9011918bd2a9cbbb5693027035ca9502b01,

3045022100f7621bb014d53d8a97c0b5605317dd4a92b53e03dd22e71b1db85c12e92218ff02204b77ff2a5bc9f7921d8a17d36d04ca29cbe25b2061f7c2f5e227e449ba614ee501,

47522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52ae

which are encoded in the transactions as:

dc00483045022100e9a2b73ff95e3395034e910d5d69dd3e18e12a28e9dacfd5f3b2894afd5fbf3f022035b50d48506932020fcea1781a0c58e9011918bd2a9cbbb5693027035ca9502b01483045022100f7621bb014d53d8a97c0b5605317dd4a92b53e03dd22e71b1db85c12e92218ff02204b77ff2a5bc9f7921d8a17d36d04ca29cbe25b2061f7c2f5e227e449ba614ee5014847522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52ae

My redeem script follows the standard (OP_M, pubkey1, pubkey2, OP_N, OP_CHECKMULTISIG):

OP_2 03e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e4 031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee OP_2 OP_CHECKMULTISIG

The input I am trying to spend is under the transaction:

9f6e65900ca76e8351b7babc6bbc2e5b0b2ded99e4e6f5b1ec74c2a190abf31a

By looking at the error, it seems like my public_key_script and my redeem_script are not consuming all the data in the stack, but I have checked everything, and I can't find what it is. HELP!

Ps: I do not think this is a relevant detail, but the input of the transaction was sent by one of the two public keys that generated the multi-signature address. Just trying to be thorough.

Your redeemScript contains the length byte for it. The redeemScript is really just a script without any prepended length byte. So for your script, it is

522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52ae

Note how it begins with 52 and not 47.

How P2SH works is that it takes the top stack element and executes it as a script. Since you began your redeemScript with 47, this script just pushes the next 0x47 bytes to the stack instead of executing the multisig that you wanted.

It is perfectly valid to do this, even if that is not what you intended. A non-empty and non-false stack means that the script succeeded, so your transaction is consensus valid and could be included in a block. It is not standard because you have more than one stack element left on the stack after script execution, which is why this does not relay.

The correct version of your transaction is

01000000011af3ab90a1c274ecb1f5e6e499ed2d0b5b2ebc6bbcbab751836ea70c90656e9f00000000db00483045022100f7621bb014d53d8a97c0b5605317dd4a92b53e03dd22e71b1db85c12e92218ff02204b77ff2a5bc9f7921d8a17d36d04ca29cbe25b2061f7c2f5e227e449ba614ee501483045022100e9a2b73ff95e3395034e910d5d69dd3e18e12a28e9dacfd5f3b2894afd5fbf3f022035b50d48506932020fcea1781a0c58e9011918bd2a9cbbb5693027035ca9502b0147522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52aeffffffff0140f60e00000000001976a91452903efc1004de01883ba3687be2a8ea4f6b1b1988ac00000000

but this is not valid. The redeemScript no longer matches the scriptPubKey of the output being spent (script execution stops here). But the signatures would also be invalid because they have signed a different redeemScript.

Because your transaction does not require any signatures, just pushing the script (that does nothing) that matches the hash in your scriptPubKey,

01000000011af3ab90a1c274ecb1f5e6e499ed2d0b5b2ebc6bbcbab751836ea70c90656e9f00000000494847522103e07f96e5ba598431c0c994493a4ae988c9854c171d5d4bb140db0a27a4c853e421031b63f964d8c65d1d1136dcfe5033dedea88c2d411934ea48c9708410be84e5ee52aeffffffff0140f60e00000000001976a91452903efc1004de01883ba3687be2a8ea4f6b1b1988ac00000000

is a valid, relayable, transaction spending your output.


Shared crypto hardware wallet We were all newbs at the beginning, and did things the wrong way.
My partner and I bought crypto separately with our own exchange accounts, but transferred our hodl coins to a single shared hardward wallet address.
Using Koinly, we can easily determine which transaction in is for which (only 15-20 or so)
Problem/challenge is, how will this work when i transfer the coins out using FIFO, LIFO. We Koinly know which "coins" are which?
I have never actually transferred out from the hardware wallet, and i want to fix this.
I thought about transferring all coins out to our respective exchanges (at the same time), then back into new separate wallets. Will this work and be cool to the ATO?
Second question. Can you have a share wallet address for a masternode and split payouts/cost by the % coin holdings.
Thanks

Bitcoins exist as 'unspent transaction outputs' (UTXOs), not as an 'address with a balance'. If you really feel the need, you could import your keys into some wallet software which will allow you to exercise 'coin control', which means you will be able to pick and choose which UTXOs are used as inputs when creating a transaction. So then you could just choose all your UTXOs and send them to a new address in a single transaction, and then do the same for your wife's UTXOs.
But doing so will put your funds at additional risk, as you'll have to trust the new wallet software/device you import your wallet into. Mishandling private keys can lead to a loss of funds (theft), so you shouldn't do this unless you feel it is absolutely necessary.
Really, I would just create a transaction that pays you your share of the coins, and another transaction paying the remaining coins to your wife. Within a bitcoin transaction, it does not make any sense to point to some specific output and say "these bitcoins came from this specific input". Rather, it is as if all of the input coins are melted down into one blob, and then the output coins are forged anew from this blob. So it doesn't make too much sense to worry about tracking 'your specific coins' through time, as each 'specific coin' is 'melted down' when it is used as input to a transaction.
Think about it like this: when you do your accounting, do you worry about the serial numbers printed on the $20 bills, or the value of them? Your bitcoin accounting can work in much the same way: how much bitcoin did you buy? How much did you sell? This is the relevant information.

Will this work and be cool to the ATO?

Questions about how to satiate the demands of any particular tax authority are going to be off-topic here, you'd do better asking an accountant or tax lawyer if you need such advice.


My transaction was rejected I don't know what to do about this transaction it have been send for days now and today i got message saying "Transaction rejected by our node. Reason: Transaction was previously accepted but has been pruned from our database"

tx hash:  414514d02b33b80fefce96669680d3e8e54d656d432958211dc632260b26f239

I don't know what do to about this

You should've used another blockexplorer instead of blockchain.info. The transaction didn't get confirmed due to low fees. I suggest trying to send it to ViaBTC transaction accelerator and see how things goes from there.


Multisig: How to identify who (public key/address) has signed the transaction? I have seen that someone had asked a similar question:
Possible to check who signed the transaction in a multi-sig transaction case?

But I'm currently unable to parse/read the redeem script. When I use the blockdozer API to get the details of the transaction I obtain the "hex" and "asm".

How do I need to parse the "hex" to identify who has signed the transaction?
Please find below the transaction ID (it's a Bitcoin Cash transaction, but I believe the multisig part would be the similar): 3a91cd0a55270972d12a42156a24c6a318c39fedce942f2ff28114d63fda5aad

Any help is highly appreciated.

blockdozer.com/api/tx/3a91cd0a55270972d12a42156a24c6a318c39fedce942f2ff28114d63fda5aad


Why does bitcoin have a value? I got this pretty good question the other day - why does bitcoin have a value at all?  After all it's nothing - who is willing to pay for nothing?

Like any other asset that has a market price, it's all a matter of supply and demand.

The supply side is relatively trivial, the protocol allows for a fixed amount (25 bitcoins at the time of writing) to be produced every tenth minute, this reward is cut in half at regular intervals, and with this algorithm there will never be more than 21 million coins.  However, scarcity by itself is not sufficient, there needs to be a demand as well.  There are many factors behind the demand, I believe none of them are sufficient alone, but some may be more important than others.

A working currency needs to be scarce, divisible, portable, durable, fungible and easy to verify.  Bitcoin scores pretty well on those attributes and was the first digital currency to do so.  However, it's not alone a guarantee to success.  Other cryptocurrencies (aka "alt-coins") may be competitive on all the above.
The belief that Bitcoin will be a viable means of paying for goods and services in the future.  This may cause a sustainable and predictable value.  As an example, assume that 21 million people are buying bread with bitcoins, and in average they'd like to hold enough bitcoins in their wallets to buy 10 breads.  For a brief moment, let's assume this is the only use-case scenario.  With 21 million bitcoins in circulation, that means every user by average has one bitcoin in the wallet.  The value of a bitcoin would then be ... exactly ten breads!
A belief that Bitcoin is "digital gold", a useful means of storing value.  Someone even says ... "payments aren't important, bitcoin is the digital gold, and gold is rarely used for payments" - I believe that's dangerous.  Gold has been established both as a currency and as a "holder for value" for millennias, while Bitcoin hasn't even been around for a decade.  Traditionally almost every currency was both backed by gold and pegged to gold, so all until the 1970s one would indirectly use gold for paying for goods and services.  Gold also has unique characteristics suiting this purpose, gold cannot easily be replaced by other metals while Bitcoins can easily be replaced - i.e. if another altcoin gets more popular than Bitcoin for payments, I predict the BTC-value will drop pretty fast.
Speculation - people hoard bitcoins because they expect the market price to increase further in the future.  As of today, this is probably the biggest driver of demand, and it's by itself enough to spur a price growth, but it may not be sustainable.  Critics compare Bitcoin to a ponzi scam, a pyramide scheme and tulip mania.  Even though none of those comparitions quite hit the mark, if the value is only driven by speculation there is a risk that at some point there may be a crack and the value may fall very fast (like it did when MtGox failed).
Trust in the scarcity.  The risk that the 21M hard limit will be increased through a protocol change is considered small.  However, Bitcoin doesn't have a monopoly on cryptocurrency as such, it's easy to create new altcoins, and there are already hundreds of altcoins which could theoretically replace Bitcoin.
Trust in the security of the transactional system.  The blockchain and proof-of-work delivered by the miners ensures that a transaction remains irreversable and that bitcoins cannot be double-spent.  The cryptographical algorithms used for signing transactions ensures that nobody but the owner of the bitcoin can spend the bitcoin.  It has been argued that the market cap of any cryptocoin have an upper bound in the security of the system; the market cap can never become so big that it would be profitable to buy the processing power needed to successfully double spend or brute-force-engineer private keys corresponding to existing valuable public keys.  Reversely, the same argument can be used to prove that Bitcoin is a secure network (at least when neglecting the risk of phishing, robbery, social-engineering, gaining access to wallets through security holes, exploits or lax password security, missing backup, etc).  The fact that the ledger is secured by an extreme amount of processing work may be one of the points where Bitcoins really excel compared to competitors.
The network effect - this is the (only) thing where Bitcoin excels on the altcoins.  (Almost) everyone that accepts cryptocurrency accepts Bitcoins - but only some few accepts other cryptocurrencies.  Never underestimate the network effect.  Bitcoins may become worthless very fast if some other cryptocurrency takes it's place.
Usefulness for criminal purposes; Bitcoin is perceived to be anonymous, it can be very anonymous if one wants it to be, it crosses borders easily and without regulatory oversight, hence it's the ideal currency for ransom, tax evasion, drug smuggling, crime-as-a-service, etc.  I sure do hope that this is a smaller driver for value than the usefulness for legitimate payments for goods and services.


Asus R9 270x mining 24/7 setup I'm using Asus R9270X-DC2T-2GD5 for mining and the temps remain stable at 68C or below even with 99% GPU load for hours.

Stock cooling with my Cooler Master CM 690 II case with positive air flow. I can move the case to a more ventilated area or just take of the side panel for greater airflow.

What are the ideal config params for this specific card?
Do the temperature readings look Ok?
Do I need to do anything more in terms of cooling or tuning the card (its already factory overclocked)?
Is mining going to make the card fail early? If so, any idea how early? I'm OK if this cards lasts 2-3 years as opposed to 4-5 years.

I can answer some of your questions, I agree with @T9b you are out of luck with BTC and should try some Alt Coins that you can mine with a number of different Algorithms: Litecoin and Dogecoin (Scrypt), or Darkcoin (X11).

For optimal parameters to mine a Scrypt coin I suggest you try this comparison which is pretty detailed and has most of the GPUs out there:

https://litecoin.info/Mining_Hardware_Comparison

Temperatures looks more than fine at 68C, I had a few R9 280 and was struggling to keep them below 80C.

If factory overclocked there is not much else you need to do. I suggest you run the Asus Utilities that came with your card to monitor temps, fan speed, etc. Make sure there is enough air circulating within your PC case.

If you mine with your card 24/7 it will fail rest assured, predicting when it's a bit more difficult as it depends on the card components and build quality. Your card is factory overclocked so it will be even more prone to failure if constantly run for mining purposes. I would say a year max, but then some cards fail after 2 weeks or 3 months, etc...

Test it out and make your own judgement, I personally don't think your card will earn you much with mining. That doesn't mean you can't try it out and have some fun with it, you may learn a few things while doing that. ;)


If pruning is so safe, why aren't 100% of the Bitcoin nodes pruning? Why keep the unnecessary data? I have a fully synced, non-pruned Bitcoin Core on this computer.
I have an almost-fully synced, pruned Bitcoin Core on another computer.
What exactly is the motivation for keeping those 368.5 GB of "unnecessary" data? Aren't those old transactions "accounted for" with the "data bundling" that goes on with pruned wallets? Are pruned wallets/nodes less secure somehow? Why is it necessary for any node to keep all this data if it's not actually necessary once it's been "accounted for"?

There are three things pruned Bitcoin Core nodes (as of version 0.21.0) cannot do:

Serve historical blocks to new nodes that are trying to bootstrap.
Rescan for old wallet transactions after importing more addresses.
The getrawtransaction RPC for retrieving arbitrary transactions.

Validation (and security in general) are unaffected.


What happens to Bitcoin wallet / Bitcoins if PC is stolen I am a beginner and just starting to explore the possibilities of Bitcoins. So I would be very grateful if somebody could help me with this question.
Is there a risk that my Bitcoins are lost if the PC with the bitcoins resp. with the Bitcoin wallet stored on it is stolen or has crashed? Thank you very much.

Accessing to (your) bitcoin requires a private key.
This is kind a long number password to access the bitcoin on the network called blockchain.

All bitcoin are saved in this (online) network.
A private key looks like this:
5Kb8kLf9zgWQnogidDA76MzPL6TsZZY36hWXMssSzNydYXYB9KF

Important thing is you save your private key on different places in case you need it back again. One good practice is print it on a paper with QR code. This is called Cold Storage. This is your backup.

Don't show this private key to anyone else and save a copy somewhere else than your home.

Act like a bank, because with bitcoin you are own bank.
When your PC is gone, you take the private key and setup a new wallet on a device. Amount of the bitcoin will be exactly the same as it was left last time, because it is saved on the blockchain.

Read more here
https://en.bitcoin.it/wiki/Private_key


Cannot access blockchain.info through Tor browser? I created my first wallet using bitaddress.org and put some money in it, which I am not able to spend, since this wallet doesn't have that function.
So I decided to import this wallet to blockchain wallet.
The problem is when i try to access blockchain wallet section through Tor it shows me a page with the following error message - Quota Exceeded (Req Count Limit).
Can someone help. Do you have any suggestions why I get this?
At this moment all my bitcoins are stuck into my bitaddress wallet and I cannot use them.

This has been an issue with their TOR service for over a year.  They claim that they're trying to fix the problem, but I don't believe them anymore.  They can't be this incompetent.  Their service is pretty much unusable.  If I knew of a decent alternative, I'd switch immediately and never use blockchain.info again.


Block Explorers search on TxID As per this post bitcoin nodes do not maintain an index from addresses to TxIDs and hence querying for the unspent tokens by addresses essentially involves traversing the entire UTXO set.

However, the blockchain explorers enable search by addresses not just on the unspent outputs but on the entire blockchain. They list all the transactions that involve an address. I have the following questions:

How do the block explorers do the search by addresses -- do they search the entire blockchain at query time, which is very inefficient, or do they maintain some sort of index which they update iteratively?
If they maintain an index, it looks like the index will be pretty huge since it will always keep on growing. So how big is the index currently?
Also, can the blockchain nodes currently do such a search (of course efficiently)?

How do the block explorers do the search by addresses -- do they
  search the entire blockchain at query time, which is very inefficient,
  or do they maintain some sort of index which they update iteratively?

The block explorers parse all of the transactions one by one and create their own database and index using the address generated from the scriptPubKeys. This is expensive the first time, but not as bad when it just needs to stay up to date.

  If they maintain the index, it looks like the index will be pretty
  huge since it will always keep on growing. So how big is the index
  currently?

It is at least as big as the blockchain itself (assuming they are storing all of the data, raw blocks, etc.). As for the specific number, you'd have to ask the specific block explorer.

  Also, can the blockchain nodes currently do such a search (of course
  efficiently)?

If you enable -txindex flag you can search by txid but Bitcoin-core offers no such functionality (search by address) unless it is one of your wallet addresses.


How to denouce a scam exchange? I was scammed by an exchange called BitNake. It is referenced in the Bitcoin Wiki as a fast and secure exchange seeded in Germany. I could not find any negative comments on the web and decided to try it. I paid the minimum amount but never got any Bitcoin deposited in my wallet. Repeated e-mails to the support address went unanswered.

As it turns out, the BitNake website seems to have been created just last month and is actually installed in California. I guess I am one of the first to fall for this.

The question then is: how do I tell the world this website is a scam? So that others do not fall for it too.

Update I: here is the scam report at CoinTalk.

Update II: BitNake had been previously reported as a scam. However the search engine I use, DuckDuckGo, seems to be blind to BitcoinTalk. Another interesting aspect in this story is PayPal actively protecting the scammer.

Spreading the word about your experiences (and supporting it by the hard facts of website domain registration etc.) is the best way. You might be able to edit the wiki entry to add a warning. In addition, the scam accusation section on bitcointalk.org might be a good place to make your warning visible to many potential victims.


How does the full lifecycle of a cryptocurrency trading look like? I am new into cryptocurrencies and I am wondering how to trade them. By trading cryptocurrencies I mean:

Transfer fiat currency (ie. USD) from my bank account into some account that enables buying cryptocurrency.
Buy a cryptocurrency like BTC or ETH with fiat currency.
Transfer cryptocurrency back to USD.
Transfer USD back into bank account.

Is there one platform where I could accomplish this full lifecycle of a trade?

From my research I was able to create a cryptocurrency wallet with Atomic wallet. This app allows to transfer USD via credit card into the app and then trade USD with multiple crypto currencies. The fee for transferring USD to a crypto is 12% of the amount. Which does not make much sense for serious trading (I need to pay 112 USD for every 100 USD transferred to Atomic wallet). Are there cheaper ways to trade fiat to crypto?

Additionally, it is only half of the story.

Atomic does not allow to transfer crypto to fiat and send back to bank account. To accomplish this I need to create another account in currency exchange like Bitstamp or Coinbase and verify it with some documents. Then I can trade crypto to USD and finally back to bank account. I did not accomplish this step so I don't know what are the costs of transferring back to bank account.

Apart of this, I've found that some trading platforms, like Ledger Live require particular devices to be bought to be able to trade crypto. Making it useless for other wallet owners.

My question
- what are the most convenient (ideally one platform) and cost efficient ways of trading crypto for fiat and back?

I assume that at the moment there is no single platform that does this but at least two accounts are needed to trade. In this case what are best ones according to cost efficiency and market accessibility?

Depending on where you live there are different options. I would suggest, if in the US, to go with one of the larger platforms like Kraken.com, or CoinBase.com. In these systems you can wire funds (Kraken) or attach to a bank account to purchase currency.

In my experience, CoinBase will be your training wheels. It's hard to see what you're buying/selling as the actual transaction occurs automatically when you click the button. What you see is not what you'll get (unless that changed in the last week). However it is very easy to use.

Kraken will require more verification for additional tiers (work with more value). But you can control the trading. You can set buy/sell limits which means you won't get 1 penny less than what you told it. They have tons of additional trading options if you want to get more advanced as well.

Final note, Kraken supports many more crypto currency options and bought cryptowat.ch over a year ago for a nice live feed of prices across multiple platforms.

Hope this helps you get started!

Edit: I'm not here to judge intentions or viability. The question was  "what can i use". Any assumption (including commentary on the current market, political, legal, etc) other than "I'm simply answering the question" would be incorrect.


How is the wallet balance split across keys? I suppose it's advisable to use a new key frequently for bitcoin receive address for anonymity. If each received amount goes to a new key, will my wallet size become unmanageable if I receive a number of small amounts per month ?

If yes, how can I consolidate all the coins split across 100s of keys in case my wallet is compromised and move it to a new wallet?

It is foreseeable that the number of private keys that you must maintain may grow  to an unmaintainable level.

The most common sense way to consolidate is to send your balance to a single address. This, however, effectively announces that all of those previously created addresses are linked to the same wallet.

If you really must maintain anonymity, then you could send the balance to a tumbler, and have that tumbler output different amounts to several different addresses you control. This, however, does have a cost, because tumblers are not free. Another alternative to a tumbler service is to send your balance to a web wallet that pools all bitcoin together (ledgering internally) and manually send different amounts to separate, new address. However, any time a balance exceeds one of those addresses' balances, it's likely that more than one will be used for the transaction, thereby linking them.


Do I need a Bitcoin full node in order to use BTC RPC Explorer? I'm thinking of using https://github.com/janoside/btc-rpc-explorer as my json explorer, but I run a pruned bitcoin node. Will this cause issues when running btc-rpc-explorer if I wanted to query old data? And if so what is the appropriate pruned node amount to access 1-2 years of blockchain history?

Will this cause issues when running btc-rpc-explorer if I wanted to query old data?

Yes, as it requires txindex.

And if so what is the appropriate pruned node amount to access 1-2 years of blockchain history?

txindex is currently only supported without pruning, so you need to have a non-pruned bitcoind to use btc-rpc-explorer.


Check when transaction was added to the mempool? I know how to check when a specific transaction was included in the block. But how do I check when my bitcoind node first saw it? I would like to estimate for how long the transaction stayed unconfirmed after it was broadcasted.

The getrawmempool interface provides this information in the time field, though it is potentially very slow to respond with a large number of transactions in the mempool. It does not record this time once the transaction is removed from the mempool for non-wallet transactions, so it either needs to be gathered from this interface or recorded on addition with the zmq socket.

"result": {
    "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d": {
        "size": 225,
        "fee": 0.00000573,
        "modifiedfee": 0.00000573,
        "time": 1556802637,
        "height": 574268,
        "descendantcount": 2,
        "descendantsize": 451,
        "descendantfees": 3247,
        "ancestorcount": 1,
        "ancestorsize": 225,
        "ancestorfees": 573,
        "wtxid": "89ee39117b4b55e54ace29c631eef80a875ae109a4fbd79ddd10b6f21329e88d",
        "depends": [

        ]
    }
}


Simplest and fastest method of utilizing Bitcoin for my online digital store? I am not very versed in digital technology but am very interested in its potential and decentralization benefits.  My question/s

I'm looking for the easiest and fastest method to allow a person who has never heard of Bitcoin to purchase Bitcoins and then use Bitcoin as a payment method on my online store.  Most people do not want to be bothered by going through a lot of technical gyrations in order to purchase a digital product on line using Bitcoin if it involves a lot of steps and or requires a background in computer expertise.  I need something that is simple so that even Grandma can do it....

Example:

Time to check out
We accept Bitcoins
Purchase Bitcoins...."click"
The person uses for example PayPal or credit card to purchase Bitcoins and then
Returns to checkout and purchase my goods and or services using their Bitcoin money
The Bitcoins go directly to my Bitcoin Wallet, and they receive their goods

Thanks for helping, I am a little handicapped in this area.

Unfortunately, there are reasons it isn't this simple.  If it were, everyone would be doing it.

The difficulty in purchasing bitcoin online is not a technical challenge, but rather a challenge with regulations and mitigating risks.  Businesses that sell bitcoin can find themselves afoul of their local laws if they do not request a certain amount of know-your-customer (KYC) information about their customers.  There is also usually a verification process with this information, which can take time.  They can get shut down or even thrown in jail if they don't comply.

Secondly, bitcoin transfers can't be reversed...but PayPal and credit card transactions can be.  This means that if you purchase bitcoin with either of these methods, the company selling you the bitcoin will need to wait until you can't do a chargeback on your purchase.  Depending on your method of payment, this can take weeks.  It's what bitcoin sellers need to do in order to protect themselves from fraud.

Bitcoin, itself, offers a payment method that is secure, convenient, trustworthy, and quick.  However, the on-ramps and off-ramps from fiat currencies to bitcoin have all the slowest and most inconvenient elements of the legacy currency system.


how to achieve transaction info of all the blocks I use https://chain.api.btc.com/v3/block/date/20151215 to achieve list of blocks and also use https://chain.api.btc.com/v3/tx/0eab89a271380b09987bcee5258fca91f28df4dadcedf892658b9bc261050d96?verbose=3 to get transaction info for a single transaction. Now I have a question. To access transaction info of all blocks what should I do?
when I copy the hash of any block from the list of the first link in the second link, it shows error.

That's because you're pasting a block hash into a field that expects a transaction hash.

It looks like btc.com doesn't support listing all transactions for a given block, it will only give a tx count: https://btc.com/api-doc#Block.

Blockchain.info does, however at the api endpoint:

https://blockchain.info/rawblock/$block_hash

So, you can copy the hash of any block from the list of the first link in your answer to the $block_hash field in https://blockchain.info/rawblock/$block_hash.


In the ASIC-age, is it worth starting mining Bitcoin at home? I have recently learned about Bitcoin and would like to get rich quickly into mining.

I have control of a

laptop
library full of ancient computers
powerful gaming PC
cluster of GPUs
an old ASIC, I got for  three times its worth off eBay
a cluster of EC2 servers

My power bill is

frightfully expensive
dirt cheap
subsidized by my neighbors included in rent
non-existant, because I produce a power surplus

Is it worth getting started with mining?

Generally, it's not worth your time and effort to mine at home! (Some exceptions may apply.)

Age of ASIC mining

CPU mining has been unprofitable since 2011, GPU mining just slightly later.

Today, ASICs rule mining. The Bitcoin network has more than 1.7 Ehash/s (Oct 2016) now which is 1,700,000,000,000 Mhash/s. Your      graphics card will be running full blast to churn out a few hundred Mhash/s, your CPU maybe a few dozen.

With CPU or GPU you will never collect a sufficient balance with a mining pool that you could even get paid out. It's a waste of time, even if you don't pay for power.

Mining has gone big scale

Meanwhile, ASIC mining has gone industrial. Corporations are building mining centers in regions with very cheap power, and filling them with millions of USD worth of ASIC miners. Greater mining power in one hand  does have some slight advantages which adds to their more efficient processes.

Finally, ASIC miners have been catching up quickly technologywise: Every few months new chips get announced moving the scale down a few more nm. Currently, we are reaching 16nm technology (Oct 2016), which is already pretty close to the general state of the art. The problem with that is that every step of miniaturization comes with a leap in power efficiency, quickly obsoleting older generations of ASICs. Chances are that your        investment will outdate before it pays for itself – even when you are just looking at cost of acquisition and have no cost of power.

Mining profits tend to zero

The mining market tends to reach an equilibrium: While it is very profitable to mine, there is room for investments. The additional mining power increases the difficulty for all which in turn reduces the profitability. When the difficulty rises, it drives out the least cost efficient mining operations, in turn increasing the profitability of the remaining miners. If you're not in a particularly advantageous position, you will be quickly pushed out of the market.

Also see: Why does mining profitability tend towards zero?

If you're not paying for your power, someone else is

Anyway, if you're "not paying for your power", because it's included in rent (e.g. in a dormitory), you're either privatizing profits by socializing costs, i.e. stealing from your neighbors, or you'll be paying   for it next year when your landlord increases your rent to cover the higher power bill.

If you produce a power surplus or use the ASIC to replace electric heating, hey, you might be one of that exceptions I mentioned going in.

There might be some altcoins that can still be profitably CPU/GPU mined and traded for Bitcoin thereafter, but I am not sure whether even they are worth it when you factor in your time investment.

If you have understood all of the above, please feel free to check out

How much Bitcoin will I mine right now with hardware X?
How can I start mining Bitcoin?


Problem in understanding other miners validating puzzle solving miner's claim I understand that miner's role is to validate the block of transactions by calculating nonce based on difficulty level and finding hash of {block + nonce + hash of previous block} .
Then it adds this block in the ledger and broadcasts to all nodes that it has solved the puzzle. Other nodes verify it and allow the that new chain in which block is added.

My question is, what if a node decides to change transaction data in a block and goes throught the process of calulating nonce and then finding hash and adding this block to chain. Other node will see that this node has correctly solved the puzzle and should allow the newly created chain. Right?

I don't know and it is not written anywhere that at the point when a node broadcasts that it has solved the puzzle and found hash of tampered transactions, is it the case that the other node has also solved the puzzle and hopefully with the untampered transactions? Because won't it be waster of resources to solve the same puzzle twice? And if other nodes do not solve the puzzle for the second time, how are they able to decide that the malicious node has solved the puzzle with the tampered transaction?

I understand that miner's role is to validate the block of transactions by calculating nonce based on difficulty level and finding hash of {block + nonce + hash of previous block} .

More accurately: the miner's role is to confirm the block of transactions. Each and every node (and miner) will independently verify the validity of all transactions and blocks. 'Validation' is not just the job of a miner. As mentioned by JBaczuk, the POW blockhash is actually computed on version, previous block hash, merkle root, unix epoch time, difficulty target (bits), and nonce.

  My question is, what if a node decides to change transaction data in a block and goes throught the process of calulating nonce and then finding hash and adding this block to chain. Other node will see that this node has correctly solved the puzzle and should allow the newly created chain. Right?

Not quite. Once a transaction is confirmed in a block, any new subsequent block that spends the same UTXO will be invalid (since that UTXO was already spent).

If the miner attempts to re-mine that original block (ie. a new block with the altered transaction, at the same blockheight), this will likely fail and be a waste of their resources. Even if they do find a valid block, the rest of the network will already know about the first version of that block, and the other miners will be working on the next block already (or they will have already found it). So even if your altered block is valid, the network will still ignore it since the network has already accepted a longest (most work) chain, that does not include your block.

  I don't know and it is not written anywhere that at the point when a node broadcasts that it has solved the puzzle and found hash of tampered transactions, is it the case that the other node has also solved the puzzle and hopefully with the untampered transactions?

Transactions generally can't be meaningfully 'tampered with'. Transaction malleability is an edge case that could be considered, but otherwise changing the contents of a transaction will make it invalid. When a node verifies the validity of a block, it would catch any invalid transactions, and thus drop the block for being invalid.

Other ways you could change a block's transaction content would include adding or removing certain transactions from the block, changing the ordering of the transaction in the block, or substituting one transaction for another (that spends the same UTXO, see double spend attacks).

In short: Since the miners are always incentivized to mine at the chain tip, having a miner work on re-mining an old block to introduce an 'altered' block in some way ultimately doesn't really matter to the rest of the network participants. The network just ignores the altered block, meaning the net outcome is that the miner that made the altered block just wasted their resources.


Is there a proposed name for 1e-4 bitcoins? One satoshi is 1e-8 bitcoins. Given that, it appears to me very convenient to have a name for 1e-4 bitcoins, and I'm wondering if someone already proposed or started using a name for that.

(the SI doesn't have a name for that, being m=1e-3 and µ=1e-6...)

Well, a thousand grams is a kilogram.   A thousand sats (Satoshis) is a kilosat.  So 10,000 sats would be ten kilosats.   Maybe that would work.

This assumes when that is needed we are moving away from fractions of a bitcoin and moving towards multiples of Satoshis.

There was also proposal to call it a milray.  And a number of votes were cast for calling it a lilbit (as in Littlebit).

When a name is found, the entry for it in the FAQ should get updated.


Bitcoin core doesn’t see transaction I’ve created address in bitcoin core from rpc and send some bitcoins on it, but my balance still zero. Transaction exists I’ve checked on blockchain info. Getaddressinfo returns “ismine”: true, but getreceivedbyaddress returns zero

As pointed out by Peter in the comments of your question, you will need to wait until your node has synced with the longest chain. At the time of your comment, you are 169,245 blocks behind which, unless your transaction took place ~3 years ago, will not be known to your node yet. As soon as the block containing your transaction is verified by your node, you will be able to see the transaction.


Create Android Alt Coin Wallet I am looking for base steps or general guidelines how to create lightweight  android wallet for existing alt coin "X".
So, lets start with simple questions:

Do I need to run a node on the server
Can I clone and configure existing open source android wallets. If yes - any help with this?

Would be happy to have any additional useful info as start point to create the wallet.

Lightweight wallets use a simplified payment verification (SPV) mode which only requires them to download part of the blockchain so yes a full node is required,yes you can clone an existing opensource wallet but skills is required for that


Verifing the given R/S pair (signature) against a hash using the public key According to this function:

public boolean verify(Sha256Hash sigHash, ECDSASignature signature) {
        return ECKey.verify(sigHash.getBytes(), signature, getPubKey());
    }

I do not understand which must be the content of the variable sighash.

Here is my function where the creation of signature happend:

public ECDSASignature scriptSig(Receiver r) {
        System.out.println("First step :\n");
        System.out
                .println("CREATION OF SCRIPTSIG-----OR----- OUTPUT TRANSACTION");

        r = super.getReceiver();

        Wallet rwallet = r.getReceiverWalletList().get(0);

        BigInteger R = rwallet.getClientKey().getPrivKey();
        System.out
                .println("*******************************************************");
        System.out.println(R);

        BigInteger S = new BigInteger(r.getReceiverWalletList().get(0).getClientKey().getPubKey()); // i
                                                                                // had
                                                                                // .getPubkeyHash()
        System.out
                .println("*******************************************************");
        System.out.println(S);

        // constructs a signature with the given components
        ECDSASignature receiverSig = new ECDSASignature(R, S);

        return receiverSig;
    }

and here i am trying to verify my signature:

sha256hash = new Sha256Hash(receiver.getReceiverWalletList()
                        .get(0).getClientKey().getPrivKeyBytes());
            redeemerSignature = scriptSig(receiver);

.....

if (receiver.getReceiverWalletList().get(0).getClientKey()
                        .verify(sha256hash, redeemerSignature))
                    System.out.println("The transaction finished SUCCESSFULLY");

                else
                    System.out
                            .println("The transaction finished UNSUCCESSFULLY");

I think i my problem is the right input in sha256hash = new Sha256Hash(...) instance.

Any help?

I suppose you use the BitCoinJ library.

You are not creating a signature the correct way; an ECDSASignature object should be initialized with the ECDSA signature parameters (r,s), not the actual private and public keys. The constructor you are using, implies that the ECDSA signature has been computed already, you somehow got r and s and you initiate the signature object.

To achieve your required functionality, use the doSign(Sha256Hash input, BigInteger privateKeyForSigning) method of your ECKey and the output will be your desired ECDSASignature object.

The input on doSign should be the same with the input on verify, which is always the SHA256 of your message to be signed. If you want to spend an P2PKH output you must sign the public key, check this post for more information.


A Blockchain that merges mining forks and could be more power-efficient? I'm new to blockchain technology so I'm sorry if I'm using wrong terminology. This is not a Bitcoin question, but a general blockchain question.

Imagine a theoretical blockchain that uses gradual proof-of-work - instead of finding a single nonce that gives a hash smaller than the target, you have to find 10 nonces that give hashes that are smaller than target * 10.
(Edit: more complicated algorithm can be used, for example the first hash includes the block-header and the first nonce, the second hash includes the
block-header, the second nonce, and the previous hash, etc. - so calculating the hashes must cannot be done in parallel).

If you discovered 9/10 good nonces, you will try to find the last nonce even if some other miner has already published a complete block.
This kind of blockchain will encourage arbitrary mining forks - where two miners publish a mined block with the same previous-block-hash (i.e. the same index in the chain), which looks like:

B1  ←-  B2  ←-  B3  ←-  B4
                ↑
                +-----  B4'

The way current blockchains (that I know of) solve this problem is by letting the miners pick which of the forks to continue, and because only the longest blockchain is the "true blockchain", all the miners will eventually work on a single fork, and all the work that was done on the other forks will go in vain.

Now imagine that each block could have contain more than 1 previous-block-hash. For example, a new miner could try mining a block like:

B1  ←-  B2  ←-  B3  ←-  B4  ←-  B5
                ↑               |
                +-----  B4' ←---+

With one important condition: the transactions in B4 must not contradict the transactions in B4' (no double-spending, etc.). Assuming there are many unrelated transactions in the mempool, this will be a very common scenario.

Miners can even be incentivised to include more previous-block-hashes in the next block. For example, if the miner of B4' notices that B4 was already published, he can offer to pay some fee to the following miners (of B5) that include B4' too.

This algorithm will be much more power efficient (in the case of a gradual proof-of-work) because miners can keep mining the same block even if some other miner already found a good block. It can mine more transactions in parallel without increasing the block size. It is different than choosing an easier hash function (for the proof-of-work), because it has no effect on the blockchain's length or growing speed.

Do you know of any proof-of-work blockchain/cryptocurrency that does something similar, like a blockchain that can split and merge? I know that IOTA is not using blockchain at all, but I never delved into the details.

Thanks

Something that is very similar to what you describe is the concept of "Uncle Blocks" used in Ethereum. Even there, though, there are no partial blocks and nobody would continue to mine on a "half-finished" block. Ethereum has significantly shorter block intervals which causes multiple blocks at the same height to be found often and allowing to reference them as uncle blocks mitigates the waste of that to a degree. Introducing progress into mining is problematic, because it biases mining success towards miners with more hashrate.


What does the FBI think about Bitcoin, in brief? Also related: The context of FBI involvement with Bitcoin

The FBI document regarding Bitcoin that was leaked in May 2012 is very long. Is there a brief summary of the most important points somewhere?

The most interesting part of the document isn't that long, as half of the pages explain some terminology and how Bitcoin works.

The main points made are:

Bitcoin is the world's first decentralised currency, thus it is hard to audit and control it
Bitcoins can become popular among criminals as they offer a lot of anonymity
Bitcoins can be used to commit money laundering
It is very likely that people wanting to steal Bitcoins will target third-party services (such as exchanges), and users' wallets
It is hard to link user's identity to their Bitcoin address, but can be quite easy when they convert their Bitcoins into a fiat currency

There are also a couple other, smaller points made and it is generally a good read. As a side note, the paper appears to have a small mistake on page 4 - listing Bitcoin's lowest price since the bubble as 4$, whereas it was as low as 2$ at some point.


How can I install a bitcoin wallet on Kali Linux? I got Kali Linux installed on my laptop and I want to install a good bitcoin wallet to store my bitcoins offline.As I know,top 5 best bitcoin wallets would be Bitcoin Core (the first offline wallet),Multibit (lightweight),Electrum,Blockchain Wallet and Hive.I would like to know how to install one or more of these,or at least another wallet,but if it's one that I haven't listed,I'd also want some basic information about it and obviously the installation guide.Thanks!

This is the official guide to building Bitcoin on Linux:

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


What role has bitcoin-init as a process? I have set up a node on a RaspberryPi. When I check for active processes with top I see bitcoin-init occupying 50% of memory and 7% of CPU.

I can check for bitcoind and it is active:

bitcoin@raspberrypi ~ $ service bitcoind status
● bitcoind.service - Bitcoin daemon
   Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-08-09 14:43:54 CEST; 2 weeks 4 days ago
  Process: 623 ExecStart=/usr/local/bin/bitcoind -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid (cod
 Main PID: 772 (bitcoin-init)
    Tasks: 16 (limit: 4915)
   CGroup: /system.slice/bitcoind.service
           └─772 /usr/local/bin/bitcoind -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid

According to this thread I assume that the daemon process bitcoind
has been renamed to bitcoin-init but I am not sure if I understood that correctly.

My node seems to update the chain, but very slowly - 50GB after several weeks. And it is not reachable if I check my local IP via Coindance.

If I run bitcoin-cli getinfo with my usual Rasperry user pi I get

error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/home/pi/.bitcoin/bitcoin.conf)`

I have not set up a bitcoin.conf file.

If I run it with user bitcoin (not sure if that would be the right thing to do):

bitcoin@raspberrypi ~ $ bitcoin-cli getinfo
error code: -32601
error message:
Method not found

So, is bitcoin-init maybe just a startup process and my node is not working?

EDIT: The book (Antonopoulos) sais that bitcoind will give an error unless I set an rpcpassword in the configuration file. I don't have such a file, but bitcoind gives:

2019-08-28T07:27:16Z Bitcoin Core version v0.18.99.0-12fd4bbd1 (release build)
2019-08-28T07:27:16Z Assuming ancestors of block 0000000000000000000f1c54590ee18d15ec70e68c8cd4cfbadb1b4f11697eee have valid signatures.
2019-08-28T07:27:16Z Setting nMinimumChainWork=0000000000000000000000000000000000000000051dc8b82f450202ecb3d471
2019-08-28T07:27:16Z Using the 'standard' SHA256 implementation
2019-08-28T07:27:17Z Default data directory /home/pi/.bitcoin
2019-08-28T07:27:17Z Using data directory /home/pi/.bitcoin
2019-08-28T07:27:17Z Config file: /home/pi/.bitcoin/bitcoin.conf (not found, skipping)
2019-08-28T07:27:17Z Using at most 125 automatic connections (1024 file descriptors available)
2019-08-28T07:27:17Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements
2019-08-28T07:27:18Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements
2019-08-28T07:27:18Z Using 4 threads for script verification
2019-08-28T07:27:18Z scheduler thread start
2019-08-28T07:27:18Z Binding RPC on address ::1 port 8332 failed.
2019-08-28T07:27:18Z Binding RPC on address 127.0.0.1 port 8332 failed.
2019-08-28T07:27:18Z Unable to bind any endpoint for RPC server
2019-08-28T07:27:18Z Error: Unable to start HTTP server. See debug log for details.
Error: Unable to start HTTP server. See debug log for details.
2019-08-28T07:27:18Z Shutdown: In progress...
2019-08-28T07:27:18Z scheduler thread interrupt
2019-08-28T07:27:18Z Shutdown: done

EDIT: I seem to have two seperate directories for .bitcoin. How can I tell bitcoind to use the other one?

With the order, I will try to response to your question.

  According to this thread I assume that the daemon process bitcoind has been renamed to bitcoin-init but I am not sure if I understood that correctly.

I don't think the bitcoind is rewriting to bitcoin-init, but I don't have a mode for testing bitcoin-core on raspberry, so I ask you if you can post "how you have installed the bitcoin-core?", with command sudo apt install or a zip directory on Github/official site bitcoin?

  My node seems to update the chain, but very slowly - 50GB after several weeks. And it is not reachable if I check my local IP via Coindance.

The answer is "depends", depends on your connection, in any case, is a little slow if you don't have an ADSL 7 mbs

  EDIT: The book (Antonopoulos) sais that bitcoind will give an error unless I set an rpcpassword in the configuration file. I don't have such a file, but bitcoind gives:

Is possible to configure the node bitcoind with the file config, "bitcoin.conf", you have a complete example here and here file must be inside the directory bitcoin, if you don't change it, will be in the folder /home/yourName/.bitcoin/bitcoin.conf or you can set the bitcoind from the command line, an example bitcoind -rpcuser=vincent

  I seem to have two seperate directories for .bitcoin. How can I tell bitcoind to use the other one?

If you have synchronized the bitcoin-core inside another directory (an example because you have a version bitcoin inside the external HDD) your command for bitcoin is similar this, bitcoind  -datadir=/media/vincenzo/Maxtor/BitcoinCore/node if you not call the bitcoind with the daradir, the bitcoind re-synchronized the blockchain of bitcoin inside the /home/yourName/.bitcoin/ directory

  If I run bitcoin-cli getinfo with my usual Rasperry user pi I get

The problem should be the datadir different from /home/yourName/.bitcoin/


what countries accept and refuse BTC as money? I am thinking where to find list what countries refuse or accept bitcoin as money?

I read Denmark doesn't make tax for BTC because it is not accepted by the state as money. it has and legal consequences, if exchanger disappear with bitcoins, he will not go to the prison because he didn't steal money. as I see, mtgox took money, 100M bucks, and they are not in the prison.

I think the most up-to-date list is from Wikipedia. If you want more countries and more recent news, I think you have to search for each country individually. For example, in the Netherlands it is declared by a judge as NOT money, but has the same status as gold and silver. This is the translated source from google.translate. If you are dutch and want to read it, this is the link to the original document.

The legal consequences differ from country to country, and I will not be surprised if it changes over time.


What's more important GPU cores or GPU memory? I have been on the sidelines, watching on and off, looking to attempt mining a few coins. I have also looked at just buying coins, but found that's not so easy to do with anonnimity with all the verifications, ID requests and concern of identity theft from scams. Plus FIAT to Bitcoin can run as high as 20% in transaction fees at a bitcoin ATM....sheesh!

So... I'm looking at mining and attempting to decipher the current GPU hardware requirements by COIN TYPE in terms of hash rate, on card memory and other items like CPU cache and main system memory and even M.2 onboard storage/cache on the newer motherboards and if these have any effect at all on a GPU miner setup.

TOTALLY BRAIN FRIED TRYING TO SORT APPLES, ORANGES and LEMONS OF MIXED DATA.

How do you determine how much GPU core or MEMORY is the minimum needed to mine a specific coin. I'm sure there might be some instances where a lower hash rate card at a lower watt rating might do fine mining, just not as fast as the best of the breed. gpuboss,com has been great for card info, but not all the cards are listed, and some do not give details on power consumption, which when compared at today's crazy prices doesn't give the cost/profit/overhead details.

At this stage it's clear that only a few will continue to mine BITCOIN and ETHERIUM directly given the custom miner farms. Call me a bottom feeder or whatever, but I'm looking at using maybe some less popular cards, lower power cards and less frequented coins to mine and get into the game and migrate into more stable crypto coins to HOLD long term.

Suggestions on plotting the details or sites to follow?

Also some pooled mining does not appear to use all the GPU hash benchmarked from some cards, or at least it doesn't pay the total hash credits offered at that rate.

I would not bother buying new hardware to mine low rate. I suggest you try mining with your existing hw. You could try cpu-mining MAGI, it's easy to start with: https://bitcointalk.org/index.php?topic=735170.0

You won't strike it rich but its a nice mining start.

If you want bitcoins to use anonymous I suggest you find someone local to buy from with cash, or buy a prefilled creditcard and use that to buy coins.

Mining pools don't pay for your hw specs, they pay for the amount of work contributed.


How can I find the sender's address from the transaction hash? Possible Duplicate:
  How to findout the sender of a transaction

I am trying to use blockchain.info API to receive a payment and store the sender's address. However, the API only indicates the transaction hash, not the sender's address. Perhaps this is simply ignorance about the BTC Protocol, but how can I find the sender's address from any given transaction hash?

The two API's I am using:

https://blockchain.info/api/api_receive
https://blockchain.info/api/blockchain_api

You can for example check the Block Explorer's info about a given transaction. For example, given transaction 1c480aad976c61b51ae47401a554b09f65efe6f95f644041f838d9129e09167c, you can see that the only input was associated with address 1HnjAo2nbHGFDto86smcFiF3uUwfvNJ4cS.

However, generally you should avoid using transaction inputs for basically any purpose - they do not uniquely identify a user, sending Bitcoins back to the user might be problematic with just this information and so forth.


What's the easiest way to hook into multiple BTC exchanges? If you want to compare prices of BTC across multiple exchanges, is there a central mechanism or place to do so? I have been unable to find such a thing from my research

Yes, there are such services.

bitcoincharts.com offers such an overview, though you may get confused from the many fiat currencies.

CoinDesk's chart is much cleaner, only uses USD, and you can easily choose which exchanges to regard. However, CoinDesk lists far fewer exchanges than bitcoincharts.com.

There are several services – for example BitcoinAverage – which attempt to plot the average price.

If you want to, you can use the APIs of the exchanges you're interested in, and write a script or small program which shows the current prices.


How to reset node information in Bitcoin Core? I think I've just put the wrong node IPs through console and I forgot all the IPs.

I would like to reset all the node information to the initial.

Should I just delete peers.dat?

To reset the peer database to the initial state, stop Bitcoin Core, delete the peers.dat file, and start Bitcoin Core again.


Does the .bitcoin directory shrink in bitcoin-qt 0.7.2 and later? The bitcointalk.org thread "Ultraprune merged in mainline" implies that a more efficient way of storing block information was introduced. Will this make the .bitcoin directory smaller after an upgrade to 0.7.2?

The code referred to by that thread will become 0.8, and is not in any released versions as of January 2012. 0.7.2 is a minor upgrade to 0.7.1 only, with only bug fixes.

0.8 will indeed use a more efficient storage mechanism, which will most likely result in slightly reduced storage requirements (though you may need to delete the old database manually). The most important improvement, however, should be block validation speed, and the amount of I/O to disk necessary.

In the future, the new database scheme may lead to a version that supports block pruning, where not (all) history blocks are stored on disk anymore without compromising security (it would still require downloading those blocks in full, however). Because of the invasive effects on the network if suddenly many nodes weren't able to serve history anymore, this may need some discussion first, and isn't implemented yet.


First block of blk00000.dat from bootstrap.dat doesn't contain genesis block I downloaded the bootstrap.dat file from the torrent at http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/ and placed it in the .bitcoin directory of a new Ubuntu installation of Bitcoin-Qt, ran the client and waited for the client to sync. In the blocks directory there are now blkxxxxx.dat files.

I expected the first 285 bytes of blk00000.dat to look like the ones at http://james.lab6.com/2012/01/12/bitcoin-285-bytes-that-changed-the-world/ complete with message about the Chancellor, but instead my first 285 bytes start with:

 00000000  f9 be b4 d9 d7 00 00 00  01 00 00 00 6f e2 8c 0a  |............o...|
 00000010  b6 f1 b3 72 c1 a6 a2 46  ae 63 f7 4f 93 1e 83 65  |...r...F.c.O...e|
 00000020  e1 5a 08 9c 68 d6 19 00  00 00 00 00 98 20 51 fd  |.Z..h........ Q.|
 00000030  1e 4b a7 44 bb be 68 0e  1f ee 14 67 7b a1 a3 c3  |.K.D..h....g{...|

and there's no readable text, i.e. no timestamp message from Satoshi. The magic number is there, but the rest of the data doesn't look like the genesis block.

Note that I'm using the standard Bitcoin foundation's client, and the genesis block has to be there for it to work (see How did the first 50 Bitcoins come into being?) so:

What am I missing?

The genesis block is hardcoded in the software, as you need a common starting point to start a chain.


Theoretical block prediction Theoretically speaking:
I take a random hash as a previous hash and compute whole block of hashes.
I'll wait for work on some mining pool until by some miracle this hash will be generated.
Would I get whole bounty if I upload this block straightaway?

What you are asking is: can I create valid blocks (with only a coinbase transaction to and address of my choice) with a previous block hash that I chose at random that will be made valid if another block occurs with that hash.

Sure you can. Note that there are 2^256 hashes. The chance of finding one at random that will equal the hash of a to-be-discovered block are very very small. You would most probably just be wasting computing power/electricity/time.

Also: Note that you could spend the same amount of computing power at guessing the private keys of other users. Finding hits there would have the possibility of getting more than the block reward.


What does the Bitcoin RPC mean and how is it used? What does Bitcoin RPC mean and how is it used? I see the term RPC referenced multiple times, but not show what it means and how its used. I see it in JSON-RPC. I know json is just a data format, meaning it looks something like this: { apple: red, banana: yellow }

RPC = Remote Procedure Calls.  That describes a system when you send a command to a remote system where it's processed and results are returned.

Bitcoin RPC is synonymous with JSON-RPC in my opinion, although JSON-RPC itself is not Bitcoin-specific.  JSON-RPC simply implies that the RPC interaction will use JSON as its data structure.

Bitcoin RPC is used by authenticated clients to connect to a running instance of bitcoind. The clients issue commands to send transactions, get status, and a variety of other purposes.

The Bitcoin RPC commands are on the wiki.


Historical bid/ask prices I'm searching for BTC historical prices and people often link this source: http://api.bitcoincharts.com/v1/csv/

Now, I'm familiar with forex historical prices where I have tick or OHLC data with bid/ask prices. However, data from that website have 3 columns (timestamp, price and amount?).

Is there a way I can get/extract historical bid/ask prices from data available on http://api.bitcoincharts.com/v1/csv/? If not, is there a (preferably free) source of BTC historical bid/ask prices (at least for the H1 timeframe)?

Thank you.

The short answer is no.

Each exchange that deals in bitcoins has it's own pricing, there is no single exchange from which to draw data.

The exchanges may or may not have have an api to access their pricing history with, you would need to check that exchange to see.

https://btc-e.com/api/documentation is one such exchange, but they don't appear to have their trade history available, for example.


Trying to understand SegWit Can someone please help to confirm my understanding of SegWit ?

My understanding:

Originally, signatures are included in each block alongside each transaction, these signatures can be read by nodes to prove validity of each transactions.
With SegWit, signatures are omitted from the blocks, but instead recorded in a side-chain called Witness blockchain.
Whoever wants to verify a transaction can refer to the corresponding signature from the Witness side-chain
The total amount of data remains the same, but since we now have two separate chains running in parallel, the size of each block is effectively doubled.

Questions:

Is my understanding correct please?
Does it mean that for old-fashioned Nodes who don’t look at Witness side-chain, they can only verify transactions up to the Segwit implementation, and will have to reject new blocks because they won't find a valid signature within the new blocks?
In that case, how is it a soft-fork? Since all nodes will be forced to upgrade in order to operate. (by here I am sure I am wrong somewhere..)
Finally, do miners and nodes now keep both chains and when they broadcast the new block, they also broadcast the new Witness block?

Thank you very much.

Is my understanding correct please?

The only nit above is the total amount of data is increased a little - so little that it can be ignored.

  Does it mean that for old-fashioned Nodes who don’t look at Witness side-chain, they can only verify transactions up to the SegWit implementation, and will have to reject new blocks because they won't find a valid signature within the new blocks?

Wrong. SegWit outputs look like AnyoneCanSpend outputs to legacy nodes (AnyoneCanSpend = P2SH address that can be spent without a signature - you just have to know the script to spend it.) While new nodes understand the "Witness Program" and verify witness signatures, legacy nodes think it's just a usual AnyoneCanSpend script. Hence, they accept transactions that spend Witness addresses.


Fatal Error Help/Advice I've salvaged my old netbook with Windows XP and have been able to access a couple of Bitcoins that a friend sent me back in 2011 (!) when he was getting into this new cryptocurrency thing. BTC was beyond my skill set then and just out of reach now -- the wallet.dat is running on Bitcoin Qt v. 0.8.5 beta.

The coins have 155140 confirmations but Qt is running 162 weeks behind -- it takes forever to load, and will never catch up to the network on this ancient machine (have kept it running for days now) -- would like to move the BTC somewhere else -- have tried sending a test amount (0.01 BTC) to a new Mycelium account on my phone but each time get this error:

Runaway exception A fatal error occured. Bitcoin can no longer continue safely and will quit. St13 runtime_error CDB() can't open database file wallet.dat error -30974

Am at a loss what to do next -- any help or straightforward advice on what steps to take in order to move the wallet.dat to another machine for an inexperienced Bitcoin layperson would be most welcome...

Thanks much

First of all if you have not done it yet, I would encourage you to make a backup of the wallet.dat file (e.g. copy it a usb stick).

One solution would be to let bitcoin-qt show you the private key for the address for which you received bitcoins back in 2011. Then you could import (actually "sweep") them with Electrum. See the following help:
https://en.bitcoin.it/wiki/Transferring_coins_from_Bitcoin-Qt_to_Electrum

This should also work with version 0.8.5 and you don't need to wait for bitcoin-qt to have downloaded the blockchain or anything.


`bitcoind` RPC: ask if syncing headers or blocks Is there a way to know from bitcoind RPC if it's syncing headers or blocks? And is there a way to know the header sync progress?

Even if not directly available, is it possible to derive header sync progress from other information through RPC?

I tried to get this information from the debug log, but the problem there is that occasionally, the last header sync log message looks like this

Synchronizing blockheaders, height: 1660930 (~95.02%)

It never logs out whether it reached 100% or not, and that's a problem for the software that I'm working on.

The getblockchaininfo RPC will tell you have many blocks and headers you have. When the number of headers is larger, you're still synchronizing.


Account Balance and Bitcoin-QT I'm attempting to clarify a few things in my mind. The wallet.dat file contains (amongst other things) my transaction history alongside the private keys associated with each address in use in the wallet.

Let's say I'm one of those open source weirdos and I use PyWallet to open the wallet.dat and pull the private keys and addresses out of my wallet. Now say my goal is to create a new wallet (called it Cwallet). Now CWallet can sign transactions for my bitcoins from bitcoin-qt, but how would it actually get an account balance?

Does CWallet have to search through the entire blockchain and find my address and then follow it to the most current block? Or is there an optimized way of determining the balance?

If you used some python scripts to generate a new wallet file and want to use it with bitcoind or bitcoin-qt, you will probably need to rescan the whole blockchain via running bitcoind -rescan (it may take much time).

After that you can use bitcoind listaccounts to get balances of all your accounts (or bitcoind getbalance to get the total amount).

Not sure if it answers your question though, since not sure what you mean under 'account' and 'CWallet'.


I sent bitcoin to the same address a second time, how can I recover it? I accidentally sent $28 in bitcoin to this address 32o7Pt42rsUFupN9sNLYJdQc6MNji5rANg a second time, and it never posted to the account to which I intended to send it. I have found the transaction in the Block Explorer, it has been confirmed 611 times. Now I am wondering how I may be able to get that bitcoin back in my possession. Can anyone help?

I accidentally sent $28 in bitcoin to this address 32o7Pt42rsUFupN9sNLYJdQc6MNji5rANg a second time, and it never posted to the account

It sounds like you are depositing to a service. You should get in contact with the admins at that website or service to see if they can credit your account.


HMAC "Bitcoin Seed" for BIP32 Pybitcointools uses the following code for calculating a master private key (BIP32) from a seed:

def bip32_master_key(seed, vbytes=MAINNET_PRIVATE):
    I = hmac.new(from_string_to_bytes("Bitcoin seed"), seed, hashlib.sha512).digest()
    return bip32_serialize((vbytes, 0, b'\x00'*4, 0, I[32:], I[:32]+b'\x01'))

Why - specifically - is the byte string Bitcoin seed used in the HMAC algorithm? When one considers that the byte strings Mnemonic and Electrum are used in HMAC derivations (in BIP39/quasi BIP39, respectively), the labels seem overly non-specific. I'm wondering why the byte string doesn't clarify or specify a version, eg BIP32 V0.1 seed.

None of this is criticism, to be clear! I'm trying to elucidate how these decisions were chosen and implemented, which is often very difficult without being intimately knowledgeable in RFCs, Github etc.

Perhaps this could be explained in context of how HMAC works also?

It is specified in BIP32 (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). The SHA512-HMAC function is reused because it is already part of the standard elsewhere, but it takes a key in addition to the data being hashed. As the key can be arbitrary, we opted to use to make sure the key derivation was Bitcoin-specific.


How long does it usually take to mine a bitcoin? I am new to bitcoin and was wondering with a single gtx 1050 mini 2gb how long would it take to get 1 bitcoin by myself?

You would never be able to mine a solo mine any Bitcoin with a GTX 1050. The current network difficulty is so high that your GPU would have an almost 0 probability of finding a block and thus earning any Bitcoin.