core/types/bal: check correct max code size

This commit is contained in:
Marius van der Wijden 2026-03-10 18:27:18 +01:00
parent 3f41dd1c5b
commit 19c51b5098

View file

@ -23,12 +23,13 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/ethereum/go-ethereum/log"
"io"
"maps"
"slices"
"strings"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
@ -413,10 +414,10 @@ func (e *AccountAccess) validate(blockTxCount int) error {
}
}
// validate that code changes could plausibly be correct (none exceed
// max code size of a contract)
// validate that code changes could plausibly be correct
// (none exceed max code size of a contract)
for _, codeChange := range e.CodeChanges {
if len(codeChange.Code) > params.MaxCodeSize {
if len(codeChange.Code) > params.MaxCodeSizeAmsterdam {
return fmt.Errorf("code change contained oversized code")
}
}