From 02c4ee276f81a9b1f7e4d59a00a870781cf88b4f Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 25 Jun 2025 08:10:28 +0000 Subject: [PATCH 01/23] chore: Update noir-repo-ref to nightly-2025-06-25 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index f04bbe0c7c07..fe5620d60031 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-24 +nightly-2025-06-25 From 7d2d77846ef46a86df35e223a804bc940cca791f Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:54:34 +0000 Subject: [PATCH 02/23] chore: update avm-transpiler lockfile --- avm-transpiler/Cargo.lock | 2 ++ noir/bootstrap.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/avm-transpiler/Cargo.lock b/avm-transpiler/Cargo.lock index 5e44af004bb0..9c75f14da7d0 100644 --- a/avm-transpiler/Cargo.lock +++ b/avm-transpiler/Cargo.lock @@ -62,6 +62,7 @@ dependencies = [ "k256", "keccak", "libaes", + "log", "num-bigint", "p256", "sha2", @@ -1425,6 +1426,7 @@ dependencies = [ "bn254_blackbox_solver", "cfg-if", "chrono", + "fm", "fxhash", "im", "iter-extended", diff --git a/noir/bootstrap.sh b/noir/bootstrap.sh index ad8b90db131b..8c9bbb12bc8e 100755 --- a/noir/bootstrap.sh +++ b/noir/bootstrap.sh @@ -225,6 +225,9 @@ function bump_noir_repo_ref { git checkout --track origin/$branch || git checkout $branch || git checkout -b $branch scripts/sync.sh write-noir-repo-ref $ref + # Update the Cargo.lock file in the transpiler to match the new ref. + cargo check --manifest-path="../avm-transpiler/Cargo.toml" + # Build nargo and run formatter on `noir-projects` build_native ../noir-projects/bootstrap.sh format From ee329875d3a9ee2e749f51edba274e98233c3deb Mon Sep 17 00:00:00 2001 From: AztecBot Date: Thu, 26 Jun 2025 08:10:21 +0000 Subject: [PATCH 03/23] chore: Update noir-repo-ref to nightly-2025-06-26 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index fe5620d60031..b56117585280 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-25 +nightly-2025-06-26 From 8b247d6f4cb9a891317d15f1391c6dc2f8ececdc Mon Sep 17 00:00:00 2001 From: AztecBot Date: Fri, 27 Jun 2025 08:10:32 +0000 Subject: [PATCH 04/23] chore: Update noir-repo-ref to nightly-2025-06-27 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index b56117585280..e1fde0ed0684 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-26 +nightly-2025-06-27 From 3f77add75ba69c79f59709aabc028eb6ba3aec5a Mon Sep 17 00:00:00 2001 From: AztecBot Date: Sat, 28 Jun 2025 08:09:19 +0000 Subject: [PATCH 05/23] chore: Update noir-repo-ref to nightly-2025-06-28 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index e1fde0ed0684..a063256199eb 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-27 +nightly-2025-06-28 From fd6709bb283d0165427edb4ef4a974ff33cc3017 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Sun, 29 Jun 2025 08:09:08 +0000 Subject: [PATCH 06/23] chore: Update noir-repo-ref to nightly-2025-06-29 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index a063256199eb..d87d171a8378 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-28 +nightly-2025-06-29 From f232a88941630852e37636d812a018b3f493a8f1 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Mon, 30 Jun 2025 08:10:34 +0000 Subject: [PATCH 07/23] chore: Update noir-repo-ref to nightly-2025-06-30 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index d87d171a8378..c7d2c058f53e 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-29 +nightly-2025-06-30 From c9d734cf97e84449fb1f5ad6f42b13ac62143580 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 30 Jun 2025 12:22:31 +0000 Subject: [PATCH 08/23] . --- barretenberg/acir_tests/bootstrap.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/barretenberg/acir_tests/bootstrap.sh b/barretenberg/acir_tests/bootstrap.sh index fe4977e3166e..99654091325e 100755 --- a/barretenberg/acir_tests/bootstrap.sh +++ b/barretenberg/acir_tests/bootstrap.sh @@ -95,6 +95,8 @@ function build { cp -R ../../noir/noir-repo/test_programs/execution_success acir_tests # Running these requires extra gluecode so they're skipped. rm -rf acir_tests/{diamond_deps_0,workspace,workspace_default_member,regression_7323} + + rm -rf acir_tests/{ecdsa_secp256k1_invalid_pub_key_in_inactive_branch, ecdsa_secp256r1_invalid_pub_key_in_inactive_branch} # These are breaking with: # Failed to solve program: 'Failed to solve blackbox function: embedded_curve_add, reason: Infinite input: embedded_curve_add(infinity, infinity)' rm -rf acir_tests/{regression_5045,regression_7744} From b8d1611a9d09c3458ff8cf8da4746ca8c4829e84 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 30 Jun 2025 12:45:53 +0000 Subject: [PATCH 09/23] . --- barretenberg/acir_tests/bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barretenberg/acir_tests/bootstrap.sh b/barretenberg/acir_tests/bootstrap.sh index 99654091325e..be4b975818fc 100755 --- a/barretenberg/acir_tests/bootstrap.sh +++ b/barretenberg/acir_tests/bootstrap.sh @@ -96,7 +96,7 @@ function build { # Running these requires extra gluecode so they're skipped. rm -rf acir_tests/{diamond_deps_0,workspace,workspace_default_member,regression_7323} - rm -rf acir_tests/{ecdsa_secp256k1_invalid_pub_key_in_inactive_branch, ecdsa_secp256r1_invalid_pub_key_in_inactive_branch} + rm -rf acir_tests/{ecdsa_secp256k1_invalid_pub_key_in_inactive_branch,ecdsa_secp256r1_invalid_pub_key_in_inactive_branch} # These are breaking with: # Failed to solve program: 'Failed to solve blackbox function: embedded_curve_add, reason: Infinite input: embedded_curve_add(infinity, infinity)' rm -rf acir_tests/{regression_5045,regression_7744} From bcc4af9b108fd345928376953628e5986e187f69 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 30 Jun 2025 13:21:07 +0000 Subject: [PATCH 10/23] . --- barretenberg/acir_tests/.rebuild_patterns | 1 + 1 file changed, 1 insertion(+) diff --git a/barretenberg/acir_tests/.rebuild_patterns b/barretenberg/acir_tests/.rebuild_patterns index f621d5d3ef8e..2c65f18e90fe 100644 --- a/barretenberg/acir_tests/.rebuild_patterns +++ b/barretenberg/acir_tests/.rebuild_patterns @@ -1 +1,2 @@ ^acir_tests/scripts/run_test.sh +^acir_tests/bootstrap.sh From 90edb308ace8d2b653138a479ed61768001a24e1 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 30 Jun 2025 15:46:37 +0000 Subject: [PATCH 11/23] . --- barretenberg/acir_tests/.rebuild_patterns | 1 - 1 file changed, 1 deletion(-) diff --git a/barretenberg/acir_tests/.rebuild_patterns b/barretenberg/acir_tests/.rebuild_patterns index 2c65f18e90fe..f621d5d3ef8e 100644 --- a/barretenberg/acir_tests/.rebuild_patterns +++ b/barretenberg/acir_tests/.rebuild_patterns @@ -1,2 +1 @@ ^acir_tests/scripts/run_test.sh -^acir_tests/bootstrap.sh From e0839c1a9c216a5418e2100c476205b5bef0bfea Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Mon, 30 Jun 2025 17:01:16 +0000 Subject: [PATCH 12/23] . --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index c7d2c058f53e..909187e19a29 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-06-30 +d6920017a3b1ae0a1c927e50b01ca748d901e9ce From d7d8b83fee75b05706cdb0ab77378e9be90840b3 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 16:26:39 -0300 Subject: [PATCH 13/23] Try with a good format --- noir/noir-repo.patch | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/noir/noir-repo.patch b/noir/noir-repo.patch index 8e678584be00..c7a00d3cb762 100644 --- a/noir/noir-repo.patch +++ b/noir/noir-repo.patch @@ -1,23 +1,37 @@ -From e17834fb9768e2d5cfc053e4ce8c82da0586a099 Mon Sep 17 00:00:00 2001 -From: TomAFrench -Date: Sat, 15 Mar 2025 15:36:12 +0000 -Subject: [PATCH 1/2] chore: turn on `skipLibCheck` +From 44af51035b8904db352bee5316da56b121cf86d6 Mon Sep 17 00:00:00 2001 +From: Ary Borenszweig +Date: Mon, 30 Jun 2025 16:25:29 -0300 +Subject: [PATCH] Patch --- - tooling/noir_codegen/tsconfig.json | 1 + - 1 file changed, 1 insertion(+) + tooling/noir_codegen/src/utils/demonomorphizer.ts | 2 +- + tooling/noir_codegen/tsconfig.json | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) +diff --git a/tooling/noir_codegen/src/utils/demonomorphizer.ts b/tooling/noir_codegen/src/utils/demonomorphizer.ts +index 2b33b57455..e5b80a63d3 100644 +--- a/tooling/noir_codegen/src/utils/demonomorphizer.ts ++++ b/tooling/noir_codegen/src/utils/demonomorphizer.ts +@@ -199,7 +199,7 @@ export class Demonomorphizer { + const unifiedStruct = structs[0]; + + if (!structs.every((struct) => struct.args.length === unifiedStruct.args.length)) { +- throw new Error('Same struct with different number of args encountered'); ++ throw new Error(`Same struct with different number of args encountered: ${unifiedStruct.structType.path}`); + } + for (let i = 0; i < unifiedStruct.args.length; i++) { + const argTypes = structs.map((struct) => struct.args[i]); diff --git a/tooling/noir_codegen/tsconfig.json b/tooling/noir_codegen/tsconfig.json -index 30dd2a7ee..a2712fd73 100644 +index 30dd2a7ee5..223eb568a2 100644 --- a/tooling/noir_codegen/tsconfig.json +++ b/tooling/noir_codegen/tsconfig.json @@ -10,6 +10,7 @@ "resolveJsonModule": true, "strict": true, "noImplicitAny": false, -+ "skipLibCheck": true ++ "skipLibCheck": true, }, "include": [ "src/**/*.ts" -- -2.43.0 +2.45.2 From 455ee78cb146d88d1341ba435a884d0cc1bc894b Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 16:52:02 -0300 Subject: [PATCH 14/23] Show more info --- noir/noir-repo.patch | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/noir/noir-repo.patch b/noir/noir-repo.patch index c7a00d3cb762..973c3f78ef15 100644 --- a/noir/noir-repo.patch +++ b/noir/noir-repo.patch @@ -1,23 +1,28 @@ -From 44af51035b8904db352bee5316da56b121cf86d6 Mon Sep 17 00:00:00 2001 +From fb8146c8d5726b6e5f76163f130759059a408564 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 16:25:29 -0300 Subject: [PATCH] Patch --- - tooling/noir_codegen/src/utils/demonomorphizer.ts | 2 +- + tooling/noir_codegen/src/utils/demonomorphizer.ts | 7 ++++++- tooling/noir_codegen/tsconfig.json | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tooling/noir_codegen/src/utils/demonomorphizer.ts b/tooling/noir_codegen/src/utils/demonomorphizer.ts -index 2b33b57455..e5b80a63d3 100644 +index 2b33b57455..9a75f9d5a1 100644 --- a/tooling/noir_codegen/src/utils/demonomorphizer.ts +++ b/tooling/noir_codegen/src/utils/demonomorphizer.ts -@@ -199,7 +199,7 @@ export class Demonomorphizer { +@@ -199,7 +199,12 @@ export class Demonomorphizer { const unifiedStruct = structs[0]; if (!structs.every((struct) => struct.args.length === unifiedStruct.args.length)) { - throw new Error('Same struct with different number of args encountered'); -+ throw new Error(`Same struct with different number of args encountered: ${unifiedStruct.structType.path}`); ++ let message = "Same struct with different number of args encountered: "; ++ structs.forEach(function(struct) { ++ message += `${struct.structType.path} (${struct.args.length}), `; ++ }); ++ ++ throw new Error(message); } for (let i = 0; i < unifiedStruct.args.length; i++) { const argTypes = structs.map((struct) => struct.args[i]); @@ -35,3 +40,4 @@ index 30dd2a7ee5..223eb568a2 100644 "src/**/*.ts" -- 2.45.2 + From de5a8a694d5c4d0cff15be0ced155d4e1ca63159 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 17:37:54 -0300 Subject: [PATCH 15/23] More info --- noir/noir-repo.patch | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/noir/noir-repo.patch b/noir/noir-repo.patch index 973c3f78ef15..d16265bfd4c0 100644 --- a/noir/noir-repo.patch +++ b/noir/noir-repo.patch @@ -1,25 +1,29 @@ -From fb8146c8d5726b6e5f76163f130759059a408564 Mon Sep 17 00:00:00 2001 +From d1fba4b755df3e767f9c6a419cf324ea9a379d44 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 16:25:29 -0300 Subject: [PATCH] Patch --- - tooling/noir_codegen/src/utils/demonomorphizer.ts | 7 ++++++- - tooling/noir_codegen/tsconfig.json | 1 + - 2 files changed, 7 insertions(+), 1 deletion(-) + tooling/noir_codegen/src/utils/demonomorphizer.ts | 11 ++++++++++- + tooling/noir_codegen/tsconfig.json | 1 + + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tooling/noir_codegen/src/utils/demonomorphizer.ts b/tooling/noir_codegen/src/utils/demonomorphizer.ts -index 2b33b57455..9a75f9d5a1 100644 +index 2b33b57455..3f5887b3cb 100644 --- a/tooling/noir_codegen/src/utils/demonomorphizer.ts +++ b/tooling/noir_codegen/src/utils/demonomorphizer.ts -@@ -199,7 +199,12 @@ export class Demonomorphizer { +@@ -199,7 +199,16 @@ export class Demonomorphizer { const unifiedStruct = structs[0]; if (!structs.every((struct) => struct.args.length === unifiedStruct.args.length)) { - throw new Error('Same struct with different number of args encountered'); + let message = "Same struct with different number of args encountered: "; + structs.forEach(function(struct) { -+ message += `${struct.structType.path} (${struct.args.length}), `; ++ message += `${struct.structType.path} (`; ++ struct.args.forEach(function(arg) { ++ message += `${arg.kind}, `; ++ }) ++ message += '), '; + }); + + throw new Error(message); @@ -40,4 +44,3 @@ index 30dd2a7ee5..223eb568a2 100644 "src/**/*.ts" -- 2.45.2 - From 9d3285e10c204242f19f15d915fff04cc8bc189d Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 19:07:17 -0300 Subject: [PATCH 16/23] Let's try to see what the ABI is... --- noir/noir-repo.patch | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/noir/noir-repo.patch b/noir/noir-repo.patch index d16265bfd4c0..9327da84e8cb 100644 --- a/noir/noir-repo.patch +++ b/noir/noir-repo.patch @@ -1,12 +1,13 @@ -From d1fba4b755df3e767f9c6a419cf324ea9a379d44 Mon Sep 17 00:00:00 2001 +From 8110ae083d311c9b696e849e2471cbccc3b0f651 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 16:25:29 -0300 Subject: [PATCH] Patch --- - tooling/noir_codegen/src/utils/demonomorphizer.ts | 11 ++++++++++- - tooling/noir_codegen/tsconfig.json | 1 + - 2 files changed, 11 insertions(+), 1 deletion(-) + tooling/noir_codegen/src/utils/demonomorphizer.ts | 11 ++++++++++- + tooling/noir_codegen/src/utils/typings_generator.ts | 4 +++- + tooling/noir_codegen/tsconfig.json | 1 + + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tooling/noir_codegen/src/utils/demonomorphizer.ts b/tooling/noir_codegen/src/utils/demonomorphizer.ts index 2b33b57455..3f5887b3cb 100644 @@ -30,6 +31,21 @@ index 2b33b57455..3f5887b3cb 100644 } for (let i = 0; i < unifiedStruct.args.length; i++) { const argTypes = structs.map((struct) => struct.args[i]); +diff --git a/tooling/noir_codegen/src/utils/typings_generator.ts b/tooling/noir_codegen/src/utils/typings_generator.ts +index 886ae8b7c5..a80580a2a8 100644 +--- a/tooling/noir_codegen/src/utils/typings_generator.ts ++++ b/tooling/noir_codegen/src/utils/typings_generator.ts +@@ -98,7 +98,9 @@ export class TypingsGenerator { + ) { + // Map all the types used in the ABIs to the demonomorphized types + for (const { abi, circuitName, artifact } of circuits) { +- const params = abi.parameters.map((param) => { ++ console.error(JSON.stringify(abi, null, 2)); ++ ++ const params = abi.parameters.map((param) => { + const type = mapAbiTypeToAbiTypeWithGenerics(param.type, this.allTypes); + return { name: param.name, type }; + }); diff --git a/tooling/noir_codegen/tsconfig.json b/tooling/noir_codegen/tsconfig.json index 30dd2a7ee5..223eb568a2 100644 --- a/tooling/noir_codegen/tsconfig.json From 67232cf8bc8245ec22846616150a5030d9afac17 Mon Sep 17 00:00:00 2001 From: AztecBot Date: Tue, 1 Jul 2025 08:10:16 +0000 Subject: [PATCH 17/23] chore: Update noir-repo-ref to nightly-2025-07-01 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index 909187e19a29..32aa8669b353 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -d6920017a3b1ae0a1c927e50b01ca748d901e9ce +nightly-2025-07-01 From 06fa558f5ef1fec5a562cdeba792e1c1acadc8c2 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 1 Jul 2025 08:54:22 -0300 Subject: [PATCH 18/23] Show which ABIs failed --- noir/noir-repo.patch | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/noir/noir-repo.patch b/noir/noir-repo.patch index 9327da84e8cb..1bbb18040115 100644 --- a/noir/noir-repo.patch +++ b/noir/noir-repo.patch @@ -1,13 +1,13 @@ -From 8110ae083d311c9b696e849e2471cbccc3b0f651 Mon Sep 17 00:00:00 2001 +From 087b6fd3239706dc74d241ce607ba7ef02148bfc Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Mon, 30 Jun 2025 16:25:29 -0300 Subject: [PATCH] Patch --- - tooling/noir_codegen/src/utils/demonomorphizer.ts | 11 ++++++++++- - tooling/noir_codegen/src/utils/typings_generator.ts | 4 +++- - tooling/noir_codegen/tsconfig.json | 1 + - 3 files changed, 14 insertions(+), 2 deletions(-) + .../noir_codegen/src/utils/demonomorphizer.ts | 11 +++++++++- + .../src/utils/typings_generator.ts | 22 ++++++++++++++----- + tooling/noir_codegen/tsconfig.json | 1 + + 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/tooling/noir_codegen/src/utils/demonomorphizer.ts b/tooling/noir_codegen/src/utils/demonomorphizer.ts index 2b33b57455..3f5887b3cb 100644 @@ -32,20 +32,45 @@ index 2b33b57455..3f5887b3cb 100644 for (let i = 0; i < unifiedStruct.args.length; i++) { const argTypes = structs.map((struct) => struct.args[i]); diff --git a/tooling/noir_codegen/src/utils/typings_generator.ts b/tooling/noir_codegen/src/utils/typings_generator.ts -index 886ae8b7c5..a80580a2a8 100644 +index 886ae8b7c5..69dce814df 100644 --- a/tooling/noir_codegen/src/utils/typings_generator.ts +++ b/tooling/noir_codegen/src/utils/typings_generator.ts -@@ -98,7 +98,9 @@ export class TypingsGenerator { +@@ -98,7 +98,7 @@ export class TypingsGenerator { ) { // Map all the types used in the ABIs to the demonomorphized types for (const { abi, circuitName, artifact } of circuits) { - const params = abi.parameters.map((param) => { -+ console.error(JSON.stringify(abi, null, 2)); -+ + const params = abi.parameters.map((param) => { const type = mapAbiTypeToAbiTypeWithGenerics(param.type, this.allTypes); return { name: param.name, type }; }); +@@ -109,11 +109,21 @@ export class TypingsGenerator { + this.demonomorphizedAbis.push({ circuitName, params, artifact }); + } + } +- // Demonomorphize the types +- Demonomorphizer.demonomorphize(this.allTypes, { +- leaveArrayLengthsUnbounded: !useFixedLengthArrays, +- leaveStringLengthsUnbounded: true, +- }); ++ ++ try { ++ // Demonomorphize the types ++ Demonomorphizer.demonomorphize(this.allTypes, { ++ leaveArrayLengthsUnbounded: !useFixedLengthArrays, ++ leaveStringLengthsUnbounded: true, ++ }); ++ } catch(error) { ++ console.error("Failed to demonomorphize types. The ABIs are:"); ++ for (const { abi, circuitName, artifact } of circuits) { ++ console.error(JSON.stringify(abi, null, 2)); ++ } ++ throw error; ++ ++ } + } + + public codegen(): string { diff --git a/tooling/noir_codegen/tsconfig.json b/tooling/noir_codegen/tsconfig.json index 30dd2a7ee5..223eb568a2 100644 --- a/tooling/noir_codegen/tsconfig.json @@ -60,3 +85,4 @@ index 30dd2a7ee5..223eb568a2 100644 "src/**/*.ts" -- 2.45.2 + From 2293856cb6404ea7f590fbc67efe40df8336c936 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 1 Jul 2025 13:23:42 -0300 Subject: [PATCH 19/23] Revert changes to noir-repo.patch --- noir/noir-repo.patch | 83 +++++--------------------------------------- 1 file changed, 9 insertions(+), 74 deletions(-) diff --git a/noir/noir-repo.patch b/noir/noir-repo.patch index 1bbb18040115..8e678584be00 100644 --- a/noir/noir-repo.patch +++ b/noir/noir-repo.patch @@ -1,88 +1,23 @@ -From 087b6fd3239706dc74d241ce607ba7ef02148bfc Mon Sep 17 00:00:00 2001 -From: Ary Borenszweig -Date: Mon, 30 Jun 2025 16:25:29 -0300 -Subject: [PATCH] Patch +From e17834fb9768e2d5cfc053e4ce8c82da0586a099 Mon Sep 17 00:00:00 2001 +From: TomAFrench +Date: Sat, 15 Mar 2025 15:36:12 +0000 +Subject: [PATCH 1/2] chore: turn on `skipLibCheck` --- - .../noir_codegen/src/utils/demonomorphizer.ts | 11 +++++++++- - .../src/utils/typings_generator.ts | 22 ++++++++++++++----- - tooling/noir_codegen/tsconfig.json | 1 + - 3 files changed, 27 insertions(+), 7 deletions(-) + tooling/noir_codegen/tsconfig.json | 1 + + 1 file changed, 1 insertion(+) -diff --git a/tooling/noir_codegen/src/utils/demonomorphizer.ts b/tooling/noir_codegen/src/utils/demonomorphizer.ts -index 2b33b57455..3f5887b3cb 100644 ---- a/tooling/noir_codegen/src/utils/demonomorphizer.ts -+++ b/tooling/noir_codegen/src/utils/demonomorphizer.ts -@@ -199,7 +199,16 @@ export class Demonomorphizer { - const unifiedStruct = structs[0]; - - if (!structs.every((struct) => struct.args.length === unifiedStruct.args.length)) { -- throw new Error('Same struct with different number of args encountered'); -+ let message = "Same struct with different number of args encountered: "; -+ structs.forEach(function(struct) { -+ message += `${struct.structType.path} (`; -+ struct.args.forEach(function(arg) { -+ message += `${arg.kind}, `; -+ }) -+ message += '), '; -+ }); -+ -+ throw new Error(message); - } - for (let i = 0; i < unifiedStruct.args.length; i++) { - const argTypes = structs.map((struct) => struct.args[i]); -diff --git a/tooling/noir_codegen/src/utils/typings_generator.ts b/tooling/noir_codegen/src/utils/typings_generator.ts -index 886ae8b7c5..69dce814df 100644 ---- a/tooling/noir_codegen/src/utils/typings_generator.ts -+++ b/tooling/noir_codegen/src/utils/typings_generator.ts -@@ -98,7 +98,7 @@ export class TypingsGenerator { - ) { - // Map all the types used in the ABIs to the demonomorphized types - for (const { abi, circuitName, artifact } of circuits) { -- const params = abi.parameters.map((param) => { -+ const params = abi.parameters.map((param) => { - const type = mapAbiTypeToAbiTypeWithGenerics(param.type, this.allTypes); - return { name: param.name, type }; - }); -@@ -109,11 +109,21 @@ export class TypingsGenerator { - this.demonomorphizedAbis.push({ circuitName, params, artifact }); - } - } -- // Demonomorphize the types -- Demonomorphizer.demonomorphize(this.allTypes, { -- leaveArrayLengthsUnbounded: !useFixedLengthArrays, -- leaveStringLengthsUnbounded: true, -- }); -+ -+ try { -+ // Demonomorphize the types -+ Demonomorphizer.demonomorphize(this.allTypes, { -+ leaveArrayLengthsUnbounded: !useFixedLengthArrays, -+ leaveStringLengthsUnbounded: true, -+ }); -+ } catch(error) { -+ console.error("Failed to demonomorphize types. The ABIs are:"); -+ for (const { abi, circuitName, artifact } of circuits) { -+ console.error(JSON.stringify(abi, null, 2)); -+ } -+ throw error; -+ -+ } - } - - public codegen(): string { diff --git a/tooling/noir_codegen/tsconfig.json b/tooling/noir_codegen/tsconfig.json -index 30dd2a7ee5..223eb568a2 100644 +index 30dd2a7ee..a2712fd73 100644 --- a/tooling/noir_codegen/tsconfig.json +++ b/tooling/noir_codegen/tsconfig.json @@ -10,6 +10,7 @@ "resolveJsonModule": true, "strict": true, "noImplicitAny": false, -+ "skipLibCheck": true, ++ "skipLibCheck": true }, "include": [ "src/**/*.ts" -- -2.45.2 - +2.43.0 From c4d6807e34d6eddb156ff2f87dcc1d76d7a3dcbb Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 1 Jul 2025 13:24:26 -0300 Subject: [PATCH 20/23] Point noir-ref to 02ef0bd62410df49747081ee68d33b9ef862f560 to see if the issue is fixed --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index 32aa8669b353..3966c687ee01 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -nightly-2025-07-01 +02ef0bd62410df49747081ee68d33b9ef862f560 From fb43ead3a8badf6a97f04b0430d4a62289b00d48 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 1 Jul 2025 13:49:54 -0300 Subject: [PATCH 21/23] Bump again --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index 3966c687ee01..47bface068ac 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -02ef0bd62410df49747081ee68d33b9ef862f560 +3052df21135016a052f99adecca8fb1299e6d74e From 72d171af41b62f81098c829faf4ba1c0ad783b70 Mon Sep 17 00:00:00 2001 From: Ary Borenszweig Date: Tue, 1 Jul 2025 14:13:47 -0300 Subject: [PATCH 22/23] Try the revert, just in case --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index 47bface068ac..e808110e4db3 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -3052df21135016a052f99adecca8fb1299e6d74e +750512eeffb273db548da1a9eb3faaff2810ee81 From 119e50bf377c055aee3fce13588157e0d4d6df9d Mon Sep 17 00:00:00 2001 From: AztecBot Date: Wed, 2 Jul 2025 08:10:52 +0000 Subject: [PATCH 23/23] chore: Update noir-repo-ref to nightly-2025-07-02 --- noir/noir-repo-ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noir/noir-repo-ref b/noir/noir-repo-ref index e808110e4db3..3941717aa8fc 100644 --- a/noir/noir-repo-ref +++ b/noir/noir-repo-ref @@ -1 +1 @@ -750512eeffb273db548da1a9eb3faaff2810ee81 +nightly-2025-07-02