Struct hotshot_stake_table::vec_based::config::QCVerKey
pub struct QCVerKey(pub(crate) Projective<<Config as BnConfig>::G2Config>);
Expand description
BLS verification key as indexing key Signature public verification key
Tuple Fields§
§0: Projective<<Config as BnConfig>::G2Config>
Implementations§
Trait Implementations§
§impl BuilderSignatureKey for VerKey
impl BuilderSignatureKey for VerKey
§type BuilderPrivateKey = SignKey
type BuilderPrivateKey = SignKey
The type of the keys builder would use to sign its messages
§type BuilderSignature = <BLSOverBN254CurveSignatureScheme as SignatureScheme>::Signature
type BuilderSignature = <BLSOverBN254CurveSignatureScheme as SignatureScheme>::Signature
The type of the signature builder would use to sign its messages
§fn sign_builder_message(
private_key: &<VerKey as BuilderSignatureKey>::BuilderPrivateKey,
data: &[u8],
) -> Result<<VerKey as BuilderSignatureKey>::BuilderSignature, <VerKey as BuilderSignatureKey>::SignError>
fn sign_builder_message( private_key: &<VerKey as BuilderSignatureKey>::BuilderPrivateKey, data: &[u8], ) -> Result<<VerKey as BuilderSignatureKey>::BuilderSignature, <VerKey as BuilderSignatureKey>::SignError>
sign the message with the builder’s private key Read more
§fn validate_builder_signature(
&self,
signature: &<VerKey as BuilderSignatureKey>::BuilderSignature,
data: &[u8],
) -> bool
fn validate_builder_signature( &self, signature: &<VerKey as BuilderSignatureKey>::BuilderSignature, data: &[u8], ) -> bool
validate the message with the builder’s public key
§fn generated_from_seed_indexed(
seed: [u8; 32],
index: u64,
) -> (VerKey, <VerKey as BuilderSignatureKey>::BuilderPrivateKey)
fn generated_from_seed_indexed( seed: [u8; 32], index: u64, ) -> (VerKey, <VerKey as BuilderSignatureKey>::BuilderPrivateKey)
Generate a new key pair
§fn validate_fee_signature<Metadata>(
&self,
signature: &Self::BuilderSignature,
fee_amount: u64,
metadata: &Metadata,
vid_commitment: &<VidSchemeType as VidScheme>::Commit,
) -> boolwhere
Metadata: EncodeBytes,
fn validate_fee_signature<Metadata>(
&self,
signature: &Self::BuilderSignature,
fee_amount: u64,
metadata: &Metadata,
vid_commitment: &<VidSchemeType as VidScheme>::Commit,
) -> boolwhere
Metadata: EncodeBytes,
validate signature over sequencing fee information
with the builder’s public key
§fn validate_sequencing_fee_signature_marketplace(
&self,
signature: &Self::BuilderSignature,
fee_amount: u64,
view_number: u64,
) -> bool
fn validate_sequencing_fee_signature_marketplace( &self, signature: &Self::BuilderSignature, fee_amount: u64, view_number: u64, ) -> bool
validate signature over sequencing fee information
with the builder’s public key (marketplace version)
§fn validate_bundle_signature<TYPES>(&self, bundle: Bundle<TYPES>) -> boolwhere
TYPES: NodeType<BuilderSignatureKey = Self>,
fn validate_bundle_signature<TYPES>(&self, bundle: Bundle<TYPES>) -> boolwhere
TYPES: NodeType<BuilderSignatureKey = Self>,
validate the bundle’s signature using the builder’s public key
§fn validate_block_info_signature(
&self,
signature: &Self::BuilderSignature,
block_size: u64,
fee_amount: u64,
payload_commitment: &BuilderCommitment,
) -> bool
fn validate_block_info_signature( &self, signature: &Self::BuilderSignature, block_size: u64, fee_amount: u64, payload_commitment: &BuilderCommitment, ) -> bool
validate signature over block information with the builder’s public key
§fn sign_fee<Metadata>(
private_key: &Self::BuilderPrivateKey,
fee_amount: u64,
metadata: &Metadata,
vid_commitment: &<VidSchemeType as VidScheme>::Commit,
) -> Result<Self::BuilderSignature, Self::SignError>where
Metadata: EncodeBytes,
fn sign_fee<Metadata>(
private_key: &Self::BuilderPrivateKey,
fee_amount: u64,
metadata: &Metadata,
vid_commitment: &<VidSchemeType as VidScheme>::Commit,
) -> Result<Self::BuilderSignature, Self::SignError>where
Metadata: EncodeBytes,
sign sequencing fee offer for proposed payload Read more
§fn sign_sequencing_fee_marketplace(
private_key: &Self::BuilderPrivateKey,
fee_amount: u64,
view_number: u64,
) -> Result<Self::BuilderSignature, Self::SignError>
fn sign_sequencing_fee_marketplace( private_key: &Self::BuilderPrivateKey, fee_amount: u64, view_number: u64, ) -> Result<Self::BuilderSignature, Self::SignError>
sign fee offer for proposed payload (marketplace version) Read more
§fn sign_bundle<TYPES>(
private_key: &Self::BuilderPrivateKey,
transactions: &[<TYPES as NodeType>::Transaction],
) -> Result<Self::BuilderSignature, Self::SignError>where
TYPES: NodeType,
fn sign_bundle<TYPES>(
private_key: &Self::BuilderPrivateKey,
transactions: &[<TYPES as NodeType>::Transaction],
) -> Result<Self::BuilderSignature, Self::SignError>where
TYPES: NodeType,
sign transactions (marketplace version) Read more
§impl CanonicalDeserialize for VerKey
impl CanonicalDeserialize for VerKey
§fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<VerKey, SerializationError>where
R: Read,
fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate,
) -> Result<VerKey, SerializationError>where
R: Read,
The general deserialize method that takes in customization flags.
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_compressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where
R: Read,
fn deserialize_uncompressed_unchecked<R>(
reader: R,
) -> Result<Self, SerializationError>where
R: Read,
§impl CanonicalSerialize for VerKey
impl CanonicalSerialize for VerKey
§fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>(
&self,
writer: W,
compress: Compress,
) -> Result<(), SerializationError>where
W: Write,
The general serialize method that takes in customization flags.
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where
W: Write,
fn uncompressed_size(&self) -> usize
§impl<'de> Deserialize<'de> for VerKey
impl<'de> Deserialize<'de> for VerKey
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VerKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Ord for VerKey
impl Ord for VerKey
§impl PartialOrd for VerKey
impl PartialOrd for VerKey
§impl Serialize for VerKey
impl Serialize for VerKey
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl SignatureKey for VerKey
impl SignatureKey for VerKey
§type PrivateKey = SignKey
type PrivateKey = SignKey
The private key type for this signature algorithm
§type StakeTableEntry = StakeTableEntry<VerKey>
type StakeTableEntry = StakeTableEntry<VerKey>
The type of the entry that contain both public key and stake value
§type QcParams = QcParams<VerKey, <BLSOverBN254CurveSignatureScheme as SignatureScheme>::PublicParameter>
type QcParams = QcParams<VerKey, <BLSOverBN254CurveSignatureScheme as SignatureScheme>::PublicParameter>
The type of the quorum certificate parameters used for assembled signature
§type PureAssembledSignatureType = <BLSOverBN254CurveSignatureScheme as SignatureScheme>::Signature
type PureAssembledSignatureType = <BLSOverBN254CurveSignatureScheme as SignatureScheme>::Signature
The type of the assembled signature, without
BitVec
§type QcType = (<VerKey as SignatureKey>::PureAssembledSignatureType, BitVec)
type QcType = (<VerKey as SignatureKey>::PureAssembledSignatureType, BitVec)
The type of the assembled qc: assembled signature +
BitVec
§fn validate(
&self,
signature: &<VerKey as SignatureKey>::PureAssembledSignatureType,
data: &[u8],
) -> bool
fn validate( &self, signature: &<VerKey as SignatureKey>::PureAssembledSignatureType, data: &[u8], ) -> bool
Validate a signature
§fn sign(
sk: &<VerKey as SignatureKey>::PrivateKey,
data: &[u8],
) -> Result<<VerKey as SignatureKey>::PureAssembledSignatureType, <VerKey as SignatureKey>::SignError>
fn sign( sk: &<VerKey as SignatureKey>::PrivateKey, data: &[u8], ) -> Result<<VerKey as SignatureKey>::PureAssembledSignatureType, <VerKey as SignatureKey>::SignError>
Produce a signature Read more
§fn from_private(private_key: &<VerKey as SignatureKey>::PrivateKey) -> VerKey
fn from_private(private_key: &<VerKey as SignatureKey>::PrivateKey) -> VerKey
Produce a public key from a private key
§fn from_bytes(bytes: &[u8]) -> Result<VerKey, SerializationError>
fn from_bytes(bytes: &[u8]) -> Result<VerKey, SerializationError>
Deserialize a public key from bytes Read more
§fn generated_from_seed_indexed(
seed: [u8; 32],
index: u64,
) -> (VerKey, <VerKey as SignatureKey>::PrivateKey)
fn generated_from_seed_indexed( seed: [u8; 32], index: u64, ) -> (VerKey, <VerKey as SignatureKey>::PrivateKey)
Generate a new key pair
§fn stake_table_entry(
&self,
stake: u64,
) -> <VerKey as SignatureKey>::StakeTableEntry
fn stake_table_entry( &self, stake: u64, ) -> <VerKey as SignatureKey>::StakeTableEntry
get the stake table entry from the public key and stake value
§fn public_key(entry: &<VerKey as SignatureKey>::StakeTableEntry) -> VerKey
fn public_key(entry: &<VerKey as SignatureKey>::StakeTableEntry) -> VerKey
only get the public key from the stake table entry
§fn public_parameter(
stake_entries: Vec<<VerKey as SignatureKey>::StakeTableEntry>,
threshold: U256,
) -> <VerKey as SignatureKey>::QcParams
fn public_parameter( stake_entries: Vec<<VerKey as SignatureKey>::StakeTableEntry>, threshold: U256, ) -> <VerKey as SignatureKey>::QcParams
get the public parameter for the assembled signature checking
§fn check(
real_qc_pp: &<VerKey as SignatureKey>::QcParams,
data: &[u8],
qc: &<VerKey as SignatureKey>::QcType,
) -> Result<(), SignatureError>
fn check( real_qc_pp: &<VerKey as SignatureKey>::QcParams, data: &[u8], qc: &<VerKey as SignatureKey>::QcType, ) -> Result<(), SignatureError>
check the quorum certificate for the assembled signature, returning
Ok(())
if it is valid. Read more§fn sig_proof(
signature: &<VerKey as SignatureKey>::QcType,
) -> (<VerKey as SignatureKey>::PureAssembledSignatureType, BitVec)
fn sig_proof( signature: &<VerKey as SignatureKey>::QcType, ) -> (<VerKey as SignatureKey>::PureAssembledSignatureType, BitVec)
get the assembled signature and the
BitVec
separately from the assembled signature§fn assemble(
real_qc_pp: &<VerKey as SignatureKey>::QcParams,
signers: &BitSlice,
sigs: &[<VerKey as SignatureKey>::PureAssembledSignatureType],
) -> <VerKey as SignatureKey>::QcType
fn assemble( real_qc_pp: &<VerKey as SignatureKey>::QcParams, signers: &BitSlice, sigs: &[<VerKey as SignatureKey>::PureAssembledSignatureType], ) -> <VerKey as SignatureKey>::QcType
assemble the signature from the partial signature and the indication of signers in
BitVec
§fn genesis_proposer_pk() -> VerKey
fn genesis_proposer_pk() -> VerKey
generates the genesis public key. Meant to be dummy/filler
impl Copy for VerKey
impl Eq for VerKey
impl StructuralPartialEq for VerKey
Auto Trait Implementations§
impl Freeze for VerKey
impl RefUnwindSafe for VerKey
impl Send for VerKey
impl Sync for VerKey
impl Unpin for VerKey
impl UnwindSafe for VerKey
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
impl<T> CanonicalSerializeHashExt for Twhere
T: CanonicalSerialize,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.