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

feat: sol shplemini in acir tests + contract_gen #8874

Merged
merged 27 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d517877
feat: add shplemini transcript
Maddiaa0 Sep 27, 2024
a838f12
feat: shplemini verification
Maddiaa0 Sep 27, 2024
cb1be8a
feat: shplemini
Maddiaa0 Sep 28, 2024
993c70a
fix: remove log
Maddiaa0 Sep 28, 2024
9e1fe70
Merge branch 'master' into md/sol-shplemini
Maddiaa0 Sep 28, 2024
d3555e2
feat: for other circuit types
Maddiaa0 Sep 28, 2024
1e7801d
Merge branch 'master' into md/sol-shplemini
Maddiaa0 Sep 28, 2024
296d579
Merge branch 'md/sol-shplemini' into md/sol-shplemini-impl
Maddiaa0 Sep 28, 2024
c7c0768
fix: typo
Maddiaa0 Sep 28, 2024
e17684b
fmt
Maddiaa0 Sep 28, 2024
ea948a0
feat: add to honk_contract.hpp
Maddiaa0 Sep 28, 2024
01a49ce
chore: adjust readme warning
Maddiaa0 Sep 29, 2024
cacf935
fix
Maddiaa0 Sep 29, 2024
052f149
fix: remove proof slicing
Maddiaa0 Sep 29, 2024
52df235
Merge branch 'master' into md/sol-shplemini
Maddiaa0 Oct 1, 2024
d03d034
fix: rename geminiComms
Maddiaa0 Oct 1, 2024
ee4b0b2
Merge branch 'md/sol-shplemini' into md/sol-shplemini-impl
Maddiaa0 Oct 1, 2024
3a14d5d
Merge branch 'md/sol-shplemini-impl' into md/shplemini-in-noir-output
Maddiaa0 Oct 1, 2024
ca844d7
fix: update vks and merge fix
Maddiaa0 Oct 1, 2024
d85bbd6
Merge branch 'md/sol-shplemini-impl' into md/shplemini-in-noir-output
Maddiaa0 Oct 1, 2024
0690aee
fix: merge update honk_contract.hpp
Maddiaa0 Oct 1, 2024
3965bad
Merge branch 'master' into md/shplemini-in-noir-output
Maddiaa0 Oct 3, 2024
3e970d5
review: feedback
Maddiaa0 Oct 3, 2024
94a2a89
chore: bump solc in cli
Maddiaa0 Oct 3, 2024
fa7e903
fix: version
Maddiaa0 Oct 3, 2024
742f14e
Merge branch 'master' into md/shplemini-in-noir-output
Maddiaa0 Oct 3, 2024
6d3d492
Merge branch 'master' into md/shplemini-in-noir-output
Maddiaa0 Oct 29, 2024
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.22"
"solc": "^0.8.27"
}
}
5 changes: 2 additions & 3 deletions barretenberg/acir_tests/sol-test/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { ethers } from "ethers";
import solc from "solc";

const NUMBER_OF_FIELDS_IN_PLONK_PROOF = 93;
// 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;
const NUMBER_OF_FIELDS_IN_HONK_PROOF = 447;

// 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 Expand Up @@ -223,6 +221,7 @@ try {

proofStr = "0x" + proofStr;


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

const key =
"0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";
const provider = await getProvider(randomPort);
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.22:
version "0.8.22"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.22.tgz#6df0bb688b9a58bbf10932730301374a6ccfb862"
integrity sha512-bA2tMZXx93R8L5LUH7TlB/f+QhkVyxrrY6LmgJnFFZlRknrhYVlBK1e3uHIdKybwoFabOFSzeaZjPeL/GIpFGQ==
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==
dependencies:
command-exists "^1.2.8"
commander "^8.1.0"
Expand Down
7 changes: 0 additions & 7 deletions barretenberg/cpp/src/barretenberg/bb/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1099,13 +1099,6 @@ 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
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/bb/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Barretenberg UltraHonk comes with the capability to verify proofs in Solidity, i
```

4. Generate Solidity verifier
**WARNING:** Contract incomplete, do not use in production!
**WARNING:** Contract unaudited, do not use in production!
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also incomplete cus we don't have support for aggregation yet :)


```bash
bb contract_ultra_honk -k ./target/vk -c $CRS_PATH -b ./target/hello_world.json -o ./target/Verifier.sol
Expand Down
Loading
Loading