How will a massive increase in hashpower affect orphan rates? Difficulty always lags behind a little. It is also limited in how large adjustments it makes each time. What if the (global) hashrate doubles overnight? What if it quadruples?

How much can we expect the orphan rate to go up? By orphans I mean blocks on a block chain fork other than the main chain (longest chain).

How large would the losses then be for PPS pools and other pools that pay for orphaned work, before the difficulty catches up?

What about a solo miner? What about P2pool? In both cases many of the miners may not be well connected to other block generating nodes on the bitcoin peer-to-peer network.

Perhaps there is useful information available from alt coins that have gone through something similar or just have a higher rate of block generation.

The question is of course motivated by the imminent shipment of ASIC-based mining equipment with hashpower that will dwarf anything seen so far. If you do an estimate, feel free to use any numbers you feel are realistic. I have no idea what amount of ASICs are currently going into production. The question could also apply to next generation ASICs, quantum computing or weaknesses that may be found in the SHA-256 hashing algorithm.

If the average time to find a block is T, and the typical time for a found block to propagate in the network is t, then the proportion of orphans among all blocks will be roughly 1/(1+T/t). As long as T>t there's not much risk for the network; however it could be a challenge for orphan-paying pools, for example If T=9t then 10% of the block rewards will need to be paid out of pocket.

If a PPS pool pays B/D per share, it is in fact using an artificially low difficulty - the difficulty metric measures how hard it is to find a block (orphan or not), when in fact what is relevant for calculating the due reward is how difficult it is to find a valid block.

If the network hashrate increases by a factor of X, then until difficulty catches up the average time for finding a block is (10 min)/X. I doubt the transition to ASIC will cause a discrepancy by a factor of over 10; this would give T = 1 min. With a conservative value of t=5 sec you will get about 7.7% loss for paying orphans. The actual numbers for both X and t will likely be much less (especially since concentrated hashrate lowers t), so I don't think the loss during the transition period will be prohibitive.


Is it possible to transfer Bitcoin from one wallet to another wallet? For example, if I buy bitcoin from Blockchain, can I transfer it to Coinbase?

And will there be a transfer fee involved or is it free?

Thanks :)

Of course you can. You bitcoins are not stored in the the wallet which may be a web wallet, hardware wallet or paper wallet. They are stored on the bitcoin network (the blockchain). The wallet is just a reference.

You can transfer bitcoins from any wallet to any other wallet.


How to download bitaddress.org to use offline? The site does not have a download option.

I can save the page using Google Crome by CTR-S, but the version I have saved in this way does not work.

It is better to download the actual code from:
https://github.com/pointbiz/bitaddress.org
(this link is from the bitaddress.org site, no need to trust me :-)

Click the "Download ZIP" button.
Restart your computer. **
Make sure you do not have an internet connection enabled (WIFI disabled, Ethernet unplugged).
Open the zip file.
Open Chrome or Firefox.
Drag the bitaddress.org.html file into your browser.
Make your paper wallet using a complex, but impossible to forget password.  Ideally it is 16+ characters + numbers and punctuation.  You might want to write this password somewhere so it is impossible to forget, but then you are opening up another potential attack surface to be careful.
Make several prints (do not save a copy anywhere on the computer).
When done, close the tab and clear your browser cache and delete the printer spool file.**
Restart the computer to clear all memory, etc.

** For extra security, boot from a Linux LiveCD so that any trojans, viruses, key-loggers, etc you have on your "normal" computer are not able to interfere with the paper wallet creation process.

More good security tips here: https://bitcoinpaperwallet.com/#security


Possibility of a DDoS attack Theoretically. This is not a mechanism of any kind of attack, but It's about the "lost" coins. May be. It is just for an educational experiment.

What if someone has the ability to send transactions to the each node's memory pool. He have also the ability to send TCP packets from some list of the internet protocol addresses (65533 IPs against 9686 nodes, for example).

He send  transactions, but R and S in it's signature are not formed by the such way as they can be formed by the real owner of the private key. Each node needs to get unsigned TX hash and then check it's Sig for to confirm the output's amount spending. It will take some time.

Is it a theoretically possible DDoS attack to [any]coin network? Each node need to verify signature and it takes some time. Provided that attacker has the full UTXO set locally on his [XXXX] machine IPs.

Or IPv6 folds this "problem"? Or what is really means "bitcoin full-node"?

Each full node maintains a score for the peers it has connected to called banscore. Any 'mischief' on the part of the peer result in an increase of the banscore. When banscore reaches 100, the peer is in most cases disconnected.

When a node receives a transaction from the peer, it will verify the transaction and signature check forms a part of this verification process. If a malformed transactions gets continuously sent from a peer, the node will simply disconnect itself.


Bitcoin HEISTS: Has USD, EUR, etc ever been stolen from an exchange? Many bitcoin exchanges allow users to store two balances: one in bitcoin and one in a fiat currency like USD.  This is convenient because it allows one to trade in and out of the bitcoin market without incurring the fees and delays of moving money in and out of the exchange.

There have been numerous cases of theft from bitcoin exchanges, but have any of them lost users' fiat funds stored in this way?  Or have only bitcoin balances been depleted by thieves?

Have any of the major exchanges made any statements (please link!) about how secure a user's fiat currency stored by them is?

Someone that gains access to an exchange's system has several options:

transfer out BTC
transfer out fiat
manipulate/corrupt the exchange

Option 1 is fairly trivial to do nearly anonymously. Governments and lawyers are good at tracking down people that take option 2. Option 3 isn't the most straightforward way to profit.

Why would anyone take the risks with #2 instead of just doing #1?


How to get public and private keys by giving seed explicitly? I am using bitcore to generate the public and private keys. I am using 'getnewaddress' method to generate a public address and dumpprivkey to generate a private key. When I am calling the getnewaddress method it automatically generating a new public address. I want to explicitly send a seed to generate a new address. Could anyone tell me how to do that?

By "bitcore" I assume you mean Bitcoin Core as the commands you are using are Bitcoin Core commands. There are other things which are called "bitcore" which is confusing.

  I want to explicitly send a seed to generate a new address. Could anyone tell me how to do that?

You cannot. Bitcoin Core does not allow you to seed the random number generators with custom values as that is a security vulnerability.

You can import a private key (which some may call a seed) which will then add that private key and its associated address to the wallet. That may be what you want to do.

In Bitcoin Core 0.17, there will be an option to set the HD wallet seed. Bitcoin Core generates private keys deterministically using BIP 32 which has its own seed value. In Bitcoin Core 0.17, a new feature has been added which will allow you to set the seed used by the wallet for key generation.


Seeing no Hash per second on any pool I'm a newbie to bitcoin and having a hard time trying to take part of a pool. I subscribed to various ones, including :
eu.p2pool.cloud or give-me-coins

And mining from windows with the following soft:
guiminer.org

For instance, in order to mine on eu.p2pool.cloud, I'm entering the following parameters in the gui:

Host: eu.p2pool.cloud
Port: 9332
username: 1NMNeA1ViusfvmX9mwNe2UiGUcNHwSaWL4 (this is my payout address)
password: xxx

Selecting my GPU, and having ~20MHashs/s displayed in the GUI. My fan is working a lot so I'm guessing calculations are really happening.

Letting it run for about 20 mins...

And when I'm logging in http://eu.p2pool.cloud/#/user I'm seeing 0 everywhere, bitcoin count, Hash/s etc.

I understand I am very very unlikely to get a bitcoin with my machine in such a short amount of time, but why I'm seeing 0 even on Hash/s ?

Same happens for give-me-coins.

Am I missing something ?

Thanks a lot

The pool calculates your hash performance from the number of shares that your miner produces. With so little hashing power, it's likely that your miner did not generate a single share, so to the pool it's indistinguishable from doing no work at all.


What does this Pubkey mean? I just started learning about Bitcoin, and am sorta familiar with p2pk and p2pkh. I just found this input on a Bitcoin blockchain explorer:

It looks like the Pkscript can be "solved" (I'm not super familiar with terminology) by something thats hash160 is the 0b49fe...
The ScriptSig looks a little more intimidating :)
What exactly is the ScriptSig doing? How does this sort of paying mechanism work?
Thanks

This is a P2SH script (pay to script hash), defined in BIP 16.
The scriptPubKey itself is very uninteresting: it takes an element from the scriptSig, hashes it with OP_HASH160, and then compares it with 0b49fe...f1. In other words, ostensibly the only thing needed in order to spend is knowing some piece of data whose hash is 0b49fe....f1.
Now, BIP 16 changed this. If a scriptPubKey has exactly the form OP_HASH160 + 20 byte hash + OP_EQUAL, then the special P2SH validation rules trigger:

All operations in the scriptSig must be pushes.
The final push in the scriptSig (the one whose hash we know is 0b49fe...f1) is taken to again be a Script (called the redeemScript).
That Script is executed, with as inputs all but the final push in the scriptSig.

So, semantically, the whole operation is equivalent to just using the redeemScript as scriptPubKey, but without needing to reveal this to the sender. Instead, the sender can just be given a short P2SH (3...) address that encodes the hash of the redeemScript, and the real one is only revealed at spending time.
In your example, the redeemScript appears to encode a 2-of-3 multisig policy: OP_2 <pubkey1> <pubkey2> <pubkey3> OP_3 OP_CHECKMULTISIG, and the additional stack items in the scriptSig are OP_0 (a workaround for a bug that OP_CHECKMULTISIG pops off one item too many from the stack) plus 2 signatures.


Which trading plateform to make cavalry? There are many companies offering crypto-currencies exchange service.

But many of them have a gap in their currency list. Some other have a strange complexity.

All wallets are not systematically stored in the same point making things complicated.

Is there a good list of companies (websites) offering a simple exchange service, optionally giving wallet storage and not requiring a PhD to use?

The goal is to make currency exchange relatively offend.

(after comparison, the only that makes the difference is Kraken)

I suggest you to read this writeup https://blockgeeks.com/guides/best-cryptocurrency-exchanges/
it presents well known platforms with their pro&cons e.g:

Coinbase

