Bitcoin Forum
November 16, 2024, 11:02:23 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How exactly does hardfork work ? How can I study about it?  (Read 239 times)
cowsgomoo (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 04, 2018, 11:41:56 AM
 #1

apologies first as English is not my first language.

I would really appreciate if anyone could explain the concept of hardfork.

As I understand it, if there is a hardfork with say, bitcoin, everyone who own X amount of

bitcoin gets X amount of hardforked coin as well.

For example, if bitcoin platinum were real, a person who owns 15 bitcoins would've got

15 bitcoin platinums.

But, software engineers who hardforked ended up with tons of them.

For example, litecoin developers ended up with tons of litecoin.

How did this happen? Also, how can I study about the blockchain technology?

And if one hardforks a coin, how do you acquire the mainnet (the network)?
HeRetiK
Legendary
*
Offline Offline

Activity: 3122
Merit: 2178


Playgram - The Telegram Casino


View Profile
March 04, 2018, 01:50:34 PM
 #2

There are (code) forks and hard forks. There are also soft forks, but let's leave these out for a minute.

Code forks happen when someone bases their code on an existing project (eg. Bitcoin) and starts their own project -- or in this case cryptocurrency (eg. Litecoin). Those kind of forks have nothing in common except for parts of the code. No shared transaction history, nothing. Thus, everyone starts with a zero balance and early adopters stand to gain more coins than latecomers (assuming Bitcoin-like block reward halvings or similar mechanisms that reduce the block reward over time).

Hard forks usually also require a code fork, but in essence are simply an disagreement on the network. That is, parts of the network want to introduce a new rule that other network participants disagree with (eg. a max blocksize increase as was the case with Bitcoin Cash). What then happens is these coins share the same transaction history until the point of disagreement. Which is why everyone who held coins on the original part of the fork, also holds coin on the forked part.

I'm not sure what you mean by "acquiring the mainnet". If you mean "acquire significant hashing power from the original chain" -- this requires the hardforked chain to be more profitable to mine than the original chain.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
cowsgomoo (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 05, 2018, 08:50:51 AM
 #3

Thank you so much for your kind reply.
I think "code fork" is what I want to accomplish.
How does one do it? I can't find much info on it on google
could you provide me any reference please ?

What I mean by mainnet is that people can join the mining network and just mine and
contribute to the network.

If code fork happens, can people just use regular bitcoin wallet (if it forked from bitcoin)
and bitcoin transaction website? Thank you.
HeRetiK
Legendary
*
Offline Offline

Activity: 3122
Merit: 2178


Playgram - The Telegram Casino


View Profile
March 05, 2018, 10:28:31 AM
 #4

Thank you so much for your kind reply.
I think "code fork" is what I want to accomplish.
How does one do it? I can't find much info on it on google
could you provide me any reference please ?

It's when you fork the code of a repository, for example on Github. If you're unfamiliar with basic software development concepts such as forks and version control you should probably start with something else than cryptocurrencies.


What I mean by mainnet is that people can join the mining network and just mine and
contribute to the network.

Anyone can provide their computational power to any network. Question is whether they want to.


If code fork happens, can people just use regular bitcoin wallet (if it forked from bitcoin)
and bitcoin transaction website? Thank you.

If you just fork the code without changing any of the protocol rules, then you simply have a Bitcoin client that interacts with the same blockchain and you can send and receive transactions like everyone else.

If you fork the code and change any of the protocol rules, or start from a new Genesis block, then you're on your own blockchain and won't be able to send transactions to or receive transactions from the Bitcoin blockchain.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
jhimli
Jr. Member
*
Offline Offline

Activity: 59
Merit: 7


View Profile
March 05, 2018, 11:01:39 AM
 #5

apologies first as English is not my first language.

I would really appreciate if anyone could explain the concept of hardfork.

As I understand it, if there is a hardfork with say, bitcoin, everyone who own X amount of

bitcoin gets X amount of hardforked coin as well.

For example, if bitcoin platinum were real, a person who owns 15 bitcoins would've got

15 bitcoin platinums.

But, software engineers who hardforked ended up with tons of them.

For example, litecoin developers ended up with tons of litecoin.

How did this happen? Also, how can I study about the blockchain technology?

And if one hardforks a coin, how do you acquire the mainnet (the network)?

My Ans is  :

A Hard fork is when a single cryptocurrency splits in two. It occurs when a cryptocurrency’s existing code is changed, resulting in both an old and new version.

Creating an altcoin can be possible by creating the full source code from scratch (basically low level cpp programming) or a fork/clone of the existing code base.

For example Litecoin is created from Bitcoin-Qt client (in plane word taking the source code of Bitcoin ) differing primarily by having a decreased block generation time, increased maximum number of coins, different hashing algorithm, and a slightly modified GUI.
Random Seller
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 05, 2018, 02:13:16 PM
Last edit: March 05, 2018, 03:40:30 PM by Random Seller
 #6

apologies first as English is not my first language.

I would really appreciate if anyone could explain the concept of hardfork.

As I understand it, if there is a hardfork with say, bitcoin, everyone who own X amount of

bitcoin gets X amount of hardforked coin as well.

For example, if bitcoin platinum were real, a person who owns 15 bitcoins would've got

15 bitcoin platinums.

But, software engineers who hardforked ended up with tons of them.

For example, litecoin developers ended up with tons of litecoin.

How did this happen? Also, how can I study about the blockchain technology?

And if one hardforks a coin, how do you acquire the mainnet (the network)?

To understand what is a hard fork you need to understand what is a blockchain.

The blockchain basically are bloks that are chained together by having the current block reference the previous block.

A fork normally happens when there’s a change in the consensus rule. When that happens you’ll see the chain split into two (imagine a Y). That’s why everyone will have the same amount of coins on the fork and on the main chain.

The difference between a hard fork and a soft fork is that blocks from a soft fork are still accepted by the main chain. Whereas in a hard fork the blocks cannot be accepted by the main chain. Take bitcoin cash for example. They forked the chain by increasing the blocksize to 8mb. The nodes on the main chain won’t be able to validate that because they can only accept blocks up to 1mb. As time pass you’ll be able to see a clear divergence.

Litecoin is not a fork because they didn’t branch out of the main chain. They started all over.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
March 05, 2018, 02:54:24 PM
 #7

A fork normally happens when there’s a change in the consensus rule. When that happens you’ll see the chain split into two (imagine a Y).

The 'Y' is used for imagination. In reality there is no real split.
Each node stores its own copy of the blockchain. When a hard fork occurs there are basically 2 versions of the blockchain spread between nodes.
Both versions have the same data until block X. The representation with an 'Y' seems to be the most popular one. But from block X those are 2 completely independent networks.



Take bitcoin cash for example. They forked the chain by increasing the blocksize to 4mb. The nodes on the main chain won’t be able to validate that because they can only accept blocks up to 1mb.

They increased the blocksize to 8mb.



Litecoin is not a fork because they didn’t branch out of the main chain. They started all over.

It is not a fork in terms of 'blockchain forks', but bitcoins code on github got forked.

This is visible at the top left corner of LTC's github (https://github.com/litecoin-project/litecoin):

Random Seller
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 05, 2018, 07:45:08 PM
 #8


The 'Y' is used for imagination. In reality there is no real split.
Each node stores its own copy of the blockchain. When a hard fork occurs there are basically 2 versions of the blockchain spread between nodes.
Both versions have the same data until block X. The representation with an 'Y' seems to be the most popular one. But from block X those are 2 completely independent networks.


Its wrong to say that a hard fork occurs when there are 2 versions of the blockchain. That situations also occurs in a soft fork. The actual difference between a hard fork and a soft fork is determined by the ability of the nodes on the main chain to validate blocks that are produced in accordance with the consensus rule of the fork.

The Y is is basically what you see if you draw a graph of the split.
HeRetiK
Legendary
*
Offline Offline

Activity: 3122
Merit: 2178


Playgram - The Telegram Casino


View Profile
March 05, 2018, 08:53:09 PM
 #9

Its wrong to say that a hard fork occurs when there are 2 versions of the blockchain. That situations also occurs in a soft fork. The actual difference between a hard fork and a soft fork is determined by the ability of the nodes on the main chain to validate blocks that are produced in accordance with the consensus rule of the fork.

Soft forks don't lead to a blockchain split, otherwise the SegWit activation would have lead to an alternative blockchain. SegWit transactions still look valid to legacy nodes, it's just that legacy nodes lack the ability to properly interpret them under the new rules that the soft fork brings with it. Now if you were to disable SegWit again -- ie. have a signifcant number of nodes handle SegWit transactions like legacy nodes -- that then would require a hard fork, since SegWit nodes would deem such transactions as invalid while legacy nodes would process them, leading to a chain split.

In short: Soft forks only require a hard fork (ie. blockchain split) when rolling back the change, not when first deploying the update. Not requiring a blockchain split on deployment / activation is pretty much the definition of a soft fork.

▄▄███████▄▄███████
▄███████████████▄▄▄▄▄
▄████████████████████▀░
▄█████████████████████▄░
▄█████████▀▀████████████▄
██████████████▀▀█████████
████████████████████████
██████████████▄▄█████████
▀█████████▄▄████████████▀
▀█████████████████████▀░
▀████████████████████▄░
▀███████████████▀▀▀▀▀
▀▀███████▀▀███████

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
 
Playgram.io
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀

▄▄▄░░
▀▄







▄▀
▀▀▀░░
▄▄▄███████▄▄▄
▄▄███████████████▄▄
▄███████████████████▄
▄██████████████▀▀█████▄
▄██████████▀▀█████▐████▄
██████▀▀████▄▄▀▀█████████
████▄▄███▄██▀█████▐██████
█████████▀██████████████
▀███████▌▐██████▐██████▀
▀███████▄▄███▄████████▀
▀███████████████████▀
▀▀███████████████▀▀
▀▀▀███████▀▀▀
██████▄▄███████▄▄████████
███▄███████████████▄░░▀█▀
███████████░█████████░░
░█████▀██▄▄░▄▄██▀█████░
█████▄░▄███▄███▄░▄█████
███████████████████████
███████████████████████
██░▄▄▄░██░▄▄▄░██░▄▄▄░██
██░░░░██░░░░██░░░░████
██░░░░██░░░░██░░░░████
██▄▄▄▄▄██▄▄▄▄▄██▄▄▄▄▄████
███████████████████████
███████████████████████
 
PLAY NOW

on Telegram
[/
hulla
Hero Member
*****
Offline Offline

Activity: 1834
Merit: 566



View Profile
March 05, 2018, 10:57:30 PM
Last edit: March 05, 2018, 11:38:37 PM by hulla
 #10

Hard forks means changes to the coin protocol by that making previous rules valid or invalid and it also a merely coin protocol upgrades which serves as an act of correcting some network mistake. Such as blocksize increasement. In other for you to have more insight go to and this link.

.
.Duelbits.
            ▄████▄▄
          ▄█████████▄
        ▄█████████████▄
     ▄██████████████████▄
   ▄████▄▄▄█████████▄▄▄███▄
 ▄████▐▀▄▄▀▌████▐▀▄▄▀▌██

 ██████▀▀▀▀███████▀▀▀▀█████

▐████████████■▄▄▄■██████████▀
▐██████████████████████████▀
██████████████████████████▀
▀███████████████████████▀
  ▀███████████████████▀
    ▀███████████████▀
▄▀▄
█   █
█ █ █
█ █ █
█ █ █
█ █ █
█ █ █
█ █ █
█ █ █
█▀▀▀▀▀█
▀█▀█▀
█▄█
█▄█
▄▀▄
█   █
█ █ █
█ █ █
█ █ █
█ █ █
█ █ █
█ █ █
█ █ █
█▀▀▀▀▀█
▀█▀█▀
█▄█
█▄█
.
         ▄ ▄▄▀▀▀▀▄▄
         ▄▀▀▄      █
         █   ▀▄     █
       ▄█▄     ▀▄   █
      ▄▀ ▀▄      ▀█▀
    ▄▀     ▀█▄▄▄▀▀ ▀
  ▄▀  ▄▀  ▄▀
 ▀▄    ▄▀▀
Live Games

   ▄▄▀▀▀▀▀▀▀▄▄
 ▄▀ ▄▄▀▀▀▀▀▄▄ ▀▄
▄▀ █ ▄  █  ▄ █ ▀▄
█ █   ▀   ▀   █ █  ▄▄▄
█ ▀▀▀▀▀▀▀▀▀▀▀▀▀ █ █   █
█▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀█  █▄█
█ ▀▀█  ▀▀█  ▀▀█ █  █▄█
█  █    █    █  █  █ █
Slots
.
        ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄
        █         ▄▄  █
▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄       █
█  ▄▄         █       █
█             █       █
█   ▄▀▀▄▀▀▄   █       █
█   ▀▄   ▄▀   █       █
█     ▀▄▀     █   ▀▀  █
Blackjack
.
▄▄▀█████▀▄▄
▄▀▀   █████ ▄▄▀▀▄
███▄  ▄█████▄▀▀▄███
██████▀▀     ▀▀██████
█ ▀▀██▀ ▀▄   ▄▀ ▀██▀▀ █
█    █    ███    █    █
█ ▄▄██▄ ▄▀   ▀▄ ▄██▄▄ █
██████▄▄     ▄▄██████
Roulette
.
█▀▀▀▄             ▄▀▀▀█
█ ▀▄ ▀▄         ▄▀ ▄▀ █
▀▄ ▀▄ ▀▄     ▄▀ ▄▀ ▄▀
▀▄ ▀▄ ▀▄  ▀ ▄▀ ▄▀
▀▄ ▀▄ ▀▄ ▀ ▄▀
▄ ▀▄ ▀▄ ▀▄  ▄
█ ▀▄ ▀▄ ▀  ▄▀ █
▄▀▄ ▀▄ ▀ ▄▀ ▄▀▄
Dice Duels
Random Seller
Newbie
*
Offline Offline

Activity: 42
Merit: 0


View Profile
March 06, 2018, 02:53:31 AM
 #11

Its wrong to say that a hard fork occurs when there are 2 versions of the blockchain. That situations also occurs in a soft fork. The actual difference between a hard fork and a soft fork is determined by the ability of the nodes on the main chain to validate blocks that are produced in accordance with the consensus rule of the fork.

Soft forks don't lead to a blockchain split, otherwise the SegWit activation would have lead to an alternative blockchain. SegWit transactions still look valid to legacy nodes, it's just that legacy nodes lack the ability to properly interpret them under the new rules that the soft fork brings with it. Now if you were to disable SegWit again -- ie. have a signifcant number of nodes handle SegWit transactions like legacy nodes -- that then would require a hard fork, since SegWit nodes would deem such transactions as invalid while legacy nodes would process them, leading to a chain split.

In short: Soft forks only require a hard fork (ie. blockchain split) when rolling back the change, not when first deploying the update. Not requiring a blockchain split on deployment / activation is pretty much the definition of a soft fork.

Andreas is able to explain this better than me:

Here the video:

https://youtu.be/rpeceXY1QBM
nc50lc
Legendary
*
Offline Offline

Activity: 2604
Merit: 6416


Self-proclaimed Genius


View Profile
March 06, 2018, 08:17:49 AM
 #12

But, software engineers who hardforked ended up with tons of them.

For example, litecoin developers ended up with tons of litecoin.

How did this happen?
Quite easy, them, the software engineers and the developers are the first persons to mine the succeding blocks.
The are no competitions in discovering the next blocks allowing them to hurdle a lot before the miners join in.

However, the "forked" coins from the previous blocks can not be claimed by them, without the addresses' private keys, even developers cannot claim those forked coins.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!