Parameters from the EIP-7934 specifications as defined at
https://eips.ethereum.org/EIPS/eip-7934#specification.
Source code in tests/osaka/eip7934_block_rlp_limit/spec.py
| class Spec:
"""
Parameters from the EIP-7934 specifications as defined at
https://eips.ethereum.org/EIPS/eip-7934#specification.
"""
MAX_BLOCK_SIZE = 10_485_760 # 10 MiB
SAFETY_MARGIN = 2_097_152 # 2 MiB
MAX_RLP_BLOCK_SIZE = MAX_BLOCK_SIZE - SAFETY_MARGIN # 8_388_608 bytes
BLOB_COMMITMENT_VERSION_KZG = 1
@staticmethod
def exceed_max_rlp_block_size(rlp_encoded_block: bytes) -> bool:
"""Check if an RLP encoded block exceeds the maximum allowed size."""
return len(rlp_encoded_block) > Spec.MAX_RLP_BLOCK_SIZE
|