Backed by trusted investors and used by millions of customers globally, Coinbase is one of the most popular and well-known brokers and trading platforms in the world. The Coinbase platform makes it easy to securely buy, use, store and trade digital currency. Users can purchase bitcoins or Ether from Coinbase through a digital wallet available on Android & iPhone or through trading with other users on the company’s Global Digital Asset Exchange (GDAX) subsidiary. GDAX currently operates in the US, Europe, UK, Canada, Australia and Singapore. GDAX does not currently charge any transfer fees for moving funds between your Coinbase account and GDAX account. For now, the selection of tradable currencies will, however, depend on the country you live in. Check out the Coinbase FAQ and GDAX FAQ

Pros: Good reputation, security, reasonable fees, beginner friendly, stored currency is covered by Coinbase insurance.
Cons: Customer support, limited payment methods, limited countries supported, non-uniform rollout of services worldwide, GDAX suitable for technical traders only.

Kraken

Founded in 2011, Kraken is the largest Bitcoin exchange in euro volume and liquidity and is a partner in the first cryptocurrency bank. Kraken lets you buy and sell bitcoins and trade between bitcoins and euros, US Dollars, Canadian Dollars, British Pounds and Japanese Yen. It’s also possible to trade digital currencies other than Bitcoin like Ethereum, Monero, Ethereum Classic, Augur REP tokens, ICONOMI, Zcash, Litecoin, Dogecoin, Ripple and Stellar/Lumens. For more experienced users, Kraken offers margin trading and a host of other trading features. Kraken is a great choice for more experienced traders. Check out the Kraken FAQ

Pros: Good reputation, decent exchange rates, low transaction fees, minimal deposit fees, feature rich, great user support, secure, supported worldwide.
Cons: Limited payment methods, not suitable for beginners, unintuitive user interface.

The Ultimate Guide To The Best Cryptocurrency ExchangesSave

Cex.io

Cex.io provides a wide range of services for using bitcoin and other cryptocurrencies. The platform lets users easily trade fiat money with cryptocurrencies and conversely cryptocurrencies for fiat money. For those looking to trade bitcoins professionally, the platform offers personalized and user-friendly trading dashboards and margin trading. Alternatively, CEX also offers a brokerage service which provides novice traders an extremely simple way to buy bitcoin at prices that are more or less in line with the market rate. The Cex.io website is secure and intuitive and cryptocurrencies can be stored in safe cold storage. Check out the Cex.io FAQ

Pros: Good reputation, good mobile product, supports credit cards, beginner friendly, decent exchange rate, supported worldwide.
Cons: Average customer support, drawn out verification process, depositing is expensive.

The Ultimate Guide To The Best Cryptocurrency ExchangesSave

ShapeShift

ShapeShift is the leading exchange that supports a variety of cryptocurrencies including Bitcoin, Ethereum, Monero, Zcash, Dash, Dogecoin and many others. Shapeshift is great for those who want to make instant straightforward trades without signing up to an account or relying on a platform to hold their funds. ShapeShift does not allow users to purchase crypto’s with debit cards, credit cards or any other payment system. The platform has a no fiat policy and only allows for the exchange between bitcoin and the other supported cryptocurrencies. Visit the Shapeshift FAQ

Pros: Good reputation, beginner friendly, Dozens of Crypto’s available for exchange, fast, reasonable prices.
Cons: Average mobile app, no fiat currencies, limited payment options and tools.

Poloniex

Founded in 2014, Poloniex is one of the world’s leading cryptocurrency exchanges. The exchange offers a secure trading environment with more than 100 different Bitcoin cryptocurrency pairings and advanced tools and data analysis for advanced traders. As one of the most popular trading platforms with the highest trading volumes, users will always be able to close a trade position. Poloniex employs a volume-tiered, maker-taker fee schedule for all trades so fees are different depending on if you are the maker or the taker. For makers, fees range from 0 to 0.15%, depending on the amount traded.

For takers, fees range from 0.10 to 0.25%. There are no fees for withdrawals beyond the transaction fee required by the network. One of the unique tools on the Poloniex platform is the chat box which is constantly filled with user help and just about everything. Any user can write almost anything but inappropriate comments are eventually deleted by moderators. It can sometimes be hard to distinguish the good advice from the bad, but the Chatbox is a great tool that will keep you engaged.

Pros: fast account creation, feature rich, BTC lending, high volume trading, user-friendly, low trading fees, open API.
Cons: Slow customer service, no fiat support.


Can there be dollar version of bitcoin? Why can't there be a p2p software that works like bitcoin but you load it with dollars?

Can't something be made that's just p2p dollar transfers and not deal with a speculative new currency and its volatility?

That would be absolutely possible. In fact, there is a cryptocurrency out there called "Hashdollar" which is trying just that. I didn't look into it yet but if you tie the value of the Hashdollar to the US Dollar, you could use the p2p network to make "real" dollar transaction. The problem here is though, who will guarantee for the value of the Hashdollar? The value of Bitcoin is mostly made by market mechanisms but if you tie the value of a crypto currency to the dollar, you would need to have some authority to guarantee for that value and I do not see that happening.

Of course the feds could just come up with their own version of a cryptocurrency (eDollar?) and this might actually happen very soon.

Hashdollar: https://bitcointalk.org/index.php?topic=368237.20


Which daemon is a lightning node running? To run a lightning node we can use 3 different daemons :
 - c-lightning
 - eclair
 - LND

Is there a way to understand which daemon is a specific peer running?

By the lightning network protocol there is no direct means to detect which implementation is used by another node.

However you could use indirect hints for example the standard cltv deltas or channel fees are different for the various implementations. That being said I could obviously run clightning with the default config of lnd.

Even if there was a way (like the user-agent header of http) nodes could easily spoof such a header.

On a side note: just to be clear there is currently a forth implementation that is said to be mainnet ready called Ptarmigan. Also electrum is short of being ready for mainnet.


I sent out a payment over a day ago and it's still not confirmed https://blockchain.info/tx/3b047ef34fcd283ce57868dedb80eb239970ded1aeb10c0fe3a39360dc822056

https://blockchain.info/tx/2a774b4a29a498f95aeb8fd256c36404118fce1157aea976a3fcfe0f29a6918c

Electrum won't let me overwrite the payment with a higher fee either. Any Ideas?

EDIT: I'm using electrum and it wont let me send out another transaction without the "funds" in the wallet which are still unconfirmed. Is there a way to resend the transaction with a higher fee from a website or another wallet? Or is there a way to cancel the entire unconfirmed transaction so I can resend the payment?

Sidenote: There's not enough bitcoin in my wallet to send out a CPFP.

The fees you included are quite low indeed.

According to Bitcoinfees, and Bitcoinexchangerate the current recommended fee/byte is around 160-168 Satoshis, implying a median transaction fee (around 226-byte transaction) of about 40K Satoshi. In your case, you are paying around 50 Satoshi/byte, 116K Satoshi per transaction. The sources differ in how many blocks will take for a transaction with this fee ratio to be published, from 6 blocks to way more than a day.

What can you do? You can either wait until both transactions get confirmed. Wait until them get pruned from the nodes mempool and resubmit them with a higher fee, or create a new transaction spending from the last one using a CPFP approach.

Child pays for parent (CPFP)

Basically what you do is to create a new transaction spending from one that is already unconfirmed, and add a high fee to that new transaction. By doing so, you incentivize a miner to include that last transaction in the blockchain, having to include the previous one also.


Can I double my money through the upcoming Segwit2x fork? Today, I have received an e-mail from GDAX that says:

  We wanted to remind you that the upcoming Bitcoin Segwit2x hard fork is projected to take place on November 16 and will result in two bitcoin blockchains.

And especially interesting:

  Any customer storing Bitcoin (BTC) on GDAX at the time of the fork will be credited with an equal amount of the Bitcoin2x (B2X) asset on the Bitcoin2x blockchain. GDAX will continue referring to the current bitcoin blockchain as Bitcoin with ticker BTC and the forked blockchain as Bitcoin2x with ticker B2X

Does this mean that I have the double amount of money after this fork? If yes, why should I not buy a lot of bitcoins before the fork and sell all Bitcoin/Bitcoin2x immediately after the fork?

The "Segwit2x" fork is scheduled to activate at block height 494,784. After this block, there will possibly be 2 independent blockchains that grow independently of each other. If that happens, then any BTC you held before block 494,784, would also be available on the B2X fork.

This doesn't necessarily mean you would double your money. It's possible, but it depends on how the market prices both BTC and B2X. For example, if you held 10 BTC @ $5000 before the fork, and then the fork happens and exchanges come back online and the market prices BTC at $2000 and B2X at $2000, your 10 BTC + 10 B2X would be worth less than before the fork. It's impossible to know how the markets are going to react to the fork and how messy it's going to get.


How much info share bitcoin nodes between other nodes? 1.If we assume bitcoin nodes share the other nodes addresses in the end every node know other nodes adresses right?

2.If we share data through network every node share the same information other nodes so if we have 100 member in network same message will arrive to me hundred times isn't it wastefull for network?

The IP-addesses of Bitcoin nodes are not a secret. See addr
Nodes don't explicitly tell other nodes their Bitcoin addresses. Since nodes pass on details of other nodes transactions, working out which nodes originated a transaction isn't straightforward.
Since the set of Bitcoin nodes is constantly changing, and nodes go offline temporarily (or permanently), no node ever absolutely and definitely knows the IP-addresses of all nodes existing
Nodes don't communicate with all other nodes. Only with a few at any time.


Old Wallet, Private key and known public address This is the scenario
I have an old wallet
This wallet misses a transaction. This transaction was confirmed several times in 2014
I have the public address of that transaction
If I ask to my friend to send the payment again (how?) to my address , will I get my founds back again?
In other words, I have an old backup of a wallet that misses a transaction but I have the pubblic address where my friend sent the coins
Is thera a way to get the litecoin back again without knowing the private key?Consider that I have the original wallet

Your wallet will contain a collection of private keys, and it should show you the balance of the addresses associated with those keys.

For the public address you mentioned, if you have the private key associated with it, you'll be able to spend the coins. If not, there is no way to recover a private key from a public key. The private key is either known by the wallet file, or not. There is no way to 'resend' a payment, etc, to recover a private key that is otherwise not known.


