fix(docs): docs after new rust version (#7375)
* fix docs build * fix docs build errors in sapling trees * fix docs build in sprout joinsplits * fix doc build in handshake * fix docs build in zebra-state * fix docs build in zebrad * new line fix
This commit is contained in:
parent
7fe040ed8e
commit
0cc48a322a
|
@ -201,7 +201,7 @@ where
|
|||
(batch, worker)
|
||||
}
|
||||
|
||||
/// Ask the `Batch` to monitor the spawned worker task's [`JoinHandle`](tokio::task::JoinHandle).
|
||||
/// Ask the `Batch` to monitor the spawned worker task's [`JoinHandle`].
|
||||
///
|
||||
/// Only used when the task is spawned on the tokio runtime.
|
||||
pub fn register_worker(&mut self, worker_handle: JoinHandle<()>) {
|
||||
|
|
|
@ -173,7 +173,7 @@ impl fmt::Debug for Node {
|
|||
|
||||
/// Required to convert [`NoteCommitmentTree`] into [`SerializedTree`].
|
||||
///
|
||||
/// Zebra stores Sapling note commitment trees as [`Frontier`][1]s while the
|
||||
/// Zebra stores Sapling note commitment trees as [`Frontier`]s while the
|
||||
/// [`z_gettreestate`][2] RPC requires [`CommitmentTree`][3]s. Implementing
|
||||
/// [`incrementalmerkletree::Hashable`] for [`Node`]s allows the conversion.
|
||||
///
|
||||
|
@ -251,7 +251,7 @@ pub enum NoteCommitmentTreeError {
|
|||
#[serde(into = "LegacyNoteCommitmentTree")]
|
||||
#[serde(from = "LegacyNoteCommitmentTree")]
|
||||
pub struct NoteCommitmentTree {
|
||||
/// The tree represented as a [`Frontier`](bridgetree::Frontier).
|
||||
/// The tree represented as a [`Frontier`].
|
||||
///
|
||||
/// A Frontier is a subset of the tree that allows to fully specify it.
|
||||
/// It consists of nodes along the rightmost (newer) branch of the tree that
|
||||
|
@ -449,13 +449,13 @@ impl From<Vec<jubjub::Fq>> for NoteCommitmentTree {
|
|||
///
|
||||
/// The format of the serialized data is compatible with
|
||||
/// [`CommitmentTree`](incrementalmerkletree::frontier::CommitmentTree) from `librustzcash` and not
|
||||
/// with [`Frontier`](bridgetree::Frontier) from the crate
|
||||
/// with [`Frontier`] from the crate
|
||||
/// [`incrementalmerkletree`]. Zebra follows the former format in order to stay
|
||||
/// consistent with `zcashd` in RPCs. Note that [`NoteCommitmentTree`] itself is
|
||||
/// represented as [`Frontier`](bridgetree::Frontier).
|
||||
/// represented as [`Frontier`].
|
||||
///
|
||||
/// The formats are semantically equivalent. The primary difference between them
|
||||
/// is that in [`Frontier`](bridgetree::Frontier), the vector of parents is
|
||||
/// is that in [`Frontier`], the vector of parents is
|
||||
/// dense (we know where the gaps are from the position of the leaf in the
|
||||
/// overall tree); whereas in [`CommitmentTree`](incrementalmerkletree::frontier::CommitmentTree),
|
||||
/// the vector of parent hashes is sparse with [`None`] values in the gaps.
|
||||
|
@ -466,7 +466,7 @@ impl From<Vec<jubjub::Fq>> for NoteCommitmentTree {
|
|||
///
|
||||
/// It is likely that the dense format will be used in future RPCs, in which
|
||||
/// case the current implementation will have to change and use the format
|
||||
/// compatible with [`Frontier`](bridgetree::Frontier) instead.
|
||||
/// compatible with [`Frontier`] instead.
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)]
|
||||
pub struct SerializedTree(Vec<u8>);
|
||||
|
||||
|
|
|
@ -73,8 +73,7 @@ pub struct JoinSplit<P: ZkSnarkProof> {
|
|||
/// A message authentication tag.
|
||||
pub vmacs: [note::Mac; 2],
|
||||
/// A ZK JoinSplit proof, either a
|
||||
/// [`Groth16Proof`](crate::primitives::Groth16Proof) or a
|
||||
/// [`Bctv14Proof`](crate::primitives::Bctv14Proof).
|
||||
/// [`Groth16Proof`] or a [`Bctv14Proof`].
|
||||
#[serde(bound(serialize = "P: ZkSnarkProof", deserialize = "P: ZkSnarkProof"))]
|
||||
pub zkproof: P,
|
||||
/// A ciphertext component for this output note.
|
||||
|
|
|
@ -130,7 +130,7 @@ pub struct ConnectionInfo {
|
|||
/// which will appear as the connected address to the OS and Zebra.
|
||||
pub connected_addr: ConnectedAddr,
|
||||
|
||||
/// The network protocol [`VersionMessage`](crate::VersionMessage) sent by the remote peer.
|
||||
/// The network protocol [`VersionMessage`] sent by the remote peer.
|
||||
pub remote: VersionMessage,
|
||||
|
||||
/// The network protocol version negotiated with the remote peer.
|
||||
|
@ -562,7 +562,7 @@ where
|
|||
/// We split `Handshake` into its components before calling this function,
|
||||
/// to avoid infectious `Sync` bounds on the returned future.
|
||||
///
|
||||
/// Returns the [`VersionMessage`](crate::VersionMessage) sent by the remote peer.
|
||||
/// Returns the [`VersionMessage`] sent by the remote peer.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub async fn negotiate_version<PeerTransport>(
|
||||
peer_conn: &mut Framed<PeerTransport, Codec>,
|
||||
|
|
|
@ -68,15 +68,14 @@ pub enum Response {
|
|||
/// Contains the median-time-past for the *next* block on the best chain.
|
||||
BestChainNextMedianTimePast(DateTime32),
|
||||
|
||||
/// Response to [`Request::BestChainBlockHash`](Request::BestChainBlockHash) with the
|
||||
/// specified block hash.
|
||||
/// Response to [`Request::BestChainBlockHash`] with the specified block hash.
|
||||
BlockHash(Option<block::Hash>),
|
||||
|
||||
/// Response to [`Request::KnownBlock`].
|
||||
KnownBlock(Option<KnownBlock>),
|
||||
|
||||
#[cfg(feature = "getblocktemplate-rpcs")]
|
||||
/// Response to [`Request::CheckBlockProposalValidity`](Request::CheckBlockProposalValidity)
|
||||
/// Response to [`Request::CheckBlockProposalValidity`]
|
||||
ValidBlockProposal,
|
||||
}
|
||||
|
||||
|
@ -120,8 +119,7 @@ impl MinedTx {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
/// A response to a read-only
|
||||
/// [`ReadStateService`](crate::service::ReadStateService)'s
|
||||
/// [`ReadRequest`](ReadRequest).
|
||||
/// [`ReadStateService`](crate::service::ReadStateService)'s [`ReadRequest`].
|
||||
pub enum ReadResponse {
|
||||
/// Response to [`ReadRequest::Tip`] with the current best chain tip.
|
||||
Tip(Option<(block::Height, block::Hash)>),
|
||||
|
@ -185,21 +183,20 @@ pub enum ReadResponse {
|
|||
/// Contains the median-time-past for the *next* block on the best chain.
|
||||
BestChainNextMedianTimePast(DateTime32),
|
||||
|
||||
/// Response to [`ReadRequest::BestChainBlockHash`](ReadRequest::BestChainBlockHash) with the
|
||||
/// specified block hash.
|
||||
/// Response to [`ReadRequest::BestChainBlockHash`] with the specified block hash.
|
||||
BlockHash(Option<block::Hash>),
|
||||
|
||||
#[cfg(feature = "getblocktemplate-rpcs")]
|
||||
/// Response to [`ReadRequest::ChainInfo`](ReadRequest::ChainInfo) with the state
|
||||
/// Response to [`ReadRequest::ChainInfo`] with the state
|
||||
/// information needed by the `getblocktemplate` RPC method.
|
||||
ChainInfo(GetBlockTemplateChainInfo),
|
||||
|
||||
#[cfg(feature = "getblocktemplate-rpcs")]
|
||||
/// Response to [`ReadRequest::SolutionRate`](ReadRequest::SolutionRate)
|
||||
/// Response to [`ReadRequest::SolutionRate`]
|
||||
SolutionRate(Option<u128>),
|
||||
|
||||
#[cfg(feature = "getblocktemplate-rpcs")]
|
||||
/// Response to [`ReadRequest::CheckBlockProposalValidity`](ReadRequest::CheckBlockProposalValidity)
|
||||
/// Response to [`ReadRequest::CheckBlockProposalValidity`]
|
||||
ValidBlockProposal,
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ pub const OUTPUT_INDEX_DISK_BYTES: usize = 3;
|
|||
|
||||
/// The maximum value of an on-disk serialized [`OutputIndex`].
|
||||
///
|
||||
/// This allows us to store [`OutputLocation`](crate::OutputLocation)s in
|
||||
/// This allows us to store [`OutputLocation`]s in
|
||||
/// 8 bytes, which makes database searches more efficient.
|
||||
///
|
||||
/// # Consensus
|
||||
|
|
|
@ -97,8 +97,8 @@ impl ZebraDb {
|
|||
self.db.zs_get(&height_by_hash, &hash)
|
||||
}
|
||||
|
||||
/// Returns the [`block::Header`](zebra_chain::block::Header) with [`block::Hash`](zebra_chain::block::Hash)
|
||||
/// or [`Height`](zebra_chain::block::Height), if it exists in the finalized chain.
|
||||
/// Returns the [`block::Header`] with [`block::Hash`] or
|
||||
/// [`Height`], if it exists in the finalized chain.
|
||||
//
|
||||
// TODO: move this method to the start of the section
|
||||
#[allow(clippy::unwrap_in_result)]
|
||||
|
@ -112,8 +112,8 @@ impl ZebraDb {
|
|||
Some(header)
|
||||
}
|
||||
|
||||
/// Returns the [`Block`] with [`block::Hash`](zebra_chain::block::Hash) or
|
||||
/// [`Height`](zebra_chain::block::Height), if it exists in the finalized chain.
|
||||
/// Returns the [`Block`] with [`block::Hash`] or
|
||||
/// [`Height`], if it exists in the finalized chain.
|
||||
//
|
||||
// TODO: move this method to the start of the section
|
||||
#[allow(clippy::unwrap_in_result)]
|
||||
|
|
|
@ -389,7 +389,7 @@ impl Chain {
|
|||
}
|
||||
|
||||
/// Returns the [`ContextuallyVerifiedBlock`] with [`block::Hash`] or
|
||||
/// [`Height`](zebra_chain::block::Height), if it exists in this chain.
|
||||
/// [`Height`], if it exists in this chain.
|
||||
pub fn block(&self, hash_or_height: HashOrHeight) -> Option<&ContextuallyVerifiedBlock> {
|
||||
let height =
|
||||
hash_or_height.height_or_else(|hash| self.height_by_hash.get(&hash).cloned())?;
|
||||
|
|
|
@ -30,7 +30,7 @@ use crate::{
|
|||
HashOrHeight,
|
||||
};
|
||||
|
||||
/// Returns the [`Block`] with [`block::Hash`](zebra_chain::block::Hash) or
|
||||
/// Returns the [`Block`] with [`block::Hash`] or
|
||||
/// [`Height`], if it exists in the non-finalized `chain` or finalized `db`.
|
||||
pub fn block<C>(chain: Option<C>, db: &ZebraDb, hash_or_height: HashOrHeight) -> Option<Arc<Block>>
|
||||
where
|
||||
|
@ -48,7 +48,7 @@ where
|
|||
.or_else(|| db.block(hash_or_height))
|
||||
}
|
||||
|
||||
/// Returns the [`block::Header`] with [`block::Hash`](zebra_chain::block::Hash) or
|
||||
/// Returns the [`block::Header`] with [`block::Hash`] or
|
||||
/// [`Height`], if it exists in the non-finalized `chain` or finalized `db`.
|
||||
pub fn block_header<C>(
|
||||
chain: Option<C>,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//! A [`Service`](tower::Service) implementation based on a fixed transcript.
|
||||
//! A [`Service`] implementation based on a fixed transcript.
|
||||
|
||||
use std::{
|
||||
fmt::Debug,
|
||||
|
|
|
@ -239,7 +239,7 @@ pub struct Config {
|
|||
/// astray.
|
||||
///
|
||||
/// For reliable checkpoint syncing, Zebra enforces a
|
||||
/// [`MIN_CHECKPOINT_CONCURRENCY_LIMIT`](MIN_CHECKPOINT_CONCURRENCY_LIMIT).
|
||||
/// [`MIN_CHECKPOINT_CONCURRENCY_LIMIT`].
|
||||
///
|
||||
/// This is set to a high value by default, to avoid verification pipeline stalls.
|
||||
/// Decreasing this value reduces RAM usage.
|
||||
|
|
Loading…
Reference in New Issue