-
Notifications
You must be signed in to change notification settings - Fork 266
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
L2 -> L1 msgs, sol/cpp/ts #469
Changes from 8 commits
684a725
a6a9025
841a23b
268f665
350333c
0c949d4
dfe0448
81518e8
9d4b980
8433052
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,9 +53,10 @@ namespace aztec3::circuits::rollup::test_utils::utils { | |
|
||
std::vector<uint8_t> get_empty_calldata_leaf() | ||
{ | ||
auto const number_of_inputs = (KERNEL_NEW_COMMITMENTS_LENGTH + KERNEL_NEW_NULLIFIERS_LENGTH + | ||
STATE_TRANSITIONS_LENGTH * 2 + KERNEL_NEW_CONTRACTS_LENGTH * 3) * | ||
2; | ||
auto const number_of_inputs = | ||
(KERNEL_NEW_COMMITMENTS_LENGTH + KERNEL_NEW_NULLIFIERS_LENGTH + STATE_TRANSITIONS_LENGTH * 2 + | ||
KERNEL_NEW_L2_TO_L1_MSGS_LENGTH + KERNEL_NEW_CONTRACTS_LENGTH * 3) * | ||
2; | ||
auto const size = number_of_inputs * 32; | ||
std::vector<uint8_t> input_data(size, 0); | ||
return input_data; | ||
|
@@ -72,6 +73,13 @@ std::array<fr, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP> get_empty_l1_to_l2_messages( | |
return l1_to_l2_messages; | ||
} | ||
|
||
void set_kernel_l2_to_l1_msgs(KernelData& kernel_data, std::array<fr, KERNEL_NEW_L2_TO_L1_MSGS_LENGTH> l2_to_l1_msgs) | ||
{ | ||
for (size_t i = 0; i < KERNEL_NEW_L2_TO_L1_MSGS_LENGTH; i++) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you not just assign the entire array rather than individually? kernel_data.public_inputs.end.new_l2_to_l2_msg = l2_to_l1_msgs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should probably also change for the other setters. |
||
kernel_data.public_inputs.end.new_l2_to_l1_msgs[i] = l2_to_l1_msgs[i]; | ||
} | ||
} | ||
|
||
void set_kernel_nullifiers(KernelData& kernel_data, std::array<fr, KERNEL_NEW_NULLIFIERS_LENGTH> new_nullifiers) | ||
{ | ||
for (size_t i = 0; i < KERNEL_NEW_NULLIFIERS_LENGTH; i++) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ constexpr size_t KERNEL_NEW_NULLIFIERS_LENGTH = 4; | |
constexpr size_t KERNEL_NEW_CONTRACTS_LENGTH = 1; | ||
constexpr size_t KERNEL_PRIVATE_CALL_STACK_LENGTH = 8; | ||
constexpr size_t KERNEL_PUBLIC_CALL_STACK_LENGTH = 8; | ||
constexpr size_t KERNEL_NEW_L2_TO_L1_MSGS_LENGTH = 4; | ||
constexpr size_t KERNEL_NEW_L2_TO_L1_MSGS_LENGTH = 2; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this different to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the same manner as |
||
constexpr size_t KERNEL_OPTIONALLY_REVEALED_DATA_LENGTH = 4; | ||
|
||
constexpr size_t VK_TREE_HEIGHT = 3; | ||
|
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.
nit: i know you didn't do this, but can you rename this to
expected_calldata_hash