diff --git a/config/default_config.json b/config/default_config.json index bc6e12eea..b13bce9b3 100644 --- a/config/default_config.json +++ b/config/default_config.json @@ -50,29 +50,29 @@ "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.", + "description": "Limitation of contract bytecode size.", "privacy": "Public", - "value": 0 + "value": 81920 }, "gateway_config.stateless_tx_validator_config.max_calldata_length": { - "description": "Validates that a transaction has calldata length less than or equal to this value.", + "description": "Limitation of calldata length.", "privacy": "Public", - "value": 0 + "value": 4000 }, "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.", + "description": "Limitation of contract class object size.", "privacy": "Public", - "value": 0 + "value": 4089446 }, "gateway_config.stateless_tx_validator_config.max_sierra_version.major": { "description": "The major version of the configuration.", "privacy": "Public", - "value": 18446744073709551615 + "value": 1 }, "gateway_config.stateless_tx_validator_config.max_sierra_version.minor": { "description": "The minor version of the configuration.", "privacy": "Public", - "value": 18446744073709551615 + "value": 5 }, "gateway_config.stateless_tx_validator_config.max_sierra_version.patch": { "description": "The patch version of the configuration.", @@ -80,19 +80,19 @@ "value": 18446744073709551615 }, "gateway_config.stateless_tx_validator_config.max_signature_length": { - "description": "Validates that a transaction has signature length less than or equal to this value.", + "description": "Limitation of signature length.", "privacy": "Public", - "value": 0 + "value": 4000 }, "gateway_config.stateless_tx_validator_config.min_sierra_version.major": { "description": "The major version of the configuration.", "privacy": "Public", - "value": 0 + "value": 1 }, "gateway_config.stateless_tx_validator_config.min_sierra_version.minor": { "description": "The minor version of the configuration.", "privacy": "Public", - "value": 0 + "value": 1 }, "gateway_config.stateless_tx_validator_config.min_sierra_version.patch": { "description": "The patch version of the configuration.", @@ -102,7 +102,7 @@ "gateway_config.stateless_tx_validator_config.validate_non_zero_l1_gas_fee": { "description": "If true, validates that a transaction has non-zero L1 resource bounds.", "privacy": "Public", - "value": false + "value": true }, "gateway_config.stateless_tx_validator_config.validate_non_zero_l2_gas_fee": { "description": "If true, validates that a transaction has non-zero L2 resource bounds.", diff --git a/crates/gateway/src/config.rs b/crates/gateway/src/config.rs index 5d659a7f0..396fc70d1 100644 --- a/crates/gateway/src/config.rs +++ b/crates/gateway/src/config.rs @@ -81,14 +81,14 @@ pub struct StatelessTransactionValidatorConfig { impl Default for StatelessTransactionValidatorConfig { fn default() -> Self { StatelessTransactionValidatorConfig { - validate_non_zero_l1_gas_fee: false, + validate_non_zero_l1_gas_fee: true, validate_non_zero_l2_gas_fee: false, - max_calldata_length: 0, - max_signature_length: 0, - max_bytecode_size: 0, - max_raw_class_size: 0, - min_sierra_version: VersionId::MIN, - max_sierra_version: VersionId::MAX, + max_calldata_length: 4000, + max_signature_length: 4000, + max_bytecode_size: 81920, + max_raw_class_size: 4089446, + min_sierra_version: VersionId { major: 1, minor: 1, patch: 0 }, + max_sierra_version: VersionId { major: 1, minor: 5, patch: usize::MAX }, } } } @@ -111,27 +111,25 @@ impl SerializeConfig for StatelessTransactionValidatorConfig { ser_param( "max_signature_length", &self.max_signature_length, - "Validates that a transaction has signature length less than or equal to this \ - value.", + "Limitation of signature length.", ParamPrivacyInput::Public, ), ser_param( "max_calldata_length", &self.max_calldata_length, - "Validates that a transaction has calldata length less than or equal to this \ - value.", + "Limitation of calldata length.", 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.", + "Limitation of contract bytecode size.", 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.", + "Limitation of contract class object size.", ParamPrivacyInput::Public, ), ]);