-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(starknet_state_sync): implement state sync get compiled class #2817
feat(starknet_state_sync): implement state sync get compiled class #2817
Conversation
954e82f
to
4fbbd3b
Compare
1f1fe73
to
9a9a9e5
Compare
4fbbd3b
to
8f57ae7
Compare
9a9a9e5
to
3f28e7c
Compare
3f28e7c
to
af6b19d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 4 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @noamsp-starkware)
crates/starknet_state_sync/src/lib.rs
line 155 at r2 (raw file):
) -> StateSyncResult<(ContractClass, SierraVersion)> { let txn = self.storage_reader.begin_ro_txn()?; verify_synced_up_to(&txn, block_number)?;
The check here should be against the casm marker and not the state marker
crates/starknet_state_sync/src/lib.rs
line 170 at r2 (raw file):
let (casm, sierra) = option_casm .zip(option_sierra) .ok_or(StateSyncError::ClassHashNotFound(class_hash))?;
Add a comment that we've checked that block number is smaller than casm marker so if it's missing it's because it doesn't exist
crates/starknet_state_sync_types/src/communication.rs
line 60 at r2 (raw file):
) -> StateSyncClientResult<ClassHash>; async fn get_compiled_class(
Add TODO to remove this and use compiler component client instead in SyncStateReader
crates/starknet_state_sync_types/src/communication.rs
line 60 at r2 (raw file):
) -> StateSyncClientResult<ClassHash>; async fn get_compiled_class(
rename to get_compiled_class_deprecated so people will fear using it
crates/starknet_state_sync_types/src/errors.rs
line 17 at r2 (raw file):
ContractNotFound(ContractAddress), #[error("Class hash {0} was not found")] ClassHashNotFound(ClassHash),
Rename to ClassNotFound
af6b19d
to
4b1c3f3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @ShahakShama)
crates/starknet_state_sync/src/lib.rs
line 155 at r2 (raw file):
Previously, ShahakShama wrote…
The check here should be against the casm marker and not the state marker
Ack.
The current rpc state reader checks the state marker and not the casm marker.
crates/starknet_state_sync/src/lib.rs
line 170 at r2 (raw file):
Previously, ShahakShama wrote…
Add a comment that we've checked that block number is smaller than casm marker so if it's missing it's because it doesn't exist
Done.
crates/starknet_state_sync_types/src/communication.rs
line 60 at r2 (raw file):
Previously, ShahakShama wrote…
rename to get_compiled_class_deprecated so people will fear using it
Done.
crates/starknet_state_sync_types/src/communication.rs
line 60 at r2 (raw file):
Previously, ShahakShama wrote…
Add TODO to remove this and use compiler component client instead in SyncStateReader
Done.
crates/starknet_state_sync_types/src/errors.rs
line 17 at r2 (raw file):
Previously, ShahakShama wrote…
Rename to ClassNotFound
Done.
4b1c3f3
to
51fdb66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware)
crates/starknet_state_sync/src/lib.rs
line 155 at r2 (raw file):
Previously, noamsp-starkware wrote…
Ack.
The current rpc state reader checks the state marker and not the casm marker.
Yes. They have a bit different case than our case
Merge activity
|
bfc191a
to
f7ff380
Compare
51fdb66
to
03bc56f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @noamsp-starkware)
3debc32
into
noam.s/sync_state_reader_get_class_hash_at
No description provided.