pub struct IntermediateOutcome {
pub(crate) n_players: u16,
pub(crate) dealer: PublicKey,
pub(crate) dealer_signature: Signature,
pub(crate) epoch: Epoch,
pub(crate) commitment: Public<MinSig>,
pub(crate) acks: Vec<Ack>,
pub(crate) reveals: Vec<Share>,
}Expand description
The local outcome of a dealer’s dealings.
This is the intermediate outcome of a ceremony, which contains a dealer’s generated commitment, all acks for the shares it sent to the ceremony’s players, and finally the revealed shares, for which it did not receive acks.
This object is persisted on-chain. Every player collects the intermediate outcomes of the other dealers to create the overall outcome of the ceremony.
Fields§
§n_players: u16The number of players in this epoch.
dealer: PublicKeyThe public key of the dealer.
dealer_signature: SignatureThe dealer’s signature over the resharing round, commitment, acks, and reveals.
epoch: EpochThe epoch of the resharing operation.
commitment: Public<MinSig>The new group public key polynomial.
acks: Vec<Ack>All signed acknowledgements from participants.
reveals: Vec<Share>Any revealed secret shares.
Implementations§
Source§impl IntermediateOutcome
impl IntermediateOutcome
Sourcepub fn new(
n_players: u16,
dealer_signer: &PrivateKey,
namespace: &[u8],
epoch: Epoch,
commitment: Public<MinSig>,
acks: Vec<Ack>,
reveals: Vec<Share>,
) -> Self
pub fn new( n_players: u16, dealer_signer: &PrivateKey, namespace: &[u8], epoch: Epoch, commitment: Public<MinSig>, acks: Vec<Ack>, reveals: Vec<Share>, ) -> Self
Creates a new intermediate ceremony outcome.
This object contains, the number of players, the epoch of the ceremony, the dealer’s commitment (public polynomial), the acks received by the players and the revealed shares for which no acks are received.
Finally, it also includes a signature over
(namespace, epoch, commitment, acks, reveals) signed by the dealer.
Sourcepub fn new_pre_allegretto(
n_players: u16,
dealer_signer: &PrivateKey,
namespace: &[u8],
epoch: Epoch,
commitment: Public<MinSig>,
acks: Vec<Ack>,
reveals: Vec<Share>,
) -> Self
pub fn new_pre_allegretto( n_players: u16, dealer_signer: &PrivateKey, namespace: &[u8], epoch: Epoch, commitment: Public<MinSig>, acks: Vec<Ack>, reveals: Vec<Share>, ) -> Self
Creates a new intermediate ceremony outcome.
This method constructs a signature without the number players. This is
incorrect and addressed by Self::new. Self::new_pre_allegretto
exists for compatibility reasons and should only be used for hardforks
pre allegretto.
This object contains, the number of players, the epoch of the ceremony, the dealer’s commitment (public polynomial), the acks received by the players and the revealed shares for which no acks are received.
Finally, it also includes a signature over
(namespace, epoch, commitment, acks, reveals) signed by the dealer.
Sourcepub fn verify_pre_allegretto(&self, namespace: &[u8]) -> bool
pub fn verify_pre_allegretto(&self, namespace: &[u8]) -> bool
Verifies the intermediate outcome’s signature.
This method constructs a signature without the number players. This is
incorrect and addressed by Self::new. Self::new_pre_allegretto
exists for compatibility reasons and should only be used for hardforks
pre allegretto.
Sourcepub(crate) fn signature_payload_from_parts(
n_players: u16,
epoch: Epoch,
commitment: &Public<MinSig>,
acks: &Vec<Ack>,
reveals: &Vec<Share>,
) -> Vec<u8> ⓘ
pub(crate) fn signature_payload_from_parts( n_players: u16, epoch: Epoch, commitment: &Public<MinSig>, acks: &Vec<Ack>, reveals: &Vec<Share>, ) -> Vec<u8> ⓘ
Returns the payload that was signed by the dealer, formed from raw parts.
Sourcepub(crate) fn signature_payload_from_parts_pre_allegretto(
epoch: Epoch,
commitment: &Public<MinSig>,
acks: &Vec<Ack>,
reveals: &Vec<Share>,
) -> Vec<u8> ⓘ
pub(crate) fn signature_payload_from_parts_pre_allegretto( epoch: Epoch, commitment: &Public<MinSig>, acks: &Vec<Ack>, reveals: &Vec<Share>, ) -> Vec<u8> ⓘ
Returns the payload that was signed by the dealer, formed from raw parts.
This method constructs a signature without the number players. This is
incorrect and addressed by Self::new. Self::new_pre_allegretto
exists for compatibility reasons and should only be used for hardforks
pre allegretto.
pub fn acks(&self) -> &[Ack]
pub fn dealer(&self) -> &PublicKey
pub fn signature(&self) -> &Signature
pub fn epoch(&self) -> Epoch
pub fn commitment(&self) -> &Public<MinSig>
pub fn reveals(&self) -> &[Share]
Trait Implementations§
Source§impl Clone for IntermediateOutcome
impl Clone for IntermediateOutcome
Source§fn clone(&self) -> IntermediateOutcome
fn clone(&self) -> IntermediateOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IntermediateOutcome
impl Debug for IntermediateOutcome
Source§impl EncodeSize for IntermediateOutcome
impl EncodeSize for IntermediateOutcome
Source§fn encode_size(&self) -> usize
fn encode_size(&self) -> usize
Source§impl PartialEq for IntermediateOutcome
impl PartialEq for IntermediateOutcome
Source§impl Read for IntermediateOutcome
impl Read for IntermediateOutcome
Source§impl Write for IntermediateOutcome
impl Write for IntermediateOutcome
impl Eq for IntermediateOutcome
impl StructuralPartialEq for IntermediateOutcome
Auto Trait Implementations§
impl Freeze for IntermediateOutcome
impl RefUnwindSafe for IntermediateOutcome
impl Send for IntermediateOutcome
impl Sync for IntermediateOutcome
impl Unpin for IntermediateOutcome
impl UnwindSafe for IntermediateOutcome
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,
§impl<T> Decode for Twhere
T: Read,
impl<T> Decode for Twhere
T: Read,
§fn decode_cfg(buf: impl Buf, cfg: &Self::Cfg) -> Result<Self, Error>
fn decode_cfg(buf: impl Buf, cfg: &Self::Cfg) -> Result<Self, Error>
§impl<X, T> DecodeExt<X> for Twhere
X: IsUnit,
T: Decode<Cfg = X>,
impl<X, T> DecodeExt<X> for Twhere
X: IsUnit,
T: Decode<Cfg = X>,
§impl<T> Encode for Twhere
T: Write + EncodeSize,
impl<T> Encode for Twhere
T: Write + EncodeSize,
§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
§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
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
x-request-id as the header name. Read more§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> Codec for Twhere
T: Encode + Decode,
impl<T> ErasedDestructor for Twhere
T: 'static,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 440 bytes