zebra/zebra-chain/src/lib.rs

32 lines
673 B
Rust
Raw Normal View History

//! Blockchain-related datastructures for Zebra. 🦓
//!
//! $$a^2 + b^2 = c^2$$
2020-07-17 16:45:29 -07:00
#![doc(html_favicon_url = "https://www.zfnd.org/images/zebra-favicon-128.png")]
#![doc(html_logo_url = "https://www.zfnd.org/images/zebra-icon.png")]
#![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_chain")]
#![deny(missing_docs)]
#![allow(clippy::try_err)]
#[macro_use]
extern crate serde;
mod merkle_tree;
2020-03-05 17:19:10 -08:00
pub mod addresses;
pub mod amount;
pub mod block;
pub mod commitments;
2020-02-25 15:14:59 -08:00
pub mod keys;
pub mod notes;
pub mod parameters;
Update Transaction definition. (#105) * Added a few more top-level fields for the Transaction struct * Add a placeholder Script type. This could alternately use bytes::Bytes to save some allocations but I don't think this is important to get perfectly now. In the future, we will want to have all of the script handling code in the zebra-script crate, but we will need to have a container type for an encoded script in zebra-chain, because otherwise zebra-chain would depend on zebra-script and not the other way around. * Rename Transaction{Input,Output} -> Transparent{Input,Output}. These are only *transparent* inputs and outputs, so by putting Transparent in the name (instead of Transaction) it's more clear that a transaction's inputs or outputs can also be shielded. * Add a LockTime enum. * First attempt at a Transaction enum. This attempts to map the versioning and field presence rules into an ADT, so that structurally invalid transactions (e.g., a BCTV14 proof in a Sapling transaction) are unrepresentable. * Update zebra-chain/src/transaction.rs Co-Authored-By: Daira Hopwood <daira@jacaranda.org> * Add fixme note on type refinement. * Rename Transaction variants according to version. * Split transaction.rs into submodules. * Start filling in spend, output descriptions. * Progress on JoinSplit data structures. This has a lot of duplication and should really use generics to abstract over Sprout-on-BCTV14 or Sprout-on-Groth16. * Add data types for Bctv14 and Groth16 proofs. This also adds a trait to abstract over them. * Make JoinSplit descriptions generic over the proof system. * Update zebra-chain/src/transaction/joinsplit.rs
2019-12-05 12:56:58 -08:00
pub mod proofs;
pub mod serialization;
pub mod transaction;
2020-07-10 13:27:47 -07:00
pub mod treestate;
pub mod types;
pub mod work;
pub use ed25519_zebra;
pub use redjubjub;