change canopy.pdf to stable protocol.pdf

This commit is contained in:
Alfredo Garcia 2020-10-28 12:14:32 -03:00 committed by Deirdre Connolly
parent 92c623eddf
commit bcb027ebc5
6 changed files with 7 additions and 7 deletions

View File

@ -868,7 +868,7 @@ impl FromStr for FullViewingKey {
/// An ephemeral public key for Sapling key agreement. /// An ephemeral public key for Sapling key agreement.
/// ///
/// https://zips.z.cash/protocol/canopy.pdf#concretesaplingkeyagreement /// https://zips.z.cash/protocol/protocol.pdf#concretesaplingkeyagreement
#[derive(Copy, Clone, Deserialize, PartialEq, Serialize)] #[derive(Copy, Clone, Deserialize, PartialEq, Serialize)]
pub struct EphemeralPublicKey( pub struct EphemeralPublicKey(
#[serde(with = "serde_helpers::AffinePoint")] pub jubjub::AffinePoint, #[serde(with = "serde_helpers::AffinePoint")] pub jubjub::AffinePoint,

View File

@ -47,7 +47,7 @@ fn merkle_crh_sapling(layer: u8, left: [u8; 32], right: [u8; 32]) -> [u8; 32] {
lazy_static! { lazy_static! {
/// Sapling note commitment trees have a max depth of 32. /// Sapling note commitment trees have a max depth of 32.
/// ///
/// https://zips.z.cash/protocol/canopy.pdf#constants /// https://zips.z.cash/protocol/protocol.pdf#constants
static ref EMPTY_ROOTS: Vec<[u8; 32]> = { static ref EMPTY_ROOTS: Vec<[u8; 32]> = {
// Uncommitted^Sapling = I2LEBSP_l_MerkleSapling(1) // Uncommitted^Sapling = I2LEBSP_l_MerkleSapling(1)
let mut v = vec![jubjub::Fq::one().to_bytes()]; let mut v = vec![jubjub::Fq::one().to_bytes()];

View File

@ -57,7 +57,7 @@ fn merkle_crh_sprout(left: [u8; 32], right: [u8; 32]) -> [u8; 32] {
lazy_static! { lazy_static! {
/// Sprout note commitment trees have a max depth of 29. /// Sprout note commitment trees have a max depth of 29.
/// ///
/// https://zips.z.cash/protocol/canopy.pdf#constants /// https://zips.z.cash/protocol/protocol.pdf#constants
static ref EMPTY_ROOTS: Vec<[u8; 32]> = { static ref EMPTY_ROOTS: Vec<[u8; 32]> = {
// Uncommitted^Sprout = = [0]^l_MerkleSprout // Uncommitted^Sprout = = [0]^l_MerkleSprout
let mut v = vec![[0u8; 32]]; let mut v = vec![[0u8; 32]];

View File

@ -95,7 +95,7 @@ impl ShieldedData {
/// of the value commitments in the Spend descriptions and Output /// of the value commitments in the Spend descriptions and Output
/// descriptions of the transaction, and the balancing value. /// descriptions of the transaction, and the balancing value.
/// ///
/// https://zips.z.cash/protocol/canopy.pdf#saplingbalance /// https://zips.z.cash/protocol/protocol.pdf#saplingbalance
pub fn binding_verification_key( pub fn binding_verification_key(
&self, &self,
value_balance: Amount, value_balance: Amount,

View File

@ -226,7 +226,7 @@ impl CompactDifficulty {
/// Also returns None on Work overflow, which should be impossible on a /// Also returns None on Work overflow, which should be impossible on a
/// valid chain. /// valid chain.
/// ///
/// [Zcash Specification]: https://zips.z.cash/protocol/canopy.pdf#workdef /// [Zcash Specification]: https://zips.z.cash/protocol/protocol.pdf#workdef
pub fn to_work(&self) -> Option<Work> { pub fn to_work(&self) -> Option<Work> {
let expanded = self.to_expanded()?; let expanded = self.to_expanded()?;

View File

@ -178,7 +178,7 @@ where
for spend in shielded_data.spends() { for spend in shielded_data.spends() {
// TODO: check that spend.cv and spend.rk are NOT of small // TODO: check that spend.cv and spend.rk are NOT of small
// order. // order.
// https://zips.z.cash/protocol/canopy.pdf#spenddesc // https://zips.z.cash/protocol/protocol.pdf#spenddesc
// Queue the validation of the RedJubjub spend // Queue the validation of the RedJubjub spend
// authorization signature for each Spend // authorization signature for each Spend
@ -205,7 +205,7 @@ where
shielded_data.outputs().for_each(|_output| { shielded_data.outputs().for_each(|_output| {
// TODO: check that output.cv and output.epk are NOT of small // TODO: check that output.cv and output.epk are NOT of small
// order. // order.
// https://zips.z.cash/protocol/canopy.pdf#outputdesc // https://zips.z.cash/protocol/protocol.pdf#outputdesc
// TODO: prepare public inputs for outputs, then create // TODO: prepare public inputs for outputs, then create
// a groth16::Item and pass to self.output // a groth16::Item and pass to self.output