Will BTC script be Turing complete in future? I want to know if BTC script will have loops in it in the future?

Turing completeness includes the capability to run programs that might not terminate or that might terminate after a very long time. This would cause the blockchain to stall, hence it is a must to keep the number of instructions to be run predetermined (like BTC) or to be run according to a budget (like ETH).


block.io alternative? Hi is there a alternative service to block.io Unfortunately they are not allowing mainet wallet on developer api and their monthly cost is too high. So looking for an alternative?

I want to use online service to have wallets online, that can send payments using api

You might want to take a look at Blockchain.com api, they are free and fairly good to start sending Cryptos and creating wallets.
But if your business grows you will need either create your own blockchain provider alongside with your own full node or pay for a service like block.io


Not sure if I accidentally double spent my LTC LITECOIN LEDGER NANO S - CHROME APP LTC LITECOIN

I just sent two transactions (with different amounts) from one address to the same receiver one after another.

While sending the second the first was still unconfirmed.

The first went through.

The second shows [unconfirmed] and the transaction id [3e454f1dc4a08fdb64ea9e047baf504891934ea8d84ee42732d5d2eebb18e138] does not exist on the LTC blockchain.

Both the amounts of the first and of the second transaction have been substracted from my Wallet Balance.

I've tried following things:

I already reset the chrome app [SETTINGS - TOOLS - RESET APLLICATION DATA]
Clicked on [Synch] severalt times
Waited an hour

I need the following things to happen

[Mandatory] My Balance needs to be restored to the amount before the double spend TX
[Optional] The unconfirmed double-spend-transaction to disappear from the transaction list

Need your advice, thanks in advance

P.S.: This question is also posted on the official Ledger Nanon Forum
https://support.ledgerwallet.com/hc/en-us/community/posts/360000120894-Please-Help-Not-sure-if-I-accidentally-double-spent-my-LTC-LITECOIN

The underlying problem is that somehow Ledger did not broadcast my transaction to the mempool. Don't know exactly why it wasnt relayed.

Solved in the following way:

Close the LTC Chrome app
Download the LTC-Version of Electrum Wallet. This wallet interfaces with the Ledger directly, like the chrome apps. No need to import the seed.
If Electrum gives a read error make sure you enable and disable broswer support once.
Make sure you started the correct app in Ledger. In my case it was LTC.
In Electrum go under the tab "Addresses" and copy one of your receiving addresses with 0 balance
Send YOUR ENTIRE BALANCE at once to your own copied address. For good luck make sure the fees are sufficient.
Wait until it confirms.
Thats it! When you start the chrome app again the new transaction will have replaced the unbroadcasted old one and the balance returns to the correct amount.

It should work in principle with every currency.

Got it from this reddit: https://www.reddit.com/r/ledgerwallet/comments/7rkicz/bch_transactions_sent_unconfirmed_but_dont_show/


Payment Protocol: Is using different addresses for refunds just because of privacy? One of the features of the new payment protocol is that it allows the customer's wallet to automatically send a refund address with the transaction to the merchant.

Why would the refund not be sent back to the same address?

I read the related question regarding why change is sent to a different address. Gavin and David Schwartz mentioned it being more difficult to track your bitcoin spendings and it obscuring which address is the spending address and which the change address.

Is this the reason why new addresses are supposed to be used for refunds or are there any additional reasons?

Some hosted wallets are using addresses in elaborate ways. So you cant be sure the address sending the payment is the one "owning" the bitcoins.

An example is CoinJar, that uses addresses to indicate to what account the funds should be added. But behind the curtain CoinJar does anything it feels is best, making the most efficient use of all its previous outputs.


Sent BCH to a BTC address in my wallet Two days ago, I sent 2.337 BCH from Kraken to Blockchain.info. I cut and paste a BTC address accidentally, not a BCH one. I had used this wallet address about 45 days prior, and so it should be associated with my own BTC wallet, which I have control over.
 (theoretically).

My question then is, how to I get my BCH out of that BTC wallet address on Blockchain.info? I wrote them days ago, and nothing back yet. Any help would be greatly appreciated.

If you don't possess and control the according private keys, you don't "own" Bitcoins. Maybe you have a right to access and transfer your Bitcoins and maybe legally "you own them", but not technically.

If you have sent BCH to a BTC address, then, only the according private key of that BTC address could help you sending your BCH out of the accidentally used BTC address.

Either you import that private key into a BCH wallet that supports importing private keys or you directly create and sign a raw transaction (experts only).

Blockchain.info could easily do that for you, but I don't expect that highly centralised services will have the man-power to follow such support inquiries.

Also, they could collect the accidentally sent BCH (don't I don't think they do).


preventing fraud in a mining pool If a group of people participate in a mining pool and person 1 finds a valid proof of work on their machine what prevents them from submitting this proof of work for themselves and not giving it to the pool to share between the participants?

The very last line of a block effectively contains:

Reward for Solving this Block: Add 12.5BTC to Account for [Mining Pool].

If the miner tried to change that line to read

Reward for Solving this Block: Add 12.5BTC to Account for [My Personal Account].

the altered line would change the block, which would change the hash, and their Proof of Work answer would no longer be valid.

So if a miner solves a block on behalf of the pool, they cannot submit that block for themselves; it will no longer be a valid solution.


Bitcoin core trying to sign a transaction loaded from psbt file, but getting "could not sign any more inputs" error I am trying to sign a transaction loaded from psbt file, but I'm getting could not sign any more inputs error.
I did it successfully on the first try. However I cannot do it any more now.
I changed my passphrase of bitcoin-core before I did the second try. Does it matter?

I changed my passphrase of bitcoin-core before I did the second try. Does it matter?

Yes. Entering the passphrase in console using walletpassphrase should resolve the issue


I lost my uncle few Weeks ago due to the covid 19 and I have his wallet I have my uncle wallet and I don’t have his private key can anyone help

I have my uncle wallet

The only important thing in a wallet is the private key(s). Usually the wallet's contents are protected by a password. Without the password, no one can get the private key out from the wallet.

The actual money is better thought of as being in the public blockchain. Money is not really inside the wallet.

  and I don’t have his private key

Then you don't have any control over his money.

You must find the private-key or a seed-phrase (recovery phrase) - usually consisting of 12 or 24 words from a special list. The private-key can be recreated from the recovery phrase. Prudent people put this information somewhere safe. Some people stamp the recovery phrase onto a fire-resistant  metal sheet and lock that away somewhere.

  can anyone help

You will get lots of offers from dishonest people trying to steal the money or, to trick you out of money in "unlocking fees" or other fictions. Don't trust new people who communicate in private. Never give anyone else anything that looks like a private-key or recovery-phrase.

But no, you really need to find the key or recovery phrase. Nothing else.


Working example of raw transaction utilising Boolean (OP_IF, OP_ENDIF) scripting REQUIRED I recently posted this Testnet TX (TxID 2d0daa01da8294a54178f8111eb2a02010c425fd15957d8baee8717edcfbe105) which successfully spends an output (TxID 8d897ca91774a7fafa086a3275e679248d6bffee015d3b2efefd5dab00df152d) of form:

OP_DUP OP_HASH160 ##HASH160_KEY1## OP_EQUALVERIFY OP_CHECKSIGVERIFY OP_IF OP_DUP OP_HASH160 ##HASH160_KEY1## OP_EQUALVERIFY OP_CHECKSIG OP_ELSE OP_HASH256 ##HASH256_OF_SECRET## OP_EQUAL OP_ENDIF

Where ##HASH256_OF_SECRET## is sha256(sha256(3ceb50edd0282cd99dc59351f513dcdf)) and ##HASH160_KEYx## is the ripemd160(sha256(public key n)).

I have been trying for days using Python (pybitcointools library, Pycoin library, raw tx construction) and Bitcoincore, however I consistently cannot duplicate the Tx myself.

EDIT: added keys, code

Here's a duplicated Tx on Testnet: ed99a9d3c8da943c5140790349d000450209367c7cf24d1627df6b43ece8b9d4:1

Keys (from pycoin):

input                        : 98a6776b00481d69147af4f19982816d24b21f1e45bd6b9b6612969a805dff5d
network                      : Bitcoin testnet3
netcode                      : XTN
secret exponent              : 69045673789968930636498185430340997034503775217197653543201755869784347377501
 hex                         : 98a6776b00481d69147af4f19982816d24b21f1e45bd6b9b6612969a805dff5d
wif                          : cShS7YocDNMfpxHPd1iWbXX6eTFPQoNTJSw6W4sQY5BVimvvw6FY
 uncompressed                : 92k9QgqAnrFCWtwvA4neyJnngkZG3g43ne9BJuzBmeeirPHXtu3
public pair x                : 66609190448066768097937392847179714582119540337817974512409209527265330917500
public pair y                : 13690920648454078566739109880631240403596673427366917192400893160542072726114
 x as hex                    : 9343773d05d5a07f103914d5294ca742db124babd2c2cac5f84e6114f192f07c
 y as hex                    : 1e44c956c737a60369fbf4f5e6324dc005ba38d156f61232f9251fec8ee3e262
y parity                     : even
key pair as sec              : 029343773d05d5a07f103914d5294ca742db124babd2c2cac5f84e6114f192f07c
 uncompressed                : 049343773d05d5a07f103914d5294ca742db124babd2c2cac5f84e6114f192f07c\
                                 1e44c956c737a60369fbf4f5e6324dc005ba38d156f61232f9251fec8ee3e262
hash160                      : fd00f9fd452fee2214e8b0f9acf4c53496bd5636
 uncompressed                : 23dfc9ad6d857c92ad2b99004354067492cf464c
Bitcoin address              : n4aiRSJEm2gT9QrZTFJ7DJy3KPGnDHxybf
Bitcoin address uncompressed : mine2pMKAyoA6CBimPd1ZdFVi5kvhTM7TT

script = 76a914dd6cce9f255a8cc17bda8ba0373df8e861cb866e88ad6376a914e900510876cb689f1db6fa982376c301362b740c88ac67aa20644d79d87e0907833e888e272e5d7b925deb261a8499a65cbc0bf26797a15e8e8768

[118, 169, '23dfc9ad6d857c92ad2b99004354067492cf464c', 136, 173, 99, 118, 169, 'fd00f9fd452fee2214e8b0f9acf4c53496bd5636', 136, 172, 103, 170, '0757152190e14e5889b1270309d7c8e40219d45e04096fcb97d1b4c5a99064e1', 135, 104]

