Author

Topic: What is a Bitcoin soft fork? (in laymen's terms) (Read 1756 times)

member
Activity: 114
Merit: 12
February 06, 2015, 09:06:50 AM
#14
https://bitcoin.org/en/developer-guide#consensus-rule-changes 

bitcoin.org documentation explains it quite nicely.

I am also writing up a blog post Soon^TM to rephrase and give some history.
jr. member
Activity: 54
Merit: 1
Thanks.
legendary
Activity: 1792
Merit: 1111

You could edit the maximum allowed block size in the code. Change it to 100 KB and it'll be a soft fork, change it to 100 MB and it'll be a hard fork.

Good example.

Changing the max block size from 1MB to 0.1MB is a softfork, because it makes previously valid blocks (0.1MB-1MB) invalid.

I think changing the max block size from 1MB to 0.1MB is a hard fork, actually. Miners that don't upgrade will generate one 1MB and those won't be accepted but the upgraded clients, forking the blockchain.

A soft fork would be changing the max block size one produces from 1MB to 0.1MB, while leaving the max block size one accepts unchanged.

Or am I wrong? #sincerequestion

People are ALREADY doing this and as johoe explains this is not a fork. A fork, soft or hard, must involve a rule change in the validity of transactions/blocks.
full member
Activity: 217
Merit: 259
Changing the max block size from 1MB to 0.1MB is a softfork, because it makes previously valid blocks (0.1MB-1MB) invalid.

I think changing the max block size from 1MB to 0.1MB is a hard fork, actually. Miners that don't upgrade will generate one 1MB and those won't be accepted but the upgraded clients, forking the blockchain.

A soft fork would be changing the max block size one produces from 1MB to 0.1MB, while leaving the max block size one accepts unchanged.

Or am I wrong? #sincerequestion

Sorry, but you are wrong.  Changing max block size to 0.1MB is a soft fork.  A soft fork only works if the majority of miners agree, in which case all miners accept the shorter blocks and the minority that produces larger blocks will be ignored.  If you do a soft fork only yourself, you are on a short chain and the longest chain will still contain large blocks.  It is similar to a hard fork where you are the only one who hasn't upgraded.

Changing the max block size you produce from 1MB to 0.1MB is not a fork at all.  You still accept the large blocks of other miners and other miners will accept your block.
member
Activity: 93
Merit: 10
Soft fork is just a bypass. Such fork is needed but doesn't harm the network.
jr. member
Activity: 54
Merit: 1

You could edit the maximum allowed block size in the code. Change it to 100 KB and it'll be a soft fork, change it to 100 MB and it'll be a hard fork.

Good example.

Changing the max block size from 1MB to 0.1MB is a softfork, because it makes previously valid blocks (0.1MB-1MB) invalid.

I think changing the max block size from 1MB to 0.1MB is a hard fork, actually. Miners that don't upgrade will generate one 1MB and those won't be accepted but the upgraded clients, forking the blockchain.

A soft fork would be changing the max block size one produces from 1MB to 0.1MB, while leaving the max block size one accepts unchanged.

Or am I wrong? #sincerequestion
legendary
Activity: 1792
Merit: 1111

You could edit the maximum allowed block size in the code. Change it to 100 KB and it'll be a soft fork, change it to 100 MB and it'll be a hard fork.

Good example.

Changing the max block size from 1MB to 0.1MB is a softfork, because it makes previously valid blocks (0.1MB-1MB) invalid.

Changing the max block size from 1MB to 10MB is a hardfork, because it makes previously invalid blocks (1MB-10MB) valid.
hero member
Activity: 728
Merit: 500
Some comparisons:

Hardfork is making some invalid transactions valid

Softfork is making some valid transactions invalid

Hardfork requires the consensus of vast majority of miners, users, and merchants

Softfork requires the consensus of vast majority of miners, but not necessarily non-mining users and merchants

Hardfork can change any rules in the protocol or implement any new rules

Softfork is usually less powerful (with a trick which I call "Aux block", a softfork could also be very powerful: https://bitcointalksearch.org/topic/auxiliary-block-increasing-max-block-size-with-softfork-283746)


Thank you for the comparison! This was very helpful.

Are a hard fork and soft fork implemented in different ways? Like are you editing the same code in both fork types?

Every change requires editing the code. What you change to the code will determine whether the new version will force a soft fork, a hard fork or no fork at all.

You could edit the maximum allowed block size in the code. Change it to 100 KB and it'll be a soft fork, change it to 100 MB and it'll be a hard fork.
hero member
Activity: 907
Merit: 1003
Some comparisons:

Hardfork is making some invalid transactions valid

Softfork is making some valid transactions invalid

Hardfork requires the consensus of vast majority of miners, users, and merchants

Softfork requires the consensus of vast majority of miners, but not necessarily non-mining users and merchants

Hardfork can change any rules in the protocol or implement any new rules

Softfork is usually less powerful (with a trick which I call "Aux block", a softfork could also be very powerful: https://bitcointalksearch.org/topic/auxiliary-block-increasing-max-block-size-with-softfork-283746)


Thank you for the comparison! This was very helpful.

Are a hard fork and soft fork implemented in different ways? Like are you editing the same code in both fork types?
hero member
Activity: 907
Merit: 1003
Hi, I was wondering if anyone can describe what a soft fork is and how it is implemented, in a very easy-to-understand way?
I know what a hard fork is. That's where you modify the source code and get more than 50% of the nodes to adopt it.
This is incorrect in that a hard fork with just 50% is a system failure, the network would split... and coins could be spent twice (on each new network). A working hardfork needs an overwhelming support of ~all the participants, and everyone else just isn't a participant anymore.
Yes, of course. I did say "more than 50%", not "just 50%". And yes, considerably more than 50% is best/important.


Quote
How does this differ from a soft fork? Does a soft fork require modifying the bitcoin source code, or only the clients?
I'm not sure what you think is the difference between "the bitcoin source code, or only the clients". Bitcoin clients are the network, and they're all software.
A soft fork is a change to the rules enforced in the blockchain which is a strict narrowing. Nothing previously invalid becomes permitted, but blocks/transactions which were previously valid may be denied. This is more powerful than you might guess at first blush because Bitcoin was designed to be forward extendable and there are many conditions where you can create transactions which say "do nothing, anyone can spend" but a later soft-fork can carve a new feature out of that. E.g. a whole new script system can be introduced in this way (and we more or less did with BIP16), it just has to look like "anyone can spend" to old nodes.

Think those 'anyone can spend' parts as blocks of marble where new features can be chiseled out of them.

Thanks. A soft fork is quite a concept to grasp for a new person.
legendary
Activity: 1792
Merit: 1111
Some comparisons:

Hardfork is making some invalid transactions valid

Softfork is making some valid transactions invalid

Hardfork requires the consensus of vast majority of miners, users, and merchants

Softfork requires the consensus of vast majority of miners, but not necessarily non-mining users and merchants

Hardfork can change any rules in the protocol or implement any new rules

Softfork is usually less powerful (with a trick which I call "Aux block", a softfork could also be very powerful: https://bitcointalksearch.org/topic/auxiliary-block-increasing-max-block-size-with-softfork-283746)

staff
Activity: 4284
Merit: 8808
Hi, I was wondering if anyone can describe what a soft fork is and how it is implemented, in a very easy-to-understand way?
I know what a hard fork is. That's where you modify the source code and get more than 50% of the nodes to adopt it.
This is incorrect in that a hard fork with just 50% is a system failure, the network would split... and coins could be spent twice (on each new network). A working hardfork needs an overwhelming support of ~all the participants, and everyone else just isn't a participant anymore.

Quote
How does this differ from a soft fork? Does a soft fork require modifying the bitcoin source code, or only the clients?
I'm not sure what you think is the difference between "the bitcoin source code, or only the clients". Bitcoin clients are the network, and they're all software.


A soft fork is a change to the rules enforced in the blockchain which is a strict narrowing. Nothing previously invalid becomes permitted, but blocks/transactions which were previously valid may be denied. This is more powerful than you might guess at first blush because Bitcoin was designed to be forward extendable and there are many conditions where you can create transactions which say "do nothing, anyone can spend" but a later soft-fork can carve a new feature out of that. E.g. a whole new script system can be introduced in this way (and we more or less did with BIP16), it just has to look like "anyone can spend" to old nodes.

Think those 'anyone can spend' parts as blocks of marble where new features can be chiseled out of them.
legendary
Activity: 1512
Merit: 1012
Soft forks are used to restrict block rules, so to speak... Smiley This is better explained here https://en.bitcoin.it/wiki/Softfork and here http://bitcoin.stackexchange.com/questions/30817/what-is-a-soft-fork Smiley
hero member
Activity: 907
Merit: 1003
Hi, I was wondering if anyone can describe what a soft fork is and how it is implemented, in a very easy-to-understand way?

I know what a hard fork is. That's where you modify the source code and get more than 50% of the nodes to adopt it. Usually the code is set to begin running at a particular block number.

How does this differ from a soft fork?

I found the wikipedia entry but didn't quite grasp it.

Adam Back and Gregory Maxwell (gmaxwell) are talking about it in this fairly technical video about side chains and I want to understand what he's talking about.

Jump to: