Bitcoin Forum
May 10, 2024, 04:39:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What is the reasoning behind setting MAX_SCRIPT_ELEMENT_SIZE to 520?  (Read 384 times)
sarva (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 09, 2017, 07:23:17 AM
 #1

In script.h of the current Bitcoin Core client, the maximum size of an element which can be pushed on to the stack during script execution is specified to be 520? It was apparently changed from 5000 to 520 in the commit https://github.com/bitcoin/bitcoin/commit/4bd188c4383d6e614e18f79dc337fbabe8464c82#diff-8458adcedc17d046942185cb709ff5c3R425

I can imagine the limit is there to prevent some DoS attacks. Why the magic number 520?
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!