*mysecret* = '12345678'.decode('hex')
sha256(sha256(*mysecret*)) == 0757152190e14e5889b1270309d7c8e40219d45e04096fcb97d1b4c5a99064e1

I'm looking for a working guide on constructing a Testnet & P2SH Tx which utilises Boolean scripting. Specifically:

A working testnet example of the question posed above (detailed further here) (I'll offer a bounty for this)
Constructing a multisig Tx of form: (1 KEY1 KEY2 2 CHECKMULTISIG) OR MASTERKEY


Bitcoin: block reward for a tiny transaction I'm sure this a basic question, but I would like to check my understanding.

At the moment, a miner who grows the blockchain by confirming a block is rewarded with 12.5 bitcoins. This incentivises miners to validate transactions.

Today each bitcoin is worth $13032.00.

It is really correct that if Bob sends Alice some tiny fraction, say one ten-thousandth, of a bitcoin, today worth $1.30, then each confirmation is worth $162,900.00 to the miner?

If this is correct, then it is only economical to offer a transaction fee comparable in value to the miner's reward when the transaction is huge. So as a follow up, I would like to ask:

What are typical transaction fees at the moment, and how is this likely to change as the number of bitcoins approaches its theoretical maximum of 21 million?

The reward is for a block, and a typical block generally contains around 2,500 separate transactions in it.

Typical transaction fees seem to be around $8 (USD), so transaction fees in a block are typically around $20,000.

The miner who successfully submits a block receives:

   $162,500 (12.5 BTC * $13,000) : reward
 +  $20,000 (2,500 tx * $8 ea.)  : tx fees
--------------------------------
   $182,500 (approximately)


sent bitcoin and its not in the blockchain and not showing "unconfirmed" to my other wallet Last night I transferred $400 btc from purse.io to my paxful.com wallet. and it didn't show in my blockchain record and I didnt received any "unconfirmed" . What happened? is my BTC lost?

paxful address: 3EHttCtQtNU4BZvf5YvjbnDruhd1ubDvBT

purse.io address: 1BM6mMXb4ZHMMSx3JnZnhnTkE5Rh5VNnj9

my tx said by purse : https://www.blocktrail.com/BTC/tx/e68ad64dba66c61d316bb628a97d0346f11eaa2a5d86f27233b8b5b2178903c2

Here is the receiving address on blockchain: https://blockchain.info/address/3EHttCtQtNU4BZvf5YvjbnDruhd1ubDvBT. It seems 0.028028 BTC where received.


Mining pools communicating outside of network Does anyone know of any papers / evidence of bitcoin mining pools communicating outside of the bitcoin network for financial gain? It seems plausible in practice, but I am not sure if that has occurred.

To be clear, I mean two mining pools sending blocks to each other outside of the network. This would give them a head start / be faster than using bitcoin's diffusion process.

This is definitely being done. One such network is FIBRE.

Obviously, miners want other miners to build on top of blocks they've mined as quickly as possible to increase the odds that their blocks will not be orphaned. And miners also want to get new blocks and start building on them as quickly as possible for the same reason.

So miners have every incentive to send and receive their blocks as quickly and as widely as possible. The bitcoin network is built to exchange blocks, but it's not its top design priority. So large scale miners use purpose built networks optimized for just that task.


Is bitcoin mining itself compromising the security of SHA256 Following good scientific practice I propose a Theory/Hypothesis and now ask you to test it.

Initially this is a "thought" experiment but may progress to real testing depending on your thoughts. Back to the initial question first; My question: Is bitcoin mining itself compromising the security of SHA256?

Possible answers:

Yes (maybe qualified by "in some way" ,etc).
No (Not at all because...xxx ,Not unless...YYY).
Maybe (??).

The hypothesis is this:

SHA256 is extensively used in many applications (including Bitcoin).
It would be of great advantage for many persons, organisations and (not least) governments/military/NSA (etc) to be able to "crack" it.

Cryptographic experts have so far failed to crack SHA256 and only a small number of defects (possible collision scenarios) have been declared which although reducing the theoretical security (of a brute force attack) do not compromise SHA256 in practical use.

SHA256 look up tables exist for e.g. dictionary attacks and are very fast to use particularly for shorter passwords (<8 character). To extend the possibility of using look up tables for longer inputs a huge amount of computing power is needed to run many Terra inputs through SHA256.

This power is impractical to set up and run (cost of hardware, manpower, etc) and if it were set up e.g. by NSA using a super-computer it existence would be apparent and therefore usage of SHA256 would decline as it would be assumed that they wouldn't do that unless they thought they would get a result so users of SHA256 would migrate to a more secure system (e.g. SHA3 series). Therefore what NSA (or whoever) need is a "covert" way of "testing/running" SHA256 and gathering the results.

Is bitcoin mining with its daily 4000+ TH/s power, funded and manned entirely by users of the hardware hoping to gain Bitcoins (and hoping they are worth some real $$) really performing a service for the NSA (or someone) and effectively "hiding in plain sight"?

Methods of testing this hypothesis are invited.

With a look up table you can avoid calculating the hash of a given input twice. Indeed, the block chain can be considered as a giant look up table, but one with very special forms of inputs: It links blocks and transactions to their hashes.

Though, why should someone choose a transaction or block as her password? Further, why would an attacker even try to look up a hash of a password in the block chain? He would have to assume in advance that the password is a transaction or a block (don't forget that even looking something up consumes some resources).


Can we get a fixed rate of kWH to USD through bitcoin? Assuming the energy to bitcoin rate of your choosing, what is the cost of one kiloWatt Hour, in USD?

Assuming the energy to bitcoin rate of your choosing

Market questions generally go out of date extremely quickly, and Bitcoin mining in general varies hugely in efficiency and availability of hardware. It is not as clear cut as working out the hardware level of efficiency at the chip level as this is only a small portion of the total power cost.

At a chip level, the hash engines have a specific cost per hash, minus any amount of failure rate, which is generally in the order of several percent of the work wasted.
At a miner level, where it converts incoming high voltage AC mains power to a lower voltage for use with the mining chips. This varies greatly with the design of the hardware being used, from tens of percent to just a few depending on the complexity and cost of the conversion.
At a farm level, where incoming transmission voltage is converted to mains voltage. This varies massively depending if the incoming supply is already designed for residential use (120v/240v), industrial use (277v/480v), or commercial distribution (tens or hundreds of kilovolts), and the efficiency of the hardware used.

It's therefor pretty hard to define even a cost per hashrate in the wider network, but once you know it it's relatively straightforward to convert it to a USD cost.

  what is the cost of one kiloWatt Hour, in USD

This is the simple bit. They're usually specified literally as this price, for example in parts of north america 4c/kWh is fairly typical, but it varies extremely widely betwene location and provider anywhere from 1c to 35c.


How do I debug Taproot functional tests using pdb? I am looking at the some of the Taproot functional tests such as feature_taproot.py to review the open Taproot PR.
I would like to use pdb to debug these tests. Can you provide some guidance on how to do this?

The Bitcoin Core test documentation provides some guidance on attaching a debugger. The functional tests are in Python so you are correctly choosing pdb (rather than gdb, lldb etc) for the job.
A python debugger can be attached to tests at any point. Just add the line:
import pdb; pdb.set_trace()
anywhere in the test. You will then be able to inspect variables, as well as call methods that interact with the bitcoind nodes-under-test.
If you're unsure where is a good point to attach the debugger one good place is after the random_checksig_style(pubkey) helper is defined in feature_taproot.py. This creates a random CHECKSIG Tapscript that requires only a valid signature on the witness stack.
There is a good video tutorial here from Simeon Franklin on pdb here. There are a large number of pdb commands but the key ones you are most likely to use are:
l(ist)
n(ext)
c(ontinue)
s(tep)
r(eturn)
b(reak)

As Franklin states:

l shows you where you are in your code. n steps to the next line of execution. c leaves debugger control and executes your code normally. s steps into the next line of execution including into function calls if they exist. r steps to the end of the currently executing function and b sets breakpoints. It is important to realize when you are debugging that from the pdb console you can type in any valid Python, changing variables or execution flow of your program and inspecting their values.

(Also p expression for printing an expression value or pp expression for pretty printing an expression value. And whatis expression for printing the type of that expression).
More detailed guidance on using pdb is on python.org but the above should be a good introduction.
Remember that you are making edits to Pieter Wuille's taproot branch locally and will not ever push them to GitHub so you can make whatever changes you want. If you want to revert back to Pieter Wuille's code before you started making edits (and discard all of your edits) you can run
git reset --hard HEAD

and then you should be back to the state before you started experimenting.


Does Bitcoin Core leak private information during synchronization without Tor? I'm very new to bitcoin.

Sorry for maybe silly or paranoid questions, but: Do I compromise myself in any ways when I first time run the official Bitcoin Core client for downloading all transactions in the world without "Connect through SOCKS5 proxy" option checked on?

I have done no transactions so far, but my client was downloading all the bitcoin transactions history without using VPN or Tor (this is default setup).

Does it mean that my future transactions will be possible to track and link to my identity (as my IP was not anonymized during history downloading process)?

Nope, don't worry. The nodes you have connected only know that your IP address has downloaded the blockchain, but the transactions you'll make in the future won't contain information specific about it.

The main threat to your privacy are contact points between the blockchain and real life (when you make a purchase and pay with Bitcoin, when you buy at an exchange that know who you are, when you publish an address in a forum...) because that puts your name next to an address someone could eventually follow.

When you make a transaction without Tor you could also compromise your privacy, but it is a long shot because nodes don't store the IP addresses that sent the transactions (and there is nothing in the blockchain either). There is still a chance because someone could modify a node to record the IP addresses and, if you connected to that node, it would record your IP address and your Bitcoin address together. By making that rogue nodes highly available they would increase the chance that you connected to them. There was at least one case of a company doing this in the past that has been discovered, but they said it was something like and experiment.

If you want to learn more about Bitcoin and privacy you can start at:

www.bitcoinisnotanonymous.com


How to find a BTC/BCC mining node with modified software? I want to confirm my non-standard transaction(s) in BTC/BCC network. To do it I have to find mining node with modified software. Is there pool admin who can switch off SCRIPT_VERIFY_CLEANSTACK flag on his node?

A special message to mods: this question is strong bitcoin-related. This is not looking for particular software :))