Blockchain use in Record Management From my understanding of blockchain, I feel the main use of blockchain is to do something in a decentralised way as compared to the traditional centralised way which involves a middle man. Usually, the centralised way is a much simpler way, but use of a more complicated way (blockchain) becomes justified because you are able to decentralise.it.

However, I see a lot of companies which are currently the central party trying to get into Blockchains. For e.g. banks etc. I am not sure what advantage there is here.

For example, take a look at this - ironmountain.com - What-is-blockchain-and-why-should-records-management-professionals-care

In my opinion, regular PKI is best suited for this. A user signs his document with his private key & then submits it to Iron Mountain. This will ensure integrity. So what advantage is it to either Iron Mountain or the user if Blockchain is adopted in this case.

It also seems as if Blockchain is getting forced into places where it's not necessarily the best solution.

Or am I wrong?

I think there are few other advantages with using blockchain such as improved peer-to-peer sharing with audit trail and no single point for cyberattack.

In saying that Iron mountain would no longer be the central point of access or holding of document and would provide the interface to accessing their documents.

Base on my limited knowledge, I won't claim to be an expert and looking for anyone with more knowledge to explain.


What was the intended benefit of truncating the Target? I'm thinking about how the Target value is truncated to and later compared to the SHA-256hash of the Block Header.

Given that

The maximum target (lowest possible difficulty) is
0x00000000FFFF0000000000000000000000000000000000000000000000000000
and the current target is
0x00000000000004985C0000000000000000000000000000000000000000000000
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (4bits * 32 = 128)
                                  This part is always zero due to truncation

Question:

Is it simply there to make coding and evaluation easier?
Does this make the mining operation faster (more efficient comparisons)?
Are the efficiencies of the previous bullet endian-specific?
Are there statistical benefits or drawbacks to making it non-zero? (fractionally easier to find a block?)

I haven't seen a thoughtful explanation of why the decision was made, and I don't want to infer anything on my own.

I suspect that the target is truncated so it will not consume too much space in the blockchain.

The blockchain stores a compact form of the target in a "bits" field that is 4 bytes wide.  This is (significantly) less than 32 bytes (256 bits) representing a SHA256 hash.

For context:

The space savings is exactly 28 bytes per block.
As of 2/28/13, a block count of 223693, that's 6,263,404 bytes or roughly 6MB that was saved with this optimization.  This data optimization applies to data-on-disk, and what is sent to miners from pool operators


What does one need to do to earn Decred through PoS? If I understand correctly, Decred can be mined through PoS (Proof of Stake) rather than PoW (Proof of Work).

What needs to be in place to achieve this? There are some technical details here about how Decred works but I'd like something in laymen's terms.

I understand that I would need to run a full node to qualify, but:

Is there a minimum number of Decred that need to be held? Does the age of them make any difference?
What kind of download/upload speeds would be required for the node?
Anything else I haven't thought of that I should know?

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

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

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

Coming to your questions,

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

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


Do bitcoin miners actually make money Possible Duplicate:
  How can I compute mining profitability?

Do bitcoin miners like the one depicted in the video below with 24 server clusters actually profit from bitcoins at the current prices? Are the bit coin exchange rates high enough to cover their costs of electricity and hardware? And is there enough liquidity in the market to actually unload them?

Or are all these miners hoarding them in hopes the idea will take off in the future?

Bitcoin Mining Rig - 24 Machine Setup - 48Gh

Miners have about 26% profit at the moment, that's includes only cost of electricity vs bitcoins sell price.


Lnd - how to open a double-funded channel I know about lncli openchannel, however this means I will open a (bidirectional) channel with my peer, but initially just my side will have some balance. Let's say I agree with a collegue running another lightning node that we both want to have some initial balance. I'd expect to use something like lncli halfopenchannel on both sides and after we both do it the funding transaction and everything aftewards will get created. Same as TCP SYN this is prone to DoS and there needs to be some timeout. Of course the workaround is that he gives me some funds and I then push some of them directly to his side, but that's not really the most optimal approach. Any other possibility? Does any other lightning implementation address this?

What you ask for is called dual funded channels as both peers would found the channel. All implementations will eventually have this feature as it has been agreed to include it to BOLT 1.1. I think c Lightning has done most progress on dual funded channels (in particular Lisa neigut has a branch working on it)


In Lightning commitment transactions, what do the upper 8 bits of sequence and locktime represent? In Bolt 3 of the Lightning Network specs, for commitment transactions it states:

locktime: upper 8 bits are 0x20, lower 24 bits are the lower 24 bits of the obscured commitment number.
sequence: upper 8 bits are 0x80, lower 24 bits are upper 24 bits of the obscured commitment number

What is the reason for those specific upper 8 bits? I understand that the lower 24 bits are effectively arbitrary data used for storing the obscured commitment, but then why not use all 32 bits for both?

If you look at git blame of BOLT 03 you can track the sentence regarding the locktime down to this commit: https://github.com/lightningnetwork/lightning-rfc/commit/f1eaa2544665c9b85a2fd95be9c83dad45888982

luckily the author gave a good explanation in the commitment message in git of why the 0x20 was introduced for the upper 8 bits in the locktime field (I have nothing to add to this):

Use 0x20 as high byte for locktime in commitment transaction

The most significant byte of the locktime in a commitment transaction
must be set to 0x20. This is to make sure that the locktime value
is always higher than 500,000,000, making it interpreted as a Unix
epoch timestamp, and not a block height. It also makes sure that the
locktime is below the current time, allowing the commitment transaction
to be included in a block.

Since the sequence field in the input of the commitment transaction is
used for the other half of the obscured commitment transaction number,
it will never assume the maxInt value (0xFFFFFFFF) which would disable
locktime checking.

Similarly for the first 8 bits of the sequence number we find this commit: https://github.com/lightningnetwork/lightning-rfc/commit/125b9a36572d05eb79b1c9527a70acadadc7cfc1 From the commit message I can quote again:

 BOLT 3: Fix commitment transaction input sequence number.

From BIP 68:

    If bit (1 << 31) of the sequence number is set, then no consensus
    meaning is applied to the sequence number and can be included in any
    block under all currently possible circumstances.

Which is what we want.


