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

Add transaction circuit #173

Merged
merged 2 commits into from
May 17, 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: 2 additions & 0 deletions circuits/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add `phoenix-circuits` as a workspace member of `phoenix` [#171]
- Add elgamal encryption and decryption gadgets [#171]
- Add the `transaction` module [#169]

<!-- ISSUES -->
[#169]: https://github.com/dusk-network/phoenix/issues/169
[#171]: https://github.com/dusk-network/phoenix/issues/171

<!-- VERSIONS -->
Expand Down
7 changes: 6 additions & 1 deletion circuits/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ exclude = [".github/workflows/dusk-ci.yml", ".gitignore"]
phoenix-core = { path = "../core" }
dusk-plonk = { version = "0.19", default-features = false }
dusk-jubjub = { version = "0.14", default-features = false }
poseidon-merkle = { version = "0.5", features = ["rkyv-impl", "zk", "size_32"] }
dusk-poseidon = { version = "0.33", default-features = false }
jubjub-schnorr = { version = "0.3", default-features = false, features = ["double", "alloc"] }
rand_core = { version = "0.6", default-features = false }
rand = "0.8"

[dev-dependencies]
ff = { version = "0.13", default-features = false }
rand_core = { version = "0.6", default-features = false }
lazy_static = "1.4"
2 changes: 1 addition & 1 deletion circuits/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ This library contains the implementation of the Phoenix-circuits, to prove, in z
2. Ownership: the sender holds the note secret key for every note that is about to be spent.
3. Nullification: the nullifier is calculated correctly.
4. Minting: the value commitment for the newly minted notes are computed correctly.
5. Balance integrity: the sum of the value of all spent notes is equal to the value of the sum of all minted notes + the gas fee + a crossover, where a crossover refers to funds being transfered to a contract.
5. Balance integrity: the sum of the values of all spent notes is equal to the sum of the values of all minted notes + the gas fee + a crossover, where a crossover refers to funds being transfered to a contract.
xevisalle marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 3 additions & 1 deletion circuits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
#![deny(missing_docs)]
#![no_std]

/// Encryption algorithm
mod encryption;

/// Transaction structs, gadget, and circuit
pub mod transaction;

/// ElGamal asymmetric cipher
pub use encryption::elgamal;
Loading