diff --git a/mysticeti-core/src/block_handler.rs b/mysticeti-core/src/block_handler.rs index 52bec399..e3b8355f 100644 --- a/mysticeti-core/src/block_handler.rs +++ b/mysticeti-core/src/block_handler.rs @@ -62,6 +62,7 @@ pub struct BenchmarkFastPathBlockHandler { consensus_only: bool, } +// COMMENT Here the Block limitations are defined // BenchmarkFastPathBlockHandler can push up to 2x of SOFT_MAX_PROPOSED_PER_BLOCK into block // So the value here should be chosen so that 2*SOFT_MAX_PROPOSED_PER_BLOCK*TRANSACTION_SIZE // is lower then the maximum allowed block size in the system @@ -80,6 +81,7 @@ impl BenchmarkFastPathBlockHandler { transaction_time: TransactionTimeMap, ) -> (Self, mpsc::Sender>) { let (sender, receiver) = mpsc::channel(1024); + // COMMENT Here the transaction log is written let transaction_log = TransactionLog::start(config.certified_transactions_log()) .expect("Failed to open certified transaction log for write"); diff --git a/mysticeti-core/src/commit_observer.rs b/mysticeti-core/src/commit_observer.rs index d9c85c2f..6a2538ba 100644 --- a/mysticeti-core/src/commit_observer.rs +++ b/mysticeti-core/src/commit_observer.rs @@ -197,6 +197,7 @@ impl + Send + Sync> CommitObs } } +// COMMENT observe commit events within the consensus system pub struct SimpleCommitObserver { #[allow(dead_code)] // will be used later during replay block_store: BlockStore, diff --git a/mysticeti-core/src/config.rs b/mysticeti-core/src/config.rs index 24cc471a..fabd186a 100644 --- a/mysticeti-core/src/config.rs +++ b/mysticeti-core/src/config.rs @@ -236,11 +236,14 @@ impl PrivateConfig { impl Print for PrivateConfig {} +// COMMENT StorageDir is a wrapper around a path to a directory where the validator stores its data. impl StorageDir { + // COMMENT for BenchmarkFastPathBlockHandler pub fn certified_transactions_log(&self) -> PathBuf { self.path.join("certified.txt") } + // COMMENT for validator pub fn committed_transactions_log(&self) -> PathBuf { self.path.join("committed.txt") } diff --git a/mysticeti-core/src/consensus/linearizer.rs b/mysticeti-core/src/consensus/linearizer.rs index acf0b895..11eedae2 100644 --- a/mysticeti-core/src/consensus/linearizer.rs +++ b/mysticeti-core/src/consensus/linearizer.rs @@ -64,6 +64,7 @@ impl CommittedSubDag { CommittedSubDag::new(*leader_block_ref, blocks, timestamp_ms, commit_data.height) } + // COMMENT The current implementation uses key, which is not ideal. We can also let the anchor decide on the order. /// Sort the blocks of the sub-dag by round number. Any deterministic algorithm works. pub fn sort(&mut self) { self.blocks.sort_by_key(|x| x.round());