What is the maximum amount of users bitcoin is ideally suited for? In terms of user scalability, how many total users is the current bitcoin system best suited for? Example: The current bitcoin mining limit is set at 21 million, therefore the bitcoin ceiling does not allow for 7 billion+ users (Earth's growing population). So, what is the maximum amount of users bitcoin is ideally suited for?

This is a highly speculative question. From a technical point of view there will eventually be 21 million (21e6) bitcoins in circulation, yes. But we are already witnessing a shift to using the millibitcoin (mBTC) when denominating prices.

This use of ever smaller fractions may go on until we reach the satoshi (1e-8 bitcoins). We would effectively have 21e14 satoshis in circulation. Even this limit could be shifted if there is consensus among the users of Bitcoin that such a change is indeed needed, but let's assume that it is indeed a hard limit. So we would have 21e14 units of accounting for a world population of 7e9. That would mean that on average each human would own 3e5, or 300'000 satoshis. The purchasing power of those satoshis depends on the evolution of the market price, but there certainly is no technical limit to the widespread adoption of Bitcoin.


How to get destination address from bitcoinj TransactionOutput? I believe TransactionOutput represents one of the outputs of a transaction.

I have a list of such output objects, and a String that represents my own address. I would like to check that this output reached my address.

How do I get the destination address from the TransactionOutput object?

TransactionOutput.getScriptPubKey.getToAddress.toString

Unfortunately, this gives an exception when dealing with an oldstyle pay-to-IP script, so you might have to deal with these yourself if you need them (which in your use case you probably won't). An example can be found in the Scala code from the link below (from line 120 on):

https://github.com/stefanwouldgo/Bitcoin-Graph-Explorer/blob/master/src/main/scala/Graph.scala


How can we trust big exchanges? After reading the question
What are ways a BTC Exchange could steal from its customers, and how can they protect themselves?, it would seem that you can't really trust the big exchanges (or anyone) all that much.  This begs a few questions:

How do we know that the big exchanges aren't manipulating the price of bitcoin?
Is there really any safe way to acquire bitcoins without mining them yourself?
Even if they (for some reason) can be trusted, is there any reason at some point they couldn't do fraudulent things? Mt.Gox apparently handles over 80% of bitcoin trade, and so it seems like they would conceivably be able to move coins between random addresses that they own, and then claim these movements were transactions above market price.  They would then be able to inflate the value of bitcoin (at least on Mt.Gox), and then the other exchanges would find their prices moving to match that on Mt.Gox.  What's stopping them from doing this?
Why is Mt.Gox the largest exchange?  I feel like people would have a harder time trusting a company in a foreign country.

There are multiple exchanges each with its own BTC/USD (or other currency pair) , so arbitrage between exchanges is what keeps prices among exchange inline.

There are short term disruptions when those providing arbitrage are out of cash (for buying) and a lesser disruption for moving bitcoins (for selling).  The selling limitation is smaller because bitcoin transactions confirm in about an hour.

There are permanent price deltas between exchanges due to the cost of moving funds and trading fees.  For instance, it is hard to get USDs to BTC-e, and therefore the selling there can be relatively far below the exchange rate at Mt. Gox -- a difference as much as 10%.  But the direction up and down are generally in sync thanks to arbitrage.


how long does it take for a miner to validate account "balance" and how does it do it My question is how long does it take for a miner to validate account "balance" is sufficient to initiate the transfer so it can include it in a block and how does it do it?
Does it iterates through the whole block chain and sums up the unspent outputs associated with the sender? Or it maintains an internal database that represents each member and their balances whose transaction was ever included in the block chain and once new transactions(a new block) is added to the block chain it updates its internal database?

I guess the second would be much faster than iterating through the whole block chain which is now over 100+ gigabyte.

I'm really interested in how the account balance is determined by the miners. Any help is appreciated. Thx

Every full node in the network does the work of making sure a transaction is valid, whereas miners do the work of confirming valid transactions by including them in new blocks. Transactions can be validated very quickly, whereas being confirmed in a block may take some time.

Every node keeps a copy of the blockchain and in doing so it generates a list of unspent transaction outputs (UTXO). When a node hears about a new tx, it will check to see if that tx's signature cryptographically matches the relevant address in the UTXO. If it validates, then the tx is valid, if it does not validate, then the node will drop the tx, and not relay it to other nodes. For some good related info, check out the answer to this question.

This is different than a method that functions by "maintain[ing] an internal database that represents each member and their balances", for more info on this, check out the answer of this question.


Do all implementation of Deterministic RFC6979-compliant ECDSA signatures generate the same signed transaction given the same data? So if I were to create the same transaction using bitcoinjs and bitcoinj, the end result of the signed transaction would be the same with both libraries, is that correct?

So if I were to create the same transaction using bitcoinjs and bitcoinj, the end result of the signed transaction would be the same with both libraries, is that correct?

They certainly should. That's why they're called deterministic. Any particular library could have a bug in it, however. I would check against examples given in the spec to make sure a library is compliant with the spec, or run the unit tests if the library you're using has them.


Is it possible to generate an invoice for my lnd without having a connection to my lnd? Is it possible to set up a merchant site where:

The customer facing website generates valid lightning invoices, given some kind of master public key, that it gives users to pay
The actual lnd server is located on an entirely different server, and the front facing website works entirely without making any outbound RPC calls to the lnd server. The lnd server would be updating a backoffice database and would not have contact with the front facing website at all.

I would expect this to be possible, maybe by having the customer facing site and lnd both share the same seed that they use to generate preimages using. I have tried just making my own script to generate valid invoices using, but it seems like lnd still needs its AddInvoice RPC call for it to handle those invoices.

The parallel of course being BIP32, where we can put a public xpub key on the customer facing site, have the actual wallet software checking for payments on an entirely different server, and the 2 never having to talk to each other. In a worst case if an attacker took over the customer facing site, they'd only get my xpub for that week, since there are no private keys.

Yes this is theoretically possible as described in this video https://youtu.be/bihYeAeNi0g The idea is to have a deterministic way of generating preimages and entangling the lightning node with the point of sale device.

This idea originated from stepan snigirev who went down further and refined it to this idea: https://lists.linuxfoundation.org/pipermail/lightning-dev/2019-June/002009.html

His main idea is that the offline node creates an invoice with a routing hint through the online node and the online node catches the onion and gets preimage information from it with some form of a ECDH key exchange.

I think both ideas are not implemented in lnd yet but the latter is supposed to be included.


How strong is the bitcoin network? Let's say an organization decides to attack bitcoin by launching a 50% attack.

Can someone estimate how big the effort is?

How expensive would such an attack be from scratch (buying enough
ASICs)?
How feasible is it for an organization with a lot of
computers to do it using their existing computational power?

For example, can a company like google do it by, say, turning 5% of their computers towards attacking bitcoin?
Can the US government do it (if they chose)?
Can a few banks group up, buy some equipment and hijack bitcoin this way?

I understand that these are all possible in principle, so I'm looking for back of the envelope estimates of how realistically feasible such scenarios are.

Three months is about the useful life of an ASIC miner. The cost of all practical mining (not including wasteful mining done by botnets and the like) tends to equal the value of all practical mining. So an approximate rule of thumb for the cost of an attack is the value of all Bitcoins mined in three months. Since the block reward is currently 25 BTC, Bitcoins are around $700, and a block is mined around every 10 minutes, you're looking at roughly $200 million. Using existing equipment is impractical -- you need ASICs.


Is pre-mining of a future block possible? Is it possible to pre-mine next block when everyone is mining current block?

Let's say, if we need 1T hash power to mine (solo / pool) a block in 1 hour, then is it possible to run 1G hash miner for 1000 hours and then use this data as proof of work.

With 1G miner, I am essentially targeting n'th (x + 6000) block in future, hoping to solve it. I will broadcast it as soon as I get hash of n-1'th block.

You seem to be asking if you can mine block X+1 while the network is still working on block X.

The answer is no, you can't mine block X+1 until block X has been solved, as each block requires a hash of the previous block to be valid.


Learning to trade iOS user friendly crypto wallet safety when stored in and transfer for trading or use to purchase or get cashed iPhone users best crypto wallet in bitcoin currency trading and transfer for easy access to use and keep safe deposit and profits as a new and first time trading experience  to the trading crypto currency and forex markets and stock exchange

Choose a wallet program/app from a reputable list such as https://bitcoin.org/en/choose-your-wallet
Install that wallet program/app on a secure clean PC or phone (as appropriate)
Get the wallet to give you a receive address (nowadays wallets issue a different address each time)
Get your brokerage to transfer money to that address
Get them to tell you the transaction-ID and check that in a bitcoin explorer

  I was told to buy as much bitcoin as I can

That's a bit of a red flag.

  I wanna understand how I can buy bitcoin currency with bitcoin currency

That doesn't make sense. Its like buying dollars with dollars. No one does that. Unless some of those dollars are fake dollars or hot dollars. See Fungibility

You can transfer money from one wallet to another. In your case that might be transferring money from your broker's wallet to your wallet.

It can be confusing because some exchanges/brokers etc label an account a "wallet" when it isn't (a wallet holds a private key that only you know, this isn't the way most exchange/broker accounts work, they hold the keys not you)

  first time trading experience to the trading crypto currency and forex markets and stock exchange

Just remember you are jumping into a pool of very hungry, very experienced, well equipped sharks. Don't "invest" any money you would not be happy to lose.


Litecoin - Is better use a good CPU or good GPU? I heard in some forums that mining Litecoin is better using a good CPU (Processor), different from Bitcoin that's better mine using a good GPU (Videoboard).

I want know, this is true? For litecoin, is better buy some good processor like i7 instead a good GPU? Litecoin really is better mined using CPU's?

Any CPU can still be used to mine Litecoin, although much less effectively as a modern AMD GPU could.

Mining with a CPU gives you very bad hashrate therefore I wouldn't recommend it.
Even a high end CPU will not give you the hashrate of a mid range GPU.

You should use a graphics card (GPU) to mine litecoins or switch to another coin

Additional Information: If you decide to buy a GPU specifically for mining go for an ATI GPU as its much more effective than its nVidia counterpart.


Is there an open source (free) client or code for bitcoin transactions Possible Duplicate:
  How can I accept bitcoins on my website?

I have a few websites I am working on, but is there an open source code I can use that will allow people to deposit bitcoins on my site to where each user would have a unique deposit address?

In the past, I've implemented this just by asking the standard Bitcoin client to generate a few thousand addresses and then just have the web site give them out one by one. It's a bit slow generating the addresses, but if you let it run overnight, you'll have a virtually unlimited supply.

Don't forget to backup the wallet immediately after doing this!


how does PoS choose a 'winning' chain I often see the 51% attack described by saying that if Bitcoin is presented with two conflicting chains, it will select the longest one.  This would seem to work because difficulty only re-adjusts at certain block intervals, meaning more hash power makes mining faster possible, until difficulty adjusts, at least.

On PoS type coins, difficulty re-adjusts every block, so even if you bring a bigger gun in terms of more coin or coin-age, you should theoretically, even on a shorter scale mint the same numberof blocks as the 'main chain'.  So if there is no 'longer chain', how doe PoS select a winning fork in the case that one occurs?

Usually longest chain is selected as main chain.The other condition is if two users find two blocks at same time.The block which is approved by maximum nodes in the network will be considered and will be added to longest chain.And the other block is considered as orphan block and considered as forked chain.


Can nLockTime TX be used to flood Mempools? What would happen, if I would create a large number of large transactions with a very high nLockTime?

Would something stop me from filling not only the miners', but also regular nodes' mempools?

Would miners drop transactions with unreasonably high nLockTime and low transaction fee?

What would BitcoinCore do?

There is no size limit to the mempool from what I can find. It might be possible to flood it but rather difficult and expensive / slow. I see two approaches:

A) minimum relay fee

connect to 1000 nodes
send plenty of txs that meet the minimum relay requirements

how many?: 32 000 000, 32 000 on each node
nLocktime in the far future so they don't get into blocks
tx fee: minimum relay fee: 0.0001
amount: very low
size per tx: 250bytes

mempools are filled with 8gb of dust

It would take a while to generate that many addresses and tx and get them broadcasted. Also it would cost at least 3200BTC.

B) 0 fee txs with minimum output of 0.01 so they still get relayed

Mempool is gated by a rate limiter for free tx:

// Continuously rate-limit free transactions
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
// be annoying or make others' transactions take longer to confirm.

// Use an exponentially decaying ~10-minute window:
// -limitfreerelay unit is thousand-bytes-per-minute

// At default rate it would take over a month to fill 1GB

So this will be at least very slow. Also you need to have 320 000 BTC for 8GB. :)

There might be ways to artificially make txs larger. Alternate clients might do things differently.


Can I access a BCH wallet with a BTC seed phrase? So I've accidentally given someone a BTC address and she sent BCH to this address. The wallet was created post-fork. Is it possible to go through the same process as accessing BCH immediately after the hard fork, or are these BCH funds lost forever?

If the seed phrase was generated by a BTC BIP-0039 compliant wallet and you have a BIP-0039 compliant BCH wallet then the answer is yes you should be able to get hold of your BCH funds.

It should be easy to try. Get a BCH wallet and enter your seed phrase and see if your coins appear.


is it possible to get mempool transactions as hex using bitcoin-core? getrawmempool returns only TXID (verbose off), what I'm doing is calling getrawtransaction for each transaction ID to get a transaction hex.

Bitcoin core doesn't support batch requests and each RPC call takes 0.06 sec, for ~ 5000 transactions, it takes 5 min which is so expensive.
can I get mempool transactions as hex instantly?

Bitcoin core doesn't support batch requests

Yes it does. Bitcoin Core uses the follows the JSON-RPC Specification for batching requests. Just use that with a custom client of your choice to interact with the RPC server to get that information. python-bitcoinrpc makes this easy to do.


How do BIP8 and BIP9 differ, how are they alike? With Taproot on everyone's lips, people have started discussing activation approaches. The debate is currently seems to favor BIP8. Previous soft forks used BIP9. How are the two related and what are the differences between the two?

