Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Godwans on January 12, 2018, 01:00:53 AM



Title: Exactly How Do you Fork a Blockchain?
Post by: Godwans on January 12, 2018, 01:00:53 AM
As the title suggests, how do you fork any blockchain?
Just kinna wondering.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: achow101 on January 12, 2018, 01:14:42 AM
You make a block that follows different consensus rules and is consensus incompatible with the current blockchain such that it will be rejected by nodes not running your software.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: bakerlisa510 on January 12, 2018, 07:30:42 AM
What do you mean to say by Forking Blockchain? You want to create a new system like blockchain or you want to make a replica of blockchain and split it with your own modifications.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Tonyfredzy on January 12, 2018, 12:05:04 PM
As the title suggests, how do you fork any blockchain?
Just kinna wondering.

Makes the two of us, But I guess you meant how new products are formed off the blockchain?

I'm following this thread for more responses to this topic.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Anti-Cen on January 12, 2018, 12:40:23 PM
You pick a block number and when the block is mined you take a snapshot of the block-chain
and then download the latest Bitcoin code from Github and make a few tweaks to the code to increase the
block-size and make changes to the block type.

Then you need 20 or so machines to host the new code (Not 20,000 like we have now)
and to make a few changes to the wallet software and away you go.

80% of the code is concerned with mining and is not for the benefit of the users
but it all like taking a copy of MS-DOS 3.2 and tweaking it to make Silly-Dos
because the whole thing is outdated and won't scale but it is a starting point
so good look to Segwit2x, Bitcoin Cash, Bitcoin Gold because they don't have
crazy high transaction costs like Bitcoin and maybe the development team is
on our side

Anyway if block chain is so good then how come lightning is being sold
on taking things off the block because they seem to me a contradiction
here and they are not being clear about the hubs that charge fees being
just another name for mini-banks

https://www.youtube.com/watch?v=UYHFrf5ci_g


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: HeRetiK on January 12, 2018, 02:12:00 PM
You pick a block number and when the block is mined you take a snapshot of the block-chain
and then download the latest Bitcoin code from Github and make a few tweaks to the code to increase the
block-size and make changes to the block type. [...]

That would be merely an airdrop, the answer by achow101 is the correct one.

While one may argue that the result is mostly the same, hardforks are still usually deployed by having nodes follow the canonical Bitcoin consensus until a certain block is reached, after which a protocol change and subsequently the hardfork is triggered. Sometimes successfully, such as was the case with BCH despite a slow startup, sometimes not so successfully, as was the case with B2X that stopped working due to a bug in the forking logic.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Carlton Banks on January 12, 2018, 04:43:47 PM
For the fork to exist, you need at least 1 forked block to exist. For that, you also need the hashpower to mine at least 1 block on the new fork. Arbitrarily lowering the block difficulty would only work once the new consensus rules are established; those rules cannot be established for a chain fork that doesn't yet exist.


For blockchain networks with low block solution difficulty, mining one hardfork block is not a problem. To hardfork Bitcoin at it's current difficulty, that's a considerable infrastructure investment (hashpower, location, electricity outlay etc).


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Anti-Cen on January 12, 2018, 06:35:10 PM

That would be merely an airdrop, the answer by achow101 is the correct one.

While one may argue that the result is mostly the same, hardforks are still usually deployed by having nodes follow the canonical Bitcoin consensus until a certain block is reached, after which a protocol change and subsequently the hardfork is triggered. Sometimes successfully, such as was the case with BCH despite a slow startup, sometimes not so successfully, as was the case with B2X that stopped working due to a bug in the forking logic.

The question was about forks and did not mention hard forks and
so far as I understand things Segwit2x used this process and is called
a fork in most articles that I read and the dev teams seems to be very
pro-active in fixing some of the problems with the code that they have
copied.

Indeed B2X could be a pump and dump for all I know but I have not come
across news of this "bug in the forking logic" that you mentioned so maybe
you can provide a link please.

Looks to me that B2X fork is still going ahead on the 15th
https://bitscreener.com/coins/segwit2x
I will be happy to receive these air-drop coins and Bitcoin Gold if Coinbase
gets it's act sorted out and gives me what they own me so that I can play
without having to give miners $25 just for sending a $1 test coin to me wallet.

We should carry on our debate about hubs being mini banks in the lightning
network and yes I know, Segwit2x is going to use LN too which is a big cross
against them as is trying to bolt on "Smart Contracts" but we will see.





Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Anti-Cen on January 12, 2018, 07:10:39 PM
For blockchain networks with low block solution difficulty, mining one hardfork block is not a problem. To hardfork Bitcoin at it's current difficulty, that's a considerable infrastructure investment (hashpower, location, electricity outlay etc).

