It seems the answer is No. This makes sense a priori in that the DOS attack this code size limitation was designed to thwart was about loading huge chunks of bytecode from the database at very low cost to the attacker. But this problem doesn't arise for initialization code (which is provided in the input data of a transaction or which is gathered from RAM of a smartcontract under execution, in either case no call is made to the DB.)
I'm relying on Geth to substantiate this. Geth defines MaxCodeSize = 24576
and this number is referenced thrice in the code. The only reference that matters to this question is in core/vm/evm.go
. The relevant code snippet is in the create
method on line 455:
// Check whether the max code size has been exceeded, assign err if the case.
if err == nil && evm.chainRules.IsEIP158 && len(ret) > params.MaxCodeSize {
err = ErrMaxCodeSizeExceeded
}
It compares the length of what is returned to the MaxCodeSize
. I.e. it makes sure that the bytecode that will be deployed on chain contains at most 24576 bytes.