Early soft forks each had their own activation method included in the proposal which relied on flagdays or block version signaling. The latter only allowed a single proposal to be considered concurrently as it relied on incrementing the block version.
BIP9 proposed an activation standard which allowed multiple proposals to be considered at the same time. Soft forks that were activated using BIP9 were coordinated by having a supermajority of hash power signal readiness for the upgrade (traditionally 95%). Miners are tasked to assess the network's uptake of the proposal and signal readiness by setting specific bits in the version field of their blocks. The miners readiness signal is measured over the last difficulty period at each retargeting height. For example, the segwit soft fork and the CHECKSEQUENCEVERIFY soft fork that activated BIP68, BIP112, and BIP113 used BIP9-based activation.
BIP8 is a variant and the successor of BIP9. BIP8 uses block heights rather than timestamps to bound the signaling window, and gives the option to either fail or lock-in the upgrade at the end of the signaling window. When lockinontimeout: true is set, nodes running the activation code only accept blocks that signal readiness in the last difficulty period before the timeoutheight. This forces the upgrade to lock-in to the end of the signaling window. In contrast, BIP9 would always fail after the signaling window passed without activation, so BIP9 worked equivalently to BIP8 with lockinontimeout: false.

via BIP8
Per BIP8, a proposal would get activated via the following steps:

The signaling period commences at start_height by switching from DEFINED to STARTED. The start_height would be set at least a month after release of the activation code. Note that the timeout_height must be the end of a difficulty epoch.

At each difficulty retargeting, every node running the activation code independently checks whether the signaling threshold was met in the concluded difficulty period. There are three possible state transactions from STARTED:

If the threshold is not met at timeout_height, the
proposal settles in the final FAILED state at the end of the signaling period.
If the signaling threshold was met, the proposal transitions to the
LOCKED_IN state.
If the proposal forces activation via lockinontimeout: true and
the last difficulty epoch of the signaling period is reached with
the proposal in STARTED state, the proposal transitions to MUST_SIGNAL. This causes upgraded nodes to reject any blocks that don't signal readiness.

The proposal remains in LOCKED_IN
state for one difficulty period and then transitions to the final ACTIVE state. Upgraded nodes now enforce the soft fork rules on the network.


Multi-Sig bitcoin in testnet I am trying out bitcoin multi-sig in test net and when I make a payment i get the payment details address as 3CRrDxJwwkrJqmgSWikQMmZWCDo5SmL3tc

but when i go into my test net wallet and try to send funds to this address it comes back as unrecognised.

Any ideas what I am doing wrong ?

Thanks

Addresses starting with 3 are Mainnet P2SH addresses. For testnet your require a valid base58check/RIPEMD160 encoded scripthash for a P2SH address (starting with 2).


Mining in the wallet Someone said me that I should give him my wallet email and then he will request for the mine from the mining network, after that he asked that you will receive email from that u will get code which u have to send me and then invest your bitcoin wallet with 50$.And after some hours I will get the profit in my wallet. Is this a scam?

Yes, it is a scam. You do not want to give the private key of your wallet to anyone. Do not deal with this person.


Transaction deserialization test vectors for Elements sidechain? I'm working on adding support for Elements sidechain to  https://github.com/Simplexum/python-bitcointx/ library.

Transaction serialization/deserialization seems to be working, but to test it properly, I need samples of different transactions (with or without assets, confidential/unconfidential etc).

Preparing these samples by hand is tedious. Elements source contain tx_valid.json data, but it seems to contain only bitcoin transactions - if you try to decoderawtransaction() some of the data from that file with elements-cli, you get "TX decode failed"

I am not sure if it is possible to get real transactions from Liquid network - while blockstream.info have an explorer for Liquid, it does not show raw transaction data.

Is there a chance to get such sample data somewhere (besides generating it myself) ?

https://github.com/ElementsProject/elements/blob/elements-0.14.1/qa/rpc-tests/confidential_transactions.py generates various tranactions. I think I will be able to dump the txs and use them in my tests.


Multibit HD wallet - cannot open or restore, I have password and secret words I can't open either of my 2 Multibit HD wallets. It says "Password did not unlock the wallet" on both. I have tried restoring from all the possible backups, my passwords are correct and my secret words successfully verify each time. On clicking "next" I get:-

1) TICK. Backup location created
2) CROSS. Wallet created.
3) TICK. Security certificates
4) CROSS. Wallet is synchronising. Please wait until complete.

The finish button is grey, the wallet seems to do nothing else - it never synchs. I am 3 coin worth $6k down at the moment. I am also trying to restore my wallet in electrum, but because I don't know how to select the wallet location from Multibit HD I am struggling. Repeat, I have all correct info required for backup. Also, I have my .zip.aes files - I stored them on the root of C: I can't seem to open them with AES Decrypt, tried using my 12 word seed chain and the password on the wallets. Plz help, its all our company bitcoin sales for the past 6 months...

Yes, I have gone through other forum posts, but am a little out of my depth and can't understand why with all the right backup info, I get no restoration. I will stick to Electrum in future, but had no problems previously with Multibit standard , the upgrade has screwed me good and proper!

MJT

MultiBit HD bugs

There are several issues:

A correct password doesn't unlock the wallet (#753 on github).
The restore process doesn't work if there's already a wallet in the directory that MHD uses for the restore (the "CROSS. Wallet created.").

In my experience even a successful restore into a fresh new location won't help with the password problem, on any MHD version.

Coin recovery

It is only sensible to move the coins into a different wallet. This can be done by importing the private keys for the addresses that hold your coins.

You'll need the wallet recovery seed, i.e. the set of words the wallet gave you when you created it.

Getting the private keys

Go to https://iancoleman.github.io/bip39/, scroll down to 'Offline usage', create an offline copy and open it in browser.
Input your seed in 'BIP39 Mnemonic'.
Under 'Derivation Path', select 'BIP32'.
For 'Client' select 'Multibit HD'.
The 'Derived Addresses' list now has your wallet's usable addresses and their private keys. Figure out which addresses hold the coins (e.g. look up on blockchain.info). Copy those private keys.
Some coins may be on "change addresses", which have different derivation path:

For 'Client' select 'Custom derivation path'
For 'BIP32 Derivation Path' input "m/0'/1"
Repeat step 5. with the updated list of derived addresses.

Importing private keys

Pick another wallet software and consult its documentation about private keys import.

For instance, Electrum allows to create a seedless wallet that can do this. That should allow to control the coins again and send them into another wallet (use the seedless wallet only temporarily).


Signing data with ECDSA I was reading about the math behind bitcoins in this article, and one thing I can't seem to wrap my head around is how the said algorithm is used to sign "data". What exactly is this "data"? Is it my bitcoin? If so, how exactly is a bitcoin represented in terms of data? Say I have 5 bitcoins in my Coinbase wallet that I want to send my friend. How would that translate to the whole "gaining the private key and signing your data with it" process as described in the article?

Sorry if this is too novice a question, I'm new to cryptography concepts. Thanks in advance!

Every Bitcoin in existence today exists as an unspent transaction output (UTXO) on the Bitcoin blockchain. That is, the output of an existing confirmed transaction that has not yet been consumed as the input of some other transaction.

Coinbase has a collection of UTXOs that represent the Bitcoins that they hold. When you tell Coinbase to make a Bitcoin payment to someone from your wallet, they choose one or more of those UTXOs to make the payment with.

They then form a chunk of data that claims those UTXOs and creates a new UTXO giving the Bitcoins to the recipient and one giving any change back to them. It's that chunk of data that they sign with the key for each UTXO they are spending with that payment.

Once the transaction is confirmed, the new UTXO for the recipient is the Bitcoins you sent them. When they see that UTXO appear on the blockchain, they know you paid them. They can then form a transaction that spends that UTXO to transfer those Bitcoins to someone else.


Where is sum(vin) > sum(vout) check in Bitcoin Core? I'm searching the function that validates a transaction according to Protocol rules - "tx" messages especially step 14 sum(vin) > sum(vout).

I found this interesting function CheckTransaction(const CTransaction& tx, CValidationState &state) but it does not validate step 14, right?

Where is this check for step 14?

https://github.com/bitcoin/bitcoin/search?q=bad-txns-in-belowout&unscoped_q=bad-txns-in-belowout

const CAmount value_out = tx.GetValueOut();
if (nValueIn < value_out) {
    return state.DoS(100, false, REJECT_INVALID, "bad-txns-in-belowout", false,
        strprintf("value in (%s) < value out (%s)", FormatMoney(nValueIn), FormatMoney(value_out)));
}


No menu in Ubuntu bitcoin-qt When I run bitcoin-qt on Ubuntu 12.04, I see this:

As you can see, there is no menu on the top menu bar.  There is the "beginning" of a menu with the word "Bitcoin" but there are no "File", "Settings", or "Help" menu titles.  Clicking on the word "Bitcoin" in the menu bar does nothing.

According to this it seems there should be a menu.

How do I get the menu to work?

This happens with many Ubuntu Apps. The simplest solution is to tap Alt any type the name of the menu item you wish to find.

Alternatively, hit Ctrl-Alt-F2, log in, type DISPLAY=:0.0 unity --replace hit Enter, and then do Ctrl-Alt-F7. The menu bars and the windowing system will reload.


bitcoin transaction stuck in limbo i tried sending a transaction using multibit hd, and its not even that i was trying to get cheesy on the fee, i just forgot to enter one in and now three days later ive lost 15 dollars from bitcoins losing value as my transaction is stuck at being viewed by 5 peers, but receiving no confirmations. after doing some research i seem to get mixed responses on what happens now, will the transaction get rejected and my coins be returned to me with mutibit hd, or do i have to do somthing proactive to get them back?

MultiBit developer here. If you're using the latest version of MultiBit HD (0.2.0 at the time of writing) then your default would have been set to a reasonable level for the current network conditions of near full blocks. You can always set it higher if needed.

If your version is older and you haven't upgraded then the default fee will likely be too low to be accepted by a miner in the current conditions. It is likely to hang around until it is finally purged by all nodes from their mempools. This can take several days.

