Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
fix(concurrency): remove compiled_class_hashes check from validate_re…
Browse files Browse the repository at this point in the history
…ads (#1954)
  • Loading branch information
OriStarkware authored Jun 6, 2024
1 parent 702f401 commit 1bb3d97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/blockifier/src/concurrency/versioned_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ impl<S: StateReader> VersionedState<S> {
}
}

// Added for symmetry. We currently do not update this initial mapping.
for (&class_hash, expected_value) in &reads.compiled_class_hashes {
let value = self.compiled_class_hashes.read(tx_index, class_hash).expect(READ_ERR);

Expand Down Expand Up @@ -341,6 +340,11 @@ impl<S: StateReader> StateReader for VersionedStateProxy<S> {
}
Err(StateError::UndeclaredClassHash(class_hash)) => {
state.declared_contracts.set_initial_value(class_hash, false);
// Papyrus storage does not support read action for compiled class hashes
// values. We artificially insert zero for undeclared contracts.
state
.compiled_class_hashes
.set_initial_value(class_hash, CompiledClassHash(StarkFelt::ZERO));
Err(StateError::UndeclaredClassHash(class_hash))?
}
Err(error) => Err(error)?,
Expand Down

0 comments on commit 1bb3d97

Please sign in to comment.