Skip to content

Commit

Permalink
Add transfer circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
xevisalle committed May 17, 2024
1 parent 7728ed3 commit e06303e
Show file tree
Hide file tree
Showing 9 changed files with 698 additions and 7 deletions.
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.
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

0 comments on commit e06303e

Please sign in to comment.