Update: one example is here: https://www.reddit.com/r/Bitcoin/comments/6f877c/ This trick will permit to spend funds from https://blockchain.info/address/3DkVqK1rUPZuj8EnPAbKmJ3A8xuZeTseeW in BTC-chain or http://blockdozer.com/insight/address/3DkVqK1rUPZuj8EnPAbKmJ3A8xuZeTseeW in BCC/BCH-chain

If you are interested in it I can publish the spending transaction.

Looks like the BCC has been claimed. As for the BTC, you are not asking a question about the protocol or the software, you are looking for a person controlling mining equipment, and that question is better suited to https://bitcointalk.org than to this site.


How safe is bitcoin with regard to a random address generation attack? Imagine an attacker implementing something like the following pseudocode on the fastest ASIC farm money can buy:

attack(blockchain, my_address)
    addresses = generate_tree_of_all_nonempty_addresses(blockchain)
    while true:
        private_key = generate_random_private_key()
        public_key = generate_public_key(private_key)
        address = ripemd160(sha256(public_key))
        if is_matched(address, addresses):
            steal_bitcoins(private_key, public_key, address, my_address)

Given that RIPEMD-160 reduces addresses to a size of 160 bits (in binary form), and that there are (IIRC) over a million non-empty addresses out there, does it really still take an impractically long time to find collisions? I should be able to do the math myself, but I know some of you are better at that kind of thing than I am...

Or to put that another way, is it possible that the decision to hash public keys the way bitcoin does, might in the future turn out to be unwise given the heightened risk of collisions compared to simply using the full ECDSA public key length?

Ok, I'm spoiling the fun of you working it out yourself, but I had too much fun working it out myself to not post.

In order to have as many target addresses as possible, let's suppose every satoshi that will ever exist (21e6 * 100e6 = 2.1e15 or 2.1 quadrillion) were in a different address.  And let's suppose someone developed an ASIC that, at the same rate as today's ASICs compute SHA256D, could generate a private key, compute the corresponding public key and address, and check it against all 2.1 quadrillion of those targets.  (This is absurd - generating an ECDSA public key is many orders of magnitude more complex than an SHA256 hash.)  Suppose they deployed this ASIC on the same scale as today's entire Bitcoin mining network.

The current Bitcoin difficulty is about 4e10, meaning the network as a whole is computing 4e10 * 2^32 = 1.7e20 hashes per second.  So let's say our imaginary attacker's network is generating 1.7e20 private keys per second.  Each private key has a probability of 2.1e15 / 2^160 = 1.4e-33 of matching one of the target addresses.  So the attacker finds a match at a rate of 1.7e20 * 1.4e-33 = 2.4e-13 per second.  On average, it takes 1/2.4e-13 = 4.0e12 seconds, or roughly 130,000 years, to find one match.

So this highly dedicated attacker, who is spending millions (if not billions) of dollars on ASICs and electricity, will be able to steal an average of one satoshi every 130,000 years.

One really has to come to terms with how mind-bogglingly fast an exponential function grows.  160 bits seems like a very small amount of data, but 2^160 is an incredibly huge number.


How to use bitcoin from the command line in Windows? Do there exist any stable and audited bitcoin wallets that can be used from the cli on Windows? I have looked but have been unable to find any that I can use for automated tasks.

You can use bitcoind and bitcoin-cli in windows too. See this post for more information.


Given the current situation, what currently available Bitcoin clients are the most likely to follow the longest chain one month from now? I am completely lost with the various BIPs and what exactly every client implements. So given the current situation as of July 2017, what currently available Bitcoin clients are the most likely to follow the longest chain by end of August?

We don't know what will happen, therefore it is hard to say which client will be on "the longest chain".

Core is scool with bip141, so it will follow that.
Segwit2x hard fork will be using BTC1.
USAF could hard fork as well so that client will be for that chain.
BItmain's BitcoinABC will have their own client (I'm not sure what that client will be/is called).


Is the price of BTC transactions driven down by the influx of miners? I'm wondering why Bitcoin transaction speed doesn't increase (and cost decrease) due to more people becoming miners all the time. Is it because the number of transactions is increasing even faster?

No, it is because those are unrelated values. The number of miners (more preciselly the cumulative hash power) influences the security of the network, but not the speed of mining the blocks (in long term). In short term (within the current window of 2016 blocks), it can influence the block generation speed, but after the window completes, difficulty retarget happens, so that the block generation speed goes back to designed avg. time of 10 minutes.

The transactions can not be confirmed faster than blocks are generated, thus block generating speed is very closely related with transaction [confirmation] speed.

Transaction speed is also influenced by number of transactions waiting to be confirmed, but that again is unrelated to number of miners.

Similarly the price is more or less unrelated (assuming enough miners to avoid monopoly). The price (per byte of serialized transaction) is mostly affected by the demand - i.e. the number of other transactions waiting for confirmation and their size and fee used and some other subtle properties.


Do transactions reference the containing block of the previous transaction? According to the wiki, it appears as if the previous transaction's index is referenced but not the block in which it's in.  Why?

How are transactions stored in the database that doesn't make referencing the previous transaction's block index necessary for performance?

If it were not this way, transaction generation would be slow and fragile. First, you couldn't form a transaction unless you knew which block all its outputs were in, which would mean you'd have to wait until they get in a block. Worse, if there were a blockchain reorganization, it would be impossible to recover many transactions because recovering their parents would change what block they're in, invalidating their children.

This means that nodes generally keep an efficient table of all unspent outputs, indexed by transaction ID.


Bitcoin cross trading from Bitstamp to Bitfinex Bitstamp exchange price for Bitcoin is right now 1056.07 USD

https://bitcoinaverage.com/en/exchanges/bitstamp/btc-to-usd

while Bitfinex is 963.41 USD

https://bitcoinaverage.com/en/exchanges/bitfinex/btc-to-usd

Is it possible to exploit such a big difference to extract value? Probably this is a well known strategy on markets, but my finance knowledge is quite limited.

Is there any bot doing that kind of operations without human intervention? Thx!

Refs.:

Bitcoin trading at bitstamp

How Does One Make Money from Bitcoin Trading?

Need help understanding how to profit from bitcoin trading (like forex?)

Is there a forum-like exchange for trading Bitcoins person-to-person?

http://en.wikipedia.org/wiki/Order_book_%28trading%29

Nobody knows whether Bitfinex is insolvent or not. As a result, dollars at Bitfinex are worth less than dollars at other exchanges. This accounts for the price difference you see. To exploit this difference, you would have to send dollars to Bitfinex and command them to make what appear to be fraudulent transfers on your behalf.
See this article for more details. Some excerpts:

Bitfinex has imposed a haircut on all of their depositors.
For those whose deposits were not held in segregated accounts, there is no question that the deposits constituted general obligations, payable on demand, on the part of Bitfinex. To justify making anything less than a full payment on a general obligation that is payable on demand, a company would have to be insolvent or illiquid.
By definition, if you don't have sufficient assets to make the payments you are obligated to make, you are insolvent. There's no reason to think Bitfinex has assets that are not liquid. They imposed a haircut because they don't have assets to cover the funds their depositors have every right to demand from them. They are insolvent.
When you deposit funds at Bitfinex, they have your funds. You have a promise that they will repay you the funds you deposited. But you're just another creditor on their list of creditors. You get funds if they have them and not if they don't. Your deposit is another general obligation of Bitfinex, a company that is insolvent.

An insolvent company cannot make full payment to a junior creditor without court approval (or consent of all their creditors) -- such a transfer would be fraudulent. We know Bitfinex has not gone to court as they would have to have given notice. When you deposit money at Bitfinex, you become a junior creditor. When you command a trade or withdrawal, you are commanding full repayment of yourself, that is, you are ordering them to make a fraudulent transfer on your behalf.
Fraudulent transfers are subject to clawback. That is, if you trade at Bitfinex, you may eventually get a letter from a trustee or receiver demanding you repay the money you made or even the full value of the assets you withdrew.


How to get hex string from transaction in bitcoinj I want to use this tool: http://blockchain.info/pushtx to push transaction. I don't understand the input data. It says it is hex string representation. I've read information about that in the raw transaction of the RPC API, but I am working with bitcoinj, it there a way to get this hex string ?

Thank you

EDIT: I want to do that to compose and broadcast a transaction

For now I did this:

final StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb);
try {
    ByteArrayOutputStream os = new ByteArrayOutputStream();
    transaction.bitcoinSerialize(os);
    byte[] bytes = os.toByteArray();
    for (byte b : bytes) {
        formatter.format("%02x", b);
    }

    return sb.toString();
}catch (IOException e) {
    return "Couldn't serialize to hex string.";
} finally {
    formatter.close();
}

A shorter version could be:

String hex = DatatypeConverter.printHexBinary(tx.unsafeBitcoinSerialize());

Where the hex converter used is standard at least since Java 7:

http://docs.oracle.com/javase/7/docs/api/javax/xml/bind/DatatypeConverter.html


how to access my wallet.dat I setup a Bitcoin many years ago. I dont remember if I bought anything.
I found on my old computer a folder : Bitcoin under Appdata/Roaming ...and these files and Folders:
 BLocks
 Chainstate
.Lock
dblog
debug.log
peers.dat
wallet.dat

Was those files installed my a program of some sort ?
How can I get Access to those files to see if there are some coins in there at all ?:)
Or can I just delete all of those files ?

-

Those files are created by Bitcoin Core software. The important one is wallet.dat, do not delete it. You can download and run bitcoin core to open the wallet, but that will probably take a long time to sync. You could open it and dumpwallet, and then check each address on a block explorer or import them into a different wallet like electrum


If Bitcoin is not stolen from an address for some months does it suggest that malware did not capture the key? Some months ago, using bitaddress.org (offline but using my normal operating system), I made a key pair, copied the key and address to paper and stored a small quantity of Bitcoin at the address. Later, of course, the computer was again connected to the Internet, but the money has not been stolen.

Does the fact that probably no malware captured my private key those months ago suggest that the key is safe? Is it credible that malware would capture an address with small amounts of Bitcoin, but not extract it in the hope that later more would be paid into the same address?

It is a fallacy of the alternative disjunct to assume that your private key is in fact private, just because a potential other party has not used it: The two events "somebody has gained access to my private key" and "nobody has used my private key" are not disjunct.

If you are uncertain whether your private key has been compromised, you should move your bitcoins to a securely created new address.


