Skip to content

Commit

Permalink
chore(blockifier): add range_check96_gas_cost (#3641)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonatan-Starkware authored Feb 2, 2025
1 parent 91889fd commit a3d8940
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"step_gas_cost": 100,
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 0,
"keccak": 0,
"pedersen": 0,
"bitwise": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"step_gas_cost": 100,
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 0,
"keccak": 0,
"pedersen": 0,
"bitwise": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"step_gas_cost": 100,
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 0,
"keccak": 0,
"pedersen": 0,
"bitwise": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
},
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 0,
"keccak": 0,
"pedersen": 0,
"bitwise": 594,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
},
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 0,
"keccak": 0,
"pedersen": 0,
"bitwise": 594,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
},
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 0,
"keccak": 0,
"pedersen": 0,
"bitwise": 594,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
},
"builtin_gas_costs": {
"range_check": 70,
"range_check96": 56,
"keccak": 136189,
"pedersen": 4050,
"bitwise": 583,
Expand Down
3 changes: 2 additions & 1 deletion crates/blockifier/src/versioned_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ pub struct BuiltinGasCosts {
// Range check has a hard-coded cost higher than its proof percentage to avoid the overhead of
// retrieving its price from the table.
pub range_check: u64,
pub range_check96: u64,
// Priced builtins.
pub keccak: u64,
pub pedersen: u64,
Expand All @@ -811,7 +812,7 @@ impl BuiltinGasCosts {
BuiltinName::ec_op => self.ecop,
BuiltinName::keccak => self.keccak,
BuiltinName::poseidon => self.poseidon,
BuiltinName::range_check96 => self.range_check,
BuiltinName::range_check96 => self.range_check96,
BuiltinName::add_mod => self.add_mod,
BuiltinName::mul_mod => self.mul_mod,
BuiltinName::ecdsa => self.ecdsa,
Expand Down

0 comments on commit a3d8940

Please sign in to comment.