Skip to content

Commit be513b8

Browse files
feat(blockifier): add data gas accounts to VC
1 parent 6ba1997 commit be513b8

11 files changed

+31
-9
lines changed

crates/blockifier/resources/blockifier_versioned_constants_0_13_0.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@
224224
},
225225
"v1_bound_accounts_cairo0": [],
226226
"v1_bound_accounts_cairo1": [],
227-
"v1_bound_accounts_max_tip": "0x0"
227+
"v1_bound_accounts_max_tip": "0x0",
228+
"data_gas_accounts": []
228229
},
229230
"os_resources": {
230231
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_1.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@
230230
},
231231
"v1_bound_accounts_cairo0": [],
232232
"v1_bound_accounts_cairo1": [],
233-
"v1_bound_accounts_max_tip": "0x0"
233+
"v1_bound_accounts_max_tip": "0x0",
234+
"data_gas_accounts": []
234235
},
235236
"os_resources": {
236237
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_1_1.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@
230230
},
231231
"v1_bound_accounts_cairo0": [],
232232
"v1_bound_accounts_cairo1": [],
233-
"v1_bound_accounts_max_tip": "0x0"
233+
"v1_bound_accounts_max_tip": "0x0",
234+
"data_gas_accounts": []
234235
},
235236
"os_resources": {
236237
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_2.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@
231231
},
232232
"v1_bound_accounts_cairo0": [],
233233
"v1_bound_accounts_cairo1": [],
234-
"v1_bound_accounts_max_tip": "0x0"
234+
"v1_bound_accounts_max_tip": "0x0",
235+
"data_gas_accounts": []
235236
},
236237
"os_resources": {
237238
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_2_1.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@
231231
},
232232
"v1_bound_accounts_cairo0": [],
233233
"v1_bound_accounts_cairo1": [],
234-
"v1_bound_accounts_max_tip": "0x0"
234+
"v1_bound_accounts_max_tip": "0x0",
235+
"data_gas_accounts": []
235236
},
236237
"os_resources": {
237238
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_3.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@
231231
},
232232
"v1_bound_accounts_cairo0": [],
233233
"v1_bound_accounts_cairo1": [],
234-
"v1_bound_accounts_max_tip": "0x0"
234+
"v1_bound_accounts_max_tip": "0x0",
235+
"data_gas_accounts": []
235236
},
236237
"os_resources": {
237238
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_4.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
"validated": "VALID",
126126
"v1_bound_accounts_cairo0": [],
127127
"v1_bound_accounts_cairo1": [],
128-
"v1_bound_accounts_max_tip": "0x0"
128+
"v1_bound_accounts_max_tip": "0x0",
129+
"data_gas_accounts": []
129130
},
130131
"os_resources": {
131132
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_13_5.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@
138138
"0x0251830adc3d8b4d818c2c309d71f1958308e8c745212480c26e01120c69ee49",
139139
"0x0251cac7b2f45d255b83b7a06dcdef70c8a8752f00ea776517c1c2243c7a06e5"
140140
],
141-
"v1_bound_accounts_max_tip": "0x746a5288000"
141+
"v1_bound_accounts_max_tip": "0x746a5288000",
142+
"data_gas_accounts": [
143+
"0x02c8c7e6fbcfb3e8e15a46648e8914c6aa1fc506fc1e7fb3d1e19630716174bc",
144+
"0x00816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253",
145+
"0x041bf1e71792aecb9df3e9d04e1540091c5e13122a731e02bec588f71dc1a5c3"
146+
]
142147
},
143148
"os_resources": {
144149
"execute_syscalls": {

crates/blockifier/resources/blockifier_versioned_constants_0_14_0.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@
138138
"0x0251830adc3d8b4d818c2c309d71f1958308e8c745212480c26e01120c69ee49",
139139
"0x0251cac7b2f45d255b83b7a06dcdef70c8a8752f00ea776517c1c2243c7a06e5"
140140
],
141-
"v1_bound_accounts_max_tip": "0x746a5288000"
141+
"v1_bound_accounts_max_tip": "0x746a5288000",
142+
"data_gas_accounts": [
143+
"0x02c8c7e6fbcfb3e8e15a46648e8914c6aa1fc506fc1e7fb3d1e19630716174bc",
144+
"0x00816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253",
145+
"0x041bf1e71792aecb9df3e9d04e1540091c5e13122a731e02bec588f71dc1a5c3"
146+
]
142147
},
143148
"os_resources": {
144149
"execute_syscalls": {

crates/blockifier/src/blockifier_versioned_constants.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ pub struct OsConstants {
800800
pub v1_bound_accounts_cairo1: Vec<ClassHash>,
801801
pub v1_bound_accounts_max_tip: Tip,
802802
pub l1_handler_max_amount_bounds: GasVector,
803+
pub data_gas_accounts: Vec<ClassHash>,
803804
}
804805

805806
impl OsConstants {
@@ -887,6 +888,7 @@ impl TryFrom<OsConstantsRawJson> for OsConstants {
887888
let v1_bound_accounts_cairo0 = raw_json_data.v1_bound_accounts_cairo0;
888889
let v1_bound_accounts_cairo1 = raw_json_data.v1_bound_accounts_cairo1;
889890
let v1_bound_accounts_max_tip = raw_json_data.v1_bound_accounts_max_tip;
891+
let data_gas_accounts = raw_json_data.data_gas_accounts;
890892
let l1_handler_max_amount_bounds = raw_json_data.l1_handler_max_amount_bounds;
891893
let os_constants = OsConstants {
892894
gas_costs,
@@ -897,6 +899,7 @@ impl TryFrom<OsConstantsRawJson> for OsConstants {
897899
v1_bound_accounts_cairo0,
898900
v1_bound_accounts_cairo1,
899901
v1_bound_accounts_max_tip,
902+
data_gas_accounts,
900903
l1_handler_max_amount_bounds,
901904
};
902905
Ok(os_constants)
@@ -941,6 +944,7 @@ struct OsConstantsRawJson {
941944
v1_bound_accounts_cairo0: Vec<ClassHash>,
942945
v1_bound_accounts_cairo1: Vec<ClassHash>,
943946
v1_bound_accounts_max_tip: Tip,
947+
data_gas_accounts: Vec<ClassHash>,
944948
l1_handler_max_amount_bounds: GasVector,
945949
}
946950

crates/blockifier/src/versioned_constants_test.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ fn check_constants_serde_error(json_data: &str, expected_error_message: &str) {
9999
"l1_handler_max_amount_bounds".into(),
100100
serde_json::to_value(GasVector::default()).unwrap(),
101101
);
102+
json_data_raw.insert("data_gas_accounts".into(), serde_json::Value::Array(vec![]));
102103

103104
let json_data = &serde_json::to_string(&json_data_raw).unwrap();
104105

0 commit comments

Comments
 (0)