transfer of bitcoin from bitcoin cash wrongly. i have exchanged my bitcoins with btc on koinex the transiction is done directly from bitcoin to bitcoin cash using destination tag of bitcoin cash  instead of selling the bitcoin and purchasing bitcoin cash, the status of the transiction is showing completed but i have not received in my bitcoin cash wallet. both the transiction is perfomed on koinex. can i pullback the transiction. i have also contacted the koinex customer care there are sayig transiction is sucessfully completed at their end.

As far as I know that any transactions that are in the blockchain cannot be undone so if it has confirmations then you lost the coins


Bitcoin Core 0.13 -- jsonrpc interface -- conflicted transactions I use bitcoind's Wallet feature to manage my bitcoins.
Using json-rpc interface, how can I check that a transaction is a conflicted one? And, how can I get txhash of a transaction, that spends those same outputs and is confirmed(malleability situation)?

If you call listtransaction, you should get a JSON array called walletconflicts.

If your transaction conflicts with another transaction in your mempool or with a transaction in a block, this walletconflicts array is filled with n transactions-id's that points to the tx that spends the same, conflicting inputs.

walletconflicts is also present in gettransaction


How to build a portable bitcoind binary for macOS? Bitcoin Core ships a portable bitcoind with the Linux and Windows releases, but doesn't ship one with macOS. And I couldn't find instructions on how to build one.

Can someone provide step-by-step instructions on how to build a portable bitcoind binary for macOS?

The host platform can be Ubuntu or macOS. I have access to both.

(Just to clarify, the goal is to have a self-contained bitcoind binary that runs on different macOS machines without having to install additional dependencies)

macOS portable binaries are uploaded to bitcoincore.org. On the download page, under Mac OS X is a link to tar.gz. That tarball contains the macOS portable binaries.

Bitcoin Core's release process using gitian does produce these portable binaries. So you can replicate the same process to build your own portable binaries. You can read about how to do that here.

There is a script, contrib/gitian-build.py that should do everything for you. It should work on Ubuntu. It will install all of the necessary dependencies and setup the gitian environment before doing the build when you run it with the --setup option.

Your build command with this script would look something like

bitcoin/contrib/gitian-build.py -Dnb -o x <name> 0.20.0

Use the -h option to get usage information

-D tells the script to not try to sign the resulting .assert file that contains all of the build hashes.

-n tells the script to not try to commit the .assert file that is created.

-b means to do a build

-o x tells the script to specifically do a macOS build (-o means operating system, x for OSX)

<name> that's where you would put your username. This is just for identifying signers who participate in the gitian build process. You can just set this to be whatever you want.

0.20.0 is the version to build, in this case, 0.20.0. You can put whatever other version you want.

The script will create a directory named bitcoin-binaries. Inside of that will be a directory with the version name. And inside that directory will be 2 files - a .tar.gz file and a .dmg file. The .tar.gz file contains the portable binaries that you can use.

Additionally some gitian builders (like myself) upload all of their gitian build results so you could just download those files.

Personally, I upload my results to github. The macOS portable binaries are named bitcoin-<version>-osx64.tar.gz.

Jonas Schnelli also uploads the results of his builds. You can find them at on his website.

In both cases, the files that you download should have hashes that match those of other gitian builds. The gitian builders commit their hashes to this github repository so you can go there to check that the file you download has the same hash that the gitian builders computed.


How is OP_CHECKTEMPLATEVERIFY a scaling solution I was wondering about OP_CHECKTEMPLATEVERIFY or OP_SECURETHEBAG as it was previously called. As far as I understand it you can commit on how to spend the coins later this way. But it doesn't enable covenants in the sense of https://fc16.ifca.ai/bitcoin/papers/MES16.pdf, right?
Tainting later transactions is probably quite controversial (and impacts fungibility). Will it be somehow possible to extend OP_CHECKTEMPLATEVERIFY to enable this in the future?

I believe there are probably some use-cases for CTV, but I don't seem to quite understand how this is a scalability solution (as it was "advertised"). After all if you do something in two-phases (first commit and then actual transactions) there is more blockchain data. The trick is just that you do the commitment when fees are high and can do the second part later (with lower fees) or am I missing some important piece? Couldn't you solve the same thing with P2(W)SH?

A bit of a meandering answer to the question, and to answer a side question: fundamentally what is a scaling solution?

OP_CTV does not increase the block space. Transactions using generally will use more block space actually (although it need not be a large amount), and relay can be optimized to equivalent.

But scaling is more than just a block size increase. The lightning network shows this -- not just because of eliding intermediate states from the chain, and routing, but also because of latency. It matters for lightning that confirmations can come faster than 1 block. This is not a minor point; if there were another way that you could get sub-block confirmations but use more total chainspace, people would probably still want it. Important to note that redeeming a channel still takes a long time potentially -- you're trading less latency now for more latency later (HTLC timeouts are longer than a single transaction confirm).

So, that said, what does OP_CTV do?

OP_CTV lets you more efficiently use block space over time. Imagine if you have a block that is almost full, and there's space for just a few inputs and outputs (let's say 2 outputs). Previously, this would mean that space would go to confirming a payment to one person -- one change address, one payment.

This isn't very efficient because we're only paying one person!

With OP_CTV, a single marginal output can confirm payment to an unlimited number of recipients. So that means the efficiency for confirming a payment on-chain is now much better.

However, at some time in the future those still must be claimed on-chain, which means that overall average demand isn't reduced (maybe, in fact, increased).

But if you look at trends, not all blocks are full. Sometimes they are, sometimes they aren't. A not full block represents "wasted" bandwidth for confirming transactions. All blocks should be full.

By splitting the market, we create two different "fee bands", the fee band for confirming a spend and the fee band for redeeming a CTV output. This creates a much healthier backlog for Bitcoin.

This is indeed similar to P2SH -- before p2sh, you pay for data on spend, when you should only need to pay for it on redeem. p2sh is bytes-wise less efficient than non-p2sh. And p2sh can't emulate it because p2sh operates at the script level, not the transaction level.

So what are the core benefits?

Improved confirmation throughput
Lower Fees paid
Lower fee-rate for top of mempool
Business operators abstracted away from "chain weather"

CTV also jives well with protocols like LN by increasing the number of HTLCs a channel can hold, which has been shown in some research (citation needed) that the number of HTLCs increasing is critical to LN working well. CTV also makes it easier to bulk-open channels, which decreases costs for opening channels & can increase LN routing viability.

CTV also enables new kinds of non-interactive protocols, which can eliminate a transaction between "withdraw from coinbase" and "open lightning channel". This meets the "classical" decreased block space usage criteria. This includes a case where, With Schnorr signatures/taproot, it's also possible to have the sub-tree be elided in favor of a new transaction.

See https://utxos.org/analysis/bip_simulation/

Oh, and it does enable similar covenants to the MES Covenants, see https://utxos.org/uses/ for more on vaults, non-interactive protocols, etc.

To close, a different definition of a scaling solution:

A blockchain scaling solution is a technology which decreases how aware users are of the fundamental limitations of the underlying blockchain, assuming they have proper wallet software (e.g., lightning support, ctv, etc).

CTV eliminates a large class of cases where a user bumps up against chain limitations, and is therefore a scaling solution.


Is Bitcoin mining profitable on a 8 core, 32 GB server with unused capacity? I have a server with following specs which is using avg. 20% CPU daily :

Quad Core 3.20Ghz (E3-1230)
32GB RAM
1Gbps unmetered b/w

My questions are :

1). With today's rates does it makes sense to CPU mine Bitcoins, what results should I expect? I used http://www.coinish.com/calc/ but it does not have anything near to my hardware specs. All other answers to similar questions take the old Bitcoin rates into consideration of profitability - with 1BTC=$1200+ the scenario must have changed a lot ?

2). Secondly, can I use multiple servers and computers to work as a farm towards the common goal of mining bitcoins working as a team and will this help achieve the goal of profitability.

The servers are used for hosting websites and I pay a fixed rental. So there is no additional investment or charges involved.

Is Bitcoin mining profitable on a 8 core, 32 GB server with unused capacity?

No.

  I used http://www.coinish.com/calc/ but it does not have anything near to my hardware specs.

Expect 2-4MH per core. 38MH/s for all eight is all but useless. Maybe 80c a month, if that.

  with 1BTC=$1200+ the scenario must have changed a lot ?

No.

  Secondly, can I use multiple servers and computers to work as a farm towards the common goal of mining bitcoins working as a team and will this help achieve the goal of profitability.

No.


Getting root pub key form derived public keys Hello I have a lot of derived public keys and derivation path to them how can I get root public key which was used to generate this pub keys?

You cannot. It is impossible to get the parent public key from the child public keys. This is because a hashing algorithm is used in deriving the child keys and hashing algorithms are not reversible.


convert "M" address to "3" address LTC currently im facing with 1 issue that i need to convert all my litecoin address in my fullnode to legacy address (prefix with "M"). Im know that we have a tool https://litecoin-project.github.io/p2sh-convert/ that can help me solve this, but my system currently dev with java, so im asking there is any convert that wrote by java support me this problem ??

Thank for read

It's pretty simple, to do this conversion all you need to do is:

decode the address using base58check
change the first byte from 0x32 to 0x5
encode using base58check


Import watch-only address to 0.18 core wallet, addresses missing I am running new bitcond server

$bitcoin-cli importaddress '32om7Xx7GnwxkiAQjpp3hhayDX4mSNLmR1' 'label' false
$

it seems added.

Then I try to list all addresses in wallet it return empty list.

$bitcoin-cli listaddressgroupings
[
]

here my bitcoind.conf

server=1
rpcuser=uname
rpcpassword=pass
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=18332
daemon=1
addresstype=p2sh-segwit

$ bitcoin-cli listwallets
[
  ""
]

You're using on incorrect bitcoin-cli method to list your addresses.

The command you're looking for is:

bitcoin-cli listreceivedbyaddress 0 true

The 0 parameter means you're requesting information on any address and the true flag means you want empty addresses included.

The original command you were attempting, listaddressgroupings, is described here.


Open source data for bitcoin Blockchain analysis I'm trying to find money laundering and other 'bad' use cases of the bitcoin. Of course, the public Blockchain is available to me and that is my main data source. But this is also quite limiting because all I can do is run 'pattern recognition' like algorithm.

I can test, supervise and improve my performance if I can have access to previous analyses on the blockchain regarding financial activities. For instance, a set of tagged Bitcoin addresses, a network of organizations within the Blockchain, etc.

I am not sure if this will help but there does seem a set of transactions tagged as silkroad seized bitcoins on the blockchain explorer. Silkroad was notorious for a while as an underground marketplace for drugs and other illegal activities:
Silkroad seized bitcoins


