Struct CurrentQuorumsInfo
pub struct CurrentQuorumsInfo {
    pub quorum_hashes: Vec<[u8; 32]>,
    pub current_quorum_hash: [u8; 32],
    pub validator_sets: Vec<ValidatorSet>,
    pub last_block_proposer: [u8; 32],
    pub last_platform_block_height: u64,
    pub last_core_block_height: u32,
}Expand description
Represents the current state of quorums in the platform.
This struct holds various information related to the current quorums, including the list of quorum hashes, the current active quorum hash, and details about the validators and their statuses.
§Fields
quorum_hashes: A list of 32-byte hashes representing the active quorums.current_quorum_hash: A 32-byte hash identifying the currently active quorum. This is the quorum that is currently responsible for platform operations.validator_sets: A collection of [ValidatorSet] structs, each representing a set of validators for different quorums. This provides detailed information about the members of each quorum.last_block_proposer: A vector of bytes representing the identity of the last block proposer. This is typically the ProTxHash of the masternode that proposed the most recent platform block.last_platform_block_height: The height of the most recent platform block. This indicates the latest block height at the platform level, which may differ from the core blockchain height.last_core_block_height: The height of the most recent core blockchain block associated with the platform. This is the height of the blockchain where the platform block was anchored.
§Derives
Debug: Provides a debug representation of theCurrentQuorumsInfostruct, useful for logging and debugging purposes.Clone: Allows theCurrentQuorumsInfostruct to be cloned, creating a deep copy of its contents.
§Conditional Derives
When the mocks feature is enabled, the following derives and attributes are applied:
Encode: Allows the struct to be serialized into a binary format using thebincodecrate.Decode: Allows the struct to be deserialized from a binary format using thebincodecrate.PlatformSerialize: Enables serialization of the struct using the platform-specific serialization format.PlatformDeserialize: Enables deserialization of the struct using the platform-specific deserialization format.platform_serialize(unversioned): Specifies that the struct should be serialized without including a version field in the serialized data.
This structure is typically used in scenarios where the state of the current quorums needs to be accessed, for example, when validating or proposing new blocks, or when determining the active set of validators.
Fields§
§quorum_hashes: Vec<[u8; 32]>A list of 32-byte hashes representing the active quorums.
current_quorum_hash: [u8; 32]A 32-byte hash identifying the currently active quorum.
validator_sets: Vec<ValidatorSet>A collection of [ValidatorSet] structs, each representing a set of validators for different quorums.
last_block_proposer: [u8; 32]A vector of bytes representing the identity of the last block proposer.
last_platform_block_height: u64The height of the most recent platform block.
last_core_block_height: u32The height of the most recent core blockchain block associated with the platform.
Trait Implementations§
§impl<'__de> BorrowDecode<'__de> for CurrentQuorumsInfo
 
impl<'__de> BorrowDecode<'__de> for CurrentQuorumsInfo
§fn borrow_decode<__D>(
    decoder: &mut __D,
) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: BorrowDecoder<'__de>,
 
fn borrow_decode<__D>(
    decoder: &mut __D,
) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: BorrowDecoder<'__de>,
§impl Clone for CurrentQuorumsInfo
 
impl Clone for CurrentQuorumsInfo
§fn clone(&self) -> CurrentQuorumsInfo
 
fn clone(&self) -> CurrentQuorumsInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for CurrentQuorumsInfo
 
impl Debug for CurrentQuorumsInfo
§impl Decode for CurrentQuorumsInfo
 
impl Decode for CurrentQuorumsInfo
§fn decode<__D>(decoder: &mut __D) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: Decoder,
 
fn decode<__D>(decoder: &mut __D) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: Decoder,
§impl Encode for CurrentQuorumsInfo
 
impl Encode for CurrentQuorumsInfo
source§impl FetchUnproved for CurrentQuorumsInfo
 
impl FetchUnproved for CurrentQuorumsInfo
source§type Request = GetCurrentQuorumsInfoRequest
 
