Bitcoin Forum
June 15, 2024, 12:29:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: Attack: if I change the genesis block.  (Read 2190 times)
dinofelis (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 629


View Profile
March 13, 2015, 01:35:50 PM
 #1

I have a question which is probably naive, but I was wondering:

suppose I change the genesis block of the bitcoin block chain, and, very important, I change the time stamp of the genesis block to, say, January 15th 2007.

I now calculate an entirely new block chain from there on, in which i can include all or some of the transactions of the current block chain, but I put time stamps on the blocks so that they are slightly more separated in time than in the original chain.  As such, the difficulty will remain very low, and I can easily calculate such a chain on my PC.
I could include many more blocks on the new chain, than on the original chain, because I have 2 years more "block chain time" to fill up until now.  As long as I separate all the blocks by somewhat more than 10 minutes time stamps, the difficulty will essentially remain 1, and I can very easily mine all the blocks on my PC.  Now, in order to respect most transactions, I would have to use the same addresses of most of the block rewards, but some, I could change and assign them to me.  For instance, I could assign all the Satoshi rewards of the first thousands of blocks to addresses I own, because they have never been spend.

If I catch up to today, with most transactions included, but many more blocks, and I broadcast this new chain, would it replace the old chain (because the one I broadcast is much longer) ?  Of course, lots of strange things would happen, such as the difficulty falling essentially to 1 or so. But strictly speaking, would the bitcoin core accept this new chain over the former one because it respects all the rules ?  Or does the bitcoin core check on the genesis block ?

DannyHamilton
Legendary
*
Offline Offline

Activity: 3416
Merit: 4658



View Profile
March 13, 2015, 01:54:41 PM
 #2

I have a question which is probably naive, but I was wondering:

suppose I change the genesis block of the bitcoin block chain, and, very important, I change the time stamp of the genesis block to, say, January 15th 2007.

Then you will have created an altcoin.

I now calculate an entirely new block chain from there on, in which i can include all or some of the transactions of the current block chain,

but I put time stamps on the blocks so that they are slightly more separated in time than in the original chain.  As such, the difficulty will remain very low, and I can easily calculate such a chain on my PC.
I could include many more blocks on the new chain, than on the original chain, because I have 2 years more "block chain time" to fill up until now.  As long as I separate all the blocks by somewhat more than 10 minutes time stamps, the difficulty will essentially remain 1, and I can very easily mine all the blocks on my PC.  Now, in order to respect most transactions, I would have to use the same addresses of most of the block rewards, but some, I could change and assign them to me.  For instance, I could assign all the Satoshi rewards of the first thousands of blocks to addresses I own, because they have never been spend.

If I catch up to today, with most transactions included, but many more blocks, and I broadcast this new chain, would it replace the old chain (because the one I broadcast is much longer) ?

No.

First of all, all nodes will not recognize your chain as a valid Bitcoin blockchain since it will have an invalid genesis block.  Furthermore, the protocol chooses the chain with the largest proof of work, not the chain with the most blocks.  Unless you have access to more hash power than the combined global hash power of the past 5 years (or you have discovered some significant weakness in the SHA256 hash function), your chain won't have more proof of work than the current chain.

Of course, lots of strange things would happen, such as the difficulty falling essentially to 1 or so. But strictly speaking, would the bitcoin core accept this new chain over the former one because it respects all the rules ?  Or does the bitcoin core check on the genesis block ?

It checks on the Genesis block AND your chain wouldn't pass the "most proof of work" test for becoming the current chain.
Meuh6879
Legendary
*
Offline Offline

Activity: 1512
Merit: 1011



View Profile
March 13, 2015, 03:07:31 PM
 #3

suppose ...

You can't do this on 6400 nodes (full nodes !) in less than 2 minutes.
dinofelis (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 629


View Profile
March 13, 2015, 03:14:31 PM
 #4

It checks on the Genesis block AND your chain wouldn't pass the "most proof of work" test for becoming the current chain.

Ah, these are two points I wanted to know. 
1) So the protocol *does* check on the genesis block, this was not clear to me.
2) what I didn't know either was that it is NOT the "longest block chain" that has preference, but the "chain with most proof of work" (even if it contains much less blocks).  Almost everywhere you look at documentation, people talk about the "longest chain" and not about the "chain with most proof of work".

