pub struct WorkReport {
pub package_spec: WorkPackageSpec,
pub context: RefineContext,
pub core_index: CoreIndex,
pub authorizer_hash: AuthorizerHash,
pub auth_output: AuthTrace,
pub sr_lookup: VecMap<WorkPackageHash, SegmentTreeRoot>,
pub results: BoundedVec<WorkDigest, MaxWorkItems>,
pub auth_gas_used: UnsignedGas,
}
Expand description
Execution report of a Work Package, mainly comprising the Results from the Refinement of its Work Items.
Fields§
§package_spec: WorkPackageSpec
The specification of the underlying Work Package.
context: RefineContext
The context of the underlying Work Package.
core_index: CoreIndex
The Core index under which the Work Package was Refined to generate the Report.
The authorizer under which this Work Package got executed. For the Work Package to be validly reported, this must appear in the Core’s authorizer queue at the time of reporting.
auth_output: AuthTrace
The output of the authorizer under which this Work Package got executed.
sr_lookup: VecMap<WorkPackageHash, SegmentTreeRoot>
The segment-root lookup dictionary.
results: BoundedVec<WorkDigest, MaxWorkItems>
The results of the evaluation of the Items in the underlying Work Package.
auth_gas_used: UnsignedGas
The amount of gas actually used by the IsAuthorized call.
Implementations§
Source§impl WorkReport
impl WorkReport
Sourcepub fn hash(&self) -> WorkReportHash
pub fn hash(&self) -> WorkReportHash
Report hash.
Sourcepub fn gas(&self) -> UnsignedGas
pub fn gas(&self) -> UnsignedGas
Report total gas requirement.
Sourcepub fn deps(&self) -> impl Iterator<Item = &WorkPackageHash>
pub fn deps(&self) -> impl Iterator<Item = &WorkPackageHash>
Report dependencies derived from both context prerequisites and the segments root lookup dictionary.
Sourcepub fn dep_count(&self) -> usize
pub fn dep_count(&self) -> usize
Count report dependencies derived from both context prerequisites and the segments root lookup dictionary.
Sourcepub fn check_size(&self) -> bool
pub fn check_size(&self) -> bool
Determine if the report size is within the limit.
Trait Implementations§
Source§impl Clone for WorkReport
impl Clone for WorkReport
Source§fn clone(&self) -> WorkReport
fn clone(&self) -> WorkReport
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WorkReport
impl Debug for WorkReport
Source§impl Decode for WorkReport
impl Decode for WorkReport
Source§fn decode<__CodecInputEdqy: Input>(
__codec_input_edqy: &mut __CodecInputEdqy,
) -> Result<Self, Error>
fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Source§impl Encode for WorkReport
impl Encode for WorkReport
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Source§impl MaxEncodedLen for WorkReport
impl MaxEncodedLen for WorkReport
Source§fn max_encoded_len() -> usize
fn max_encoded_len() -> usize
Source§impl PartialEq for WorkReport
impl PartialEq for WorkReport
impl EncodeLike for WorkReport
impl Eq for WorkReport
impl StructuralPartialEq for WorkReport
Auto Trait Implementations§
impl Freeze for WorkReport
impl RefUnwindSafe for WorkReport
impl Send for WorkReport
impl Sync for WorkReport
impl Unpin for WorkReport
impl UnwindSafe for WorkReport
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§impl<T> DecodeLimit for Twhere
T: Decode,
impl<T> DecodeLimit for Twhere
T: Decode,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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