Bitcoin Forum
April 27, 2024, 09:25:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [NOT A DISCUSION ABOUT INCREMENTING BLOCK SIZE] Bitcoin blocks size  (Read 121 times)
simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
June 21, 2023, 07:40:37 PM
 #1

Hi,

Could someone point me to the code file where the block size is defined?
I need to know the theoretical max block size if we ignore SegWit, etc.

Thanks in advace.


Regards,
SS
1714253130
Hero Member
*
Offline Offline

Posts: 1714253130

View Profile Personal Message (Offline)

Ignore
1714253130
Reply with quote  #2

1714253130
Report to moderator
1714253130
Hero Member
*
Offline Offline

Posts: 1714253130

View Profile Personal Message (Offline)

Ignore
1714253130
Reply with quote  #2

1714253130
Report to moderator
1714253130
Hero Member
*
Offline Offline

Posts: 1714253130

View Profile Personal Message (Offline)

Ignore
1714253130
Reply with quote  #2

1714253130
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1498
Merit: 7294


Farewell, Leo


View Profile
June 21, 2023, 07:49:03 PM
Merited by NeuroticFish (2), pooya87 (2), ABCbits (1)
 #2

The maximum block size is defined in src/consensus/consensus.h.
Code:
/** The maximum allowed weight for a block, see BIP 141 (network rule) */
static const unsigned int MAX_BLOCK_WEIGHT = 4000000;

If you search for WITNESS_SCALE_FACTOR (which is also defined in the above file as 4), you'll notice it also appears in other parts where there are bytes that need to be measured. In other words there isn't a parameter equal to 1 MB, there's just the above, and the code takes into account the fact that 1 byte is equal with 4 weight units.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

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

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

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

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

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











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
witcher_sense
Legendary
*
Offline Offline

Activity: 2310
Merit: 4313

🔐BitcoinMessage.Tools🔑


View Profile WWW
June 22, 2023, 05:26:16 AM
Merited by pooya87 (2), ABCbits (1)
 #3

Your question has already been answered here: Block size limit in source code

█▀▀▀











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











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
simpleSliv3r (OP)
Jr. Member
*
Offline Offline

Activity: 46
Merit: 28


View Profile
June 25, 2023, 09:15:21 AM
 #4

The maximum block size is defined in src/consensus/consensus.h.
Code:
/** The maximum allowed weight for a block, see BIP 141 (network rule) */
static const unsigned int MAX_BLOCK_WEIGHT = 4000000;

If you search for WITNESS_SCALE_FACTOR (which is also defined in the above file as 4), you'll notice it also appears in other parts where there are bytes that need to be measured. In other words there isn't a parameter equal to 1 MB, there's just the above, and the code takes into account the fact that 1 byte is equal with 4 weight units.
Your question has already been answered here: Block size limit in source code

Hi thanks both for your answers. I appreciate it.


Regards,
SS
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!