diff --git a/avm-transpiler/Cargo.lock b/avm-transpiler/Cargo.lock index fcb68171212f..bdc25c24b194 100644 --- a/avm-transpiler/Cargo.lock +++ b/avm-transpiler/Cargo.lock @@ -368,9 +368,9 @@ dependencies = [ [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -466,6 +466,15 @@ dependencies = [ "num-bigint", ] +[[package]] +name = "borsh" +version = "1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +dependencies = [ + "cfg_aliases", +] + [[package]] name = "brillig" version = "1.0.0-beta.4" @@ -518,6 +527,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -650,9 +665,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core", @@ -707,11 +722,12 @@ dependencies = [ [[package]] name = "der" -version = "0.6.1" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid", + "pem-rfc7468", "zeroize", ] @@ -732,6 +748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", + "const-oid", "crypto-common", "subtle", ] @@ -749,14 +766,16 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", + "digest", "elliptic-curve", "rfc6979", "signature", + "spki", ] [[package]] @@ -779,17 +798,17 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der", "digest", "ff", "generic-array", "group", + "pem-rfc7468", "pkcs8", "rand_core", "sec1", @@ -874,9 +893,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "ff" -version = "0.12.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ "rand_core", "subtle", @@ -945,6 +964,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -966,9 +986,9 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core", @@ -1273,14 +1293,16 @@ dependencies = [ [[package]] name = "k256" -version = "0.11.6" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", + "once_cell", "sha2", + "signature", ] [[package]] @@ -1386,10 +1408,10 @@ dependencies = [ "codespan-reporting", "flate2", "fm", + "fxhash", "noirc_printable_type", "serde", "serde_json", - "serde_with", "tracing", ] @@ -1407,6 +1429,7 @@ dependencies = [ "noirc_errors", "noirc_frontend", "num-bigint", + "num-integer", "num-traits", "petgraph 0.6.5", "rayon", @@ -1513,12 +1536,13 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "p256" -version = "0.11.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" dependencies = [ "ecdsa", "elliptic-curve", + "primeorder", "sha2", ] @@ -1528,6 +1552,15 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.1" @@ -1562,9 +1595,9 @@ checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pkcs8" -version = "0.9.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der", "spki", @@ -1592,6 +1625,15 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -1767,13 +1809,12 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", "hmac", - "zeroize", + "subtle", ] [[package]] @@ -1820,9 +1861,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustix" @@ -1883,9 +1924,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -2002,9 +2043,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signature" -version = "1.6.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest", "rand_core", @@ -2040,10 +2081,11 @@ dependencies = [ [[package]] name = "smol_str" -version = "0.1.24" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad6c857cbab2627dcf01ec85a623ca4e7dcb5691cbaa3d7fb7653671f0d09c9" +checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d" dependencies = [ + "borsh", "serde", ] @@ -2055,9 +2097,9 @@ checksum = "bceb57dc07c92cdae60f5b27b3fa92ecaaa42fe36c55e22dbfb0b44893e0b1f7" [[package]] name = "spki" -version = "0.6.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der", diff --git a/avm-transpiler/src/transpile.rs b/avm-transpiler/src/transpile.rs index 56a95704d7d2..b00d5ff67936 100644 --- a/avm-transpiler/src/transpile.rs +++ b/avm-transpiler/src/transpile.rs @@ -1688,7 +1688,7 @@ pub fn patch_debug_info_pcs( for (original_opcode_location, source_locations) in opcode_locations_map.iter() { let avm_opcode_location = BrilligOpcodeLocation(brillig_pcs_to_avm_pcs[original_opcode_location.0]); - patched_locations.insert(avm_opcode_location, source_locations.clone()); + patched_locations.insert(avm_opcode_location, *source_locations); } // insert the new map as a brillig locations map for the current function id patched_brillig_locations.insert(*brillig_function_id, patched_locations); diff --git a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/burn_public.nr b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/burn_public.nr index 5306538603e1..63df4233c5d1 100644 --- a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/burn_public.nr +++ b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/burn_public.nr @@ -35,7 +35,7 @@ unconstrained fn burn_public_on_behalf_of_other() { utils::check_public_balance(token_contract_address, owner, mint_amount - burn_amount); } -#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow 'self - other'")] +#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow")] unconstrained fn burn_public_failure_more_than_balance() { let (env, token_contract_address, owner, _, mint_amount) = utils::setup_and_mint_to_public(/* with_account_contracts */ false); diff --git a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_in_public.nr b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_in_public.nr index fb9ffa49c921..aa808f9d788b 100644 --- a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_in_public.nr +++ b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_in_public.nr @@ -57,7 +57,7 @@ unconstrained fn public_transfer_on_behalf_of_other() { utils::check_public_balance(token_contract_address, recipient, transfer_amount); } -#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow 'self - other'")] +#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow")] unconstrained fn public_transfer_failure_more_than_balance() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, recipient, mint_amount) = @@ -106,7 +106,7 @@ unconstrained fn public_transfer_failure_on_behalf_of_other_without_approval() { public_transfer_in_private_call_interface.call(&mut env.public()); } -#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow 'self - other'")] +#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow")] unconstrained fn public_transfer_failure_on_behalf_of_other_more_than_balance() { // Setup with account contracts. Slower since we actually deploy them, but needed for authwits. let (env, token_contract_address, owner, recipient, mint_amount) = diff --git a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr index 1434b5e9487d..69d5709c4657 100644 --- a/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr +++ b/noir-projects/noir-contracts/contracts/app/token_contract/src/test/transfer_to_private.nr @@ -63,7 +63,7 @@ unconstrained fn transfer_to_private_transfer_not_prepared() { ); } -#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow 'self - other'")] +#[test(should_fail_with = "Assertion failed: attempt to subtract with overflow")] unconstrained fn transfer_to_private_failure_not_an_owner() { // Setup without account contracts. We are not using authwits here, so dummy accounts are enough let (env, token_contract_address, owner, not_owner, amount) = diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index 74e15eac9647..ccc1030cc6bd 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-04-22 +nightly-2025-04-28 diff --git a/yarn-project/end-to-end/src/e2e_account_contracts.test.ts b/yarn-project/end-to-end/src/e2e_account_contracts.test.ts index 60af5112ba1a..2e60f6efcdd4 100644 --- a/yarn-project/end-to-end/src/e2e_account_contracts.test.ts +++ b/yarn-project/end-to-end/src/e2e_account_contracts.test.ts @@ -78,7 +78,7 @@ const itShouldBehaveLikeAnAccountContract = ( const entrypoint = randomContract.getInterface(accountAddress, nodeInfo); const invalidWallet = new AccountWallet(pxe, entrypoint); const childWithInvalidWallet = await ChildContract.at(child.address, invalidWallet); - await expect(childWithInvalidWallet.methods.value(42).prove()).rejects.toThrow(/Cannot satisfy constraint.*/); + await expect(childWithInvalidWallet.methods.value(42).prove()).rejects.toThrow('Cannot satisfy constraint'); }); }); }; diff --git a/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts b/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts index 54eab8842db1..6028a3a6b2cb 100644 --- a/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts +++ b/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts @@ -34,12 +34,12 @@ describe('e2e_avm_simulator', () => { describe('Not nested', () => { it('PXE processes user code assertions and recovers message', async () => { await expect(avmContract.methods.assertion_failure().simulate()).rejects.toThrow( - "Assertion failed: This assertion should fail! 'not_true == true'", + 'Assertion failed: This assertion should fail!', ); }); it('PXE processes user code assertions and recovers message (complex)', async () => { await expect(avmContract.methods.assert_nullifier_exists(123).simulate()).rejects.toThrow( - "Assertion failed: Nullifier doesn't exist! 'context.nullifier_exists(nullifier, context.this_address())'", + "Assertion failed: Nullifier doesn't exist!", ); }); it('PXE processes intrinsic assertions and recovers message', async () => { @@ -49,7 +49,7 @@ describe('e2e_avm_simulator', () => { describe('Nested', () => { it('PXE processes user code assertions and recovers message', async () => { await expect(avmContract.methods.external_call_to_assertion_failure().simulate()).rejects.toThrow( - "Assertion failed: This assertion should fail! 'not_true == true'", + 'Assertion failed: This assertion should fail!', ); }); it('PXE processes intrinsic assertions and recovers message', async () => { diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/access_control.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/access_control.test.ts index 569317987d8b..f99bfbf2bb82 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/access_control.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/access_control.test.ts @@ -76,14 +76,14 @@ describe('e2e_blacklist_token_contract access control', () => { .withWallet(t.other) .methods.update_roles(await AztecAddress.random(), newRole.toNoirStruct()) .prove(), - ).rejects.toThrow(/Assertion failed: caller is not admin .*/); + ).rejects.toThrow('Assertion failed: caller is not admin'); }); it('revoke minter from non admin', async () => { const noRole = new Role(); await expect( t.asset.withWallet(t.other).methods.update_roles(t.admin.getAddress(), noRole.toNoirStruct()).prove(), - ).rejects.toThrow(/Assertion failed: caller is not admin .*/); + ).rejects.toThrow('Assertion failed: caller is not admin'); }); }); }); diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/burn.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/burn.test.ts index b5063b8415da..c184faac5324 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/burn.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/burn.test.ts @@ -240,7 +240,7 @@ describe('e2e_blacklist_token_contract burn', () => { it('burn from blacklisted account', async () => { await expect(asset.methods.burn(blacklisted.getAddress(), 1n, 0).prove()).rejects.toThrow( - /Assertion failed: Blacklisted: Sender .*/, + 'Assertion failed: Blacklisted: Sender', ); }); }); diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts index b12a974feb89..0ce37738f6ed 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/minting.test.ts @@ -112,7 +112,7 @@ describe('e2e_blacklist_token_contract mint', () => { await expect( asset.withWallet(wallets[1]).methods.redeem_shield(wallets[1].getAddress(), amount, secret).prove(), - ).rejects.toThrow(`Assertion failed: note not popped 'notes.len() == 1'`); + ).rejects.toThrow(`Assertion failed: note not popped`); }); it('mint_private as non-minter', async () => { @@ -140,7 +140,7 @@ describe('e2e_blacklist_token_contract mint', () => { it('mint and try to redeem at blacklist', async () => { await expect(asset.methods.redeem_shield(blacklisted.getAddress(), amount, secret).prove()).rejects.toThrow( - /Assertion failed: Blacklisted: Recipient .*/, + 'Assertion failed: Blacklisted: Recipient', ); }); }); diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/shielding.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/shielding.test.ts index ea80f8b846f9..90ae88ec20aa 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/shielding.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/shielding.test.ts @@ -145,7 +145,7 @@ describe('e2e_blacklist_token_contract shield + redeem_shield', () => { it('shielding from blacklisted account', async () => { await expect( asset.withWallet(blacklisted).methods.shield(blacklisted.getAddress(), 1n, secretHash, 0).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Sender .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Sender'); }); }); }); diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_private.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_private.test.ts index 1aceae6956c7..1104f86f64db 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_private.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_private.test.ts @@ -173,13 +173,13 @@ describe('e2e_blacklist_token_contract transfer private', () => { it('transfer from a blacklisted account', async () => { await expect( asset.methods.transfer(blacklisted.getAddress(), wallets[0].getAddress(), 1n, 0).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Sender .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Sender'); }); it('transfer to a blacklisted account', async () => { await expect( asset.methods.transfer(wallets[0].getAddress(), blacklisted.getAddress(), 1n, 0).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Recipient .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Recipient'); }); }); }); diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_public.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_public.test.ts index c54439bd7551..c0e57bffcf8a 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_public.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/transfer_public.test.ts @@ -165,13 +165,13 @@ describe('e2e_blacklist_token_contract transfer public', () => { it('transfer from a blacklisted account', async () => { await expect( asset.methods.transfer_public(blacklisted.getAddress(), wallets[0].getAddress(), 1n, 0n).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Sender .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Sender'); }); it('transfer to a blacklisted account', async () => { await expect( asset.methods.transfer_public(wallets[0].getAddress(), blacklisted.getAddress(), 1n, 0n).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Recipient .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Recipient'); }); }); }); diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/unshielding.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/unshielding.test.ts index 83ff0b4a1593..7318cd8dea45 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract/unshielding.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract/unshielding.test.ts @@ -127,13 +127,13 @@ describe('e2e_blacklist_token_contract unshielding', () => { it('unshield from blacklisted account', async () => { await expect( asset.methods.unshield(blacklisted.getAddress(), wallets[0].getAddress(), 1n, 0).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Sender .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Sender'); }); it('unshield to blacklisted account', async () => { await expect( asset.methods.unshield(wallets[0].getAddress(), blacklisted.getAddress(), 1n, 0).prove(), - ).rejects.toThrow(/Assertion failed: Blacklisted: Recipient .*/); + ).rejects.toThrow('Assertion failed: Blacklisted: Recipient'); }); }); }); diff --git a/yarn-project/end-to-end/src/e2e_fees/dapp_subscription.test.ts b/yarn-project/end-to-end/src/e2e_fees/dapp_subscription.test.ts index b350ad45d67a..f06eca41ecf6 100644 --- a/yarn-project/end-to-end/src/e2e_fees/dapp_subscription.test.ts +++ b/yarn-project/end-to-end/src/e2e_fees/dapp_subscription.test.ts @@ -176,7 +176,7 @@ describe('e2e_fees dapp_subscription', () => { // Subscribe again. This will overwrite the previous subscription. await subscribe(new PrivateFeePaymentMethod(bananaFPC.address, aliceWallet), 5, 1); await expect(dappIncrement()).resolves.toBeDefined(); - await expect(dappIncrement()).rejects.toThrow(/note.remaining_txs as u64 > 0/); + await expect(dappIncrement()).rejects.toThrow("you're out of txs"); }); async function subscribe(paymentMethod: FeePaymentMethod, blockDelta: number = 5, txCount: number = 4) { diff --git a/yarn-project/end-to-end/src/e2e_note_getter.test.ts b/yarn-project/end-to-end/src/e2e_note_getter.test.ts index 33cd02edc9d8..8e2f2f2b45d5 100644 --- a/yarn-project/end-to-end/src/e2e_note_getter.test.ts +++ b/yarn-project/end-to-end/src/e2e_note_getter.test.ts @@ -94,11 +94,12 @@ describe('e2e_note_getter', () => { } async function assertNoReturnValue(storageSlot: number, activeOrNullified: boolean) { + const expectedError = 'Assertion failed: Attempted to read past end of BoundedVec'; await expect(contract.methods.call_view_notes(storageSlot, activeOrNullified).simulate()).rejects.toThrow( - 'index < self.len', // from BoundedVec::get + expectedError, ); await expect(contract.methods.call_get_notes(storageSlot, activeOrNullified).prove()).rejects.toThrow( - `Assertion failed: Attempted to read past end of BoundedVec`, + expectedError, ); } diff --git a/yarn-project/end-to-end/src/fixtures/fixtures.ts b/yarn-project/end-to-end/src/fixtures/fixtures.ts index 119b4ecae46f..2f2c200d8a18 100644 --- a/yarn-project/end-to-end/src/fixtures/fixtures.ts +++ b/yarn-project/end-to-end/src/fixtures/fixtures.ts @@ -14,8 +14,8 @@ export const privateKey = Buffer.from('ac0974bec39a17e36ba4a6b4d238ff944bacb478c export const privateKey2 = Buffer.from('59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d', 'hex'); /// Common errors -export const U128_UNDERFLOW_ERROR = "Assertion failed: attempt to subtract with overflow 'self - other'"; -export const U128_OVERFLOW_ERROR = "Assertion failed: attempt to add with overflow 'self + other'"; +export const U128_UNDERFLOW_ERROR = 'Assertion failed: attempt to subtract with overflow'; +export const U128_OVERFLOW_ERROR = 'Assertion failed: attempt to add with overflow'; export const BITSIZE_TOO_BIG_ERROR = "Assertion failed: call to assert_max_bit_size 'self.__assert_max_bit_size'"; // TODO(https://github.com/AztecProtocol/aztec-packages/issues/5818): Make these a fixed error after transition. export const DUPLICATE_NULLIFIER_ERROR = /dropped|nullifier|reverted/i; diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 1657381f00db..2b2c3ce0e566 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -972,7 +972,7 @@ __metadata: resolution: "@aztec/noir-noir_codegen@portal:../noir/packages/noir_codegen::locator=%40aztec%2Faztec3-packages%40workspace%3A." dependencies: "@aztec/noir-types": "npm:1.0.0-beta.4" - glob: "npm:^10.4.5" + glob: "npm:^11.0.1" ts-command-line-args: "npm:^2.5.1" bin: noir-codegen: lib/main.js @@ -981,13 +981,13 @@ __metadata: "@aztec/noir-noir_js@file:../noir/packages/noir_js::locator=%40aztec%2Faztec3-packages%40workspace%3A.": version: 1.0.0-beta.4 - resolution: "@aztec/noir-noir_js@file:../noir/packages/noir_js#../noir/packages/noir_js::hash=c6552c&locator=%40aztec%2Faztec3-packages%40workspace%3A." + resolution: "@aztec/noir-noir_js@file:../noir/packages/noir_js#../noir/packages/noir_js::hash=67ebc4&locator=%40aztec%2Faztec3-packages%40workspace%3A." dependencies: "@aztec/noir-acvm_js": "npm:1.0.0-beta.4" "@aztec/noir-noirc_abi": "npm:1.0.0-beta.4" "@aztec/noir-types": "npm:1.0.0-beta.4" pako: "npm:^2.1.0" - checksum: 10/5837f4c888ae8387a3acd02c0593ab1d2c20ea0e68f92f55ed7897ec9960720e6bc1f79848ab0d46421c22b97110dcf4b84aca5c4876b36934df0dd4c54cc1eb + checksum: 10/e53997a2fdc2ca0f4b26875e0e2c0fb8b10238d4632fb1589bb2c14e980f55289a625e3766375b12179af3bf0f3626d1c8015c412368fbdc0d18b8776b08bf92 languageName: node linkType: hard @@ -12383,19 +12383,19 @@ __metadata: languageName: node linkType: hard -"glob@npm:^10.4.5": - version: 10.4.5 - resolution: "glob@npm:10.4.5" +"glob@npm:^11.0.1": + version: 11.0.2 + resolution: "glob@npm:11.0.2" dependencies: foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" + jackspeak: "npm:^4.0.1" + minimatch: "npm:^10.0.0" minipass: "npm:^7.1.2" package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" + path-scurry: "npm:^2.0.0" bin: glob: dist/esm/bin.mjs - checksum: 10/698dfe11828b7efd0514cd11e573eaed26b2dff611f0400907281ce3eab0c1e56143ef9b35adc7c77ecc71fba74717b510c7c223d34ca8a98ec81777b293d4ac + checksum: 10/53501530240150fdceb9ace47ab856acd1e0d598f8101b0760b665fc11dae2160d366563b89232ae4f5df7ddba8f7c92294719268fe932bd3a32d16cc58c3d02 languageName: node linkType: hard @@ -14110,16 +14110,12 @@ __metadata: languageName: node linkType: hard -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" +"jackspeak@npm:^4.0.1": + version: 4.1.0 + resolution: "jackspeak@npm:4.1.0" dependencies: "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10/96f8786eaab98e4bf5b2a5d6d9588ea46c4d06bbc4f2eb861fdd7b6b182b16f71d8a70e79820f335d52653b16d4843b29dd9cdcf38ae80406756db9199497cf3 + checksum: 10/d3ad964e87a3d66ec86b6d466ff150cf3472bbda738a9c4f882ece96c7fb59f0013be1f6cad17cbedd36260741db6cf8912b8e037cd7c7eb72b3532246e54f77 languageName: node linkType: hard @@ -15490,6 +15486,13 @@ __metadata: languageName: node linkType: hard +"lru-cache@npm:^11.0.0": + version: 11.1.0 + resolution: "lru-cache@npm:11.1.0" + checksum: 10/5011011675ca98428902de774d0963b68c3a193cd959347cb63b781dad4228924124afab82159fd7b8b4db18285d9aff462b877b8f6efd2b41604f806c1d9db4 + languageName: node + linkType: hard + "lru-cache@npm:^5.1.1": version: 5.1.1 resolution: "lru-cache@npm:5.1.1" @@ -15889,6 +15892,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:^10.0.0": + version: 10.0.1 + resolution: "minimatch@npm:10.0.1" + dependencies: + brace-expansion: "npm:^2.0.1" + checksum: 10/082e7ccbc090d5f8c4e4e029255d5a1d1e3af37bda837da2b8b0085b1503a1210c91ac90d9ebfe741d8a5f286ece820a1abb4f61dc1f82ce602a055d461d93f3 + languageName: node + linkType: hard + "minimatch@npm:^5.0.1, minimatch@npm:^5.1.6": version: 5.1.6 resolution: "minimatch@npm:5.1.6" @@ -15907,7 +15919,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": +"minimatch@npm:^9.0.3": version: 9.0.5 resolution: "minimatch@npm:9.0.5" dependencies: @@ -17296,13 +17308,13 @@ __metadata: languageName: node linkType: hard -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" +"path-scurry@npm:^2.0.0": + version: 2.0.0 + resolution: "path-scurry@npm:2.0.0" dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10/5e8845c159261adda6f09814d7725683257fcc85a18f329880ab4d7cc1d12830967eae5d5894e453f341710d5484b8fdbbd4d75181b4d6e1eb2f4dc7aeadc434 + lru-cache: "npm:^11.0.0" + minipass: "npm:^7.1.2" + checksum: 10/285ae0c2d6c34ae91dc1d5378ede21981c9a2f6de1ea9ca5a88b5a270ce9763b83dbadc7a324d512211d8d36b0c540427d3d0817030849d97a60fa840a2c59ec languageName: node linkType: hard