More information is here: https://bitcoin.stackexchange.com/a/9737/117 (as suggested by @StephenM347).


If I delay upgrading to the latest Bitcoin Core version post Taproot activation does my node ever verify early Taproot spends? Let's assume the Taproot soft fork is activated in June 2021. I continue to run an old version of Bitcoin Core (not enforcing Taproot rules) in July 2021 and so my full node treats valid Taproot spends as anyone-can-spend. Then in August 2021 I upgrade to the latest version of Bitcoin Core and start enforcing the Taproot rules. Does my full node re-verify the Taproot spends from the point of network activation or does it only verify Taproot spends from the point that I upgraded to the latest version of Bitcoin Core?

Your node will likely never re-verify those transactions according to the Taproot rules unless it is forced to do a new initial block download (IBD) due to database corruption etc. It verified them at the time as valid spends according to anyone-can-spend rules and so there is no need to revisit them.
SegWit was different to Taproot in that pre SegWit versions (< 0.13.1) weren't storing the witnesses and so when they upgraded to a post SegWit version (>= 0.13.1) they had to request these witnesses. With Taproot, the witnesses (SegWit v1) are already stored by post SegWit (>= 0.13.1) but pre Taproot versions, they just haven't been validated according to Taproot rules.
There is an open Bitcoin Core PR #21009 at the time of writing (February 2021) to remove the code that allowed for requesting witnesses after an upgrade to a post SegWit version (>= 0.13.1).
There is some interesting advice and observations on bitcoincore.org in the Segregated Witness Upgrade Guide. Some of it is specific to the SegWit soft fork (e.g. activation) rather than the proposed Taproot soft fork but much of it is applicable to both.
Thanks to Luke Dashjr and Suhas Daftuar for answering this question on IRC.


How do I export an xpub from Bitcoin Core for use in BTCPayServer? I'm using Bitcoin Core 0.17, and using bitcoin-cli getaddressinfo method to extract xpub for a given address.

This xpub is 66 characters long, and I'm using BTCPayServer which needs this xpub and I've to select one of the following address type corresponding to this:

P2WPKH
P2SH-P2WPKH
P2PKH

What I'm trying to do : I'm trying to link my wallet to BTCPayServer, in order to do so their admin panel needs an input for xpub and it also asks to specify the exact format of that xpub/derivation scheme. I don't want to use a wallet like electrum so I'm creating my own private keys through bitcoin-cli

This is not currently possible, as Bitcoin Core uses hardened BIP32 derivation to compute keys and addresses. This derivation scheme does not have a usable xpub that lets you derive the same keys publicly.

For more background, an xpub (or extended public key) is a string defined by BIP32. Every xpub has a corresponding xprv (extended private key). From the xpub one can derive a large number of child public keys, whose private keys can be derived from the corresponding xprv. This permits watching a large number of addresses without explicitly transferring all public keys.

The downside is that the xpub derivation scheme has a weakness: if an attacker knows the private key of any of the child keys and the xpub, he can compute the private key of all child keys. Because of this corcern, Bitcoin Core does not currently support xpub-compatible key derivation.

This will likely change in a future version with the introduction of descriptor wallets, which are far more flexible in specifying what keys and addresses belong to the wallet.


double spend the mempool to outbid an attacker if I spend some input in a tx and a few seconds later spends the same input with other inputs in another tx with higher fees. If the first tx is still in the mempool would the 2nd tx replace the first one?
With a hot wallet I can receive a notification on my phone every time an input is spent and if I reply to the notification (somehow wallet has been compromised) then I could broadcast a signed tx with all my inputs to another address I control with higher fees. I could potentially outbid the hacker and save the wallet?

Many nodes today will not replace any transaction in their mempool with another transaction that spends the same inputs, making it difficult for spenders to adjust their previously-sent transactions to deal with unexpected confirmation delays or to perform other useful replacements.

First paragraph of 'Abstract' section in BIP 125
Maybe if the transaction had RBF enabled it would be helpful or if the transaction had a change address in outputs to try CPFP
Hackers are expected to use high fee rate, no RBF, no change address  etc. although it's not the case in lot of incidents that I have observed.


Different balances in API block explorers for BTC BTC.com block explorer shows bigger balance than for example Insight or Blockchair. For example: https://btc.com/1FLDCfr9iG7n6bAdGsqBXmhaLgC4aSze72

https://insight.bitpay.com/address/1FLDCfr9iG7n6bAdGsqBXmhaLgC4aSze72 https://blockchair.com/bitcoin/address/1FLDCfr9iG7n6bAdGsqBXmhaLgC4aSze72

Why BTC.com's result is different?

Just check on our explorer
https://bitaps.com/1FLDCfr9iG7n6bAdGsqBXmhaLgC4aSze72

Correct balance is 1.41297880BTC

You can also turn timeline mode and check balance change after each transaction


How to get fee in a transaction with unconfirmed inputs in bitcoinj? I am trying to get the fee of incoming transactions in a wallet with bitcoinj. At times it was the commission using Transaction.getFee(), but this was throwing NullPointerException. I got to do a little more research and I realized that it happens when the transaction has unconfirmed inputs. I've tried adding the value of all the inputs and subtracting the value of all the outputs, so you would get the fee, but on these occasions the sum of the inputs is 0 BTC. Is there any other way to get the commission?

I leave an example of the output of one of the transactions (testnet):

04f570fdd0cb8c973d8c9b3adf09b803ef70941ec239685d479a93b089e4d621: Seen by 1 peer. Pending/unconfirmed.
   in   PUSHDATA(72)[3045022100fe750e43c3bc46eddb390dad98acd6ef0646e00386770de542e7e5c581f8118102206924cd243b459645ae8626e948e1d33404d29c651a8a59c24ed5cd902d7e939201] PUSHDATA(33)[02a40db91b59058375fe7f13810beb6609e63a8974ce355b76d01692058eaac9f9]
        outpoint:7cd4378560d2b36f53b3d492afa815c5ae615d18bff9611c3081f591a1c0c156:0
   out  DUP HASH160 PUSHDATA(20)[49d2661baf33597c6dc3dbdbb9e7a8835fdb76b4] EQUALVERIFY CHECKSIG 0.00126081 BTC
   out  DUP HASH160 PUSHDATA(20)[372fb0d8affe634b369af9722cc48c63ad90e9df] EQUALVERIFY CHECKSIG 0.001 BTC
   prps UNKNOWN

In case of a SPV node you don't have the values of the inputs of a transaction, as you don't have the full blockchain and thus all the UTXOs.

The transaction itself has no values of the inputs!

You have the following options:

Query a trusted server for the UTXOs (e.g. electrum servers)
Query a webservice (e.g. blockcypher)
of course have a full copy of the blockchain, you could use java bindings to query a local bitcoind


How does an SPV node verify an unconfirmed transaction? Alice pays Bob 1 BTC with a simple pay-to-address type transaction. Three seconds after Alice broadcasts her transaction, Bob's Simplified Payment Verification (SPV) wallet displays a message saying the transaction was received.

How exactly does this work? What checks, if any, does Bob's wallet do before showing the message?

A lot of the SPV documentation I've seen makes vague statements about "height" vs. "depth" verification. These discussions aren't helpful because they don't describe the actual process.

The clearest statement I've found appears on the BitcoinJ documentation (under "Pending transactions"):

  ... However, in SPV mode the only reason you have to believe the transaction is valid is the fact that the nodes you connected to relayed the transaction. If an attacker could ensure you were connected to his nodes, this would mean they could feed you a transaction that was completely invalid (spent non-existing money), and it would still be accepted as if it was valid.

https://bitcoinj.github.io/security-model

In other words, complete trust is placed in the network to only relay valid transactions. The network isn't supposed to relay double spends or transactions spending bogus coins. Therefore, the relay, and only the relay, vouches for the validity of the unconfirmed transaction. If an attacker can control your internet connection (through a WiFi hotspot, or VPN, for example), then he can send you fake unconfirmed transactions and rip you off.

Is this how SPV nodes handle unconfirmed transactions?

It seems like an SPV node could do better. For example, couldn't Bob's wallet verify that the coins being spent existed at one time? Request the Merkle path and transaction for all outpoints referenced in the unconfirmed transaction's input list. If the parent transactions can't be found, Alice's transaction is trying to spend bogus coins.

Could a similar mechanism be used to further verify that Alice's unconfirmed transaction doesn't double spend coins?

If neither of these checks are possible today, what would need to happen for them to become possible?

First, nobody should rely solely on unconfirmed transactions.  This applies equally to full node operators and SPV wallet users.

  Bob's wallet verify that the coins being spent existed at one time? Request the Merkle path and transaction for all outpoints referenced in the unconfirmed transaction's input list.

Yes, that can be done now.  I doubt any wallets do that now, as with the current P2P network design it would be slow and not definitive.

It would be slow because the network protocol does not allow requesting arbitrary transactions.  In order to get a particular transaction, you have to set a bloom filter and then keep requesting merkle blocks until you find the block that contains the transaction.  In the case of a negative search, this would require requesting a merkle block for every block on the block chain, or downloading about 32 MB of data and forcing your full node peer to scan its entire about 30 GB block chain.

It would not be definitive because anyone can withhold data from an SPV node.  For example, the full node that notifies the SPV node about an unconfirmed transaction can include merkle blocks to each of the inputs, proving that they exist on the block chain.  But the full node can't include any proof that those inputs haven't been previously spent on the block chain.

When some form of UTXO commitments gets implemented, it will become possible for full nodes to prove to SPV nodes that an input was unspent up to the tip of the SPV node's header chain.  However, it that still doesn't offer any guarantee that the transaction won't be double spent anyway.  (In short, it decreases the full node's ability to lie without making unconfirmed transactions any more secure.)

  Could a similar mechanism be used to further verify that Alice's unconfirmed transaction doesn't double spend coins?

No, this is fundamentally impossible because an unconfirmed transaction is just data.  Alice could create and broadcast transaction T paying Bob and then create transaction T' (a double spend) that she keeps secret on her hard drive.  Because it's a secret, you don't know about T', but it's still a valid double spend.

