News for hackers. Stuff that matters.
Re:El Salvador adopts Bitcoin as official currency, first co... by bethecloud on Tuesday September 07, 2021 @12:19PM (#28446570)
Nope. Bitcoin use and mining power are completely uncorrelated. By mining bitcoins, your earn as much as the computational fraction you are representing. So, indeed, there was a race to more and more mining power in the recent years but it can completely be reversed. For example if electricity prices rises.

Bitcoin could be used by the whole world with mining only happening on a laptop. That would not change anything for Bitcoin users.

Re:El Salvador adopts Bitcoin as official currency, first co... by simiones on Tuesday September 07, 2021 @12:31PM (#28446713)
> Bitcoin could be used by the whole world with mining only happening on a laptop. That would not change anything for Bitcoin users.

No, that is completely inaccurate.

First of all, with current parameters that would mean that you need a good few hundred years to process a few seconds of world-wide transactions.

And if the parameters were adjusted such that it would be that easy to mine blocks, bitcoin would become valueless, as everyone with a laptop could produce their own longest blockchain where they have half of all bitcoin.

Proof of work systems will always require absurd wastes of energy - that is, by definition, the only way they ensure the correctness of the blockchain.

Re:El Salvador adopts Bitcoin as official currency, first co... by solveit on Tuesday September 07, 2021 @12:41PM (#28446869)
So, you're correct, but the previous poster did that thing we so often do where we go too far to make a correct point.

In this case, the correct point is that the waste of energy is to ensure the security of the blockchain (as you correctly pointed out), and not to process transactions. The marginal cost of processing another transaction is completely negligible compared to the cost of securing the blockchain, and so naive comparisons saying that a single transaction uses as much energy as XXX where XXX is the total energy cost divided by the number of transactions is misguided. You could send a million more transactions and the energy cost wouldn't budge.

Of course, the overreach is in the part where they said a single laptop could run all of Bitcoin. Marginal transactions are cheap, but not that cheap, and a single laptop couldn't secure shit. (Again, all as you correctly pointed out. I just wanted to clarify where everyone was coming from for readers who aren't familiar with how Bitcoin works.)

Re:El Salvador adopts Bitcoin as official currency, first co... by lottin on Tuesday September 07, 2021 @02:43PM (#28448345)
What? Securing the blockchain and processing transactions is the same thing. What do you think "securing the blockchain" entails other than processing transactions?
Re:El Salvador adopts Bitcoin as official currency, first co... by topranks on Wednesday September 08, 2021 @01:12PM (#28460078)
The point is the number of transactions in a block could vary, and not require additional hashpower.

Obviously it's limited now by the blocksize (let's not go there). But the point is the "per transaction" figure is based on the currently imposed limits.

Re:El Salvador adopts Bitcoin as official currency, first co... by lottin on Wednesday September 08, 2021 @05:15PM (#28463155)
Okay, but this has nothing to do with the fact that miners do one job, and this job is processing transactions. They don't have another job that consists in "securing the network", in addition to processing transactions. Therefore the entirety of the energy spent by miners is spent processing transactions.
Re:El Salvador adopts Bitcoin as official currency, first co... by xur17 on Tuesday September 07, 2021 @12:39PM (#28446831)
> No, that is completely inaccurate.

> First of all, with current parameters that would mean that you need a good few hundred years to process a few seconds of world-wide transactions.

If you settle everything onchain, maybe (I haven't done the math on this, so I honestly don't know), but storing every transaction for a cup of coffee in a datastore that persists across tens of thousands of computers for the rest of time is absurd.

Long term Bitcoin layer 1 (onchain) is likely to be the settlement layer for large transactions, and other layers (lightning network, etc) will be used for every day activities like buying coffee, sending funds to a friend, etc.

Re:El Salvador adopts Bitcoin as official currency, first co... by simiones on Tuesday September 07, 2021 @01:19PM (#28447306)
But the total amount of data stored in the Lightning network is even more absurd. Not only do we store "A has paid B 1 SAT" for all time, we actually store "A is paying C 1SAT for B; C is paying D 1SAT for B; E is paying F 1SAT for B; F is paying B 1SAT".
Re:El Salvador adopts Bitcoin as official currency, first co... by datadata on Tuesday September 07, 2021 @02:26PM (#28448113)
The transactions within an open channel are only stored by the two owners of the channel. The entire network does not need to store, nor does it even get to see these transactions. They can even be private. When the channel is closed none of the channel transactions need to be committed to the blockchain, only the final balances of the channel between the two participants.

A lightning channel does require an onchain bitcoin transaction both to be opened and closed, but while open it supports unlimited transactions within the channel while it is open without increasing the onchain storage burden on the network validation nodes further beyond the two transactions to open and close the channel.

Re:El Salvador adopts Bitcoin as official currency, first co... by modo_mario on Wednesday September 08, 2021 @06:27AM (#28455227)
I'm a layman when it comes to this but doesn't that mean the amount of "channels" is still severely limited? Someone mentioned 220million transactions annually. Even if those channels only open and close the balance once a year that's very little it seems.

Or can there be more than 2 owners of a channel?

Re:El Salvador adopts Bitcoin as official currency, first co... by SamPatt on Tuesday September 07, 2021 @01:55PM (#28447723)
Not everyone is forced to store it though.

You don't need consensus about the state of the entire network on layer 2 like you do on layer 1.

So it's not really a problem.

Re:El Salvador adopts Bitcoin as official currency, first co... by xur17 on Tuesday September 07, 2021 @02:21PM (#28448046)
More specifically, only the channel participants have to store it, and only as long as the channel is open.
Re:El Salvador adopts Bitcoin as official currency, first co... by Tenoke on Tuesday September 07, 2021 @12:35PM (#28446780)
A laptop is an exaggeration but the general point that if you reduce the hashrate say 10fold you'll still be processing exactly the same amount of transactions (after the difficulty adjusts at least) is true.
Re:El Salvador adopts Bitcoin as official currency, first co... by ajkdhcb2 on Tuesday September 07, 2021 @12:38PM (#28446821)
>First of all, with current parameters that would mean that you need a good few hundred years to process a few seconds of world-wide transactions.

Completely wrong. Go run a testnet yourself and you will see.

>And if the parameters were adjusted such that it would be that easy to mine blocks, bitcoin would become valueless, as everyone with a laptop could produce their own longest blockchain where they have half of all bitcoin.

The difficulty adjusts automatically. The energy usage comes only from the competition aspect - people are competing to earn blocks. You are lacking basic understanding of how PoW functions.

Re:El Salvador adopts Bitcoin as official currency, first co... by simiones on Tuesday September 07, 2021 @12:52PM (#28446989)
> Completely wrong. Go run a testnet yourself and you will see.

If you imagine that a laptop has enough hashrate to mine all the world's transactions in realtime, then how do you explain to yourself that the actual Bitcoin network is only able to add a few hundred transactions per second to the chain?

> The difficulty adjusts automatically. The energy usage comes only from the competition aspect - people are competing to earn blocks. You are lacking basic understanding of how PoW functions.

PoW works because miners have to invest significant resources in building and maintaining their mining rigs. As such, no one who wins the race to add a new block will want that block to contain false transactions, as that would bring down the value of the currency and leave them with extremely expensive mining equipment that is useless (once the deception would be noticed by others).

If the bitcoin network was run on 3 laptops, I could buy 100 laptops and start advertising my own blockchain which reverts the entire previous blockchain and replaces it with transactions I like. Since I can mine many more blocks with my 100 laptops, I can create a longer chain, so all clients will accept my chain and discard the old one, reverting all transactions that ever happened.

Instead, if I wanted to mount such an attack on the actual bitcoin network today, I would have to spend billions of dollars on equipment and electricity - ensuring that I wouldn't want to do so.

Re:El Salvador adopts Bitcoin as official currency, first co... by ajkdhcb2 on Tuesday September 07, 2021 @01:14PM (#28447252)
I am struggling the follow the argument through the comment chain. Energy is used to secure the chain via mining; a secure network is required to be a payment system, but the energy usage is not from processing transactions.

Originally the discussion is about people "using Bitcoin to pay for their McDonalds". Then the commenter erroneously stated, in response to that, that a "bitcoin transaction uses the energy equivalent the entire lifespan of a tree". El Salvador is using the lightning network. These transactions are done off-chain. So the transaction fees do not even go to miners. There can be thousands of McDonalds transactions that occur off-chain and are eventually settled on-chain in one transaction. Processing and validating transactions is very computationally easy. You can indeed do it on a laptop.

Mining blocks is a separate issue. If you ignore the competitive security race, then the network can indeed function on a laptop. Most the mining race that is currently occurring is because people are fighting to win the block reward - this would happen even if nobody were transacting, and someone doing a lightning network transaction has truly negligible effect on that energy usage.

When you said "bitcoin would become valueless, as everyone with a laptop could produce their own longest blockchain where they have half of all bitcoin" this shows you don't understand the process, because the difficulty would rise until people can no longer produce blocks so rapidly. You're describing a situation where miners are not even on the same network so it doesnt make sense

Re:El Salvador adopts Bitcoin as official currency, first co... by simiones on Wednesday September 08, 2021 @05:23AM (#28454869)
This is pretty muddled up.

Let's look at it like this: a block on the blockchain has a maximum size. A transaction has a minimum size. So, each block contains a maximum number of transactions. Miners must waste a certain amount of energy hashing a block to ensure the security of the network (through the incentive mechanisms described above).

So, we can compute a practical energy/block, which translates to an energy/typical transaction.

Now, the block size is a kind of free parameter - the blockchain guarantees wouldn't be significantly different with 1GB blocks instead of 1MB. And that, in turn, would reduce the energy cost per transaction dramatically, and allow the network to process more transactions/second.

Similarly, if there were fewer people putting fewer resources into mining bitcoin, the energy cost/block could go down. This would affect the security of the network though, as it also brings down the cost of a 51% attack.

But miners are opposed to such changes, which have been proposed before. So, in practice, the bitcoin network as it is today has a huge energy cost/mined transaction.

Again, if you don't believe this, you should ask yourself what stops the bitcoin blockchain from processing 1 billion transactions/second instead of the current pitiful ~2 hundred transactions.

Re:El Salvador adopts Bitcoin as official currency, first co... by ajkdhcb2 on Wednesday September 08, 2021 @07:43AM (#28455672)
Do you know what the lightning network is? It changes all of these relationships, and it is key to what we are talking about, but you didnt mention it in this comment.

Separately to the lightning network, the security (hashrate, energy usage) is still not directly linked to the number of on-chain transactions that are processed. You can compute "a practical energy/block" specifically for bitcoin but it does not translate to a meaningful energy/transaction value because the quantity of energy used is not directly caused by transactions. You can have a less-secure blockchain that does many more transactions than bitcoin with low energy usage (altcoins exist) - if these are low value transactions then people won't even be incentivised to attack it. The relationship is NOT just energy/transaction. Your estimated energy/transaction value will keep changing because that's not the relationship; the new coins in the block reward will eventually drop to zero, the value processed by the network will change, the ASIC development situation will change, etc. It's like finding a runner that eats icecream and computing icecream/kilometre.

>Again, if you don't believe this, you should ask yourself what stops the bitcoin blockchain from processing 1 billion transactions/second instead of the current pitiful ~2 hundred transactions.

Nothing is stopping it. Run your own lightning node and you can do more transactions than what you are erroneously claiming

Re:El Salvador adopts Bitcoin as official currency, first co... by simiones on Wednesday September 08, 2021 @12:44PM (#28459636)
What do off-chain transactions like Lightning have to do with the transaction costs of the blockchain itself? We can trade bitcoin over HN comments, that doesn't mean that the bitcoin blockchain is involved in our trade.

The whole discussion is about the Bitcoin blockchain itself. Altcoins, lightning, payment apps etc are all entirely irrelevant to this point.

The bitcoin blockchain as it exists today has a pretty well fixed energy cost per transaction. All sorts of things could change this - changes in the protocol to allow bigger blocks, changes in the hashrate that most miners are willing to invest, changes in mining hardware efficiency etc.

But what you are claiming is like saying that it's meaningless to talk about the gas/mile of a diesel Ford Mustang, since you could always change the engine (block size), or change from gas to another fuel (better ASICs), or choose to ship the car by ferry somewhere(use Lightning instead)!

> You can compute "a practical energy/block" specifically for bitcoin but it does not translate to a meaningful energy/transaction value because the quantity of energy used is not directly caused by transactions.

Why does it matter that "it's not caused by " the number of transactions? As long as the block size is fixed, the number of transactions that can be processed by the existing bitcoin network is directly linked to the energy expenditure of the existing bitcoin network. Other hypothetical versions of the bitcoin network could achieve other energy/transaction thresholds. But the one we have today is extremely wasteful.

> Nothing is stopping it. Run your own lightning node and you can do more transactions than what you are erroneously claiming

"Why can't my car do 600km/h, it can only do 200km/h?" "Nothing is stopping it. Board a maglev train and you can do far more than 200 km/h."

Re:El Salvador adopts Bitcoin as official currency, first co... by ajkdhcb2 on Sunday September 12, 2021 @01:08PM (#28502878)
The block reward will continue to repeatedly halve over time until it reaches zero and dramatically decreases the incentive to mine. That requires no changes.

>"Why can't my car do 600km/h, it can only do 200km/h?" "Nothing is stopping it. Board a maglev train and you can do far more than 200 km/h."

Going by this analogy, you are commenting on an article about maglev trains. The article is about lightning network transactions. So you've gone completely off-topic? Why even talk about "transaction costs of the blockchain itself" if you think lightning transactions arent bitcoin transactions?

>What do off-chain transactions like Lightning have to do with the transaction costs of the blockchain itself?

Facilitating off-chain transactions lowers demand for on-chain transactions. Off-chain transactions arent possible without the underlying blockchain, yet they can fulfill the use-case of small bitcoin transactions. You can't separate the two.

>All sorts of things could change this - changes in the protocol to allow bigger blocks, changes in the hashrate that most miners are willing to invest, changes in mining hardware efficiency etc. But what you are claiming...

Back up the comment chain you were arguing that changing electricity prices etc would not affect the energy usage... I think you have changed what you are arguing about. Previously you disagreed with this:

"Bitcoin use and mining power are completely uncorrelated. By mining bitcoins, your earn as much as the computational fraction you are representing. So, indeed, there was a race to more and more mining power in the recent years but it can completely be reversed. For example if electricity prices rises."

Re:El Salvador adopts Bitcoin as official currency, first co... by topranks on Wednesday September 08, 2021 @01:27PM (#28460299)
I hear where you are coming from.

But changing the blocksize is just a software change. It doesn't require outlay on a "bigger engine", or any new engineering. The "existing bitcoin network" could switch to it with a 1 line change in the code.

So it's not quite the same as some of your examples.

Re:El Salvador adopts Bitcoin as official currency, first co... by simiones on Thursday September 09, 2021 @08:34AM (#28468960)
> just a software change

It's not "just" a software change. It's a huge political and organizational issue. It has been proposed and agreed and disagreed and fought over for many years, with no plausible change in site.

Turns out, changing fundamental limits of a truly distributed system is actually very hard. True, not entirely for engineering reasons, but that makes it even worse - engineering can in principle be solved, people problems can be forever.

https://en.wikipedia.org/wiki/Bitcoin_scalability_problem#Bl...

Re:El Salvador adopts Bitcoin as official currency, first co... by chriswilmer on Tuesday September 07, 2021 @02:51PM (#28448439)
You are correct! The other person is wrong. Transaction volume has almost zero relationship with mining energy usage (there are some very subtle connections, but those nuances are hardly worth getting into for this discussion).
Re:El Salvador adopts Bitcoin as official currency, first co... by wittycardio on Tuesday September 07, 2021 @01:11PM (#28447224)
Please stop you clearly don't understand this at all
Re:El Salvador adopts Bitcoin as official currency, first co... by only_as_i_fall on Tuesday September 07, 2021 @02:38PM (#28448285)
Isn't the security of the blockchain fundamentally tied to the mining difficultly?

I don't see how you could significantly reduce the energy usage without sacrificing security (unless you make structural changes such as moving to POS)

Re:El Salvador adopts Bitcoin as official currency, first co... by topranks on Wednesday September 08, 2021 @01:28PM (#28460317)
You could reduce the energy use per-transaction if the block size limit was increased.

That's not gonna happen at this stage however.

Re:El Salvador adopts Bitcoin as official currency, first co... by geofft on Tuesday September 07, 2021 @12:45PM (#28446919)
That's not how either Bitcoin or electricity pricing works.

Bitcoin is secure only under the assumption that a 51% attack is computationally difficult, i.e., that it is not cheaper to acquire more mining capacity than the non-malicious miners collectively have (whether by creating a conspiracy of existing miners, or by becoming new miners) than to actually pay whatever transaction you're trying to get away with not paying.

This means two things (which are, in a sense, the same thing in two different directions).

First, Bitcoin needs to have a nontrivial fraction of the world's computational power in order to be secure. If mining happens on a laptop, well, I personally own at least two laptops, so I can easily double-spend coins, making the currency worthless. It doesn't have to be 51% of the world's total computational power, but it has to be enough that nobody can easily and cheaply put together enough additional power to mine false chains at a rate that keeps up with the non-malicious miners.

Second, if it were ever the case that secure mining was happening on a single laptop, that would mean that this one laptop represents a huge portion of humanity's computing power, meaning that, first of all, the fair market value of being able to use this laptop would be incredibly high (both because it needs to be high enough that a double-spend attack isn't profitable, and because of simple supply and demand), and second, there would be a separate moral question of why we're using this laptop to mine Bitcoin instead of, say, powering any of the scientific research (like vaccine development) that now has to happen on TI-83s.

It is technically true that Bitcoin could "work" with mining only happening on a laptop (and probably did "work" in this sense when Satoshi was developing it on his personal laptop), but that's like saying that, say, MD5 is a "secure" hash provided the attacker only has pen and paper. True, but that's not what anyone means by "secure."