So thanks !
BitcoinFr34k
Hero Member
*****
Offline Offline

Activity: 504
Merit: 500




View Profile
March 14, 2015, 03:02:32 AM
 #5

The nodes will only accept the chain that has done the most total work as a valid blockchain. If you try to create an alternate blockchain with an earlier genius block then, the total work to mine the blockchain would be lower then the current blockchain and would be rejected.

It is a common misconception that the nodes/network will accept the blockchain with the most number of blocks as the valid blockchain, although this is generally the case when determining if a block is going to be orphaned or not because the competing chains are mining on the same blockchain except a very small number of blocks at the "top" 
SargeR33
Member
**
Offline Offline

Activity: 112
Merit: 10

★Bitin.io★ - Instant Exchange


View Profile
March 14, 2015, 07:05:17 AM
 #6

Is this where a 51% attack could make this plausible? 1 person broadcasting a block to the network would immediately be rejected but if 5100/10000(for example) broadcast the same fabricated block, this could fool the system, correct?

john-connor
Sr. Member
****
Offline Offline

Activity: 596
Merit: 251



View Profile
March 14, 2015, 07:29:47 AM
 #7

I have a question which is probably naive, but I was wondering:

suppose I change the genesis block of the bitcoin block chain, and, very important, I change the time stamp of the genesis block to, say, January 15th 2007.

I now calculate an entirely new block chain from there on, in which i can include all or some of the transactions of the current block chain, but I put time stamps on the blocks so that they are slightly more separated in time than in the original chain.  As such, the difficulty will remain very low, and I can easily calculate such a chain on my PC.
I could include many more blocks on the new chain, than on the original chain, because I have 2 years more "block chain time" to fill up until now.  As long as I separate all the blocks by somewhat more than 10 minutes time stamps, the difficulty will essentially remain 1, and I can very easily mine all the blocks on my PC.  Now, in order to respect most transactions, I would have to use the same addresses of most of the block rewards, but some, I could change and assign them to me.  For instance, I could assign all the Satoshi rewards of the first thousands of blocks to addresses I own, because they have never been spend.

If I catch up to today, with most transactions included, but many more blocks, and I broadcast this new chain, would it replace the old chain (because the one I broadcast is much longer) ?  Of course, lots of strange things would happen, such as the difficulty falling essentially to 1 or so. But strictly speaking, would the bitcoin core accept this new chain over the former one because it respects all the rules ?  Or does the bitcoin core check on the genesis block ?


Your genesis block would be rejected as invalid.

Minter                       ▄▄▄▄▄▄▄▄▄▄▄
                  ▄▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄▄
               ▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
            ,▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
          ,▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄
         ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
        ▓▓▓▓▓▓▓▓▓▓▓█▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀█▓▓▓▓▓▓▓▓▓▓▓
       ▓▓▓▓▓▓▓▓▓▓▓▓    █▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓
      █▓▓▓▓▓▓▓▓▓▓▓▓▓▓    ▀▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓
      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▓▓▄   ▀▓▀   ▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓
     ▐▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▄     ▄▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓▌
     ╟▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▄ ▄▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓▌
     ▐▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓▌
      ▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓
      ║▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▌
       ▀▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓▓   ▓▓▓▓▓▓▓▓▓▓▓▓
        ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
         ╙▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
           ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
             ▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
                ▀█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▀
                     ▀▀██▓▓▓▓▓▓▓▓▓██▀▀
||

╓▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒
▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█▀▀▀▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓         ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▓▓         ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▓▌        ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▓         ▀╜        ╙▀▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▓                      ▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▌                       ▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓                        ▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓         ▓▓▓▓▓▌         ▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▌         ▓▓▓▓▓          ▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓⌐         ▓▓▓▓▓         ╣▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓         ▀█▀▀^         ╫▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▌                      ▒▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓                     ▒▓▓▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓                 #▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌
▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
 ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
 ╙▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀
WALLET




                   ▄▄████
              ▄▄████████▌
         ▄▄█████████▀███
    ▄▄██████████▀▀ ▄███▌
▄████████████▀▀  ▄█████
▀▀▀███████▀   ▄███████▌
      ██    ▄█████████
       █  ▄██████████▌
       █  ███████████
       █ ██▀ ▀██████▌
       ██▀     ▀████
                 ▀█




                ▄█████▄   ▄▄
