pub struct CoinbaseSolution<N: Network> { /* private fields */ }
Expand description
The coinbase puzzle solution constructed by accumulating the individual prover solutions.
Implementations§
source§impl<N: Network> CoinbaseSolution<N>
impl<N: Network> CoinbaseSolution<N>
sourcepub const fn new(
partial_solutions: Vec<PartialSolution<N>>,
proof: PuzzleProof<N>
) -> Self
pub const fn new( partial_solutions: Vec<PartialSolution<N>>, proof: PuzzleProof<N> ) -> Self
Initializes a new instance of a coinbase solution.
sourcepub fn partial_solutions(&self) -> &[PartialSolution<N>]
pub fn partial_solutions(&self) -> &[PartialSolution<N>]
Returns the partial solutions.
sourcepub fn puzzle_commitments(
&self
) -> impl '_ + Iterator<Item = PuzzleCommitment<N>>
pub fn puzzle_commitments( &self ) -> impl '_ + Iterator<Item = PuzzleCommitment<N>>
Returns the puzzle commitments.
sourcepub const fn proof(&self) -> &PuzzleProof<N>
pub const fn proof(&self) -> &PuzzleProof<N>
Returns the KZG proof.
sourcepub fn to_cumulative_proof_target(&self) -> Result<u128>
pub fn to_cumulative_proof_target(&self) -> Result<u128>
Returns the cumulative sum of the prover solutions.
sourcepub fn to_accumulator_point(&self) -> Result<Field<N>>
pub fn to_accumulator_point(&self) -> Result<Field<N>>
Returns the accumulator challenge point.
Trait Implementations§
source§impl<N: Clone + Network> Clone for CoinbaseSolution<N>
impl<N: Clone + Network> Clone for CoinbaseSolution<N>
source§fn clone(&self) -> CoinbaseSolution<N>
fn clone(&self) -> CoinbaseSolution<N>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<N: Network> Debug for CoinbaseSolution<N>
impl<N: Network> Debug for CoinbaseSolution<N>
source§impl<'de, N: Network> Deserialize<'de> for CoinbaseSolution<N>
impl<'de, N: Network> Deserialize<'de> for CoinbaseSolution<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the coinbase solution from a JSON-string or buffer.
source§impl<N: Network> Display for CoinbaseSolution<N>
impl<N: Network> Display for CoinbaseSolution<N>
source§impl<N: Network> FromBytes for CoinbaseSolution<N>
impl<N: Network> FromBytes for CoinbaseSolution<N>
source§impl<N: Network> FromStr for CoinbaseSolution<N>
impl<N: Network> FromStr for CoinbaseSolution<N>
source§impl<N: Hash + Network> Hash for CoinbaseSolution<N>
impl<N: Hash + Network> Hash for CoinbaseSolution<N>
source§impl<N: PartialEq + Network> PartialEq<CoinbaseSolution<N>> for CoinbaseSolution<N>
impl<N: PartialEq + Network> PartialEq<CoinbaseSolution<N>> for CoinbaseSolution<N>
source§fn eq(&self, other: &CoinbaseSolution<N>) -> bool
fn eq(&self, other: &CoinbaseSolution<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network> Serialize for CoinbaseSolution<N>
impl<N: Network> Serialize for CoinbaseSolution<N>
source§impl<N: Network> ToBytes for CoinbaseSolution<N>
impl<N: Network> ToBytes for CoinbaseSolution<N>
impl<N: Eq + Network> Eq for CoinbaseSolution<N>
impl<N: Network> StructuralEq for CoinbaseSolution<N>
impl<N: Network> StructuralPartialEq for CoinbaseSolution<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for CoinbaseSolution<N>where <N as Environment>::Field: RefUnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe, <N as Environment>::Projective: RefUnwindSafe,
impl<N> Send for CoinbaseSolution<N>
impl<N> Sync for CoinbaseSolution<N>
impl<N> Unpin for CoinbaseSolution<N>where <N as Environment>::Field: Unpin, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: Unpin, <N as Environment>::Projective: Unpin,
impl<N> UnwindSafe for CoinbaseSolution<N>where <N as Environment>::Field: UnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: UnwindSafe, <N as Environment>::Projective: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.