There are various proposals to allow full nodes to relay information about broadcast double spends, such as Gavin Andresen's relay first double spend or Peter Todd's replace by fee, but none of these can provide a method to verify there are no double spends in existence for a particular input.

It's also possible to change how Bitcoin verifies signatures to require either mathematical ECDSA one-show signatures or consensus one-show signatures.  This wouldn't stop double spends, but it would mean that anyone who had two signatures for the same input could create a third spend taking all the money for themselves.  (E.g. if a miner running a full node received T and T', it could create and mine T3 paying the full input value to itself.)

This would obviously disincentivize creating public double spends, but it wouldn't stop them.  Worse, there are some easy ways around the disincentives for systematic fraudsters, but everyday users like you and me who occasionally need to make double spends for legitimate reasons (e.g. because a transaction isn't confirming) couldn't safely make them any more.


Bitcoin future mass usage for payments - how feasible is it without real privacy The bitcoin is by many people believed to be used as a method of payment, just like fiat currencies, in the future. Apart from the other big use case of a stable store of value.

But the payment use case is very flawed currently. because from the day someone starts to make a payment and shows her public key around, everyone (also people who have malicious ideas) could start to track this person based on her public key for the rest of her live basically on the blockchain. Everyone using btc payments would be sitting "naked in a cup made of glass".

This is horror scenario for all, companies, private persons, a dangerous inherent feature.

this is currently not possible with cash or bank transfers. everyone can have your IBAN accout number, but no other person who has your IBAN (and is not a bank employee) can ever track you or know about your financial state, etc.

How can btc in such grave circumstances achieve mass usage status as payment method??  Is privacy not needed as prerequisite for payment use case?

How are bitcoin devs trying to tackle this unsolved issue? Or do you think this is not an important issue.

Thanks

Bitcoins themselves are fungible, and addresses are designed to be for one-time-use only. It really comes down to how you use it, and it is entirely possible to transact using Bitcoin in a private manner.

If the user is naive and has poor practices, then it is possible to track their financial history.

