Skip to content

Commit ff807ed

Browse files
authored
feat(starknet_os): compute hash of deprecated classes with hints (#4233)
1 parent 1986104 commit ff807ed

File tree

10 files changed

+663
-8
lines changed

10 files changed

+663
-8
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/starknet_api/src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ fn entry_points_hash(
310310

311311
// Python code masks with (2**250 - 1) which starts 0x03 and is followed by 31 0xff in be.
312312
// Truncation is needed not to overflow the field element.
313-
fn truncated_keccak(mut plain: [u8; 32]) -> Felt {
313+
pub fn truncated_keccak(mut plain: [u8; 32]) -> Felt {
314314
plain[0] &= 0x03;
315315
Felt::from_bytes_be(&plain)
316316
}

crates/starknet_os/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ description = "The Starknet OS."
99
[features]
1010
deserialize = [
1111
"blockifier/transaction_serde",
12-
"serde",
1312
"shared_execution_objects/deserialize",
1413
"starknet-types-core/serde",
1514
"starknet_patricia/deserialize",
@@ -26,10 +25,12 @@ indoc.workspace = true
2625
log.workspace = true
2726
num-bigint.workspace = true
2827
num-traits.workspace = true
29-
serde = { workspace = true, optional = true, features = ["derive"] }
30-
serde_json.workspace = true
28+
papyrus_common.workspace = true
29+
serde = { workspace = true, features = ["derive"] }
30+
serde_json = { workspace = true, features = ["raw_value"] }
31+
sha3.workspace = true
3132
shared_execution_objects.workspace = true
32-
starknet-types-core.workspace = true
33+
starknet-types-core = { workspace = true, features = ["hash"] }
3334
starknet_api.workspace = true
3435
starknet_infra_utils.workspace = true
3536
starknet_patricia.workspace = true

0 commit comments

Comments
 (0)