Exchange Transaction versus Blockchain Verification I am wondering about a question related to this post. According to bitcoinity, the number of bitcoin-trades at major exchanges per minute is roughly 400. However, as also pointed out by @eponymous in this answer, this number exceeds the trades which are verified on the bitcoin blockchain by far. However, how should I trust exchanges who do not provide real transactions in the sense that bitcoins are moved to my wallet? Is there a documentation on which exchanges provide this service and what exactly happens if I trade, say, USD versus BTC on a exchange which is not settling the trade on the blockchain?

If you send 0.1 bitcoin to an exchange, you would see it credited to your account, but that doesn't mean that it is in a wallet solely dedicated to your account. Instead, that 0.1 bitcoin is sent to a wallet which aggregates all transactions to the exchange.

When you withdraw the bitcoin, a transaction is published from the aggregating wallet to your supplied bitcoin address.

All internal movements are just crediting and bookkeeping to the internal systems of the exchange. This is the reason why it is generally not advised to keep bitcoin an an exchange for very long. If the company goes bankrupt or is hacked, you won't be able to retrieve your funds, because you don't have control over the wallet.


lost 4 out of 12 recovery phrase I lost 4 out of 12 recovery phrase
I even cant remember public address
is there a way I can find them back
please help me
thanks a lot

The BIP39 English wordlist contains 2048 entries so, since words can be repeated, you need to try (corrected) 2048 ^ 4  combinations which is 117,592,186,044,416 different phrases to try. If you could test a million guesses a second, that would take up to 204 days.
The first stage of testing would be that the checksum condition is met. This ought to be fast. I imagine the second phase involves using the phrase to generate some reasonable number of HD addresses and checking against a local copy of the blockchain to see if any generated addresses appear in any transaction outputs.
Some wallets  use a different wordlist - I think Electrum is one. Obviously you need to use the right wordlist for your wallet or attempted recovery is a complete waste of time.
There are tools that can help with this, one is btcrecover. I would use this sort of tool only on a new airgapped computer that has no WiFi, Bluetooth, Ethernet or other networking capability.
Obviously you need to be extremely careful about where and how you obtain this sort of tools. There must be many fake or maliciously altered copies around that send your recovery phrase to a thief (before or after recovery).
There is the option of adding a user passphrase to the recovery phrase. If you did use that and can't remember anything about it, I doubt the wallet is recoverable.

Useful resources

BIP39 - including implementations in numerous programming languages
bip39 checksum python


Which Bitcoin escrow services are available - and reliable? For some transaction, the possibility of generating "chargebacks" might be very useful. For example, when trust cannot be established between both parties. In such cases, a trusted third party may be very helpful. One very well known and reputable Bitcoin escrow service was ClearCoin - however, that's currently not available.

Please list one service per answer (not multiple services in the same answer) so that the votes can decide on reliability (use comments for testimonies, if there are any ;-) ).

BTCrow.com, operator made quite a few posts about the service, Bitcoin Escrow Service - For safer bitcoin transactions


Can the dollar value of a transaction be different at different times? Bitcoin value gets fluctuating frequently. Suppose I am transfering bitcoin to another person who is in another country (like my current bitcoin value is $234.97), i am sending the QR code through e-mail to receive the money , if suppose the person sees my mail after 3 to 4 hrs , will the same bitcoin ($234.97)value be considered or the BTC value which is available when the person receive the money will be considered. Please clarify my doubt.

Amounts in a Bitcoin transaction are set in bitcoin. That is, if you want to receive $5, when the current bitcoin price is $234.97/bitcoin, then you might make a request for 0.0212 bitcoin inside the QR code.

If the price changes between you making the request and the other person sending bitcoin, then you will still receive 0.0212 bitcoin, but it might be worth $4.50 or $5.50, depending on if the price went up or down.

However, if you wanted the other person to send you $5 worth of bitcoin at the time that they send it, you could just send the address you want to receive with and a note saying "Please send $5 worth of bitcoin". The other person would have to calculate the current price (and you would have to trust their evaluation, but they can send whatever amount they want).


Different balances Bitcoin-Qt vs. Blockchain.info Why is the balance in my Bitcoin-Qt wallet different from the balance when I check the information about my address on blockchain.info? All transactions are confirmed.

The problem is likely that in Bitcoin-Qt, your balance is not kept in a single address. For privacy reasons (of the system as a whole), change from transactions is sent to new addresses.

The abstraction provided by the Bitcoin-Qt client is that of a wallet, in which coins enter via (don't reside at) addresses, and are sent out from it, and is otherwise a black box. When you look at it via blockchain.info or similar sites, you get a more low-level via, where "balances" are kept per address (which is actually sort-of misleading, as at the protocol level, Bitcoin doesn't work in function of addresses or balances at all, but in terms of transactions on individual coins).


Why do we call it a 51% attack instead of a 50% attack? From the Bitcoin paper:

p = probability an honest node finds the next block
q = probability the attacker finds the next block
qz = probability the attacker will ever catch up from z blocks behind

qz = 1 if p ≤ q

In other words, when an attacker controls 50% or more the success rate of a double-spend attack is 100%.

Why is it referred to as 51% attack, and not 50% as 50% is also enough?

Am I missing something here?

The distinction is of theoretical importance only.   But if the attacker controls exactly 50%, then it's true that the attacker will eventually catch up, but he won't stay caught up: the honest population will eventually overtake his chain, and we'll be in an unstable situation where control of the "best" chain will bounce back and forth between them forever.

If the attacker wants to eventually catch up and stay caught up, he needs to have strictly greater than half of the mining power.  In this case, they might bounce back and forth for a while, but eventually there will come a time when the attacker takes the lead and never again loses it.  We say "51%" informally to summarize this, though of course 50.1% or 50.000001% would also be sufficient.


Is there a blockchain.info for testnet? I'm trying to test to see if transactions went through or not and blockchain.info is super helpful for this on the real network.

Yes, blockchain.info has its own testnet service: https://testnet.blockchain.info/


Sent Bitcoins to an expired address - how do I get back? I sent bitcoins to my CampBX address, and I was unaware that addresses expired, and it had.  So I sent them, they were taken out of my account, and now they are gone...

How do I get them back?

Bitchain says they were sent - but they are not in either account:

https://blockchain.info/address/1aPb2GVC3YVcaRce17EAjEZL9ZsT1Ssqi

Any help would be greatly appreciated.

Thank you!

From Camp BX:

"Do not use this address after the expiry date, as your Bitcoin transfers will not be credited to your account. If you mistakenly make a deposit to an expired address, our system administrator has to expend several hours to track it down. We have to bill these hours out to customer if they wish to recover a lost deposit."


the bitcoind daemon doesn't respond to commands For some reason, the daemon doesn't accept commands neither RPC, nor command-line.
I'm running the prebuild 64 version of the bitcoind. It already downloaded all blocks etc and as is happyly running in the background, however it doesn't allow any commands to be sent. For example:

./bitcoind getinfo
error: couldn't connect to server

I tried with a config file having only the rpc user and pass, then I extended it with different params, and of course have restarted the daemon each time. Still - no luck.

The debug.log is not telling anything either. It just dumps the normal intensive communication, like…

 2013-12-07 22:01:40 received getdata for: tx
 593f4528895f75bcd3df12fb09eedb7e5e6659a7a8a999d7e127eb131afde417)

but no trace from my attempts to call a simple command.

I tried to google the problem without luck.

In bitcoin.conf, make sure you have the following lines:

rpcuser=your-userid
rpcpassword=your-password
server=1


What is the story behind Bitcoinica? Bitcoinica was a very popular service when it was operating. What is the story behind it - when was it started, what did it offer, and what hurdles did it face?

I think this is a good summary: http://arstechnica.com/uncategorized/2012/05/bitcoins-worth-87000-plundered/

Even more summarised thanks to freesummarizer.com:

  More than $87,000 worth of the virtual currency known as Bitcoin was
  stolen after online bandits penetrated servers belonging to
  Bitcoinica, prompting its operators to temporarily shutter the trading
  platform to contain the damage.

  Friday's theft came after hackers accessed Bitcoinica's production
  servers and depleted its online wallet of 18,547 BTC, as individual
  Bitcoin units are called, company officials said in a blog post
  published on Friday.

  In early March, a security lapse at cloud services provider Linode
  allowed hackers to make off with about $210,000 worth of bitcoin after
  they gained unauthorized access to bitcoin wallets stored by
  Bitcoinica and seven other customers.

  Strong cryptographic controls ensure that once bitcoins are spent they
  can't be taken back, although a recently published research paper
  reports limitations that allow the same bitcoins to be double spent in
  certain cases (which Bitcoin developers say they've long warned users
  to avoid).

  The March heist that hit Bitcoinica also affected several other
  trading platforms that have also lamented the necessity of storing
  large amounts of the currency in liquid form in "hot wallets" to
  automatically cover payout requests made by customers.


what would it take for the Bitcoin price to drop less than a dollar? I don't understand why the prices have actually dropped these days so much. Some forums say that people are selling, so what? People are selling, and people are buying, the bitcoins don't disappear they just change hands. Then why does the price drop?

And assuming this is the case, then theoretically speaking, what would it take for the price to drop lower than one dollar?

This is all speculation in a very new technology. I'm not an expert in economics, but there are irrefutable facts that's some of the "cultists" will not entertain. There are, simply put, 2 types of Bitcoin advocates:

Those who see in binary; black and white, moon and doom - more often than not Bitcoin's "success" is solely judged in fiat conversion
Those who are more pragmatic; the people who understand that MySpace gave way to Facebook

The most dangerous attitude is the former, because there is no acknowledgement that Bitcoin, in its infancy, still has a long way to go. The Blockchain is the key technological advance here. It is already being adopted by companies like Blocktech Group for commodoties and smart contracts. That may involve building on top of the Bitcoin blockchain, or it may mean an entirely new Blockchain purpose built for a corporate interest.

  As a thought experiment, imagine there was a base metal as scarce as gold but with the following properties:

  boring grey in colour
  not a good conductor of electricity
  not particularly strong, but not ductile or easily malleable either
  not useful for any practical or ornamental purpose

  And one special, magical property:

  can be transported over a communications channel

  If you redact "over a communications channel" you end up with depleted
  uranium...

-Satoshi Nakamoto

So with that in mind, realise that there is no certainty of a $10,000 BTC price in the future. Perhaps $400 is what BTC is worth? Perhaps $1100 was well and truly over its true? These questions can only be answered with time and with development. There's a very small team looking after the code while speculators search for answers about why they're not rich yet. Perhaps we need to add value to Bitcoin instead of expecting, like it's everyone's destiny, that BTC will go to the moon in price. Will it drop to $1; only if the Bitcoin P2P network dies. I think the best think anyone can take away from this is it is possible to separate a Blockchain from Bitcoin. A long term outlook would serve everyone better than daily stresses over price volatility.


Solving a block and verification of transactions My understanding of mining is that the reason an award of Bitcoin comes along with the solving of the current block is to give people incentive to actually try to solve the block.  My understanding is also that the reason that it is desirable to have people trying to solve blocks is because this is what makes the network work, that is, the more people using their processing power to verify Bitcoin transactions, the better.

What I don't understand is what hashing has to do with actual transaction verification?  I sort of vaguely have this idea in my head that because of the difficulty of the SHA256 hashing algorithm, if someone finds a hash that solves a block, that must mean they spent a significant amount of time working to find the hash . . . but what does that have to do with spending a significant amount of time working to verify transactions?  What stops people from just hashing but not verifying?  Moreover, if I am correct in assuming that hashing serves no other purpose other than to verify that someone indeed put in a fair amount of work for the network, is there really no other better method to prove this?  Why is something as stupid as just keeping track of how many transactions a person has verified not going to work?

Verifying a transaction is not a difficult process, it is finding a good block hash that makes mining difficult. Furthermore, if a miner verifies a transaction and includes it in the block he is creating, he gets the transaction fee from that transaction. This makes it attractive for miners to verify transactions instead of just looking for a block hash.

The reason why mining is difficult and it needs to be verified that a miner has put a certain amount of work in finding his new block, is for security of the network. If mining were easier, it would be easier for attackers to take control over the block chain.

Also, the Bitcoin protocol tries to achieve a block creation rate of 1 block every 10 minutes. To achieve this, the protocol automatically adjusts the difficulty of finding a block every 2016 blocks. This should be approximately 2 weeks. When these 2016 blocks were found too quickly, the difficulty will rise. Otherwise, it will fall. This makes it possible to predict the supply of bitcoins over time.

So, because we only want one block to be found every 10 minutes, the difficulty has to be proportional to the total amount of work the whole network is doing. This means the more people are mining, the more they help raising the difficulty and help making the network more secure against attacks.

I don't fully understand your last question. But "keeping track of how many transactions a person has verified" would not be a suitable alternative for several reasons. First, as I mentioned above, transaction verifying is not a difficult process, so the amount of verified transactions would not be a good measure of the amount of work you did. Also, in the Bitcoin network, there does not exist such thing as a "person". It is possible to keep track of the IP address of who submits transactions and blocks, but identifying people by their IP address is not a good idea (IP's are not always fixed and multiple users can share an IP). The only other identification method Bitcoin supports are its addresses, but real Bitcoin anonymity requires you to frequently change the address you use, so addresses should not be used as identification. (Although sometimes they are.)

I tried to answer all your questions, if I missed something, just ask me in a comment.


How does exchanges, such as coinbase handle off-chain transaction? Does coinbase create a channel between each customer and coinbase itself?

If i buy 10 USD of bitcoin from coinbase, where does the 10 USD worth of bitcoin come from? Does coinbase maintain a huge wallet that belongs to itself, and creates a payment channel with each individual customers?

Yes, exchanges tend to have huge cold wallet where they amass and send most of their bitcoins ( you can even follow those addresses by each exchange on the top 100 richest bitcoin addresses )

When a user want to withdraw fund they can use smaller hot wallet to send coins, some exchanges will use payment channel for the transfer but most have not adopted it, or choose not to.

For more detail about how they do that you can check this question How do cryptocurrency exchanges handle users' accounts?


Transaction's maximum size Is there a maximum size for any given transaction?

I just created this tx:

http://blockexplorer.com/testnet/tx/194173dcc07b396433d5725abe76d52b10d42ebd3d1d10b465429f87fee12a52

and although it seems to get confirmed I would like to know if adding more inputs or outputs (and thus increasing its size) could result in an undesired outcome.