Yes it's a pointless CPU-War between miners that keeps Intel and big oil happy but no one else and
the joke is some of the 20,000 miners could be earning a honest living by helping Bitcoin to scale and
keeping everything on the block-chain by using block-matrix instead of using a sticking plaster like
Lightning.

if Block-chain is so good then why is the new buzz word "off-block"


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: haltingprobability on January 12, 2018, 07:27:35 PM
As the title suggests, how do you fork any blockchain?
Just kinna wondering.

First, bring it to 350 degrees. Bake for 6 to 8 hours, basting regularly to prevent drying out. Fork it gently to determine cookedness and remove it when it has become tender. A thermometer can help ensure that it has been thoroughly cooked.

 :P


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: cr1776 on January 12, 2018, 07:31:31 PM
As the title suggests, how do you fork any blockchain?
Just kinna wondering.

It really depends on exactly what you are asking.   achow has a correct answer.

1. Do you mean just cause a fork in the block chain?  Look at achow's answer.
2. Do you mean fork the software?  You go to GitHub, and fork it there, then make changes to it so that it is incompatible with the software from which it was forked.
3. Do you mean fork the software and fork a current block chain so that it will remain incompatible with the original but keep the history up to that point?  Look at anti-cen's 1st response.
4. The question as to whether you mean a hard fork or soft fork further muddies the waters.  

The answer really depends on what precisely you were asking.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: HeRetiK on January 12, 2018, 09:00:42 PM
It really depends on exactly what you are asking.   achow has a correct answer.

1. Do you mean just cause a fork in the block chain?  Look at achow's answer.
2. Do you mean fork the software?  You go to GitHub, and fork it there, then make changes to it so that it is incompatible with the software from which it was forked.
3. Do you mean fork the software and fork a current block chain so that it will remain incompatible with the original but keep the history up to that point?  Look at anti-cen's 1st response.
4. The question as to whether you mean a hard fork or soft fork further muddies the waters.  

The answer really depends on what precisely you were asking.


It's safe to assume that OP is referring to hardforks though, as all Bitcoin hardforks were code forks but not all code forks lead to hard forks (LTC for example). Snapshotting / airdropping is a valid distribution scheme, but nonetheless something different from a hard fork.

Soft forks weren't mentioned and are something completely different still. Soft forks lead to neither a blockchain split nor to a new a currency.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Anti-Cen on January 12, 2018, 11:43:09 PM
It's safe to assume that OP is referring to hardforks though

Is it ? so why is that unless you only hear what you want to hear.

Segwit2x that kicks into gear in two days time does not fit this definition and the term airdrop
is not one everyone understands and I hope B2X keeps going down and will let you know if/when
I stake my claim from this free gift and if it does look like a scam then I will be the first to call
them out.


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: alani123 on January 12, 2018, 11:46:32 PM
Mining power is needed to support the mining of a block that will split off of the main chain I order due to different consensus. Forking bircoin has been a trend recently after Bitcoin cash set the base with it's now tested code. Many are now forking the code of the fork. Forkception.  :D


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Godwans on January 13, 2018, 02:18:57 AM
You pick a block number and when the block is mined you take a snapshot of the block-chain
and then download the latest Bitcoin code from Github and make a few tweaks to the code to increase the
block-size and make changes to the block type.

Then you need 20 or so machines to host the new code (Not 20,000 like we have now)
and to make a few changes to the wallet software and away you go.

80% of the code is concerned with mining and is not for the benefit of the users
but it all like taking a copy of MS-DOS 3.2 and tweaking it to make Silly-Dos
because the whole thing is outdated and won't scale but it is a starting point
so good look to Segwit2x, Bitcoin Cash, Bitcoin Gold because they don't have
crazy high transaction costs like Bitcoin and maybe the development team is
on our side

Anyway if block chain is so good then how come lightning is being sold
on taking things off the block because they seem to me a contradiction
here and they are not being clear about the hubs that charge fees being
just another name for mini-banks

https://www.youtube.com/watch?v=UYHFrf5ci_g


Thanks very much for your answer


Title: Re: Exactly How Do you Fork a Blockchain?
Post by: Godwans on January 13, 2018, 02:23:37 AM
It's safe to assume that OP is referring to hardforks though

Is it ? so why is that unless you only hear what you want to hear.

Segwit2x that kicks into gear in two days time does not fit this definition and the term airdrop
is not one everyone understands and I hope B2X keeps going down and will let you know if/when
I stake my claim from this free gift and if it does look like a scam then I will be the first to call
them out.

Yea, hardfork