But if the user is smart and uses best practices (no address reuse, coinjoin/payjoin transactions, lightning network, etc), then they can enjoy a very high degree of privacy, and sovereignty (you don't get this with traditional banking).

This article is a great writeup about privacy while using Bitcoin.


Can we get any default address before running getnewaddress? I am trying to develop some application using bitcoin (currently only in the regtest mode).
I am aware that one can create a new address using

bitcoin-cli -regtest getnewaddress

RPC call, but I want to know whether bitcoind pre-generates a bitcoin wallet address when we install and run

bitcoind -regtest -daemon

fresh. If yes, how can I know this address?

No.

The wallet actually always pregenerates keys (not addresses) and puts them in the keypool. A keys is fetched from the keypool and converted to an address only when an address is explicitly requested (via getnewaddress or from the GUI). An address is not pre-fetched by default.


Is pruning of the merkle tree implemented in the bitcoin android wallet? I know that satoshi's client doesn't prune, because we need to store all the transactions so that we can send them to other nodes.  But does this android bitcoin wallet from de.schildbach prune?  Space on a smartphone is at a higher premium so it seems like a good place to prune.

And how much space would pruning save?  Has it ever been checked?

That wallet is using bitcoinj as its client which implements a "simplified payment verification" mode.

Here's what the client does in this implementation:

Connects to a trusted node.
Downloads only the block headers.
Validates the headers.

Do they chain back to genesis block?
Is difficulty high enough?
Do I trust this node enough?

Downloads only the transactions that yield ownership to your addresses.
Sufficiently deep block headers are thrown away.

Resource usage in this implementation just depends on your own sent/received transactions.

  As of October 2012 (block 203258) there have been 7,979,231 transactions, however the size of the unspent output set is less than 100MiB, which is small enough to easily fit in RAM for even quite old computers.

In other words, almost 8 million txns in Oct2012 could be consolidated to 100MiB just by throwing out txns that had no spendable outputs.

So you can imagine how little space it takes just to store transactions relevant to your addresses.

https://code.google.com/p/bitcoin-wallet/
http://code.google.com/p/bitcoinj/source/browse/core/src/main/java/com/google/bitcoin/core/BlockChain.java#26
https://en.bitcoin.it/wiki/Scalability#Storage
https://en.bitcoin.it/wiki/Scalability#Simplified_payment_verification


Possibly sent Bitcoin to wrong address Almost a week ago I sent .05 BTC from my coinbase account to what I thought was my jaxx address, but I haven't received it.

The transaction (here) says that some of the output of the transaction was spent. Does that mean that I sent my BTC to the wrong address and the receiver spent it?

It sounds like you may have sent your bitcoin to the wrong address, if that is the case it is likely gone. The 0.05 btc is sitting in address 1JERLf..., and has not moved since the coinbase withdrawl. If you control that address then there is no issue

You can try 'reset Jaxx cache', the wallet software might be experiencing some sort of bug and not displaying your balance correctly.

It may be worth checking any other wallet software you have, to see if you sent the btc to that wallet instead of Jaxx, and got mixed up about which wallet you got the receiving address from.


How to confirm offline a transaction Is it possible to confirm a transaction offline in the following scenario:

the "receiving" device is first online. There is no restriction at this point. Especially, it can prepare anything needed for the following steps.
the "receiving" device goes offline. It generates a payment request for a specific amount that was not known before and shares it to the "sending" device via an offline means, such as a QR code for instance.
the "sending" device which is always online, completes the transaction.
How could the "receiving" device, while staying offline, can get a confirmation that the transaction has really occurred? In other words, what should the "sending" device share (by QR code for instance) to the "receiving" device that will let it confirm the transaction without being fooled?

Could the "receiving" device have a public key that would verify a signed version of the transaction?

It depends precisely how secure you need to be. Generally speaking, the entire block containing the transaction and the next 100 block headers should be sufficient. The validation should consist of ensuring that the first block actually contains the transaction and is a valid Bitcoin block, the other 100 blocks form a valid chain, and all 100 blocks meet a reasonable difficulty target.

The easy way to create such a chain is to get the transaction confirmed and wait for all the world's miners to produce 100 blocks. Other than that, you'd have to find all 100 blocks yourself, which is an awful lot of work to do just to fake one transaction.

Note that this method would fail should the Bitcoin network's total hashing power ever fall below what the device expects as the real blocks wouldn't meet the "reasonable difficulty target". You do, to some extent, have to predict the future Bitcoin difficulty to make this work.

This assumes that having no central authority is a requirement. If you can accept a central authority, then that central authority can periodically issue a signed statement of the current minimum difficulty and number of blocks the device should accept. Updating this every year or so should be more than sufficient. That would allow you to wait for far fewer confirmations. 100 confirmations will take 17 hours or so.


bitcoin chainstate database parsing in python giving wrong value I am trying to decode chainstate db for a specific out index for a transaction in python just for learning.
Transaction ID: 4d4a4c6ca4f3c91e69563199943336d3279fad71c9e8d9c1708ef9dc6ac16000
out index = 1822

chainstate_db = plyvel.DB(os.path.join(os.getenv('HOME'),".bitcoin/chainstate"), compression=None)
def getObfuscationKey():
    value = chainstate_db.get(b'\x0e\x00' + b'obfuscate_key')
    print('obfuscation key = %s' % value)
    obfuscation_key = value[1:]
    return obfuscation_key

def applyObfuscationKey(data: bytes):
    obfuscation_key = getObfuscationKey()
    new_val = bytes(data[index] ^ obfuscation_key[index % len(obfuscation_key)] for index in range(len(data)))
    return new_val

def b128_varint_decode(value: bytes, pos = 0):
    n = 0
    while True:
        data = value[pos]
        pos += 1
        n = (n << 7) | (data & 0x7f) # 1111111
        if data & 0x80 == 0:
            return (n, pos)
        n += 1

def txout_decompress(x):
    # x = 0  OR  x = 1+10*(9*n + d - 1) + e  OR  x = 1+10*(n - 1) + 9
    if x == 0:
        return 0
    x -=1
    # x = 10*(9*n + d - 1) + e
    e = x % 10
    x /= 10
    n = 0
    if e < 9:
        # x = 9*n + d - 1
        d = (x % 9) + 1
        x /= 9
        # x = n
        n = x*10 + d
    else:
        n = x+1
    while e:
        n *= 10
        e -= 1
    return n
...
def getChainstateData(txn_hash_big_endian: bytes, out_index: int):
    key = b'C' + txn_hash_big_endian + b128_varint_encode(out_index)
    value = chainstate_db.get(key)
    value = applyObfuscationKey(value)
    code, pos = b128_varint_decode(value)
    height = code >> 1
    coinbase = code & 0x01
    print('height = %d, coinbase = %r' % (height, coinbase))
    decoded_varint_amount, pos = b128_varint_decode(value, pos)
    amount = txout_decompress(decoded_varint_amount)
    print('amount = %d' % amount)
if __name__ == '__main__':
    getChainstateData(binascii.unhexlify('0060c16adcf98e70c1d9e8c971ad9f27d3363394993156691ec9f3a46c4c4a4d'), 1822)

I get below result:
    height = 355833, coinbase = 0
    amount = 12353

When I do getrawtransaction in bitcoin core daemon I get amount as 12200.

./bitcoin-cli getrawtransaction 4d4a4c6ca4f3c91e69563199943336d3279fad71c9e8d9c1708ef9dc6ac16000 true

For out index 1822 I get:

{
      "value": 0.00012200,
      "n": 1822,
      "scriptPubKey": {
        "asm": "OP_DUP OP_HASH160 c40c4870c3874cafb3385dca3731d637ac51110d OP_EQUALVERIFY OP_CHECKSIG",
        "hex": "76a914c40c4870c3874cafb3385dca3731d637ac51110d88ac",
        "reqSigs": 1,
        "type": "pubkeyhash",
        "addresses": [
          "1JscA3193KByPvFv4X6nNEV2SGjdXVcVq6"
        ]
      }
    },

So there must be problem with code which I am not able to figure out. I think problem is in

  txout_decompress(x)

method. But this is strange because I have directly used method in bitcoin core

  uint64_t DecompressAmount(uint64_t x)

in

  src/compressor.cpp

after converting this to python.
Please help me solve this issue.

After investigating I found the x in txout_decompress(x) was not an integer which was causing the difference in answer so during division I typecast it to int and it worked. So the corrected code:

def amount_decompress(x: int):
    # x = 0  OR  x = 1+10*(9*n + d - 1) + e  OR  x = 1+10*(n - 1) + 9
    if x == 0:
        return 0
    x -=1
    # x = 10*(9*n + d - 1) + e
    e = x % 10
    x = int(x / 10)
    n = 0
    if e < 9:
        # x = 9*n + d - 1
        d = (x % 9) + 1
        x = int(x / 9)
        # x = n
        n = x*10 + d
    else:
        n = x+1
    while e:
        n *= 10
        e -= 1
    return n


How does a miner’s pubkey get passed into miner.cpp? I understand that a miner using an application like pooler’s cpuminer can set a Coinbase-txn address where new coins that are generated to. I’m trying to override this setting in the code of the core client for an academic project to demonstrate bitcoin’s consensus mechanism. When I try to set a fixed address in the core client, the miner is still being paid out to the address they set rather than the hardcoded one in the miner.cpp file

How does the address get sent for a miner’s Coinbase transaction payout? Having some insight into where the logic is would allow me to further try and troubleshoot my project.

Thank you

Bitcoin Core does not set the payout address. It can only do that when you use the internal miner (i.e. use the generatetoaddress command, but only on regtest). Otherwise, external mining software sets the address. This is because Bitcoin Core does not just send a complete block that the mining software just works on.

Rather, those mining software use the getblocktemplate RPC which returns a block template. This template does not include a coinbase transaction. It just includes information necessary to construct the coinbase (such as amounts) as well as the transaction data to include in the block. But it is not a block itself and the external miner still has to construct their own coinbase transaction and block given the information in the block template.

So Bitcoin Core cannot force an external mining software to use a particular output script in the coinbase transaction. You have to configure your mining software to do that.


Is Ethereum essentially Bitcoin with Turing-complete Script? Is Ethereum essentially Bitcoin with a Turing-complete scripting language and, if I understand correctly, where the script to be executed (not its hash) is placed in the Ethereum blockchain?

If so, why doesn't Ethereum just put hashes of its scripts in the Bitcoin blockchain, send the scripts to be executed through another secure means such as via a P2P network (which would greatly reduce blockchain bloat), and avoid being an altcoin altogether?
If not, is the gas limit the real distinguishing feature of Ethereum compared to Bitcoin? Or is gas really Ethereum's equivalent of Bitcoin's transaction fees? Also, would Ethereum's adoption of proof-of-stake further differentiate Ethereum from Bitcon?

cf. Ethereum's white paper
(cf. the related BitcoinTalk.org thread)

Is Ethereum essentially Bitcoin with a Turing-complete scripting language and, if I understand correctly, where the script to be executed (not its hash) is placed in the Ethereum blockchain?

That's a bit of a simplification, (Ethereum has other improvements like GHOST) but for our purposes (discussing how a Turing complete scripting language could be implemented) it's essentially accurate.

  If so, why doesn't Ethereum just put hashes of its scripts in the Bitcoin blockchain, send the scripts to be executed through another secure means such as via a P2P network (which would greatly reduce blockchain bloat), and avoid being an altcoin altogether?

One of the important features of Ethereum is that you can condition spending funds on the output of a script. For example, you could write a lottery script that accepts money from a bunch of different people, and randomly sends all of the money to the winner. Imagine that we change this system so that only the hash of the script is included in the blockchain:

If it's not a consensus rule, then other nodes will accept a transaction that doesn't satisfy the attached script. In other words, if nodes can't see the entire script, how can a node know whether someone claiming the lottery winnings is actually authorized to do that?
If it is a consensus rule, that introduces a new set of problems. First, in order to tell if a block is valid, you need to download the scripts from the P2P network, and check that all of the scripts are valid. That increases the amount of time it takes to verify blocks, and therefore increases the amount of orphan blocks.

The second problem that this introduces is that full nodes synchronizing for the first time need these scripts, or they won't be able to check that the blocks are valid. Therefore, the scripts need to be stored indefinitely, in case new nodes join the network.

This doesn't really solve the blockchain bloat - it just moves the problem around.

There's one more solution that does use the Bitcoin blockchain, though. You could follow Counterparty's example, and create a system where you send a Bitcoin transaction with additional metadata to identify it as a colored coin. You don't change transaction validity rules on the main network; rather, you say that if the transaction doesn't follow certain rules, then it is not a valid TuringCoin transaction for the purpose of establishing ownership of TuringCoins. (Other TuringCoin transactions within the same block would still be valid, though.)

That's not an altcoin in the traditional sense (you're using Bitcoin's blockchain, and you must pay Bitcoin transaction fees) but it is an altcoin in the sense that you're creating your own token that isn't fungible with Bitcoin.

  If not, is the gas limit the real distinguishing feature of Ethereum compared to Bitcoin?

The gas limit in Ethereum is present for essentially the same reason that people have proposed making transactions in Bitcoin larger than 100KB invalid: otherwise, it becomes possible to create a block that takes a really long time to validate.


Bitcoins mysteriously transferred out of my wallet? I started mining bitcoins a few months ago, picked up a couple ASIC miners and have had my computer using them. I've been mining using Slush pool. I had my settings set to send bitcoins to my address when I reached 0.1 bitcoins.

I finally reached that yesterday, and Slush sent me my 0.1 (actually, it sent 0.1000341, because I was slightly above). The transaction can be seen as the second transaction on this page: https://blockchain.info/address/1LxLWPmzh3uMCmTwterHoFkrQagsFoF3Wm

Now, that was great, I now have 0.1 bitcoins! Then, when I got home from work today, I checked my bitcoin wallet and I noticed that it said I have 0 bitcoins! I checked the transactions, and there's a second one listed. The second one listed is for the exact amount I just received, with a transaction date/time of "28 Feb 2014 01:49", just under 8 hours after I received the bitcoins. (transaction listed at the top of the link posted above)

Does anyone know what happened? Did someone break into my wallet? Wouldn't they need my private key and my password to do that? Is there something else going on that I don't know about?

Did someone break into my wallet?

If you were using standard bitcoin client -- then yes. If some online wallet like blockchain.info -- anything could have happened.

  Wouldn't they need my private key and my password to do that?

The only thing needed to transfer coins is private key.


Is anyone taking advantage of different prices across exchanges? Say I have funds on two exchanges. Whenever the price of bitcoin is higher on the first one, I sell on that one and buy on the other one.

Is anyone doing this or has a program that does this? Is it even possible?

This is possible and many people do it, but the loop can be significantly delayed by the time it takes to transfer fiat between exchanges. There may be automation software out there, but it is likely closely guarded by those who employ it. There is still the manual step of coordinating fiat movement.


Where is the documentation for Testnet 5? I've seen references to a Testnet 5 or Testnet5. The last Testnet version I know about was Testnet 3, started in late 2012 by Bitcoin Core 0.7.0.

This raises two questions:

Where is the documentation for Testnet 5? In particular I'm wondering about chain parameters. I'd also like to know when it started and what its purpose is.
What happened to Testnet 4?

I'd assumed it was testnet5 because segnet (the segwit development testnet) was regarded as the 4th testnet.  It's not strictly true though, as Bitcoin Unlimited has the nol testnet (NO Limit) and very probably there are or were other experimental testnets that I don't know about.

There's a bit of a history of skipping numbers like this: there was no testnet that was ever called testnet2 - the first two testnets were just called 'testnet' - but testnet3 was nonetheless so named - skipping the name testnet2 - because it was the 3rd testnet.  (And testnet3 is still the main testnet for Bitcoin.)

EDIT TO ADD: Incidentally, the reason why we're on the third (mainstream) Bitcoin testnet is that people started to actually trade testnet coins as an altcoin, so the developers made good on their threat to reset the testnet (with a new genesis block) to help enforce the priciple that testnet coins should have no value.


How do I get my Bitcoin Cash from my Blockchain.info wallet? I am pretty much a Bitcoin novice. Bought some a few years ago, they went into my Blockchain.info wallet and I only checked it again a few days ago. It says I can get the same amount of Bitcoin Cash as I had in actual Bitcoins. It's not very clear whether this will do anything to my Bitcoin value or whether it just gives you a load of Bitcoin cash too. I don't want to do anything to risk my Bitcoins obviously. What do I need to do to "download" my Bitcoin Cash to my Bitcoin wallet? Should I send my Bitcoins to a new Blockchain.info wallet to keep them safe while I get the Bitcoin Cash?

Bitcoin cash is a cryptocurrency like bitcoin, but it exists on its own separate network. So moving the bch coins will not affect your btc balance, but there are some safety considerations. If Blockchain.info has an option to 'withdraw bch' now, then you can easily send your bch to an exchange like Shapeshift, and change them into btc.

If there is not an easy 'withdraw' option, then you will need to:

move your btc to a new wallet first
get your recovery seed phrase from the blockchain.info wallet
install some bch wallet software, and input your seed phrase into it
this will generate the bch wallet that holds your funds, you can now send them to an exchange, or whatever

If you search, there are some comprehensive guides available with more info on splitting your bch.


Where can I query the UTXO database? Currently there are 35 million unspent transaction outputs. Is there a site somewhere where I can query this data to see, for instance, how many UTXO's exist with a value less than 20,000 satoshis? Or the total unique scriptPubKey values found in a  UTXOs?

The standard bitcoind core daemon has no methods to query the UTXO set for reasons I don't know: it should be trivial to give access to it even on a pruned node since it needs to have the full UTXO set at any time to validate a new block.

Anyway a pull request seems in progress to add this capability:
https://github.com/bitcoin/bitcoin/pull/8952

There are anyway third party apis to query a single address, for example https://www.blockcypher.com/dev/ or https://chain.so/api


Is there any tool available that can tell me the balance of bitcoin address on specific date? Is there any tool available that can tell me the balance of bitcoin address on specific date?

Like, what was the balance of 1XXXXXX on Jan 1st 2016?

Looked up insight: seems not available.