Skip to content

Commit

Permalink
Merkle opening constant circuit description (#123) (#124)
Browse files Browse the repository at this point in the history
PLONK requires the circuit description + witness indexes to be constant
so the same verifier data can be reused to check different proofs.

The previous implementation contained an optimization that swaps the
witness index to reduce the number of gates.

This optimization may lead to inconsistencies when reusing verifier keys
because the verification will depend on the disposition of the witness
data, and this is undesirable.

Resolves #122
  • Loading branch information
vlopes11 authored Apr 6, 2021
1 parent aa82987 commit bfa13ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.20.0] - 2021-04-06

### Changed

- Update `dusk-plonk` from `0.6` to `0.7` #119
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dusk-poseidon"
version = "0.20.0-pre.1"
version = "0.20.0"
authors = [
"zer0 <[email protected]>", "vlopes11 <[email protected]>", "CPerezz <[email protected]>", "Kristoffer Ström <[email protected]>"
]
Expand All @@ -15,13 +15,13 @@ repository = "https://github.com/dusk-network/poseidon252"
dusk-bls12_381 = {version = "0.6", default-features = false}
dusk-jubjub = {version = "0.8", default-features = false}
dusk-bytes = "0.1"
dusk-hades = { version = "0.15.0-pre", default-features = false }
dusk-hades = { version = "0.15", default-features = false }
canonical = {version = "0.5", optional = true}
canonical_derive = {version = "0.5", optional = true}
microkelvin = {version = "0.6", optional = true}
nstack = {version = "0.7", optional = true}

dusk-plonk = {version="0.7.0-pre", default-features = false, optional = true}
dusk-plonk = {version="0.7", default-features = false, optional = true}
anyhow = { version = "1.0", optional = true }
thiserror = { version = "1.0", optional = true }

Expand Down
2 changes: 1 addition & 1 deletion src/tree/zk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ mod tests {
use crate::tree::{self, PoseidonAnnotation, PoseidonBranch, PoseidonTree};
use canonical_host::MemStore;
use dusk_plonk::circuit;
use dusk_plonk::prelude::Error as PlonkError;
use dusk_plonk::error::Error as PlonkError;
use dusk_plonk::prelude::*;
use rand::rngs::StdRng;
use rand::SeedableRng;
Expand Down

0 comments on commit bfa13ea

Please sign in to comment.