package tezos-sapling
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=296bb5674bc6050afe6330326fbdd0dfc2255d414bfd6b79cc7666ac6b39316d
sha512=c061cd300a9410300851158d77bf8e56ca3c568b0b1161b38305e5b2efdcd9c746d391f832fdb2826f9a1d6babce10a9b764a4b04f5df42699f7314b9863123a
Description
Published: 11 Apr 2022
README
README.md
This OCaml library implements the Sapling protocol for privacy-preserving transactions as described in its specification, version 2020.1.2.
A large part of the functionalities are implemented by the librustzcash library from the ZCash project. This library provides bindings to librustzcash
and implements the needed data structures to use the library. Additionally it provides some facilities to forge transactions.
Rustzcash
The Rust library exports a C compatible interface in librustzcash/src/rustzcash.rs
and librustzcash/include/librustzcash.h
that is used by the ZCash C++ node and client. The files rustzcash.ml{,i}
simply bind this C interface. The binding can't be used alone to test the library as a number of data structures are left to be implemented to the user of library.
Additionally the ZCash parameters are necessary to create and verify proofs. We assume that the library and the parameters are installed as part of the usual make build-deps
.
Core
The file core.ml
contains a more high level presentation of the Sapling protocol with respect to the low level binding. Core is organized in several modules that are exposed through a limited signature for validators and a more complete signature for clients.
Storage
All the data structures are implemented in storage.ml
, including the incremental Merkle tree, the nullifier set, the root bounded list and the ciphertexts list.
Example
The file test/example.ml
contains a simplified implementation of a client and validator using the library.
Dependencies (7)
-
tezos-rust-libs
>= "1.1"
-
tezos-crypto
= version
- integers
-
ctypes-foreign
>= "0.18.0"
-
ctypes
>= "0.18.0"
-
dune
>= "2.9"
-
conf-rust
build
Dev Dependencies (2)
-
tezos-base-test-helpers
with-test & = version
-
alcotest-lwt
with-test & >= "1.1.0"
Used by (2)
-
tezos-client-base
= "12.3"
-
tezos-protocol-environment
= "12.3"
Conflicts
None