Skip to content

Commit

Permalink
chore: bump public call depth
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarreiro committed Apr 18, 2024
1 parent cb1e25b commit c6783b0
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library Constants {
uint256 internal constant MAX_NEW_NOTE_HASHES_PER_CALL = 16;
uint256 internal constant MAX_NEW_NULLIFIERS_PER_CALL = 16;
uint256 internal constant MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL = 4;
uint256 internal constant MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 4;
uint256 internal constant MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 18;
uint256 internal constant MAX_NEW_L2_TO_L1_MSGS_PER_CALL = 2;
uint256 internal constant MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 16;
uint256 internal constant MAX_PUBLIC_DATA_READS_PER_CALL = 16;
Expand All @@ -31,7 +31,7 @@ library Constants {
uint256 internal constant MAX_NEW_NOTE_HASHES_PER_TX = 64;
uint256 internal constant MAX_NEW_NULLIFIERS_PER_TX = 64;
uint256 internal constant MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX = 8;
uint256 internal constant MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX = 8;
uint256 internal constant MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX = 32;
uint256 internal constant MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 32;
uint256 internal constant MAX_PUBLIC_DATA_READS_PER_TX = 32;
uint256 internal constant MAX_NEW_L2_TO_L1_MSGS_PER_TX = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ fn empty_hash() {
let hash = item.hash();

// Value from private_call_stack_item.test.ts "computes empty item hash" test
let test_data_empty_hash = 0x24185d8e88fe796dec6e400f3d6c7572cefd85cea80591f268f08a9350992c48;
let test_data_empty_hash = 0x22d1df091ef5fee37d4bcbae5395616a5a3f2f1b3441dcc7a4a1bc308d81bd0f;
assert_eq(hash, test_data_empty_hash);
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,6 @@ fn empty_hash() {
let inputs = PrivateCircuitPublicInputs::empty();
let hash = inputs.hash();
// Value from private_circuit_public_inputs.test.ts "computes empty item hash" test
let test_data_empty_hash = 0x24ea9ab3fc039778bef8e7212f6a09feec1019db19b449333b523a08b812ee88;
let test_data_empty_hash = 0x20c5c5fc842c902f62bb7234b4b9fb803e85055a173a9f881fd2799cb29e47d0;
assert_eq(hash, test_data_empty_hash);
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ mod tests {
let call_stack_item = PublicCallStackItem { contract_address, public_inputs, is_execution_request: false, function_data };

// Value from public_call_stack_item.test.ts "Computes a callstack item hash" test
let test_data_call_stack_item_hash = 0x0c0d60d424315af5f106a802b250c27c613a9ec1c0f583c6ad806cf22fe66a13;
let test_data_call_stack_item_hash = 0x1fd42592bdc77007eb835e64dc8c06057044035ddc58f52d4b77aa65a97141ea;
assert_eq(call_stack_item.hash(), test_data_call_stack_item_hash);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ fn empty_hash() {
let hash = inputs.hash();

// Value from public_circuit_public_inputs.test.ts "computes empty item hash" test
let test_data_empty_hash = 0x1092820bc987359300ff136abf020d58218e1b3484e03d756c76e81ac56ccbf7;
let test_data_empty_hash = 0x08a0821851999ce70ebfd071427faa310b79579688d12b06795cb0bfd4b7972a;
assert_eq(hash, test_data_empty_hash);
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ global ARGS_LENGTH: u64 = 16;
global MAX_NEW_NOTE_HASHES_PER_CALL: u64 = 16;
global MAX_NEW_NULLIFIERS_PER_CALL: u64 = 16;
global MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL: u64 = 4;
global MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL: u64 = 4;
global MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL: u64 = 18;
global MAX_NEW_L2_TO_L1_MSGS_PER_CALL: u64 = 2;
global MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL: u64 = 16;
global MAX_PUBLIC_DATA_READS_PER_CALL: u64 = 16;
Expand All @@ -40,7 +40,7 @@ global MAX_UNENCRYPTED_LOGS_PER_CALL: u64 = 4; // If modifying, update DEPLOYER_
global MAX_NEW_NOTE_HASHES_PER_TX: u64 = 64;
global MAX_NEW_NULLIFIERS_PER_TX: u64 = 64;
global MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX: u64 = 8;
global MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX: u64 = 8;
global MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX: u64 = 32;
global MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX: u64 = 32;
global MAX_PUBLIC_DATA_READS_PER_TX: u64 = 32;
global MAX_NEW_L2_TO_L1_MSGS_PER_TX: u64 = 2;
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const ARGS_LENGTH = 16;
export const MAX_NEW_NOTE_HASHES_PER_CALL = 16;
export const MAX_NEW_NULLIFIERS_PER_CALL = 16;
export const MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL = 4;
export const MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 4;
export const MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL = 18;
export const MAX_NEW_L2_TO_L1_MSGS_PER_CALL = 2;
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL = 16;
export const MAX_PUBLIC_DATA_READS_PER_CALL = 16;
Expand All @@ -17,7 +17,7 @@ export const MAX_UNENCRYPTED_LOGS_PER_CALL = 4;
export const MAX_NEW_NOTE_HASHES_PER_TX = 64;
export const MAX_NEW_NULLIFIERS_PER_TX = 64;
export const MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX = 8;
export const MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX = 8;
export const MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX = 32;
export const MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX = 32;
export const MAX_PUBLIC_DATA_READS_PER_TX = 32;
export const MAX_NEW_L2_TO_L1_MSGS_PER_TX = 2;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`PrivateCallStackItem computes empty item hash 1`] = `Fr<0x24185d8e88fe796dec6e400f3d6c7572cefd85cea80591f268f08a9350992c48>`;
exports[`PrivateCallStackItem computes empty item hash 1`] = `Fr<0x22d1df091ef5fee37d4bcbae5395616a5a3f2f1b3441dcc7a4a1bc308d81bd0f>`;

exports[`PrivateCallStackItem computes hash 1`] = `Fr<0x2e5307580ef277146cc3c6a9d9210c6e317d9b6a033755f509e6161d0eaf576a>`;
exports[`PrivateCallStackItem computes hash 1`] = `Fr<0x110b353908ca62b8018788f3ce15fd557a3ca733bbc72019e716c282794ff5b0>`;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`PrivateCircuitPublicInputs computes empty inputs hash 1`] = `Fr<0x24ea9ab3fc039778bef8e7212f6a09feec1019db19b449333b523a08b812ee88>`;
exports[`PrivateCircuitPublicInputs computes empty inputs hash 1`] = `Fr<0x20c5c5fc842c902f62bb7234b4b9fb803e85055a173a9f881fd2799cb29e47d0>`;

exports[`PrivateCircuitPublicInputs hash matches snapshot 1`] = `Fr<0x144c861f88d1ba68fc7e72f7a578546207bbf785e4a23278601662d85cd25d12>`;
exports[`PrivateCircuitPublicInputs hash matches snapshot 1`] = `Fr<0x1d855c446c5a86bf1872514d7fc39ef8138cfa39b99b07e4a9dccb86fb189fc0>`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`PublicCallStackItem Computes a callstack item hash 1`] = `"0x0c0d60d424315af5f106a802b250c27c613a9ec1c0f583c6ad806cf22fe66a13"`;
exports[`PublicCallStackItem Computes a callstack item hash 1`] = `"0x1fd42592bdc77007eb835e64dc8c06057044035ddc58f52d4b77aa65a97141ea"`;

exports[`PublicCallStackItem Computes a callstack item request hash 1`] = `"0x134d01b778664dbc1ffa953008ce28f72b0cb258533776f10df59a59d791e972"`;
exports[`PublicCallStackItem Computes a callstack item request hash 1`] = `"0x006b66fcdc599cbba7e8aae1d18343a577e38ad4cd1ed3e1df593f057ea6b93f"`;

exports[`PublicCallStackItem computes hash 1`] = `Fr<0x2c7d4c31cdb4762c88686417968228c7d102e205e89cb157a34365eef5bfb15c>`;
exports[`PublicCallStackItem computes hash 1`] = `Fr<0x22059b89441643e9eb9642fa8f2a020f20a15a3485430b337ca9548f7d89eb7e>`;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`PublicCircuitPublicInputs computes empty item hash 1`] = `Fr<0x1092820bc987359300ff136abf020d58218e1b3484e03d756c76e81ac56ccbf7>`;
exports[`PublicCircuitPublicInputs computes empty item hash 1`] = `Fr<0x08a0821851999ce70ebfd071427faa310b79579688d12b06795cb0bfd4b7972a>`;

exports[`PublicCircuitPublicInputs hash matches snapshot 1`] = `Fr<0x251dcf0ab2afb050857487a1545e99cc12ddd7655154f89b8aab1d7872845173>`;
exports[`PublicCircuitPublicInputs hash matches snapshot 1`] = `Fr<0x100e0e8e475d4ba3022c26f7cb68e45bf889464e6b884666e23dcd20f5c8d1af>`;

0 comments on commit c6783b0

Please sign in to comment.