#[repr(C)]pub struct NondeterministicProposalData {
pub nondeterministic_bits: BytesM,
pub nondeterministic_bit_count: u32,
pub observed_queue_entry_sequence: VecM<QueueEntry, thruput_xdr::::transaction::NondeterministicProposalData::{constant#0}>,
}Expand description
Nondeterministic data captured during transaction execution by the proposer.
Thruput executes transactions in parallel, which introduces nondeterminism (e.g., from two-phase commit conflict resolution). To ensure validators can deterministically re-execute transactions, the proposer captures all nondeterministic decisions and includes them in the block proposal.
This allows validators to replay the exact same execution path as the proposer, ensuring consensus on the transaction result.
Fields§
§nondeterministic_bits: BytesMA bitstring of nondeterministic decisions made during execution.
This includes:
- Two-phase commit conflict resolution results from try_invoke frames (one boolean per try_invoke frame that succeeds and attempts lock acquisition)
- Other nondeterministic outcomes that must be consistent across validators
Each bit represents a binary decision point encountered during execution. The bits are consumed sequentially as the transaction re-executes.
nondeterministic_bit_count: u32The length of nondeterministic_bits in bits (not bytes).
Since nondeterministic_bits.size() returns the rounded-up length in bytes, this field tracks the exact bit count to avoid trailing garbage bits.
observed_queue_entry_sequence: VecM<QueueEntry, thruput_xdr::::transaction::NondeterministicProposalData::{constant#0}>Retrocausal queue entries inserted by concurrent transactions in the same block that this transaction observed, so validators replay the same reads.
An entry is recorded when a peek or consume reads a concurrent entry. Reads of entries from past blocks or inserted by this transaction itself record nothing. Entries appear in the order they were first observed during execution, interleaved across queues; within one queue they are that queue’s concurrent entries in index order, starting at 0. Each (queue, index) is recorded once however many times it is read, so repeated peeks, or a peek followed by a consume, add a single entry. Whether each concurrent read found an entry is recorded separately, one bit per read, in nondeterministic_bits.
Trait Implementations§
Source§impl Clone for NondeterministicProposalData
impl Clone for NondeterministicProposalData
Source§fn clone(&self) -> NondeterministicProposalData
fn clone(&self) -> NondeterministicProposalData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NondeterministicProposalData
impl Debug for NondeterministicProposalData
impl EncodesAs<NondeterministicProposalData> for NondeterministicProposalData
impl Eq for NondeterministicProposalData
Source§impl Hash for NondeterministicProposalData
impl Hash for NondeterministicProposalData
Source§impl JsonSchema for NondeterministicProposalData
impl JsonSchema for NondeterministicProposalData
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ord for NondeterministicProposalData
impl Ord for NondeterministicProposalData
Source§fn cmp(&self, other: &NondeterministicProposalData) -> Ordering
fn cmp(&self, other: &NondeterministicProposalData) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for NondeterministicProposalData
impl PartialOrd for NondeterministicProposalData
Source§impl<'_r> ReadXDR<'_r> for NondeterministicProposalData
impl<'_r> ReadXDR<'_r> for NondeterministicProposalData
Source§fn read_xdr<R>(r: &mut R) -> Result<NondeterministicProposalData, ReadError>where
R: Reader<'_r>,
fn read_xdr<R>(r: &mut R) -> Result<NondeterministicProposalData, ReadError>where
R: Reader<'_r>,
Source§fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, NondeterministicProposalData>,
) -> Result<Init<'__xdrs_s, NondeterministicProposalData>, ReadError>where
R: Reader<'_r>,
fn read_xdr_in_place<R, '__xdrs_s>(
r: &mut R,
__xdrs_slot: Slot<'__xdrs_s, NondeterministicProposalData>,
) -> Result<Init<'__xdrs_s, NondeterministicProposalData>, ReadError>where
R: Reader<'_r>,
slot, without first building it
on the stack. Read more