-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support disabling aztec vm in non-wasm builds #6965
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
978f772
Add and use DISABLE_AZTEC_VM
codygunton 3a9d165
Merge remote-tracking branch 'origin/master' into ad-cg/disable-avm-n…
codygunton 97fc450
Fix typo
codygunton e5e52d6
Update CMakeLists.txt
ludamad 9dc86d9
Update main.cpp
ludamad e35bc5c
Update CMakeLists.txt
ludamad 39ac46b
Merge branch 'master' into ad-cg/disable-avm-non-wasm
ludamad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,10 @@ | |
#include "barretenberg/dsl/acir_format/acir_format.hpp" | ||
#include "barretenberg/honk/proof_system/types/proof.hpp" | ||
#include "barretenberg/plonk/proof_system/proving_key/serialize.hpp" | ||
#ifndef DISABLE_AZTEC_VM | ||
#include "barretenberg/vm/avm_trace/avm_common.hpp" | ||
#include "barretenberg/vm/avm_trace/avm_execution.hpp" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pushed this to also not have to parse the headers |
||
#endif | ||
#include "config.hpp" | ||
#include "get_bn254_crs.hpp" | ||
#include "get_bytecode.hpp" | ||
|
@@ -514,6 +516,7 @@ void vk_as_fields(const std::string& vk_path, const std::string& output_path) | |
} | ||
} | ||
|
||
#ifndef DISABLE_AZTEC_VM | ||
/** | ||
* @brief Writes an avm proof and corresponding (incomplete) verification key to files. | ||
* | ||
|
@@ -586,6 +589,7 @@ bool avm_verify(const std::filesystem::path& proof_path, const std::filesystem:: | |
vinfo("verified: ", verified); | ||
return verified; | ||
} | ||
#endif | ||
|
||
/** | ||
* @brief Creates a proof for an ACIR circuit | ||
|
@@ -892,6 +896,7 @@ int main(int argc, char* argv[]) | |
} else if (command == "vk_as_fields") { | ||
std::string output_path = get_option(args, "-o", vk_path + "_fields.json"); | ||
vk_as_fields(vk_path, output_path); | ||
#ifndef DISABLE_AZTEC_VM | ||
} else if (command == "avm_prove") { | ||
std::filesystem::path avm_bytecode_path = get_option(args, "--avm-bytecode", "./target/avm_bytecode.bin"); | ||
std::filesystem::path avm_calldata_path = get_option(args, "--avm-calldata", "./target/avm_calldata.bin"); | ||
|
@@ -903,6 +908,7 @@ int main(int argc, char* argv[]) | |
avm_prove(avm_bytecode_path, avm_calldata_path, avm_public_inputs_path, avm_hints_path, output_path); | ||
} else if (command == "avm_verify") { | ||
return avm_verify(proof_path, vk_path) ? 0 : 1; | ||
#endif | ||
} else if (command == "prove_ultra_honk") { | ||
std::string output_path = get_option(args, "-o", "./proofs/proof"); | ||
prove_honk<UltraFlavor>(bytecode_path, witness_path, output_path); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
if(NOT WASM) | ||
barretenberg_module(vm honk sumcheck) | ||
if(NOT DISABLE_AZTEC_VM) | ||
barretenberg_module(vm honk sumcheck) | ||
endif() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this not on by default