referrerpolicy=no-referrer-when-downgrade
sp_consensus_sassafras::ticket

Type Alias TicketSignature

Source
pub type TicketSignature = RingVrfSignature;
Expand description

Ticket ring vrf signature.

Aliased Type§

struct TicketSignature {
    pub signature: [u8; 755],
    pub pre_outputs: BoundedVec<VrfPreOutput, ConstU32<3>>,
}

Fields§

§signature: [u8; 755]

Ring signature.

§pre_outputs: BoundedVec<VrfPreOutput, ConstU32<3>>

VRF pre-outputs.

Implementations

§

impl RingVrfSignature

pub fn ring_vrf_verify( &self, data: &VrfSignData, verifier: &RingVerifier<Fp<MontBackend<FrConfig, 4>, 4>, KZG<Bls12<Config<HostHooks>>>, BandersnatchConfig<HostHooks>>, ) -> bool

Verify a ring-vrf signature.

The signature is verifiable if it has been produced by a member of the ring from which the RingVerifier has been constructed.

Trait Implementations

§

impl Clone for RingVrfSignature

§

fn clone(&self) -> RingVrfSignature

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for RingVrfSignature

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Decode for RingVrfSignature

§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<RingVrfSignature, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
§

impl Encode for RingVrfSignature

§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
§

impl MaxEncodedLen for RingVrfSignature

§

fn max_encoded_len() -> usize

Upper bound, in bytes, of the maximum encoded size of this item.
§

impl PartialEq for RingVrfSignature

§

fn eq(&self, other: &RingVrfSignature) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl TypeInfo for RingVrfSignature

§

type Identity = RingVrfSignature

The type identifying for which type info is provided. Read more
§

fn type_info() -> Type

Returns the static type identifier for Self.
§

impl DecodeWithMemTracking for RingVrfSignature

§

impl EncodeLike for RingVrfSignature

§

impl Eq for RingVrfSignature

§

impl StructuralPartialEq for RingVrfSignature