-
Notifications
You must be signed in to change notification settings - Fork 583
fix: Enforce recipients of l2l1msgs having 20 bytes at most #19898
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
base: merge-train/avm
Are you sure you want to change the base?
Conversation
|
|
||
| namespace { | ||
|
|
||
| EthAddress ff_to_eth_address(FF ff) |
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.
const&FF
LeilaWang
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.
Only a small nit. Circuit side LGTM 😄
noir-projects/noir-protocol-circuits/crates/types/src/constants.nr
Outdated
Show resolved
Hide resolved
Flakey Tests🤖 says: This CI run detected 2 tests that failed, but were tolerated due to a .test_patterns.yml entry. |
IlyasRidhuan
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.
PIL LGTM!
jeanmon
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.
Looks good. Please consider my comments.
| sel_execute_send_l2_to_l1_msg * (REMAINING_L2_TO_L1_MSG_WRITES * (sel_l2_to_l1_msg_limit_error * (1 - remaining_l2_to_l1_msgs_inv) + remaining_l2_to_l1_msgs_inv) - 1 + sel_l2_to_l1_msg_limit_error) = 0; | ||
|
|
||
| // The opcode errors if we have reached the limit or if we are in a static context | ||
| // TODO: We need this temporarily while we do not allow for aliases in the lookup tuple |
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.
During pre-audit, I am trying to remove any TODO. Can you please replace the TODO, by "Lookup constant support: " or something similar?
|
|
||
| get_gas_tracker().consume_gas(); | ||
|
|
||
| if (greater_than.gt(recipient, MemoryValue::from(FF(MAX_ETH_ADDRESS_VALUE)))) { |
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.
Can you write a comment that it is crucial to have this check before the 2 other error checks (static and MAX number of messages), because in circuit, we always (in opcode logic) check this and needs the gt event to always be emitted.
Resolves https://linear.app/aztec-labs/issue/AVM-209/l2l1msgs-possible-completeness-issue-with-recipient-20-bytes