type Request = GetCurrentQuorumsInfoRequest
source§fn fetch_unproved<'life0, 'async_trait, Q>(
    sdk: &'life0 Sdk,
    query: Q,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>where
    Self: FromUnproved<<Self as FetchUnproved>::Request, Request = <Self as FetchUnproved>::Request, Response = <<Self as FetchUnproved>::Request as TransportRequest>::Response> + Send + 'async_trait,
    Q: 'async_trait + Query<<Self as FetchUnproved>::Request>,
    'life0: 'async_trait,
 
fn fetch_unproved<'life0, 'async_trait, Q>(
    sdk: &'life0 Sdk,
    query: Q,
) -> Pin<Box<dyn Future<Output = Result<Option<Self>, Error>> + Send + 'async_trait>>where
    Self: FromUnproved<<Self as FetchUnproved>::Request, Request = <Self as FetchUnproved>::Request, Response = <<Self as FetchUnproved>::Request as TransportRequest>::Response> + Send + 'async_trait,
    Q: 'async_trait + Query<<Self as FetchUnproved>::Request>,
    'life0: 'async_trait,
source§fn fetch_unproved_with_settings<'life0, 'async_trait, Q>(
    sdk: &'life0 Sdk,
    query: Q,
    settings: RequestSettings,
) -> Pin<Box<dyn Future<Output = Result<(Option<Self>, ResponseMetadata), Error>> + Send + 'async_trait>>where
    Self: FromUnproved<<Self as FetchUnproved>::Request, Request = <Self as FetchUnproved>::Request, Response = <<Self as FetchUnproved>::Request as TransportRequest>::Response> + Send + 'async_trait,
    Q: 'async_trait + Query<<Self as FetchUnproved>::Request>,
    'life0: 'async_trait,
 
fn fetch_unproved_with_settings<'life0, 'async_trait, Q>(
    sdk: &'life0 Sdk,
    query: Q,
    settings: RequestSettings,
) -> Pin<Box<dyn Future<Output = Result<(Option<Self>, ResponseMetadata), Error>> + Send + 'async_trait>>where
    Self: FromUnproved<<Self as FetchUnproved>::Request, Request = <Self as FetchUnproved>::Request, Response = <<Self as FetchUnproved>::Request as TransportRequest>::Response> + Send + 'async_trait,
    Q: 'async_trait + Query<<Self as FetchUnproved>::Request>,
    'life0: 'async_trait,
§impl FromUnproved<GetCurrentQuorumsInfoRequest> for CurrentQuorumsInfo
 
impl FromUnproved<GetCurrentQuorumsInfoRequest> for CurrentQuorumsInfo
§type Request = GetCurrentQuorumsInfoRequest
 
type Request = GetCurrentQuorumsInfoRequest
§type Response = GetCurrentQuorumsInfoResponse
 
type Response = GetCurrentQuorumsInfoResponse
§fn maybe_from_unproved_with_metadata<I, O>(
    _request: I,
    response: O,
    _network: Network,
    _platform_version: &PlatformVersion,
) -> Result<(Option<CurrentQuorumsInfo>, ResponseMetadata), Error>where
    I: Into<<CurrentQuorumsInfo as FromUnproved<GetCurrentQuorumsInfoRequest>>::Request>,
    O: Into<<CurrentQuorumsInfo as FromUnproved<GetCurrentQuorumsInfoRequest>>::Response>,
    CurrentQuorumsInfo: Sized,
 
fn maybe_from_unproved_with_metadata<I, O>(
    _request: I,
    response: O,
    _network: Network,
    _platform_version: &PlatformVersion,
) -> Result<(Option<CurrentQuorumsInfo>, ResponseMetadata), Error>where
    I: Into<<CurrentQuorumsInfo as FromUnproved<GetCurrentQuorumsInfoRequest>>::Request>,
    O: Into<<CurrentQuorumsInfo as FromUnproved<GetCurrentQuorumsInfoRequest>>::Response>,
    CurrentQuorumsInfo: Sized,
§fn maybe_from_unproved<I, O>(
    request: I,
    response: O,
    network: Network,
    platform_version: &PlatformVersion,
) -> Result<Option<Self>, Error>
 
fn maybe_from_unproved<I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, ) -> Result<Option<Self>, Error>
§fn from_unproved<I, O>(
    request: I,
    response: O,
    network: Network,
    platform_version: &PlatformVersion,
) -> Result<Self, Error>
 
fn from_unproved<I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, ) -> Result<Self, Error>
§fn from_unproved_with_metadata<I, O>(
    request: I,
    response: O,
    network: Network,
    platform_version: &PlatformVersion,
) -> Result<(Self, ResponseMetadata), Error>
 
fn from_unproved_with_metadata<I, O>( request: I, response: O, network: Network, platform_version: &PlatformVersion, ) -> Result<(Self, ResponseMetadata), Error>
source§impl MockResponse for CurrentQuorumsInfo
 
