in librabft-v2/src/record_store.rs [28:93]
fn highest_quorum_certificate_hash(&self) -> QuorumCertificateHash<Context::HashValue>;
/// Query the round of the highest QC.
fn highest_quorum_certificate_round(&self) -> Round;
/// Query the highest QC.
fn highest_quorum_certificate(&self) -> Option<&QuorumCertificate<Context>>;
/// Query the round of the highest TC.
fn highest_timeout_certificate_round(&self) -> Round;
/// Query the round of the highest commit.
fn highest_committed_round(&self) -> Round;
/// Query the last QC of the highest commit rule.
fn highest_commit_certificate(&self) -> Option<&QuorumCertificate<Context>>;
/// Current round as seen by the record store.
fn current_round(&self) -> Round;
/// Iterate on the committed blocks starting after the round `after_round` and ending with the
/// highest commit known so far.
fn committed_states_after(&self, after_round: Round) -> Vec<(Round, Context::State)>;
/// Access the block proposed by the leader chosen by the Pacemaker (if any).
fn proposed_block(
&self,
pacemaker: &dyn Pacemaker<Context>,
) -> Option<(BlockHash<Context::HashValue>, Round, Context::Author)>;
/// Check if a timeout already exists.
fn has_timeout(&self, author: Context::Author, round: Round) -> bool;
/// Create a timeout.
fn create_timeout(&mut self, author: Context::Author, round: Round, context: &mut Context);
/// Fetch a command from mempool and propose a block.
fn propose_block(
&mut self,
context: &mut Context,
previous_qc_hash: QuorumCertificateHash<Context::HashValue>,
clock: NodeTime,
);
/// Execute the command contained in a block and vote for the resulting state.
/// Return false if the execution failed.
fn create_vote(
&mut self,
context: &mut Context,
block_hash: BlockHash<Context::HashValue>,
) -> bool;
/// Try to create a QC for the last block that we have proposed.
fn check_for_new_quorum_certificate(&mut self, context: &mut Context) -> bool;
/// Compute the previous round and the second previous round of a block.
fn previous_round(&self, block_hash: BlockHash<Context::HashValue>) -> Round;
fn second_previous_round(&self, block_hash: BlockHash<Context::HashValue>) -> Round;
/// Pick an author based on a seed, with chances proportional to voting rights.
fn pick_author(&self, seed: u64) -> Context::Author;
/// APIs supporting data synchronization.
fn timeouts(&self) -> Vec<Timeout<Context>>;
fn current_vote(&self, local_author: Context::Author) -> Option<&Vote<Context>>;
fn block(&self, block_hash: BlockHash<Context::HashValue>) -> Option<&Block<Context>>;
fn known_quorum_certificate_rounds(&self) -> BTreeSet<Round>;
fn unknown_records(&self, known_qc_rounds: BTreeSet<Round>) -> Vec<Record<Context>>;
fn insert_network_record(&mut self, record: Record<Context>, context: &mut Context);
}
// -- END FILE --
// -- BEGIN FILE record_store_state --
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(bound(serialize = "Context: SmrContext"))]
#[serde(bound(deserialize = "Context: SmrContext"))]
pub struct RecordStoreState<Context: SmrContext> {