From c6783b09722cb518e9e4c76020c28c830b08f2b4 Mon Sep 17 00:00:00 2001 From: fcarreiro Date: Thu, 18 Apr 2024 11:14:00 +0000 Subject: [PATCH] chore: bump public call depth --- l1-contracts/src/core/libraries/ConstantsGen.sol | 4 ++-- .../crates/types/src/abis/private_call_stack_item.nr | 2 +- .../crates/types/src/abis/private_circuit_public_inputs.nr | 2 +- .../crates/types/src/abis/public_call_stack_item.nr | 2 +- .../crates/types/src/abis/public_circuit_public_inputs.nr | 2 +- .../noir-protocol-circuits/crates/types/src/constants.nr | 4 ++-- yarn-project/circuits.js/src/constants.gen.ts | 4 ++-- .../__snapshots__/private_call_stack_item.test.ts.snap | 4 ++-- .../private_circuit_public_inputs.test.ts.snap | 4 ++-- .../__snapshots__/public_call_stack_item.test.ts.snap | 6 +++--- .../__snapshots__/public_circuit_public_inputs.test.ts.snap | 4 ++-- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/l1-contracts/src/core/libraries/ConstantsGen.sol b/l1-contracts/src/core/libraries/ConstantsGen.sol index 6661fc67443..5cf98ea705f 100644 --- a/l1-contracts/src/core/libraries/ConstantsGen.sol +++ b/l1-contracts/src/core/libraries/ConstantsGen.sol @@ -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; @@ -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; diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_call_stack_item.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_call_stack_item.nr index 45b7f67c493..09f12b6c688 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_call_stack_item.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_call_stack_item.nr @@ -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); } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_circuit_public_inputs.nr index 09fbc60463e..dc7f770b126 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_circuit_public_inputs.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/private_circuit_public_inputs.nr @@ -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); } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_stack_item.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_stack_item.nr index 7bafc07b37d..0a1a9f26c26 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_stack_item.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_call_stack_item.nr @@ -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); } } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_circuit_public_inputs.nr b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_circuit_public_inputs.nr index ca5dc4742f3..d97113992dc 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_circuit_public_inputs.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/abis/public_circuit_public_inputs.nr @@ -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); } diff --git a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr index e8e5f1cf2ee..ea91b87aa81 100644 --- a/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr +++ b/noir-projects/noir-protocol-circuits/crates/types/src/constants.nr @@ -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; @@ -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; diff --git a/yarn-project/circuits.js/src/constants.gen.ts b/yarn-project/circuits.js/src/constants.gen.ts index 6441113ed89..28370ffc9c9 100644 --- a/yarn-project/circuits.js/src/constants.gen.ts +++ b/yarn-project/circuits.js/src/constants.gen.ts @@ -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; @@ -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; diff --git a/yarn-project/circuits.js/src/structs/__snapshots__/private_call_stack_item.test.ts.snap b/yarn-project/circuits.js/src/structs/__snapshots__/private_call_stack_item.test.ts.snap index 46d4e2bf80d..1dd517ad906 100644 --- a/yarn-project/circuits.js/src/structs/__snapshots__/private_call_stack_item.test.ts.snap +++ b/yarn-project/circuits.js/src/structs/__snapshots__/private_call_stack_item.test.ts.snap @@ -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>`; diff --git a/yarn-project/circuits.js/src/structs/__snapshots__/private_circuit_public_inputs.test.ts.snap b/yarn-project/circuits.js/src/structs/__snapshots__/private_circuit_public_inputs.test.ts.snap index 4e423c22442..7d67a671497 100644 --- a/yarn-project/circuits.js/src/structs/__snapshots__/private_circuit_public_inputs.test.ts.snap +++ b/yarn-project/circuits.js/src/structs/__snapshots__/private_circuit_public_inputs.test.ts.snap @@ -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>`; diff --git a/yarn-project/circuits.js/src/structs/__snapshots__/public_call_stack_item.test.ts.snap b/yarn-project/circuits.js/src/structs/__snapshots__/public_call_stack_item.test.ts.snap index 230870d273c..cb952e40ac9 100644 --- a/yarn-project/circuits.js/src/structs/__snapshots__/public_call_stack_item.test.ts.snap +++ b/yarn-project/circuits.js/src/structs/__snapshots__/public_call_stack_item.test.ts.snap @@ -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>`; diff --git a/yarn-project/circuits.js/src/structs/__snapshots__/public_circuit_public_inputs.test.ts.snap b/yarn-project/circuits.js/src/structs/__snapshots__/public_circuit_public_inputs.test.ts.snap index 057d7b9aeac..22da2387d6a 100644 --- a/yarn-project/circuits.js/src/structs/__snapshots__/public_circuit_public_inputs.test.ts.snap +++ b/yarn-project/circuits.js/src/structs/__snapshots__/public_circuit_public_inputs.test.ts.snap @@ -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>`;