Skip to content

Commit

Permalink
feat: add max_bytecode_size to config
Browse files Browse the repository at this point in the history
  • Loading branch information
ArniStarkware committed Jul 8, 2024
1 parent cbc4f67 commit ef4b845
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/default_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions crates/gateway/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ef4b845

Please sign in to comment.