Similar question (that doesn't answer my question, though): What is the maximum size of a transaction?

There is a maximum standard transaction size since Bitcoin 0.8.2 of 100k per transaction.

There are a number of other limits that influence the validation and propagation of a transaction though. Specifically:

A block is limited to 20000 signature verifications.
The block itself can't be larger than 1Mb.
The standard Bitcoin client (Bitcoin Core / bitcoind) will refuse to relay transactions flagged as dust.
Enough fee should be included (0.0001 BTC/kb)


HD Wallet with BIP44 - workaround of deriving public keys knowing only a xpub My goal: I don't want to require a private key to hierarchically derive new addresses.
Sure, I can create a batch of addresses, given a private key, at first. But once I have surpassed that batch I'll require the private key again to generate more addresses.
I want to derive addresses knowing only a public key. I know this is possible with BIP39, but understand there can be security concerns involved with this, ie. if an attacker stumbles upon an xpub and xprv they can derive as many addresses as they want and be able to sign transactions using them.
Attempting to derive from a HD public key with BIP44 results in a exception stating a hardened path requires a HD private key. However, I have found a workaround, but I fear it is cheating and might sacrifice the benefits of path hardening in BIP44.
Here's an example:
// It starts off with a `userCode` that represents a BIP39 Mnemonic code.
const codeUser = new Mnemonic('select scout crash enforce riot rival spring whale hollow radar rule sentence')

// Convert to HD private key...
const hdUserPrivateKey = codeUser.toHDPrivateKey()

console.log(hdUserPrivateKey.hdPublicKey.toString())
// Gives: `xpub661MyMwAqRbcEngoXGfFNahZ5FzSDGqY8pWKTqo6vtXxK15otDNLXJmbeHV7DUjvPc7CAFhYp6hzBiTanr8rgoHPHf6NSgZAyejK5bk8MiW`
// But we won't use it...

// Instead, I can then derive a BIP44 without the `change`, `address_index` segments from `hdUserPrivateKey`...
console.log(hdUserPrivateKey.deriveChild(`m/44'/0'/0'`).hdPublicKey.toString())
// Gives: `xpub6CsrEMgU2f8uEGfFMvsPjKB9ekHuZiesLqSHLwCJuNFkP2uJGm7WjTo2gy95S4KEBc4etdodNQXAvn5Vsf4kupJQ1DKR4DMfcHwKdhQ3k6h`
// This is the xpub I can use to derive addresses without requiring the initial private key.

// So knowing this, I can build a HD public key given that xpub...
const hdPublicKey = Mnemonic.bitcore.HDPublicKey('xpub6CsrEMgU2f8uEGfFMvsPjKB9ekHuZiesLqSHLwCJuNFkP2uJGm7WjTo2gy95S4KEBc4etdodNQXAvn5Vsf4kupJQ1DKR4DMfcHwKdhQ3k6h')

const derivative = 0

// We can derive from it this path, but what is this path defined as? Are we back in BIP39 territory now?
const publicKey = hdPublicKey.deriveChild(`m/0/${derivative}`).publicKey

const address = new Mnemonic.bitcore.Address(publicKey)

console.log(address.toString()) // 12XyHwtmoq5w4VQ5mzcu6BQzdLqCLxUv5e

...and of course, I can increment the derivative as many times as I wish to create new addresses from the public key.
Whenever I wish to sign a transaction...
const codeUser = new Mnemonic('select scout crash enforce riot rival spring whale hollow radar rule sentence')
const hdUserPrivateKey = codeUser.toHDPrivateKey()
const derivative = 0

// BIP 44 derivation path for private key...
const privateKey = hdUserPrivateKey.deriveChild(`m/44'/0'/0'/0/${derivative}`).privateKey

Is this approach valid or am I dodging BIP44 standards?

This is, in fact, the intended approach and use of BIP 44.
The purpose is to derive to the account level with hardened derivation. Then export that xpub to be imported into other software which derives the receiving and change addresses. When signing a transaction, the wallet with the private keys can derive the entire path to get the individual child private keys needed to sign.


How is my real identity linked to my bitcoins? I am new to bitcoin and would like some clarification on its anonymity.
Example: i buy bitcoins from an exchange and send them to my bitcoin wallet.
The addresss that i sent the bitcoins to would be linked to my real identity, i get that part, but what if i create a new address? Or create an entirely new wallet? Would that address in any way be linked to me? Currently it seems to me that the only way to be anonymous, is to buy bitcoins themselves anonymously. Thank you

your identity can be linked to bitcoins in more ways: exchange site can gather info about you (your IP address, ID, bank account, etc), your transactions are public through blockchain, your IP can get registered when you send BTC, your IP address can be registered when you visit BTC forums or any website/honeypot related to darknet markets (illegal activities connected to BTC)... so, there are many techiques to get your identity, thetefore, you should pritect yourself by buying BTC face to face or pay someone to do it for you, and use tor to receive/send bitcoins.


What happens to a person's bitcoins if they should happen to die prematurely? What happens to a person's bitcoins if they should happen to die prematurely?  Will those coins be lost forever if no one knows that person's wallet info?

Yes. Those bitcoins will never be used again unless someone creates a private key that hashes to the same public key.


How to cancel the callback url registered on blockchain.info So i was testing the Blockchain receive API, and during the first trial, I had a typo on the callback url.

Does that mean blockchain.info will retry to call that bad url 1000 times before it finally gives up ?

Is there a way to cancel the unwanted callback registered on blockchain.info ?

Does that mean blockchain.info will retry to call that bad url 1000 times before it finally gives up ?

It would appear so, and I can't see a way to cancel it, besides creating a page at that url with the text '*ok*'

To see what requests it's made already, try looking at this page and putting the bad url in the Check Callback Response Log form.


Lightning Network: can I create a channel from a preexisting channel? If I open a channel with myself for 0.01 BTC, with one end having all, and the other having none, could I create an updated contract, or state, to send 0.001 BTC to an address owned by Alice, even though this address would not be in the blockchain, whereby she now has a valid channel with 0.001 BTC, and I have 0.009?

No, you cannot. This is because you could always revert the state of the channel to the one where you held all of the coins without Alice being able to have any recourse if you do so.


How many transactions per second can blake2s algorithm can handle? i saw the hash functions speed (miBps) are 947 according to this website: https://blake2.net/

but how many transactions blake2s algorithm can handle? Verge uses the same algorithm right?

more about blake2s
https://eprint.iacr.org/2013/322.pdf

The number of transactions per second a blockchain can process is not correlated to the relative computational speed of the hashing algorithm.

A faster hashing algorithm just means the network's miners will be able to attempt more hashes per second, given the same (general purpose) hardware.

The number of transactions per second will depend on the block size, transaction size(s), and the average block time.


What products, deals or other incentives are available exclusively to those paying with Bitcoin? Occasionally I'll see an offer that is available only to those who pay with Bitcoin.

What products are sold in which no other payment method is offered, or other offer extended only to those paying with bitcoins?

The only payment method for Bundles through Nestor Games is in bitcoins.
Items in BitPremier's showroom are available only when paying with bitcoins.  Since some of these items are not otherwise available this might indicate Bitcoin exclusivity.
Author James Altucher made Bitcoin as the only payment method for his new e-book (for a limited period of time)


Merchant tool that will dynamically adjust the # of required confirmations based on network hashrate data Satoshi built Bitcoin to be a decentralized network. Some of the original recommendations (such as waiting for 6 confirmations) relied on statistics that related to level of decentralization.

https://bitcoin.org/bitcoin.pdf

According to the math on page 9 of the whitepaper there is less than a 0.1% chance of successful a double spending attack if a rogue miner controls 10% of the network hash rate and the recipient waits for 5 confirmations. However if a rogue miner controls 45% of the network hash rate you would have to wait for 340 confirmations to reach the same level of confidence (less than 0.1% chance) of a double spend not occurring.

Are there any tools that automatically monitor the hashrate of the major pools and dynamically use that data to change the number of confirmations merchants request? My intended use case would kick in for large purchases when/if a major pool went down, giving another pool (at least temporarily) a very large percentage of the network hash rate.

Pools can lie about their hashrate, and not claim to have solved blocks that were actually solved by them when. I would propose that this is the wrong method of dynamically choosing a confirm count.

Instead, my suggestion would be to dynamically set your threshold based on the value of the transaction. If someone buys a $1 digital good, you can send it to them immediately, because the loss of a double-spend is almost immeasurably small (it's a digital good anyway). If someone buys a $50 item that needs to physically be shipped, you can wait for 1 confirm before getting the item off the shelf and popping it in a box. And if someone buys a $100 000 sports car, well the paperwork will at least take a few hours to fill out and complete, maybe even a day or two, so you'll have worked through enough confirms to be reasonably sure of the safety of that transaction.

Right now I don't believe there is a merchant solution that does this, but it is somewhat trivial to build.


Destination address(es) when redeeming an HTLC Starting from this text at https://en.bitcoin.it/wiki/Script:

"The script for a typical Bitcoin transfer to destination Bitcoin address D simply encumbers future spending of the bitcoins with two things: the spender must provide 1. a public key that, when hashed, yields destination address D embedded in the script ..."

and then looking at the HTLC script:

OP_IF
    [HASHOP] <digest> OP_EQUALVERIFY OP_DUP OP_HASH160 <seller pubkey hash>
OP_ELSE
    <num> [TIMEOUTOP] OP_DROP OP_DUP OP_HASH160 <buyer pubkey hash>
OP_ENDIF
OP_EQUALVERIFY
OP_CHECKSIG

My original thought was that the HTLC could only be redeemed to the address behind <seller pubkey hash> or <buyer pubkey hash>: they are the only data relating to addresses embedded in the script so must be the "destination address" referred to above. I understand this to be wrong.

Am I now correct in thinking:

That the two pubkey hashes merely establish the right of the redeemer to take the respective branch;
There is in fact no "destination address D embedded in the script" for an HTLC;
That the seller or buyer may redeem to any address they like;
And that address can remain undecided through the funding and life of the HTLC until the moments before redemption?

The inputs of a transaction have absolutely no ability to effect the outputs in any situation. They can only define who can spend, not the conditions for how they go about spending it.


Which wallets have support for BIP 70 - 72 for merchant message transactions? Which wallets support merchant message transactions such as bip 70 - 72? I want to build static html page where a user can just send their btc to my address with a message attached to it. The message would just be their email address so I can send them an order confirmation.

From my understanding the URI: "bitcoin:1zsfkje2034908234" would just have the r parameter and you would just specify a url for the wallet to goto. This url would just be something like this I'd assume: http://www.example.com?phone=83282829323

Let me know if this is even possible or if this is even correct?

I've been searching for the same and found this article. Below I put the wallets that support Bitcoin URIs (BIP 21) and Payment Protocol (BIPs 70, 71, 72,73). For more info please check the link.

+-------------------------------+--------------+------------------+
|            Wallet             | Bitcoin URIs | Payment Protocol |
+-------------------------------+--------------+------------------+
| Bitcoin Core (Satoshi client) | V            | V                |
| BitPay Wallet                 | V            | V                |
| Breadwallet                   | V            | V                |
| Mycelium                      | V            | V                |
+-------------------------------+--------------+------------------+

And add Copay to the table, which also supports BIPs 70-73 and is not in the link. For your URI question check this answer.

That's all I can do for you. Hope it helps!


Is there any altcoin with improvements in blockchain download time? Let me introduce my idea.

Given:

sizeof( Blockchain ) = 16Gb
Downloading of one avi film 16GB from the pirate bay ( 5mb/s ) = 2-3 hours
Downloading of bitcoin's blockchain ( 5mb/s ) = 2-3 days
One day = 6 * 24 = 144 blocks.
Drag - cryptography.

Task:

Accelerate boot of fresh client to the torrent speed. Similar to Bootstrap.

As I can see, downloading of blockchain is the same hard as mining, because there is every time recalculation of hash, comparing, checking of signs, etc...

What if client will only download this 144 blocks for a day and one super block with 144 hashs of the last valid blocks, thereafter only compare current wallet's addresses with addresses in this 144 blocks without any calculation of its hash.

Is there any alt-coin with such accelerator?

E.g. this super blocks might be archived into another ultra-block for a month. Than we have similar to sha(sha(text)) cascade shield against bruteforce attack.

Downloading of blockchain should takes at max the same time as downloading of 16GB avi from the pirate bay. Say, 5mb/s internet channel + p2p / 16 Gb = 2, may be 3 hours ( in the no peers case ), but I spent 2 - 3 days, and I see that this is no internet speed reason, it is CPU + harddisk very very hard job.

Your premise is wrong. The work required to download and validate the blockchain has nothing at all to do with the work required to mine it.

As far as the block hash goes, validating it requires just one hash while mining the block requires quintillions of hash calculations.

Validating the block also requires computing the hashes of the Merkle tree but the main work is validating ECDSA signatures. Your method is not going to help with that.

(On a meta note, it's rude to offer "improvements" when you don't understand well enough what currently exists.)


Is there only one method? for miner and pool communication? I tried doing some sort of filtering on XMRig using wireshark on an ETN pool and I found that XMRig was using login method of JSON-RPC 2.0, my question is does all miners use this method? By "all" I mean even the bitcoin, monero and all minable cryptocurrency miners use this method? I heard about GBT, stratum and getwork, are they just a simple "sub-part" of JSON-RPC?

JSON-RPC as a protocol does not specify other protocols that use it. Rather it just defines the general structure that protocols using JSON-RPC should use. JSON-RPC does not define any methods; login is a method that is offered by protocols using JSON-RPC.

GBT, stratum, and getwork use JSON-RPC. They themselves are not JSON-RPC or some subset of JSON-RPC. Furthermore, none of those have a login method.

There is no guarantee that all coins use the same protocol (GBT, stratum, or getwork) nor that they use JSON-RPC. Typically coins will use one of those or something similar because they simply copy existing code, but there is no guarantee.


Where are the blocks in the blockchain stored? I understand that every transaction of bitcoin is stored in a "block" which is then added to the "blockchain". I realize that this is data of some sort that must have a physical location. Where is that location(s)? Where is the data of the blockchain stored?

Since it's unclear what context you are asking in:

The blockchain is stored, distributed, on every machine in the Bitcoin network being used to mine Bitcoin.

This network is self-regulating and peer-to-peer. There is majority rule, meaning that if one node on the network no longer agrees with the other nodes (on, say, what the hash of the last block was), it is kicked out of the network and will have to "resync" its data to be in agreement with the network.


How can a noob understand 'where their money went' when buying from bittylicious? Complete newbie, trying out bitcoin for the first time (probably like everyone else in the world this morning).

Wanted to spend the maximum allowed for a new user - about 43 pounds.

When the full transaction details came up, I was being offered to buy 2.9 mBTC for this amount - at the bitcoin rate at the time, that was only about 33 dollars' worth of bitcoin - so, about 24 pounds!

On the face of it, the transaction results in me losing half my money!
How can I tell where that money 'goes'? Is it a transaction fee, or am I somehow just paying a strange price?

From the transaction link provided (link)

You can see that fees was just below $2 for this transaction:

So the rest (about 18 pounds) have been taken as a commission/fees for using their interface.

I would suggest you to try some other website to buy BTC, as you are paying a very high fees to buy BTC.


Move money/address from watch only wallet I am completely new to bitcoin.
I recently received bitcoins from a poker site, using a receiving address that I created in Bitcoin Core.
When I realized that synchronization takes forever, I installed Electrum instead and added the receiving address to the default wallet, which is watch only.
Now I want to deposit my coins to Neteller but they are on this watch only wallet and I can't make a payment with it.
The wallet doesn't seem to have a private or public key (I read somewhere that  i might need a private key that I would then import to a new wallet?).
What the hell do I do?

In electrum there is an option to sweep private key , dump your private key from bitcoin core and then sweep it into electrum. Then you can spend your coins in electrum


Why does Wikipedia's Bitcoin entry imply Satoshi's whitepaper is from May 2009? The first citation in Wikipedia's Bitcoin article is of Satoshi's original whitepaper. It is worded:

  Nakamoto, Satoshi (24 May 2009). "Bitcoin: A Peer-to-Peer Electronic Cash System". Retrieved 20 December 2012.

Satoshi's whitepaper was released on 1 Nov 2008, not on 2009.

What am I missing here? Did anything relevant happen at 24 May 2009? Is this a factual error in the Wikipedia entry? (It's there for a long time, so it's not any recent vandalism).

That is clearly incorrect. His whitepaper was released on October 31st, 2008 via the metzdowd mailing list

  Bitcoin P2P e-cash paper

  Satoshi Nakamoto satoshi at vistomail.com
  Fri Oct 31 14:10:00 EDT 2008

  Previous message: Fw: SHA-3 lounge
  Messages sorted by: [ date ] [ thread ] [ subject ] [ author]

  I've been working on a new electronic cash system that's fully peer-to-peer, with no trusted third party.

  The paper is available at: http://www.bitcoin.org/bitcoin.pdf

  The main properties:  Double-spending is prevented with a peer-to-peer
  network.  No mint or other trusted parties.  Participants can be
  anonymous.  New coins are made from Hashcash style proof-of-work.  The
  proof-of-work for new coin generation also powers the
      network to prevent double-spending.

  Bitcoin: A Peer-to-Peer Electronic Cash System

  Abstract.  A purely peer-to-peer version of electronic cash would
  allow online payments to be sent directly from one party to another
  without the burdens of going through a financial institution. Digital
  signatures provide part of the solution, but the main benefits are
  lost if a trusted party is still required to prevent double-spending.
  We propose a solution to the double-spending problem using a
  peer-to-peer network.  The network timestamps transactions by hashing
  them into an ongoing chain of hash-based proof-of-work, forming a
  record that cannot be changed without redoing the proof-of-work.  The
  longest chain not only serves as proof of the sequence of events
  witnessed, but proof that it came from the largest pool of CPU power.
  As long as honest nodes control the most CPU power on the network,
  they can generate the longest chain and outpace any attackers.  The
  network itself requires minimal structure.  Messages are broadcasted
  on a best effort basis, and nodes can leave and rejoin the network at
  will, accepting the longest proof-of-work chain as proof of what
  happened while they were gone.

  Full paper at: http://www.bitcoin.org/bitcoin.pdf

  Satoshi Nakamoto

He realeased Bitcoin v0.1 on Thu Jan 8 14:27:40 EST 2009 -- more than 2 months later. By May, he had ceased all communication on the mailing list.


Why sending bitcoin and one addresss shows (Unspend) and one address shows (Spent)? I sent some btc to a btc address, and each time we send btc, it gets to split into two addresses, only one of them is the real destination address. The recipient said he has not received the the btc yet. I checked blockchain info, it shows the detination address (spent) but the other address as (unspent). This is normal right? If the recipient's wallet address shows spent, it means the btc has arrived in his wallet right?

Please confirm. Thanks!

The second address your transaction sent to is called a ‘change address’. If you search that term on this site you can learn about what a change address is.

Here is a breakdown of the different status’ blockchain.info reports on their block explorer website:

if it says ‘unconfirmed’, that means transaction is not yet confirmed (not yet included in a block)
if it says ‘unspent’, that means the transaction went through, and the funds are still sitting in that address
If it says ‘spent’, that means the transaction went through, and the recipient has already moved the funds to another new address


How much electricity and time would mining a bitcoin consume right now? I live in an area where electricity is really cheap, I'm talking 0.003 USD per kilowatts/hour. I've searched myself around internet apparently it takes 15 000 kilowatts/hour of power to mine a bitcoin, however that information I believe is outdated since hashes have significantly increased from last year and especially since last two weeks, so if someone could do the math I'd appreciate it.

The amount of kilowatts needed to mine a bitcoin depend on the hashing your setting(rigs) can produce, so 15 000 kilowatts/hour of power is not a good metric

There is plenty of website that allow you to calcul if it can be profitable to mine bitcoin, based on your settings of 0.003 USD per kilowatts/hour yes it is

https://www.cryptocompare.com/mining/calculator/btc?HashingPower=40&HashingUnit=TH%2Fs&PowerConsumption=1500&CostPerkWh=0.003&MiningPoolFee=1


How can I find well-connected nodes? If I am a merchant accepting 0-confirmation transactions I should protect myself against race attacks. Several resources state that I should configure bitcoin daemon to not listen for incoming connections (parameter -nolisten) and only connect to "well-connected" hosts (using multiple "connect=" parameter).

Question: How do I know which hosts are "well-connected" and suitable (long-running, no dial-up...)? Also it seems I can not rely on the mining pools because they probably have a limit on connections which might be already reached.

You could try connecting to various mining pools, fallback nodes or seed nodes. Those should be well connected.

The best option, however, would be to host your own Bitcoin node on a server and set it to connect to a lot of outbound peers. This would also ensure that you would be able to see most transactions quickly and also broadcast the transactions that interest you to more peers.

All in all, it is best not to rely on third-party nodes if you can set up your own well connected node. Also, you should also consider a pre-mined double spend attack that would be undetectable no matter how many nodes you are connected to.


How to get lost passphrase? I set up the bitcoin daemon and galaxycash daemon on my server. And i was using this library

  easybitcoin.php

to contact the daemon via rpc . Somehow i remeber that i used this function encryptwallet("test")
but whenever i try to use this function now sendfrom("walletaddress","towalletaddress",1);

i get this message

  Error: Please enter the wallet passphrase with walletpassphrase first.

so i used this function walletpassphrase("test",60);

but am getting this error

  Error: The wallet passphrase entered was incorrect.

Does any wallet address has it's own passphrase in bitcoin daemon?
Or it's only 1 passphrase for all wallets in 1 daemon?
And how can i get the passphrase of the address because i need to use it with this function sendfrom
Am using rpc for PHP.

Note that an individual address is not a wallet. A wallet is a collection of addresses.

  Does any wallet address has it's own passphrase in bitcoin daemon? Or it's only 1 passphrase for all wallets in 1 daemon?

A wallet has its own passphrase; passphrases are not per-address (that would be impractical).

You can have multiple wallets in a daemon each with different passphrases (the most recent versions of Bitcoin Core support multiwallet).

  And how can i get the passphrase of the address

Passphrases are not automatically generated. You as the user must have set it. If you do not know the passphrase, then there is nothing that you can do.


Help! I've sent ltc to bcc address I've been stupid..

I've sent ltc's from one wallet (litebit) to a bcc address from my other wallet (btc.com) by mistake.
The btc.com wallet only supports BTC and BCC

The address is 386BxgQy7samGg3L7adCDMEMW7ndEocDC7 and i can see the ltc's in this address by using blockcypher.

I have the recover pdf file from the btc.com wallet containing:
Wallet identifier (v3)
Encrypted primary seed (60 words)
Backup seed (24 words)
Encrypted recovery secret (60 words)
BTC wallet public key
Password encrypted secret (60 words)

I've tried contacting btc.com and they suggested using ltc-recovery.blocktrail.com which i did.. Result after implementing my seeds etc was:

------ Discover Wallet Funds

Scan for funds to recover from addresses in the wallet.

The first address of your wallet is: MSW5x2ggVAagygz24kWhP7PgZXCbFELP1S,
please provide this if you ever need to contact support about help using this tool.
No Funds Found

A balance of 0.00000000 LTC was found after searching 150 addresses. -----

For the rest btc.com isn't responding.
Note: I only used the wallet once and the first address (see above "outcome" from blocktrail) is different than the address now containing my ltc's?

I also tried "coinomi" wallet to restore a wallet using my btc.com seeds (i'm not sure which seeds to use, so i've tried them all) there is no error and the wallet opens every time, only with 0 ltc's.

I've found a simulair question on this site but with no solution:( It does talk about a private key, did i get a private key and didn't see it or is that something i can look up any where? A private key is not the same as my seeds or recovery secret is it? (Except for the public key, the seeds and secrets in my back up pdf are words)

Can i somehow acces the specific address containing my ltc's and a different wallet? I have the seeds from my btc.com wallet back up..

I'm a newbe at this and can sure use some help!!!?

I am not sure your money is recoverable, and I don't know too much about the specifics of Litecoin, but I believe there is hope.  First, I think I should explain what appears to have happened (for anyone else who finds this question, since you seem to have a handle on it).

The address you sent to is a pay-to-script-hash (P2SH) address, which according to comments on this answer are valid on both chains.  This does not mean that you sent LTC to a Bitcoin (or Bitcoin Cash) address.  This means that you sent LTC to an identical, yet valid, Litecoin address.  However, this address is not one that currently has a private key stored in your Litecoin wallet.  This is why you would not expect to see the money there.

This means that in theory, you could claim the coins on the Litecoin blockchain by importing the private key(s) that correspond to the address on the Bitcion blockchain...which it sounds like are private keys that you have in your Bitcoin wallet.  I know nothing about the wallet services you are using, but if you can export your keys from the Bitcoin wallet that generated the address in question, and then import that particular key into your Litecoin wallet, you should be able to claim the coins.

It all sounds like this is what you are already attempting, but you are starting by seeding a new wallet.  If this isn't working, it could be because one of the wallet providers is using a non-standard way of generating addresses from wallet seeds.  You may want to try writing some code of your own (using a utility such as https://github.com/prusnak/bip32utils) to generate your own addresses based on your recovered seeds.  This may help you to find the specific private key for the address in question, and from there you can import that key directly into the Litecoin reference client and claim the coins.  This may or may not be worth the effort, depending on how much money is at stake.

Best of luck!


Have there been reports of botnets mining Bitcoin / crypto-currencies? Is the threat of Botnets using massive amounts of CPUs/GPUs to mine Bitcoin, or some CPU-friendly coin, purely theoretical at this point? Or have there been reports of this actually happening?

I know of trojans stealing Bitcoin wallets, this is not related to my question.

First report about mining botnet was made at the end of June, and it evolved rapidly from CPU to GPU mining. But there is no consensus about what kind of harm it will do to Bitcoin, because from the bitcoin network point of view, infected computers run legitimate mining that supports network operation.

17 Jun 2011 - Symantec suggested that it would be profitable to
run CPU mining botnet.
28 Jun 2011 - Kaspersky Lab's expert Alex Gostev made first
report about simple CPU mining botnet found in the wild.
2 Aug 2011  - F-Secure reported about discovery of advanced CPU
mining botnet controlled via twitter.
11 Aug 2011 - Symantec discovered first GPU mining botnet called
Trojan.Badminer.


How to determine how many transactions are being processed by the lightning network? Is there a way to get an estimation of how many transactions are being currently (last hour or last 24h) processed by the lightning network? And by a specific node?

Yes, that is possible. If you operate all nodes in the network :)

If you are interested in a specific node, performing an effective sybil attack will also allow you to determine number of transactions which are routed through or initiated by that specific node.

Other than that, there is no way to accurately determine transaction rate of the network, as only channel capacity is publicly broadcast.