Bitcoin Forum
March 27, 2017, 06:44:36 AM *
News: Latest stable version of Bitcoin Core: 0.14.0  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: How do clients enforce the 50 BTC generation rule?  (Read 1335 times)
bytemaster
Hero Member
*****
Offline Offline

Activity: 742

BitShares


View Profile WWW
August 03, 2010, 03:59:25 AM
 #1

Suppose one client decided to modify CBlock::GetBlockValue() which hardcodes 50 * COIN as nSubsidy to 1000 * COIN and they "complete a block", what would happen?  What line of code would catch this mis-match?

Shouldn't these kind of settings be in some kind of "config file" instead of distributed all over the code?   


https://steemit.com  Blogging is the new Mining
1490597076
Hero Member
*
Offline Offline

Posts: 1490597076

View Profile Personal Message (Offline)

Ignore
1490597076
Reply with quote  #2

1490597076
Report to moderator
1490597076
Hero Member
*
Offline Offline

Posts: 1490597076

View Profile Personal Message (Offline)

Ignore
1490597076
Reply with quote  #2

1490597076
Report to moderator
1490597076
Hero Member
*
Offline Offline

Posts: 1490597076

View Profile Personal Message (Offline)

Ignore
1490597076
Reply with quote  #2

1490597076
Report to moderator
Be very wary of relying on JavaScript for security on sites such as blockchain.info and brainwallet.org. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1490597076
Hero Member
*
Offline Offline

Posts: 1490597076

View Profile Personal Message (Offline)

Ignore
1490597076
Reply with quote  #2

1490597076
Report to moderator
1490597076
Hero Member
*
Offline Offline

Posts: 1490597076

View Profile Personal Message (Offline)

Ignore
1490597076
Reply with quote  #2

1490597076
Report to moderator
1490597076
Hero Member
*
Offline Offline

Posts: 1490597076

View Profile Personal Message (Offline)

Ignore
1490597076
Reply with quote  #2

1490597076
Report to moderator
knightmb
Sr. Member
****
Offline Offline

Activity: 308


Timekoin - Save Electricity, Don't Waste It!


View Profile WWW
August 03, 2010, 04:13:54 AM
 #2

Suppose one client decided to modify CBlock::GetBlockValue() which hardcodes 50 * COIN as nSubsidy to 1000 * COIN and they "complete a block", what would happen?  What line of code would catch this mis-match?

Shouldn't these kind of settings be in some kind of "config file" instead of distributed all over the code?   


When I tested that, the other clients would ignore the one that decided to generate 1000 BTC a block for example.

theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2604


View Profile
August 03, 2010, 04:15:03 AM
 #3

The block won't be accepted by legitimate users. See ConnectBlock in main.cpp:
Code:
    if (vtx[0].GetValueOut() > GetBlockValue(nFees))
        return false;
(Line 1089)

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!