▐█▄           ▄███████████▀
████▄▄       ▐█████████████▀
████████▄▄   ▐████████████
 ████████████████████████▌
▐████████████████████████
 ▀███████████████████████
   ▀████████████████████
   ████████████████████
    ▀█████████████████
      ▄█████████████▀
▄▄▄▄█████████████▀
  ▀▀█████████▀▀
Rannasha
Hero Member
*****
Offline Offline

Activity: 728
Merit: 500


View Profile
March 14, 2015, 07:29:53 AM
 #8

Is this where a 51% attack could make this plausible? 1 person broadcasting a block to the network would immediately be rejected but if 5100/10000(for example) broadcast the same fabricated block, this could fool the system, correct?

No. Legitimate nodes will never accept a block that is considered invalid, regardless of how many nodes are broadcasting it. In your example, the attacking nodes would form a separate fork and the legit nodes would just carry on with the original blockchain.
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
March 14, 2015, 07:54:49 AM
 #9

suppose ...

You can't do this on 6400 nodes (full nodes !) in less than 2 minutes.
Danny explained nicely what would happen. Something like this can't be done.
On the other hand, only 6400 full nodes is a bit worrisome. I find this quite low. Where did you pull this number from?

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
iGotSpots
Legendary
*
Offline Offline

Activity: 2548
Merit: 1054


CPU Web Mining 🕸️ on webmining.io


View Profile WWW
March 14, 2015, 07:54:54 AM
 #10

Is this where a 51% attack could make this plausible? 1 person broadcasting a block to the network would immediately be rejected but if 5100/10000(for example) broadcast the same fabricated block, this could fool the system, correct?

No. Legitimate nodes will never accept a block that is considered invalid, regardless of how many nodes are broadcasting it. In your example, the attacking nodes would form a separate fork and the legit nodes would just carry on with the original blockchain.

The first reponse and this one pretty much cover it. You would be on a chain only with those set up similarly to yours

onemorexmr
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250



View Profile
March 14, 2015, 12:41:04 PM
 #11

suppose ...

You can't do this on 6400 nodes (full nodes !) in less than 2 minutes.
Danny explained nicely what would happen. Something like this can't be done.
On the other hand, only 6400 full nodes is a bit worrisome. I find this quite low. Where did you pull this number from?

https://getaddr.bitnodes.io/
6484 nodes...

i have one running... do you?

XMR || Monero || monerodice.net || xmr.to || mymonero.com || openalias.org || you think bitcoin is fungible? watch this
rikkie
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500


Richard Coleman - Chief Executive @ CloudThink.IO


View Profile WWW
March 14, 2015, 07:16:03 PM
 #12

Is this where a 51% attack could make this plausible? 1 person broadcasting a block to the network would immediately be rejected but if 5100/10000(for example) broadcast the same fabricated block, this could fool the system, correct?
a 51% attack is actually when 51% of the mining hashrate/hashpower somehow attacks the network, the most common fear would be to execute a double spend attack.

All that would happen if someone did what the OP proposed is would create a premined altcoin.
Truecurrency
Newbie
*
Offline Offline

Activity: 11
Merit: 0


View Profile
March 14, 2015, 07:49:35 PM
 #13

Dont think that would work, youd be creating a seperate cryptocoin.
bri912678
Sr. Member
****
Offline Offline

Activity: 348
Merit: 250



View Profile
March 14, 2015, 08:46:44 PM
 #14

suppose ...

You can't do this on 6400 nodes (full nodes !) in less than 2 minutes.
Danny explained nicely what would happen. Something like this can't be done.
On the other hand, only 6400 full nodes is a bit worrisome. I find this quite low. Where did you pull this number from?

The Bitnodes Incentive Program will continue issuing a weekly incentive for running a full node paid in bitcoins until the end of this year or when it hits 10,000 reachable nodes, whichever comes first.

A good read for anyone running a full node.  I'm going to check my PIX value when I get home (don't know my IP address off the top of my head).  The incentive program looks cool, too.

http://blog.bitcoinfoundation.org/bitnodes-project-2015-q1-report-peer-index-and-incentivized-full-nodes/

