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: revert "feat: sol shplemini in acir tests + contract_gen" #9505

Merged
merged 1 commit into from
Oct 29, 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
2 changes: 1 addition & 1 deletion barretenberg/acir_tests/sol-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
},
"dependencies": {
"ethers": "^6.8.1",
"solc": "^0.8.27"
"solc": "^0.8.22"
}
}
4 changes: 3 additions & 1 deletion barretenberg/acir_tests/sol-test/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { ethers } from "ethers";
import solc from "solc";

const NUMBER_OF_FIELDS_IN_PLONK_PROOF = 93;
const NUMBER_OF_FIELDS_IN_HONK_PROOF = 447;
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1093): This is the size of the proof up to Sumcheck, without public inputs, as the Honk contract does not currently have a PCS.
// This needs to be changed once Shplemini is implemented in the smart contract.
const NUMBER_OF_FIELDS_IN_HONK_PROOF = 303;

// We use the solcjs compiler version in this test, although it is slower than foundry, to run the test end to end
// it simplifies of parallelising the test suite
Expand Down
8 changes: 4 additions & 4 deletions barretenberg/acir_tests/sol-test/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ semver@^5.5.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==

solc@^0.8.27:
version "0.8.27"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.27.tgz#cb8e7246cceadad8df65ceccffe640e106106bb4"
integrity sha512-BNxMol2tUAbkH7HKlXBcBqrGi2aqgv+uMHz26mJyTtlVgWmBA4ktiw0qVKHfkjf2oaHbwtbtaSeE2dhn/gTAKw==
solc@^0.8.22:
version "0.8.22"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.22.tgz#6df0bb688b9a58bbf10932730301374a6ccfb862"
integrity sha512-bA2tMZXx93R8L5LUH7TlB/f+QhkVyxrrY6LmgJnFFZlRknrhYVlBK1e3uHIdKybwoFabOFSzeaZjPeL/GIpFGQ==
dependencies:
command-exists "^1.2.8"
commander "^8.1.0"
Expand Down
7 changes: 7 additions & 0 deletions barretenberg/cpp/src/barretenberg/bb/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,13 @@ void prove_honk(const std::string& bytecodePath, const std::string& witnessPath,
// Construct Honk proof
Prover prover = compute_valid_prover<Flavor>(bytecodePath, witnessPath);
auto proof = prover.construct_proof();
// TODO(https://github.com/AztecProtocol/barretenberg/issues/1093): As the Smart contract doesn't verify the PCS and
// Shplemini is not constant size, we slice the proof up to sumcheck so calculation of public inputs is correct.
// This hack will be subsequently removed.
if constexpr (std::same_as<Flavor, UltraKeccakFlavor>) {
auto num_public_inputs = static_cast<uint32_t>(prover.proving_key->proving_key.num_public_inputs);
proof.erase(proof.begin() + num_public_inputs + 303, proof.end());
}
if (outputPath == "-") {
writeRawBytesToStdout(to_buffer</*include_size=*/true>(proof));
vinfo("proof written to stdout");
Expand Down
Loading
Loading