From 249e50efafd306fa8cd9005972636adbddbca81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Rodr=C3=ADguez?= Date: Wed, 4 Sep 2024 10:07:24 +0200 Subject: [PATCH] fix: Transpiler after noir sync (#8353) There is a new field, brillig_names, needed to profile functions. It was being deleted by the transpiler when transpiling artifacts. This PR also removes the duplicated noir contract function artifact that was present in the transpiler since at this point it uses all the fields except the ABI --- avm-transpiler/src/transpile_contract.rs | 3 +++ noir-projects/bootstrap_cache.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/avm-transpiler/src/transpile_contract.rs b/avm-transpiler/src/transpile_contract.rs index c1f836818b9..e684a541d84 100644 --- a/avm-transpiler/src/transpile_contract.rs +++ b/avm-transpiler/src/transpile_contract.rs @@ -52,6 +52,7 @@ pub struct AvmContractFunctionArtifact { deserialize_with = "ProgramDebugInfo::deserialize_compressed_base64_json" )] pub debug_symbols: ProgramDebugInfo, + pub brillig_names: Vec, pub assert_messages: HashMap, } @@ -73,6 +74,7 @@ pub struct AcirContractFunctionArtifact { deserialize_with = "ProgramDebugInfo::deserialize_compressed_base64_json" )] pub debug_symbols: ProgramDebugInfo, + pub brillig_names: Vec, } /// An enum that allows the TranspiledContract struct to contain @@ -139,6 +141,7 @@ impl From for TranspiledContractArtifact { abi: function.abi, bytecode: base64::prelude::BASE64_STANDARD.encode(compressed_avm_bytecode), debug_symbols: ProgramDebugInfo { debug_infos }, + brillig_names: function.brillig_names, assert_messages, }, )); diff --git a/noir-projects/bootstrap_cache.sh b/noir-projects/bootstrap_cache.sh index cca10e817be..bd0e3399145 100755 --- a/noir-projects/bootstrap_cache.sh +++ b/noir-projects/bootstrap_cache.sh @@ -11,4 +11,6 @@ extract_repo_if_working_copy_clean noir-projects \ remove_old_images noir-projects +yarn + ./mock-protocol-circuits/bootstrap.sh \ No newline at end of file