Quote
During this quarter, I have also started the Bitnodes Incentive Program as a personal experiment to allow reachable nodes with Bitcoin address set to receive weekly incentive paid in bitcoins. The program has issued its first incentive just last week and will continue to do so until the end of this year or when we hit 10,000 reachable nodes, whichever comes first. While the program is the first of its kind, it is still far from an ideal solution but hopefully we can see some more serious discussions, e.g. #5783, from the community to look into ways to sustain more full nodes distributed across the globe. In the mean time, if you are already running a full node, you can enroll your node in the program by following the instructions in https://getaddr.bitnodes.io/nodes/incentive/.
dinofelis (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 629


View Profile
March 14, 2015, 08:49:52 PM
 #15

The nodes will only accept the chain that has done the most total work as a valid blockchain. If you try to create an alternate blockchain with an earlier genius block then, the total work to mine the blockchain would be lower then the current blockchain and would be rejected.

It is a common misconception that the nodes/network will accept the blockchain with the most number of blocks as the valid blockchain, although this is generally the case when determining if a block is going to be orphaned or not because the competing chains are mining on the same blockchain except a very small number of blocks at the "top" 

Indeed.  Actually it is very smart to check on the total amount of work, and not on the number of blocks.  It would make it even moot to check the genesis bock.  But apparently, the genesis block itself is checked by the bitcoin core.
iGotSpots
Legendary
*
Offline Offline

Activity: 2548
Merit: 1054


CPU Web Mining 🕸️ on webmining.io


View Profile WWW
March 15, 2015, 06:54:59 AM
 #16

Is this where a 51% attack could make this plausible? 1 person broadcasting a block to the network would immediately be rejected but if 5100/10000(for example) broadcast the same fabricated block, this could fool the system, correct?
a 51% attack is actually when 51% of the mining hashrate/hashpower somehow attacks the network, the most common fear would be to execute a double spend attack.

All that would happen if someone did what the OP proposed is would create a premined altcoin.

But unlike other altcoins, the private keys would work

spin
Sr. Member
****
Offline Offline

Activity: 362
Merit: 261


View Profile
March 19, 2015, 09:44:30 AM
 #17

But unlike other altcoins, the private keys would work

Yeah you'd be able to sign tx but the tx will never be mined or broadcast as they use inputs from some other blockchain. So "work" only in the narrowest sense.  I.e. the private tx will only be valid on the altcoin.

If you liked this post buy me a beer.  Beers are quite cheap where I live!
bc1q707guwp9pc73r08jw23lvecpywtazjjk399daa
e1ghtSpace
Legendary
*
Offline Offline

Activity: 1526
Merit: 1001


Crypto since 2014


View Profile WWW
March 19, 2015, 11:09:26 AM
 #18

If you changed the time that a block was mined then the difficulty would change and that would make the rest of the blocks invalid unless their mined blocks are above the target difficulty.
This is why it won't work.

I almost thought you were on to something there.
dinofelis (OP)
Hero Member
*****
Offline Offline

Activity: 770
Merit: 629


View Profile
March 19, 2015, 08:52:34 PM
 #19

If you changed the time that a block was mined then the difficulty would change and that would make the rest of the blocks invalid unless their mined blocks are above the target difficulty.
This is why it won't work.

The idea was that you can put the time stamps of the blocks sufficiently spread out in time (more than 10 minutes between them) so that indeed the difficulty target would be extremely low (1 essentially).  That would allow you to re-calculate a whole chain with not much proof of work. 

The difficulty, as I understand it, comes from the slight compression in time of the blocks: that the true block chain has overall, somewhat more blocks than one every 10 minutes since the genesis block.  The difficulty is such that the block chain in time is highly incompressible: in order to squeeze a few more blocks in the same period (hence making their difference in time somewhat less than 10 minutes), difficulty rises strongly, making this compression computationally very hard to do.  My 'trick' was simply to put the genesis block much earlier, so that there's no need to compress in time, getting plenty of "time room" to space the blocks somewhat more than 10 minutes.  It would create a valid block chain, that would contain more blocks than the original chain (and would require much less PoW).

It was then pointed out that this doesn't work for 2 reasons:
- it is not the chain with most blocks, but the one with most PoW
- there's an explicit test on the original genesis block.
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1016



View Profile
March 20, 2015, 11:31:31 AM
 #20

Even if clients didn't check the genesis block, you'd still have to make a chain with more proof of work than bitcoin

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!