Skip to content

Commit

Permalink
updated snaps after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jul 9, 2024
1 parent 69465d8 commit abc5bde
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 33 deletions.
12 changes: 6 additions & 6 deletions l1-contracts/src/core/libraries/ConstantsGen.sol
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ library Constants {
uint256 internal constant TX_REQUEST_LENGTH = 13;
uint256 internal constant TOTAL_FEES_LENGTH = 1;
uint256 internal constant HEADER_LENGTH = 23;
uint256 internal constant PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 449;
uint256 internal constant PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 482;
uint256 internal constant PRIVATE_CALL_STACK_ITEM_LENGTH = 452;
uint256 internal constant PUBLIC_CONTEXT_INPUTS_LENGTH = 41;
uint256 internal constant PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 444;
uint256 internal constant PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 481;
uint256 internal constant PRIVATE_CALL_STACK_ITEM_LENGTH = 447;
uint256 internal constant PUBLIC_CONTEXT_INPUTS_LENGTH = 40;
uint256 internal constant AGGREGATION_OBJECT_LENGTH = 16;
uint256 internal constant SCOPED_READ_REQUEST_LEN = 3;
uint256 internal constant PUBLIC_DATA_READ_LENGTH = 2;
Expand All @@ -185,8 +185,8 @@ library Constants {
uint256 internal constant COMBINED_CONSTANT_DATA_LENGTH = 41;
uint256 internal constant PUBLIC_CALL_STACK_ITEM_COMPRESSED_LENGTH = 15;
uint256 internal constant CALL_REQUEST_LENGTH = 7;
uint256 internal constant PRIVATE_ACCUMULATED_DATA_LENGTH = 1168;
uint256 internal constant PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2308;
uint256 internal constant PRIVATE_ACCUMULATED_DATA_LENGTH = 1160;
uint256 internal constant PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2300;
uint256 internal constant PUBLIC_ACCUMULATED_DATA_LENGTH = 983;
uint256 internal constant PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 3323;
uint256 internal constant KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 384;
Expand Down
4 changes: 1 addition & 3 deletions noir-projects/aztec-nr/aztec/src/encrypted_logs/header.nr
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ fn test_encrypted_log_header() {

let ciphertext = header.compute_ciphertext(secret, point);

let expected_header_ciphertext = [
228, 9, 65, 81, 62, 59, 249, 207, 90, 196, 206, 72, 39, 199, 82, 196, 23, 131, 32, 226, 26, 176, 43, 39, 239, 177, 177, 192, 85, 216, 17, 15, 18, 187, 35, 225, 135, 192, 63, 88, 29, 173, 232, 46, 72, 82, 187, 139
];
let expected_header_ciphertext = [231,126,15,225,68,138,75,80,237,178,203,27,105,200,174,176,13,215,25,216,87,111,139,0,194,150,46,225,239,245,202,110,136,199,199,116,235,135,120,182,189,166,24,172,157,153,23,195];

assert_eq(ciphertext, expected_header_ciphertext);
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ mod test {

let ciphertext = body.compute_ciphertext(eph_sk, ivpk_app);

let expected_note_body_ciphertext = [
228, 9, 65, 81, 62, 59, 249, 207, 90, 196, 206, 72, 39, 199, 82, 196, 63, 127, 188, 251, 150, 188, 238, 205, 3, 86, 102, 164, 175, 12, 137, 158, 163, 111, 205, 10, 229, 230, 46, 202, 110, 107, 156, 180, 67, 192, 161, 201, 48, 153, 169, 1, 25, 182, 93, 39, 39, 207, 251, 218, 234, 147, 156, 13, 110, 180, 190, 199, 41, 6, 211, 203, 176, 110, 165, 186, 110, 127, 199, 22, 201, 149, 92, 249, 219, 68, 145, 68, 179, 29, 233, 34, 98, 123, 197, 234, 169, 53, 44, 14, 81, 60, 92, 27, 250, 134, 49, 248, 57, 119, 236, 118, 158, 104, 82, 243, 98, 164, 60, 72, 74, 27, 177, 194, 221, 225, 193, 150, 67, 235, 205, 106, 150, 24, 126, 186, 220, 178, 199, 189, 113, 54, 181, 55, 46, 15, 236, 236, 9, 159, 5, 172, 237, 154, 110, 50, 241, 64, 92, 13, 37, 53, 20, 140, 42, 146, 229, 63, 97, 25, 159, 63, 235, 104, 68, 100
];
let expected_note_body_ciphertext = [231,126,15,225,68,138,75,80,237,178,203,27,105,200,174,176,146,101,227,84,19,141,176,40,103,223,229,126,222,105,170,224,249,151,56,93,118,197,151,127,30,134,137,202,95,116,88,231,209,202,89,216,98,2,229,16,96,177,39,242,238,33,93,55,89,97,234,58,68,38,249,92,213,43,143,227,206,44,189,32,199,145,223,82,7,112,231,39,160,18,133,37,150,253,195,89,48,17,247,165,222,3,163,23,147,31,8,134,153,42,82,12,86,136,145,240,247,194,70,154,14,125,46,104,226,105,244,129,56,108,115,144,7,178,102,183,52,122,79,97,126,98,109,213,97,65,23,191,212,215,228,245,115,24,79,29,71,150,3,168,17,234,240,21,6,203,120,148,69,111,248,6,197,26,210,92];

assert_eq(expected_note_body_ciphertext.len(), ciphertext.len());

Expand Down Expand Up @@ -235,9 +233,7 @@ mod test {

let ciphertext = body.compute_ciphertext(eph_sk, ivpk_app);

let expected_event_body_ciphertext = [
228, 9, 65, 81, 62, 59, 249, 207, 90, 196, 206, 72, 39, 199, 82, 196, 63, 127, 188, 251, 150, 188, 238, 205, 3, 86, 102, 164, 175, 12, 137, 158, 163, 111, 205, 10, 229, 230, 46, 202, 110, 107, 156, 180, 67, 192, 161, 201, 66, 122, 29, 35, 42, 33, 153, 216, 199, 208, 103, 207, 126, 153, 189, 136, 19, 220, 238, 15, 169, 29, 255, 11, 123, 107, 70, 192, 53, 40, 36, 93, 187, 32, 123, 136, 104, 23, 229, 245, 152, 90, 84, 2, 136, 112, 42, 27, 82, 214, 104, 14, 250, 48, 199, 245, 88, 22, 200, 77, 38, 51, 127, 56, 138, 255, 16, 46, 179, 129, 215, 185, 185, 116, 148, 16, 133, 62, 56, 180, 10, 132, 109, 77, 206, 199, 21, 167, 7, 163, 171, 158, 244, 23, 18, 121, 108, 42, 107, 7, 48, 84, 212, 104, 39, 16, 109, 7, 108, 129, 60, 80, 112, 241, 223, 140, 186, 158, 38, 74, 230, 213, 159, 175, 142, 228, 128, 160
];
let expected_event_body_ciphertext = [231,126,15,225,68,138,75,80,237,178,203,27,105,200,174,176,146,101,227,84,19,141,176,40,103,223,229,126,222,105,170,224,249,151,56,93,118,197,151,127,30,134,137,202,95,116,88,231,7,213,168,102,8,55,153,213,237,203,108,79,186,177,75,174,92,210,10,64,218,238,74,244,235,242,5,99,214,188,183,84,109,135,104,177,167,71,193,194,88,135,220,197,150,145,62,103,14,29,161,60,184,95,145,143,139,55,160,127,46,121,96,26,172,222,101,91,74,21,201,8,186,11,25,252,97,235,15,176,157,154,168,169,249,230,66,248,35,222,58,39,6,21,78,77,120,166,55,194,220,44,26,196,177,114,72,214,140,205,18,147,161,85,108,152,36,83,36,219,4,152,149,21,136,204,197,237];

assert_eq(expected_event_body_ciphertext.len(), ciphertext.len());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ mod test {

let ciphertext = body.compute_ciphertext(sender_ovsk_app, eph_pk);

let expected_outgoing_body_ciphertext = [
127, 84, 96, 176, 101, 107, 236, 57, 68, 8, 53, 202, 138, 74, 186, 54, 74, 193, 245, 7, 109, 59, 218, 33, 1, 31, 205, 225, 241, 209, 64, 222, 94, 245, 4, 150, 47, 241, 187, 64, 152, 20, 102, 158, 200, 217, 213, 82, 1, 240, 170, 185, 51, 80, 27, 109, 63, 231, 235, 120, 174, 44, 133, 248, 10, 97, 60, 40, 222, 190, 147, 76, 187, 48, 91, 206, 48, 106, 56, 118, 38, 127, 82, 4, 182, 188, 44, 224, 31, 129, 47, 107, 134, 252, 20, 25, 122, 191, 158, 69, 35, 255, 215, 171, 196, 45, 91, 184, 83, 80, 238, 201, 1, 233, 235, 159, 171, 130, 158, 64, 176, 165, 132, 30, 84, 81, 71, 195, 145, 47, 82, 247, 210, 192, 23, 4, 220, 90, 56, 109, 46, 105, 79, 251, 165, 141, 185, 233, 191, 118, 219, 153, 191, 162, 99, 238, 241, 249, 9, 74, 210, 241, 54, 28, 126, 226, 85, 235, 174, 75, 239, 207, 100, 184, 248, 194
];
let expected_outgoing_body_ciphertext = [127,84,96,176,101,107,236,57,68,8,53,202,138,74,186,54,74,193,245,7,109,59,218,33,1,31,205,225,241,209,64,222,94,245,4,150,47,241,187,64,152,20,102,158,200,217,213,82,1,240,170,185,51,80,27,109,63,231,235,120,174,44,133,248,10,97,60,40,222,190,147,76,187,48,91,206,48,106,56,118,38,127,82,4,182,188,44,224,31,129,47,107,134,252,20,25,122,191,158,69,35,255,215,171,196,45,91,184,83,80,238,201,1,233,235,159,171,130,158,64,176,165,132,30,84,81,71,195,145,47,82,247,210,192,23,4,220,90,56,109,46,105,79,251,165,141,185,233,191,118,219,153,191,162,99,238,241,249,9,74,139,195,242,37,206,243,148,101,239,204,133,242,240,86,126,51];

for i in 0..expected_outgoing_body_ciphertext.len() {
assert_eq(ciphertext[i], expected_outgoing_body_ciphertext[i]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ fn check_point_to_symmetric_key() {

let key = point_to_symmetric_key(secret, point);
// The following value gets updated when running encrypt_buffer.test.ts with AZTEC_GENERATE_TEST_DATA=1
let expected_key = [
49, 167, 146, 222, 151, 129, 138, 184, 87, 210, 245, 249, 99, 100, 1, 59, 223, 180, 5, 99, 14, 7, 177, 236, 159, 203, 231, 72, 220, 180, 241, 23
];
let expected_key = [34,47,73,239,201,117,244,113,255,96,117,13,217,245,66,32,86,202,135,239,240,76,236,12,45,105,159,211,174,21,51,30];
assert_eq(key, expected_key);
}
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 = 0x267a892d425b73b18f984607ec388d71df8058819eddbfcf2cb8a749596a507e;
let test_data_empty_hash = 0x065f2831db9ac0db5e710bd3a865b5facd8cf83f1585e1af8fd1d6ce9c47f685;
assert_eq(hash, test_data_empty_hash);
}
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,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 = 0x142dd7d24536af9139b3b190d2061a64c224a50b5c8d5a854b564c2b1032ba49;
let test_data_empty_hash = 0x15c9b0a92b9b541598e24c9f0b0b4b04b7f2408599751c45aa12de671fd9b363;
assert_eq(hash, test_data_empty_hash);
}
12 changes: 6 additions & 6 deletions yarn-project/circuits.js/src/constants.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ export const TX_CONTEXT_LENGTH = 9;
export const TX_REQUEST_LENGTH = 13;
export const TOTAL_FEES_LENGTH = 1;
export const HEADER_LENGTH = 23;
export const PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 449;
export const PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 482;
export const PRIVATE_CALL_STACK_ITEM_LENGTH = 452;
export const PUBLIC_CONTEXT_INPUTS_LENGTH = 41;
export const PRIVATE_CIRCUIT_PUBLIC_INPUTS_LENGTH = 444;
export const PUBLIC_CIRCUIT_PUBLIC_INPUTS_LENGTH = 481;
export const PRIVATE_CALL_STACK_ITEM_LENGTH = 447;
export const PUBLIC_CONTEXT_INPUTS_LENGTH = 40;
export const AGGREGATION_OBJECT_LENGTH = 16;
export const SCOPED_READ_REQUEST_LEN = 3;
export const PUBLIC_DATA_READ_LENGTH = 2;
Expand All @@ -169,8 +169,8 @@ export const COMBINED_ACCUMULATED_DATA_LENGTH = 333;
export const COMBINED_CONSTANT_DATA_LENGTH = 41;
export const PUBLIC_CALL_STACK_ITEM_COMPRESSED_LENGTH = 15;
export const CALL_REQUEST_LENGTH = 7;
export const PRIVATE_ACCUMULATED_DATA_LENGTH = 1168;
export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2308;
export const PRIVATE_ACCUMULATED_DATA_LENGTH = 1160;
export const PRIVATE_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 2300;
export const PUBLIC_ACCUMULATED_DATA_LENGTH = 983;
export const PUBLIC_KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 3323;
export const KERNEL_CIRCUIT_PUBLIC_INPUTS_LENGTH = 384;
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<0x267a892d425b73b18f984607ec388d71df8058819eddbfcf2cb8a749596a507e>`;
exports[`PrivateCallStackItem computes empty item hash 1`] = `Fr<0x065f2831db9ac0db5e710bd3a865b5facd8cf83f1585e1af8fd1d6ce9c47f685>`;

exports[`PrivateCallStackItem computes hash 1`] = `Fr<0x0b97fe2235bd5cf9e172a119299a7c2074a0277ccc4c062237dd76811a443779>`;
exports[`PrivateCallStackItem computes hash 1`] = `Fr<0x284f821d2bcea6a1a7fbe596cd7e929085c1c0076133829ae60a6e0d16117bb9>`;
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<0x142dd7d24536af9139b3b190d2061a64c224a50b5c8d5a854b564c2b1032ba49>`;
exports[`PrivateCircuitPublicInputs computes empty inputs hash 1`] = `Fr<0x15c9b0a92b9b541598e24c9f0b0b4b04b7f2408599751c45aa12de671fd9b363>`;

exports[`PrivateCircuitPublicInputs hash matches snapshot 1`] = `Fr<0x2f9b476628870a5740e3a6aae52234d8872b3eba7df610977eca31f93769a18f>`;
exports[`PrivateCircuitPublicInputs hash matches snapshot 1`] = `Fr<0x0fc0a3f32fc96cf98cea1365453385f9ea028ddea94019604e5b9279ccf029e2>`;

0 comments on commit abc5bde

Please sign in to comment.