Skip to content

Commit

Permalink
fix: Transpiler after noir sync (#8353)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sirasistant authored Sep 4, 2024
1 parent 5f6d2e2 commit 249e50e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions avm-transpiler/src/transpile_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pub struct AvmContractFunctionArtifact {
deserialize_with = "ProgramDebugInfo::deserialize_compressed_base64_json"
)]
pub debug_symbols: ProgramDebugInfo,
pub brillig_names: Vec<String>,
pub assert_messages: HashMap<usize, String>,
}

Expand All @@ -73,6 +74,7 @@ pub struct AcirContractFunctionArtifact {
deserialize_with = "ProgramDebugInfo::deserialize_compressed_base64_json"
)]
pub debug_symbols: ProgramDebugInfo,
pub brillig_names: Vec<String>,
}

/// An enum that allows the TranspiledContract struct to contain
Expand Down Expand Up @@ -139,6 +141,7 @@ impl From<CompiledAcirContractArtifact> 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,
},
));
Expand Down
2 changes: 2 additions & 0 deletions noir-projects/bootstrap_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ extract_repo_if_working_copy_clean noir-projects \

remove_old_images noir-projects

yarn

./mock-protocol-circuits/bootstrap.sh

0 comments on commit 249e50e

Please sign in to comment.