diff --git a/config/default_config.json b/config/default_config.json index 22889fb1..0db86ead 100644 --- a/config/default_config.json +++ b/config/default_config.json @@ -49,11 +49,21 @@ "privacy": "Public", "value": 0 }, + "gateway_config.stateless_tx_validator_config.max_bytecode_size": { + "description": "Validates that a transaction has bytecode size less than or equal to this value.", + "privacy": "Public", + "value": 0 + }, "gateway_config.stateless_tx_validator_config.max_calldata_length": { "description": "Validates that a transaction has calldata length less than or equal to this value.", "privacy": "Public", "value": 0 }, + "gateway_config.stateless_tx_validator_config.max_raw_class_size": { + "description": "Validates that a transaction has raw class size less than or equal to this value.", + "privacy": "Public", + "value": 0 + }, "gateway_config.stateless_tx_validator_config.max_sierra_version.major": { "description": "The major version of the configuration.", "privacy": "Public", diff --git a/crates/gateway/src/config.rs b/crates/gateway/src/config.rs index 9add4d86..5d659a7f 100644 --- a/crates/gateway/src/config.rs +++ b/crates/gateway/src/config.rs @@ -122,6 +122,18 @@ impl SerializeConfig for StatelessTransactionValidatorConfig { value.", ParamPrivacyInput::Public, ), + ser_param( + "max_bytecode_size", + &self.max_bytecode_size, + "Validates that a transaction has bytecode size less than or equal to this value.", + ParamPrivacyInput::Public, + ), + ser_param( + "max_raw_class_size", + &self.max_raw_class_size, + "Validates that a transaction has raw class size less than or equal to this value.", + ParamPrivacyInput::Public, + ), ]); vec![ members,