Bitcoin Forum
May 02, 2024, 04:36:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Why is it necessary to mine the genesis block?  (Read 427 times)
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10521



View Profile
April 23, 2021, 03:12:04 AM
 #21

As far as I know you don't mine the genesis block, you hardcode it.

Exactly, to calculate the genesis hash you need write your own code within your bitcoin clone. It's a bit complicated for beginners Wink
Cheers
It is only complicated for those who have no idea how bitcoin and specifically blocks and mining them works. Otherwise the only difference between Genesis block and any other block is that Genesis block's previous block hash is empty! Everything else is the same.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
1714624569
Hero Member
*
Offline Offline

Posts: 1714624569

View Profile Personal Message (Offline)

Ignore
1714624569
Reply with quote  #2

1714624569
Report to moderator
1714624569
Hero Member
*
Offline Offline

Posts: 1714624569

View Profile Personal Message (Offline)

Ignore
1714624569
Reply with quote  #2

1714624569
Report to moderator
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714624569
Hero Member
*
Offline Offline

Posts: 1714624569

View Profile Personal Message (Offline)

Ignore
1714624569
Reply with quote  #2

1714624569
Report to moderator
GameUnits
Jr. Member
*
Offline Offline

Activity: 102
Merit: 5

GameBit - The Network


View Profile WWW
April 23, 2021, 05:29:24 PM
 #22

As far as I know you don't mine the genesis block, you hardcode it.

Exactly, to calculate the genesis hash you need write your own code within your bitcoin clone. It's a bit complicated for beginners Wink
Cheers
It is only complicated for those who have no idea how bitcoin and specifically blocks and mining them works. Otherwise the only difference between Genesis block and any other block is that Genesis block's previous block hash is empty! Everything else is the same.

Need to be say, that its the first block. Without it the new chain wouldnt start and it would connect to the chain, which was used or forked from the source before. Indeed its a difference to the original genesis block which was mined before, but not to the following block yes. Normaly the developers calculate it on their own without getting it listed in a code block.

Coffee works!
zeuner
Member
**
Offline Offline

Activity: 189
Merit: 16


View Profile
May 06, 2021, 10:01:43 AM
 #23

It is necessary to prevent Genesis Block overwriting. Satoshi timestamped Genesis Block with the NY Times message to prove that this block was not mined earlier. In old versions, Genesis Block was not any special case in code. You just started from zero hash and built on top of it. But then, everyone could overwrite the whole chain, including the Genesis Block. And later, Satoshi hardcoded Genesis Block data in the client to prevent that kind of attack. But he forgot about adding that transaction to the database, so it became unspendable.

So, you can start with no Genesis Block at all, just build on top of zero hash and you will get simpler code. But then, overwriting all blocks will be possible, including the first block in the chain.

With a new blockchain started in 2021, even if the genesis block is precomputed with a non-zero difficulty, it may still be feasible for someone with considerable mining power to just compute the first X blocks again and replace the block history, if the incentive for doing so is large enough. So, I doubt that the risk of overwriting blocks can be fully eliminated just by having a precomputed genesis block. It may be a part of an effective strategy, though.
NotATether
Legendary
*
Offline Offline

Activity: 1582
Merit: 6718


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 06, 2021, 04:40:46 PM
 #24

And later, Satoshi hardcoded Genesis Block data in the client to prevent that kind of attack. But he forgot about adding that transaction to the database, so it became unspendable.

So, I assume that devs can't hardcode this transaction into the client right now without performing a hardfork?

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
May 06, 2021, 05:33:51 PM
 #25

With a new blockchain started in 2021, even if the genesis block is precomputed with a non-zero difficulty, it may still be feasible for someone with considerable mining power to just compute the first X blocks again and replace the block history...

Not quite. Mining the first 32000 blocks (difficulty 1) would take a little more than 1 second with a S19 pro; however, you still would need 51% to replace all of the blocks.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10521



View Profile
May 07, 2021, 02:46:32 AM
Merited by vapourminer (1), ABCbits (1)
 #26

And later, Satoshi hardcoded Genesis Block data in the client to prevent that kind of attack. But he forgot about adding that transaction to the database, so it became unspendable.

So, I assume that devs can't hardcode this transaction into the client right now without performing a hardfork?
That's correct but it is not about "forgetting", Satoshi may have intentionally avoided adding that transaction to the UTXO database because the genesis block (i.e. block 0) was technically "premined" before the client was released a couple of days later whereas block 1 was mined after release.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
zeuner
Member
**
Offline Offline

Activity: 189
Merit: 16


View Profile
May 08, 2021, 06:51:33 PM
 #27

With a new blockchain started in 2021, even if the genesis block is precomputed with a non-zero difficulty, it may still be feasible for someone with considerable mining power to just compute the first X blocks again and replace the block history...

Not quite. Mining the first 32000 blocks (difficulty 1) would take a little more than 1 second with a S19 pro; however, you still would need 51% to replace all of the blocks.

If you started clandestinely mining an alternative chain from the beginning, you needed 101% of the mining power used for the public chain in order to completely replace it. If you started later, you needed even more. But with the insane amounts of mining power professional miners on a large blockchain have, compared with the mining power the average blockchain started by some random developer would likely have, this is not completely out of sight.
Pages: « 1 [2]  All
  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!