impl MockResponse for CurrentQuorumsInfo
source§fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8> ⓘ
 
fn mock_serialize(&self, sdk: &MockDashPlatformSdk) -> Vec<u8> ⓘ
source§fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Selfwhere
    Self: Sized,
 
fn mock_deserialize(sdk: &MockDashPlatformSdk, buf: &[u8]) -> Selfwhere
    Self: Sized,
§impl PlatformDeserializable for CurrentQuorumsInfo
 
impl PlatformDeserializable for CurrentQuorumsInfo
fn deserialize_from_bytes( bytes: &[u8], ) -> Result<CurrentQuorumsInfo, ProtocolError>
fn deserialize_from_bytes_no_limit( bytes: &[u8], ) -> Result<CurrentQuorumsInfo, ProtocolError>
§impl PlatformSerializable for CurrentQuorumsInfo
 
impl PlatformSerializable for CurrentQuorumsInfo
type Error = ProtocolError
fn serialize_to_bytes( &self, ) -> Result<Vec<u8>, <CurrentQuorumsInfo as PlatformSerializable>::Error>
§fn serialize_consume_to_bytes(
    self,
) -> Result<Vec<u8>, <CurrentQuorumsInfo as PlatformSerializable>::Error>
 
fn serialize_consume_to_bytes( self, ) -> Result<Vec<u8>, <CurrentQuorumsInfo as PlatformSerializable>::Error>
§impl PlatformVersionEncode for CurrentQuorumsInfo
 
impl PlatformVersionEncode for CurrentQuorumsInfo
§fn platform_encode<__E>(
    &self,
    encoder: &mut __E,
    platform_version: &PlatformVersion,
) -> Result<(), EncodeError>where
    __E: Encoder,
 
fn platform_encode<__E>(
    &self,
    encoder: &mut __E,
    platform_version: &PlatformVersion,
) -> Result<(), EncodeError>where
    __E: Encoder,
§impl<'__de> PlatformVersionedBorrowDecode<'__de> for CurrentQuorumsInfo
 
impl<'__de> PlatformVersionedBorrowDecode<'__de> for CurrentQuorumsInfo
§fn platform_versioned_borrow_decode<__D>(
    decoder: &mut __D,
    platform_version: &PlatformVersion,
) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: BorrowDecoder<'__de>,
 
fn platform_versioned_borrow_decode<__D>(
    decoder: &mut __D,
    platform_version: &PlatformVersion,
) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: BorrowDecoder<'__de>,
§impl PlatformVersionedDecode for CurrentQuorumsInfo
 
impl PlatformVersionedDecode for CurrentQuorumsInfo
§fn platform_versioned_decode<__D>(
    decoder: &mut __D,
    platform_version: &PlatformVersion,
) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: Decoder,
 
fn platform_versioned_decode<__D>(
    decoder: &mut __D,
    platform_version: &PlatformVersion,
) -> Result<CurrentQuorumsInfo, DecodeError>where
    __D: Decoder,
Auto Trait Implementations§
impl Freeze for CurrentQuorumsInfo
impl RefUnwindSafe for CurrentQuorumsInfo
impl Send for CurrentQuorumsInfo
impl Sync for CurrentQuorumsInfo
impl Unpin for CurrentQuorumsInfo
impl UnwindSafe for CurrentQuorumsInfo
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
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)
clone_to_uninit)§impl<T> Conv for T
 
impl<T> Conv for T
§impl<T> CostsExt for T
 
impl<T> CostsExt for T
§fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
    Self: Sized,
 
fn wrap_with_cost(self, cost: OperationCost) -> CostContext<Self>where
    Self: Sized,
CostContext object with provided costs.§fn wrap_fn_cost(
    self,
    f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
    Self: Sized,
 
fn wrap_fn_cost(
    self,
    f: impl FnOnce(&Self) -> OperationCost,
) -> CostContext<Self>where
    Self: Sized,
CostContext object with costs computed using the
value getting wrapped.§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,
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,
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,
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,
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,
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,
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,
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,
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,
§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>
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>
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 moresource§impl<T> IntoRequest<T> for T
 
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
 
fn into_request(self) -> Request<T>
T in a tonic::Request§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,
§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,
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,
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
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
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
self, then passes self.deref() into the pipe function.§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
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
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
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
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
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
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
.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
.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
.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
.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
.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
.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
.tap_deref() only in debug builds, and is erased in release
builds.