Skip to content
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

fix: remove embedded srs #5173

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion barretenberg/cpp/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ src/wasi-sdk-*
src/barretenberg/proof_system/proving_key/fixtures
src/barretenberg/rollup/proofs/*/fixtures
srs_db/*/*/transcript*
srs_db/*/bn254_g*
CMakeUserPresets.json
.vscode/settings.json
acir_tests
# we may download go in scripts/collect_heap_information.sh
go*.tar.gz
barretenberg_modules.dot
barretenberg_modules.png
barretenberg_modules.png
7 changes: 3 additions & 4 deletions barretenberg/cpp/src/barretenberg/bb/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ void acvm_info(const std::string& output_path)
*/
void avm_prove(const std::filesystem::path& bytecode_path,
const std::filesystem::path& calldata_path,
const std::string& crs_path,
const std::filesystem::path& output_path)
{
// Get Bytecode
Expand All @@ -485,7 +484,8 @@ void avm_prove(const std::filesystem::path& bytecode_path,
}
std::vector<fr> const call_data = many_from_buffer<fr>(call_data_bytes);

srs::init_crs_factory(crs_path);
// Hardcoded circuit size for now
init_bn254_crs(256);

// Prove execution and return vk
auto const [verification_key, proof] = avm_trace::Execution::prove(avm_bytecode, call_data);
Expand Down Expand Up @@ -601,9 +601,8 @@ int main(int argc, char* argv[])
} else if (command == "avm_prove") {
std::filesystem::path avm_bytecode_path = get_option(args, "-b", "./target/avm_bytecode.bin");
std::filesystem::path calldata_path = get_option(args, "-d", "./target/call_data.bin");
std::string crs_path = get_option(args, "-c", "../srs_db/ignition");
std::filesystem::path output_path = get_option(args, "-o", "./proofs/avm_proof");
avm_prove(avm_bytecode_path, calldata_path, crs_path, output_path);
avm_prove(avm_bytecode_path, calldata_path, output_path);
} else if (command == "avm_verify") {
std::filesystem::path proof_path = get_option(args, "-p", "./proofs/avm_proof");
return avm_verify(proof_path) ? 0 : 1;
Expand Down
4 changes: 0 additions & 4 deletions yarn-project/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ COPY --from=noir-projects /usr/src/noir-projects /usr/src/noir-projects
COPY --from=noir /usr/src/noir/noir-repo/target/release/acvm /usr/src/noir/noir-repo/target/release/acvm
COPY --from=barretenberg /usr/src/barretenberg/cpp/build/bin/bb /usr/src/barretenberg/cpp/build/bin/bb

COPY --from=barretenberg /usr/src/barretenberg/cpp/srs_db/ /usr/src/barretenberg/cpp/srs_db/
WORKDIR /usr/src/barretenberg/cpp/srs_db
RUN ./download_ignition.sh 0

WORKDIR /usr/src/yarn-project
COPY . .

Expand Down
4 changes: 0 additions & 4 deletions yarn-project/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ COPY --from=contracts /usr/src/l1-contracts /usr/src/l1-contracts
COPY --from=noir-projects /usr/src/noir-projects /usr/src/noir-projects
COPY --from=barretenberg /usr/src/barretenberg/cpp/build/bin/bb /usr/src/barretenberg/cpp/build/bin/bb

COPY --from=barretenberg /usr/src/barretenberg/cpp/srs_db/ /usr/src/barretenberg/cpp/srs_db/
WORKDIR /usr/src/barretenberg/cpp/srs_db
RUN ./download_ignition.sh 0

WORKDIR /usr/src/yarn-project
COPY . .

Expand Down
4 changes: 0 additions & 4 deletions yarn-project/simulator/src/public/executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ export class PublicExecutor {
*/
public async getAvmProof(avmExecution: PublicExecution): Promise<Buffer[]> {
// The paths for the barretenberg binary and the write path are hardcoded for now.
// We additionally need the path to a valid crs for proof generation.
// const bbPath = '../../barretenberg/cpp';
const bbPath = path.resolve('../../barretenberg/cpp');
const artifactsPath = path.resolve('target');

Expand Down Expand Up @@ -273,8 +271,6 @@ export class PublicExecutor {
bytecodePath,
'-d',
calldataPath,
'-c',
path.join(bbPath, 'srs_db', 'ignition'),
'-o',
proofPath,
]);
Expand Down
Loading