-
Notifications
You must be signed in to change notification settings - Fork 65
blockifier: add l3 compatibility for addresses #7763
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Benchmark movements: No major performance changes detected. |
8744a20 to
f3b01a2
Compare
5d86548 to
56b7167
Compare
35d402a to
3b0b16e
Compare
Yoni-Starkware
left a comment
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 5 of 11 files at r1.
Reviewable status: 5 of 11 files reviewed, 6 unresolved discussions
crates/apollo_batcher/src/cende_client_types.rs line 258 at r1 (raw file):
call.execution.l2_to_l1_messages.iter().map(|l2_to_l1_message| L2ToL1Message { from_address: call.call.caller_address, to_address: EthAddress::try_from(l2_to_l1_message.message.to_address).unwrap(),
Add informative message (we don't use plain unwrap in production code)
Suggestion:
.except("..."),crates/blockifier/src/execution/deprecated_syscalls/mod.rs line 423 at r1 (raw file):
impl SyscallRequest for SendMessageToL1Request { // The Cairo struct contains: `to_address`, `payload_size`, `payload`. fn read(
What about the deprecated syscall?
crates/blockifier/src/execution/deprecated_syscalls/mod.rs line 427 at r1 (raw file):
ptr: &mut Relocatable, ) -> DeprecatedSyscallExecutorBaseResult<SendMessageToL1Request> { let felt_to_address = felt_from_ptr(vm, ptr)?;
"felt_to_address" sounds like a conversion from felt to address
Suggestion:
to_address_feltcrates/blockifier/src/execution/syscalls/vm_syscall_utils.rs line 407 at r1 (raw file):
ptr: &mut Relocatable, ) -> SyscallBaseResult<SendMessageToL1Request> { let felt_to_address = felt_from_ptr(vm, ptr)?;
Suggestion:
to_address_feltcrates/apollo_rpc_execution/src/objects.rs line 467 at r1 (raw file):
message: MessageToL1 { from_address, to_address: EthAddress::try_from(blockifier_message.message.to_address).unwrap(),
Same
crates/blockifier/src/execution/native/syscall_handler.rs line 571 at r1 (raw file):
)?; if !self.base.context.tx_context.block_context.chain_info.is_layer_3 {
To share this code between the VM and Native, please move this to self.base.send_message_to_l1
Code quote:
if !self.base.context.tx_context.block_context.chain_info.is_layer_3 {
Yoni-Starkware
left a comment
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 11 files at r1.
Reviewable status: 6 of 11 files reviewed, 6 unresolved discussions (waiting on @einat-starkware)
56b7167 to
2c4e54d
Compare
3b0b16e to
1aad341
Compare
einat-starkware
left a comment
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: 5 of 12 files reviewed, 4 unresolved discussions (waiting on @Yoni-Starkware)
crates/apollo_batcher/src/cende_client_types.rs line 258 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Add informative message (we don't use plain
unwrapin production code)
Done.
crates/apollo_rpc_execution/src/objects.rs line 467 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Same
Done.
crates/blockifier/src/execution/deprecated_syscalls/mod.rs line 423 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
What about the deprecated syscall?
How exactly do I handle the deprecated syscall? I'm not sure how to access the ChainInfo here
crates/blockifier/src/execution/native/syscall_handler.rs line 571 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
To share this code between the VM and Native, please move this to
self.base.send_message_to_l1
Done.
Yoni-Starkware
left a comment
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 5 of 7 files at r2, all commit messages.
Reviewable status: 10 of 12 files reviewed, 1 unresolved discussion (waiting on @einat-starkware)
crates/blockifier/src/execution/deprecated_syscalls/mod.rs line 423 at r1 (raw file):
Previously, einat-starkware wrote…
How exactly do I handle the deprecated syscall? I'm not sure how to access the
ChainInfohere
Here, using the syscall_hanlder
Yoni-Starkware
left a comment
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: 10 of 12 files reviewed, 1 unresolved discussion (waiting on @einat-starkware)
crates/blockifier/src/execution/deprecated_syscalls/mod.rs line 423 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
Here, using the syscall_hanlder
(Similar to what you did in the non-deprecated handler)
Yoni-Starkware
left a comment
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 7 files at r2.
Reviewable status: 11 of 12 files reviewed, 1 unresolved discussion (waiting on @einat-starkware)
1aad341 to
920da05
Compare
einat-starkware
left a comment
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: 10 of 13 files reviewed, 1 unresolved discussion (waiting on @Yoni-Starkware)
crates/blockifier/src/execution/deprecated_syscalls/mod.rs line 423 at r1 (raw file):
Previously, Yoni-Starkware (Yoni) wrote…
(Similar to what you did in the non-deprecated handler)
Done.
Yoni-Starkware
left a comment
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 7 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @einat-starkware)
2c4e54d to
9d4edbf
Compare
920da05 to
9990172
Compare
9d4edbf to
7bc2f18
Compare
9990172 to
6e4c317
Compare
einat-starkware
left a comment
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 all commit messages.
Reviewable status: 6 of 13 files reviewed, all discussions resolved (waiting on @Yoni-Starkware)
einat-starkware
left a comment
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 7 files at r2, 2 of 2 files at r3, 7 of 7 files at r4.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @einat-starkware)

No description provided.