Skip to content

Commit

Permalink
Add add_affine_to_circuit_descriptionto composer
Browse files Browse the repository at this point in the history
Resolves #534
  • Loading branch information
vlopes11 committed Jun 7, 2021
1 parent 330822a commit f127e7d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.1] - 07-06-21

### Added

- Add `add_affine_to_circuit_description` to composer [#534](https://github.com/dusk-network/plonk/issues/534)

## [0.8.0] - 03-05-21

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dusk-plonk"
version = "0.8.0"
version = "0.8.1"
authors = ["Kevaundray Wedderburn <[email protected]>",
"Luke Pearson <[email protected]>",
"CPerezz <[email protected]>"]
Expand Down
13 changes: 13 additions & 0 deletions src/constraint_system/ecc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,19 @@ impl StandardComposer {
point
}

/// Add the provided affine point as a circuit description and return its
/// constrained witness value
pub fn add_affine_to_circuit_description(
&mut self,
affine: dusk_jubjub::JubJubAffine,
) -> Point {
// Not using individual gates because one of these may be zero
let x = self.add_witness_to_circuit_description(affine.get_x());
let y = self.add_witness_to_circuit_description(affine.get_y());

Point { x, y }
}

/// Asserts that a [`Point`] in the circuit is equal to a known public
/// point.
pub fn assert_equal_public_point(
Expand Down

0 comments on commit f127e7d

Please sign in to comment.