type ConsensusTaskTestState = ConsensusTaskState<TestTypes, MemoryImpl, TestVersions>;

Aliased Type§

struct ConsensusTaskTestState {
Show 24 fields pub public_key: VerKey, pub private_key: SignKey, pub consensus: OuterConsensus<TestTypes>, pub instance_state: Arc<TestInstanceState>, pub timeout: u64, pub round_start_delay: u64, pub cur_view: ViewNumber, pub cur_view_time: i64, pub payload_commitment_and_metadata: Option<CommitmentAndMetadata<TestTypes>>, pub network: Arc<MemoryNetwork<VerKey>>, pub timeout_membership: Arc<GeneralStaticCommittee<TestTypes>>, pub quorum_membership: Arc<GeneralStaticCommittee<TestTypes>>, pub da_membership: Arc<GeneralStaticCommittee<TestTypes>>, pub vote_collectors: BTreeMap<ViewNumber, VoteCollectionTaskState<TestTypes, SimpleVote<TestTypes, QuorumData<TestTypes>>, SimpleCertificate<TestTypes, QuorumData<TestTypes>, SuccessThreshold>, TestVersions>>, pub timeout_vote_collectors: BTreeMap<ViewNumber, VoteCollectionTaskState<TestTypes, SimpleVote<TestTypes, TimeoutData<TestTypes>>, SimpleCertificate<TestTypes, TimeoutData<TestTypes>, SuccessThreshold>, TestVersions>>, pub timeout_task: JoinHandle<()>, pub spawned_tasks: BTreeMap<ViewNumber, Vec<JoinHandle<()>>>, pub formed_upgrade_certificate: Option<SimpleCertificate<TestTypes, UpgradeProposalData<TestTypes>, UpgradeThreshold>>, pub proposal_cert: Option<ViewChangeEvidence<TestTypes>>, pub output_event_stream: Sender<Event<TestTypes>>, pub current_proposal: Option<QuorumProposal<TestTypes>>, pub id: u64, pub storage: Arc<RwLock<TestStorage<TestTypes>>>, pub upgrade_lock: UpgradeLock<TestTypes, TestVersions>,
}

Fields§

§public_key: VerKey

Our public key

§private_key: SignKey

Our Private Key

§consensus: OuterConsensus<TestTypes>

Reference to consensus. The replica will require a write lock on this.

§instance_state: Arc<TestInstanceState>

Immutable instance state

§timeout: u64

View timeout from config.

§round_start_delay: u64

Round start delay from config, in milliseconds.

§cur_view: ViewNumber

View number this view is executing in.

§cur_view_time: i64

Timestamp this view starts at.

§payload_commitment_and_metadata: Option<CommitmentAndMetadata<TestTypes>>

The commitment to the current block payload and its metadata submitted to DA.

§network: Arc<MemoryNetwork<VerKey>>

The underlying network

§timeout_membership: Arc<GeneralStaticCommittee<TestTypes>>

Membership for Timeout votes/certs

§quorum_membership: Arc<GeneralStaticCommittee<TestTypes>>

Membership for Quorum Certs/votes

§da_membership: Arc<GeneralStaticCommittee<TestTypes>>

Membership for DA committee Votes/certs

§vote_collectors: BTreeMap<ViewNumber, VoteCollectionTaskState<TestTypes, SimpleVote<TestTypes, QuorumData<TestTypes>>, SimpleCertificate<TestTypes, QuorumData<TestTypes>, SuccessThreshold>, TestVersions>>

A map of QuorumVote collector tasks.

§timeout_vote_collectors: BTreeMap<ViewNumber, VoteCollectionTaskState<TestTypes, SimpleVote<TestTypes, TimeoutData<TestTypes>>, SimpleCertificate<TestTypes, TimeoutData<TestTypes>, SuccessThreshold>, TestVersions>>

A map of TimeoutVote collector tasks.

§timeout_task: JoinHandle<()>

timeout task handle

§spawned_tasks: BTreeMap<ViewNumber, Vec<JoinHandle<()>>>

Spawned tasks related to a specific view, so we can cancel them when they are stale

§formed_upgrade_certificate: Option<SimpleCertificate<TestTypes, UpgradeProposalData<TestTypes>, UpgradeThreshold>>

The most recent upgrade certificate this node formed. Note: this is ONLY for certificates that have been formed internally, so that we can propose with them.

Certificates received from other nodes will get reattached regardless of this fields, since they will be present in the leaf we propose off of.

§proposal_cert: Option<ViewChangeEvidence<TestTypes>>

last View Sync Certificate or Timeout Certificate this node formed.

§output_event_stream: Sender<Event<TestTypes>>

Output events to application

§current_proposal: Option<QuorumProposal<TestTypes>>

The most recent proposal we have, will correspond to the current view if Some() Will be none if the view advanced through timeout/view_sync

§id: u64

The node’s id

§storage: Arc<RwLock<TestStorage<TestTypes>>>

This node’s storage ref

§upgrade_lock: UpgradeLock<TestTypes, TestVersions>

Lock for a decided upgrade