-
Notifications
You must be signed in to change notification settings - Fork 34
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(blockifier): add ExecutableCallEntryPoint #3657
Conversation
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 r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @liorgold2)
crates/blockifier/src/execution/entry_point.rs
line 99 at r1 (raw file):
#[cfg_attr(feature = "transaction_serde", derive(serde::Deserialize))] #[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct CallEntryPointEx<ClassHashT> {
Suggestion:
TClassHash
crates/blockifier/src/execution/entry_point.rs
line 99 at r1 (raw file):
#[cfg_attr(feature = "transaction_serde", derive(serde::Deserialize))] #[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct CallEntryPointEx<ClassHashT> {
Naming suggestions: CallEntryPoin[Variant,Phase,State]
.
Code quote:
CallEntryPointEx
crates/blockifier/src/execution/entry_point.rs
line 106 at r1 (raw file):
/// The class hash is not given if it can be deduced from the storage address. /// It is resolved prior to entry point's execution. pub class_hash: ClassHashT,
Cool, no need for phantom data when the generic type is directly used! 🔥
Code quote:
pub class_hash: ClassHashT,
crates/blockifier/src/execution/entry_point.rs
line 122 at r1 (raw file):
pub type CallEntryPoint = CallEntryPointEx<Option<ClassHash>>; pub type CallEntryPointResolved = CallEntryPointEx<ClassHash>;
Suggestion:
ExecutableCallEntryPoint
crates/blockifier/src/execution/entry_point.rs
line 141 at r1 (raw file):
impl CallEntryPoint { pub fn execute(
Move to impl CallEntryPointEx<ClassHash>
block to achieve what we want.
Code quote:
pub fn execute
crates/blockifier/src/execution/entry_point.rs
line 233 at r1 (raw file):
} fn as_resolved(self, class_hash: ClassHash) -> CallEntryPointResolved {
I'd move here the decision line (match storage_class_hash ...
).
Suggestion:
fn resolve_for_execution(self, storage_class_hash: ClassHash) -> CallEntryPointResolved
71a51dd
to
cc8c669
Compare
83a311f
to
3e4e26f
Compare
cc8c669
to
249a273
Compare
956e54a
to
662de79
Compare
c791d54
to
1fbf7ae
Compare
662de79
to
7b4abf1
Compare
1fbf7ae
to
5adcda9
Compare
7b4abf1
to
5519e59
Compare
5adcda9
to
cce3c6c
Compare
5519e59
to
26c3afb
Compare
cce3c6c
to
3c23060
Compare
26c3afb
to
40c8e48
Compare
40c8e48
to
d1d7b6a
Compare
d1d7b6a
to
a793080
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: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @elintul)
crates/blockifier/src/execution/entry_point.rs
line 99 at r1 (raw file):
Previously, elintul (Elin) wrote…
Naming suggestions:
CallEntryPoin[Variant,Phase,State]
.
Done
crates/blockifier/src/execution/entry_point.rs
line 99 at r1 (raw file):
#[cfg_attr(feature = "transaction_serde", derive(serde::Deserialize))] #[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)] pub struct CallEntryPointEx<ClassHashT> {
Done.
crates/blockifier/src/execution/entry_point.rs
line 122 at r1 (raw file):
pub type CallEntryPoint = CallEntryPointEx<Option<ClassHash>>; pub type CallEntryPointResolved = CallEntryPointEx<ClassHash>;
Done.
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 r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @liorgold2)
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: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
a793080
to
9d7a87a
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 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
9d7a87a
to
c420a5e
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 1 of 1 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
c420a5e
to
64c7615
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 1 of 1 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
commit-id:7ef0c9b2
64c7615
to
49e1313
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 r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)
No description provided.