Skip to main content

validate_bal_code_sizes

Function validate_bal_code_sizes 

Source
pub fn validate_bal_code_sizes(
    bal: &BlockAccessList,
    max_code_size: u64,
) -> Result<(), InvalidBlockError>
Expand description

Validates that no code change in the BAL is larger than max_code_size, the fork’s maximum deployed bytecode size.

Code can only be deployed within that limit, so a larger code change cannot appear in the BAL of a valid block. This is structural, like validate_header_bal_indices, so it runs before the BAL is used to seed execution rather than after.