diff --git a/crates/legacy/src/builder_state.rs b/crates/legacy/src/builder_state.rs index dabcc913..e087d560 100644 --- a/crates/legacy/src/builder_state.rs +++ b/crates/legacy/src/builder_state.rs @@ -171,7 +171,7 @@ pub struct BuilderState { /// locally spawned builder Commitements pub builder_commitments: HashSet<(BuilderStateId, BuilderCommitment)>, - /// timeout for maximising the txns in the block + /// timeout for maximizing the txns in the block pub maximize_txn_capture_timeout: Duration, /// constant fee that the builder will offer per byte of data sequenced @@ -244,7 +244,7 @@ pub struct BuilderState { /// 3. If we can't find any [`BuilderState`]s that match the view number /// and leaf commitment, then we should return for the maximum stored view /// number that is smaller than the current [`QuorumProposal2`]. -/// 4. If there is is only one [`BuilderState`] stored in the [`GlobalState`], then +/// 4. If there is only one [`BuilderState`] stored in the [`GlobalState`], then /// we should return that [`BuilderState`] as the best fit. /// 5. If none of the other criteria match, we return an empty result as it is /// unclear what to do in this case. @@ -388,7 +388,7 @@ impl BuilderState { quorum_proposal.data.view_number.u64(), ); - // We are a best fit if we are contained within the returned set of + // We are the best fit if we are contained within the returned set of // best [BuilderState]s to extend from. best_builder_states_to_extend.contains(&BuilderStateId { parent_commitment: self.parent_block_references.vid_commitment, @@ -486,9 +486,9 @@ impl BuilderState { // Two cases to handle: // Case 1: Bootstrapping phase - // Case 2: No intended builder state exist + // Case 2: No intended builder state exists // To handle both cases, we can have the highest view number builder state running - // and only doing the insertion if and only if intended builder state for a particulat view is not present + // and only doing the insertion if and only if intended builder state for a particular view is not present // check the presence of quorum_proposal.data.view_number-1 in the spawned_builder_states list let quorum_proposal = &quorum_msg.proposal; let view_number = quorum_proposal.data.view_number; @@ -524,7 +524,7 @@ impl BuilderState { // also make sure we clone for the same view number( check incase payload commitments are same) if da_proposal_info.view_number != view_number { - tracing::debug!("Not spawning a clone despite matching DA and quorum payload commitments, as they corresponds to different view numbers"); + tracing::debug!("Not spawning a clone despite matching DA and quorum payload commitments, as they correspond to different view numbers"); return; } diff --git a/crates/legacy/src/lib.rs b/crates/legacy/src/lib.rs index 820e2153..cce73748 100644 --- a/crates/legacy/src/lib.rs +++ b/crates/legacy/src/lib.rs @@ -8,7 +8,7 @@ // 2. Serves a proposer(leader)'s request to provide the full blocks information // 3. Serves a proposer(leader)'s request to provide the block header information -// It also provides one API services external users: +// It also provides one API services for external users: // 1. Serves a user's request to submit a private transaction // providing the core services to support above API services diff --git a/crates/legacy/src/service.rs b/crates/legacy/src/service.rs index c026ca36..1a09f859 100644 --- a/crates/legacy/src/service.rs +++ b/crates/legacy/src/service.rs @@ -75,7 +75,7 @@ pub struct ReceivedTransaction { pub tx: Types::Transaction, // transaction's hash pub commit: Commitment, - // transaction's esitmated length + // transaction's estimated length pub len: u64, // transaction's source pub source: TransactionSource, @@ -1138,7 +1138,7 @@ impl AcceptsTxnSubmits for ProxyGlobalState { ); // NOTE: ideally we want to respond with original Vec - // instead of Result not to loose any information, + // instead of Result not to lose any information, // but this requires changes to builder API response.into_iter().collect() } diff --git a/crates/legacy/src/testing/basic_test.rs b/crates/legacy/src/testing/basic_test.rs index 926c9da9..5c5a6486 100644 --- a/crates/legacy/src/testing/basic_test.rs +++ b/crates/legacy/src/testing/basic_test.rs @@ -99,7 +99,7 @@ mod tests { let multiplication_factor = 5; const NUM_NODES_IN_VID_COMPUTATION: usize = 4; - // settingup the broadcast channels i.e [From hostshot: (tx, decide, da, quorum, )], [From api:(req - broadcast, res - mpsc channel) ] + // setting up the broadcast channels i.e [From hostshot: (tx, decide, da, quorum, )], [From api:(req - broadcast, res - mpsc channel) ] let (decide_sender, decide_receiver) = broadcast::>(num_test_messages * multiplication_factor); let (da_sender, da_receiver) = @@ -112,7 +112,7 @@ mod tests { num_test_messages * multiplication_factor, ); let tx_queue = VecDeque::new(); - // generate the keys for the buidler + // generate the keys for the builder let seed = [201_u8; 32]; let (builder_pub_key, builder_private_key) = BLSPubKey::generated_from_seed_indexed(seed, 2011_u64); diff --git a/crates/legacy_refactored/src/block_size_limits.rs b/crates/legacy_refactored/src/block_size_limits.rs index a88616b2..47cca3ac 100644 --- a/crates/legacy_refactored/src/block_size_limits.rs +++ b/crates/legacy_refactored/src/block_size_limits.rs @@ -25,7 +25,7 @@ pub(crate) struct MutableState { #[derive(Debug)] pub struct BlockSizeLimits { pub(crate) mutable_state: Atomic, - /// Maximum block size as defined by protocol. We'll never increment beyound that + /// Maximum block size as defined by protocol. We'll never increment beyond that pub protocol_max_block_size: u64, /// Period between optimistic increments of the block size pub increment_period: Duration, diff --git a/crates/legacy_refactored/src/testing/block_size.rs b/crates/legacy_refactored/src/testing/block_size.rs index 15df76f9..d9182326 100644 --- a/crates/legacy_refactored/src/testing/block_size.rs +++ b/crates/legacy_refactored/src/testing/block_size.rs @@ -18,7 +18,7 @@ use std::sync::atomic::Ordering; use std::sync::Arc; use std::time::Duration; -/// This tests simulates size limits being decreased lower than our capacity +/// This test simulates size limits being decreased lower than our capacity /// and then checks that size limits return to protocol maximum over time #[tokio::test] #[traced_test] diff --git a/crates/marketplace/src/builder_state.rs b/crates/marketplace/src/builder_state.rs index 2ffd5bb8..eed89182 100644 --- a/crates/marketplace/src/builder_state.rs +++ b/crates/marketplace/src/builder_state.rs @@ -216,7 +216,7 @@ pub struct BuilderState { /// 3. If we can't find any [`BuilderState`]s that match the view number /// and leaf commitment, then we should return for the maximum stored view /// number that is smaller than the current [`QuorumProposal2`]. -/// 4. If there is is only one [`BuilderState`] stored in the [`GlobalState`], then +/// 4. If there is only one [`BuilderState`] stored in the [`GlobalState`], then /// we should return that [`BuilderState`] as the best fit. /// 5. If none of the other criteria match, we return an empty result as it is /// unclear what to do in this case. diff --git a/crates/shared/src/block.rs b/crates/shared/src/block.rs index 2554a371..24e915d8 100644 --- a/crates/shared/src/block.rs +++ b/crates/shared/src/block.rs @@ -28,7 +28,7 @@ pub struct ReceivedTransaction { pub transaction: Types::Transaction, /// transaction's hash pub commit: Commitment, - /// transaction's esitmated length + /// transaction's estimated length pub min_block_size: u64, /// transaction's source pub source: TransactionSource, diff --git a/crates/shared/src/coordinator/mod.rs b/crates/shared/src/coordinator/mod.rs index c7f0974a..a085b8ad 100644 --- a/crates/shared/src/coordinator/mod.rs +++ b/crates/shared/src/coordinator/mod.rs @@ -168,7 +168,7 @@ where /// Enqueue new transaction in all builder states managed by this coordinator. /// /// Builder states will automatically filter transactions already included from - /// their point of view when dequeing transactions. + /// their point of view when dequeuing transactions. /// ///
/// @@ -210,7 +210,7 @@ where Ok(()) } - /// This function should be called whenever new DA Proposal is recieved from HotShot. + /// This function should be called whenever new DA Proposal is received from HotShot. /// Coordinator uses matching Quorum and DA proposals to track creation of new blocks /// and spawning corresponding builder states for those. pub async fn handle_da_proposal(&self, da_proposal: DaProposal) { @@ -219,7 +219,7 @@ where .await; } - /// This function should be called whenever new Quorum Proposal is recieved from HotShot. + /// This function should be called whenever new Quorum Proposal is received from HotShot. /// Coordinator uses matching Quorum and DA proposals to track creation of new blocks /// and spawning corresponding builder states for those. pub async fn handle_quorum_proposal(&self, quorum_proposal: QuorumProposal2) { @@ -383,7 +383,7 @@ where /// 3. If we can't find any [`BuilderState`]s that match the view number /// and leaf commitment, then we should return for the maximum stored view /// number that is smaller than the current [`QuorumProposal2`]. - /// 4. If there is is only one [`BuilderState`] stored in the coordinator, then + /// 4. If there is only one [`BuilderState`] stored in the coordinator, then /// we should return that [`BuilderState`] as the best fit. /// 5. If none of the other criteria match, we return an empty result as it is /// unclear what to do in this case. diff --git a/crates/shared/src/utils/event_serivce_wrapper.rs b/crates/shared/src/utils/event_serivce_wrapper.rs index 1e191b3c..a4d0e685 100644 --- a/crates/shared/src/utils/event_serivce_wrapper.rs +++ b/crates/shared/src/utils/event_serivce_wrapper.rs @@ -35,7 +35,7 @@ pub struct EventServiceStream { impl EventServiceStream { /// Maximum period between events, once it elapsed we assume - /// udnerlying connection silently went down and attempt to reconnect + /// underlying connection silently went down and attempt to reconnect const MAX_WAIT_PERIOD: Duration = Duration::from_secs(10); const RETRY_PERIOD: Duration = Duration::from_secs(1); const CONNECTION_TIMEOUT: Duration = Duration::from_secs(60);