Skip to content
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

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

liorgold2
Copy link
Contributor

@liorgold2 liorgold2 commented Jan 26, 2025

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@elintul elintul left a 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

@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/41c980aa branch from 71a51dd to cc8c669 Compare January 26, 2025 11:13
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 83a311f to 3e4e26f Compare January 26, 2025 11:13
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/41c980aa branch from cc8c669 to 249a273 Compare January 26, 2025 12:44
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch 2 times, most recently from 956e54a to 662de79 Compare January 26, 2025 13:36
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/41c980aa branch 2 times, most recently from c791d54 to 1fbf7ae Compare January 26, 2025 14:19
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 662de79 to 7b4abf1 Compare January 26, 2025 14:19
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/41c980aa branch from 1fbf7ae to 5adcda9 Compare January 26, 2025 14:46
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 7b4abf1 to 5519e59 Compare January 26, 2025 14:46
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/41c980aa branch from 5adcda9 to cce3c6c Compare January 26, 2025 22:40
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 5519e59 to 26c3afb Compare January 26, 2025 22:40
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/41c980aa branch from cce3c6c to 3c23060 Compare January 27, 2025 08:20
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 26c3afb to 40c8e48 Compare January 27, 2025 08:20
@liorgold2 liorgold2 changed the base branch from pr/liorgold2/lior/version-3/41c980aa to main January 27, 2025 09:09
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 40c8e48 to d1d7b6a Compare January 27, 2025 09:09
@liorgold2 liorgold2 changed the title feat(blockifier): add CallEntryPointResolved feat(blockifier): add ExecutableCallEntryPoint Jan 27, 2025
@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from d1d7b6a to a793080 Compare January 27, 2025 09:55
Copy link
Contributor Author

@liorgold2 liorgold2 left a 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.

Copy link
Collaborator

@elintul elintul left a 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)

Copy link
Collaborator

@elintul elintul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from a793080 to 9d7a87a Compare January 27, 2025 10:49
Copy link
Collaborator

@elintul elintul left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 9d7a87a to c420a5e Compare January 27, 2025 14:16
Copy link
Collaborator

@elintul elintul left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from c420a5e to 64c7615 Compare January 27, 2025 14:22
Copy link
Collaborator

@elintul elintul left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

@liorgold2 liorgold2 force-pushed the pr/liorgold2/lior/version-3/7ef0c9b2 branch from 64c7615 to 49e1313 Compare January 27, 2025 14:45
Copy link
Collaborator

@elintul elintul left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @liorgold2)

@liorgold2 liorgold2 added this pull request to the merge queue Jan 28, 2025
Merged via the queue into main with commit 0d94643 Jan 28, 2025
12 of 19 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants