Skip to content

Commit

Permalink
Fix typos (MystenLabs#7254)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored Jan 21, 2023
1 parent 757a239 commit 80996ed
Show file tree
Hide file tree
Showing 79 changed files with 141 additions and 141 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
.txeventsright {
@apply col-span-5 overflow-y-scroll md:col-span-4;

max-height: 100vh; /* enables scrolling list independtly of page */
max-height: 100vh; /* enables scrolling list independently of page */
}

.txcomponent {
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/utils/objectUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function parseImageURL(data: any): string {

if (findIPFSvalue(url)) return url;

// String respresenting true http/https URLs are valid:
// String representing true http/https URLs are valid:
try {
new URL(url);
return url;
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/src/utils/timeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function useTimeAgo(
return formattedTime;
}

// TODO - this need a bit of modification to account for multiple display formate types
// TODO - this need a bit of modification to account for multiple display format types
export const timeAgo = (
epochMilliSecs: number | null | undefined,
timeNow?: number | null,
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet/src/background/keyring/VaultStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class VaultStorageClass {
* Import a new keypair to the vault and saves it to storage. If keypair already exists it ignores it.
* NOTE: make sure you verify the password before calling this method
* @param keypair The keypair to import
* @param password The password to be used to store the vault. Make sure to verify that it's the correct password (of the current vault) and then call this function. It does't verify the password see {@link VaultStorage.verifyPassword}.
* @param password The password to be used to store the vault. Make sure to verify that it's the correct password (of the current vault) and then call this function. It doesn't verify the password see {@link VaultStorage.verifyPassword}.
* @returns True if the key was imported, false otherwise
*/
public async importKeypair(keypair: ExportedKeypair, password: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function StepTwo({
<Form className={st.container} autoComplete="off" noValidate={true}>
<Content>
<div className={st.labelDirection}>
Enter or search the address of the recepient below to start
Enter or search the address of the recipient below to start
sending coins.
</div>
<div className={cl(st.group, st.address)}>
Expand Down
2 changes: 1 addition & 1 deletion apps/wallet/src/ui/styles/utils/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ $main-extra-space: sizing.$main-bottom-space;
font-weight: 600;
letter-spacing: 0;
} @else if $type == 'mono-type' {
// TODO chanage to mono font
// TODO change to mono font
font-style: normal;
font-weight: 500;
font-size: 14px;
Expand Down
2 changes: 1 addition & 1 deletion crates/rccheck/src/ed25519_certgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl Certifiable for Ed25519 {
// ed25519 OID
oid: ed25519::pkcs8::ALGORITHM_OID,
// some environments require a type ASN.1 NULL, use the commented alternative if so
// this instead matches our rcgen-produced certificates for compatibiltiy
// this instead matches our rcgen-produced certificates for compatibility
// use pkcs8::spki::der::asn1;
parameters: None, // Some(asn1::Any::from(asn1::Null)),
},
Expand Down
10 changes: 5 additions & 5 deletions crates/rccheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub(crate) mod test_utils;

pub mod ed25519_certgen;

// Re-export our version of rustls to stave off compatiblity issues
// Re-export our version of rustls to stave off compatibility issues
pub use rustls;

type SignatureAlgorithms = &'static [&'static webpki::SignatureAlgorithm];
Expand Down Expand Up @@ -292,7 +292,7 @@ impl ClientCertVerifier for Psk {
}

fn client_auth_root_subjects(&self) -> Option<rustls::DistinguishedNames> {
// We can't guarantee subjects before having seen the cert. This should not be None for compatiblity reasons
// We can't guarantee subjects before having seen the cert. This should not be None for compatibility reasons
Some(rustls::DistinguishedNames::new())
}

Expand Down Expand Up @@ -368,14 +368,14 @@ impl ServerCertVerifier for Psk {
.map_err(pki_error)
.map(|_| cert)?;

// log additional certificate transaparency info (which is pointless in our self-signed context) and return
// log additional certificate transparency info (which is pointless in our self-signed context) and return
let mut peekable = scts.peekable();
if peekable.peek().is_none() {
tracing::trace!("Met unvalidated certificate transparency data");
tracing::trace!("Met invalidated certificate transparency data");
}

if !ocsp_response.is_empty() {
tracing::trace!("Unvalidated OCSP response: {:?}", ocsp_response.to_vec());
tracing::trace!("Invalidated OCSP response: {:?}", ocsp_response.to_vec());
}

cert.verify_is_valid_for_dns_name(dns_nameref)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ module Test::M1 {
// create at size limit should succeed
//# run Test::M1::transfer_object_with_size --args 256000

// addding 1 byte to an object at the size limit should fail
// adding 1 byte to an object at the size limit should fail
//# run Test::M1::add_byte --args object(108)

// create at size limit, wrap, increase to over size limit while wrapped, then unwrap. should fail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Test::M {

}

// Instead of calling on the Test package, we are calling a non-existant package
// Instead of calling on the Test package, we are calling a non-existent package
//# run 0x242::M::create

// Calling a non-existent function.
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-adapter/src/adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ fn init_modules<
let mut args = vec![];
// an init function can have one or two arguments, with the last one always being of type
// &mut TxContext and the additional (first) one representing a characteristic type (see
// char_type verfier pass for additional explanation)
// char_type verifier pass for additional explanation)
if parameters.len() == 2 {
// characteristic type is a struct with a single bool filed which in bcs is encoded as
// 0x01
Expand Down Expand Up @@ -536,7 +536,7 @@ pub fn generate_package_id(
/// Update `state_view` with the effects of successfully executing a transaction:
/// - Look for each input in `by_value_objects` to determine whether the object was transferred, frozen, or deleted
/// - Update objects passed via a mutable reference in `mutable_refs` to their new values
/// - Process creation of new objects and user-emittd events in `events`
/// - Process creation of new objects and user-emitted events in `events`
#[allow(clippy::too_many_arguments)]
fn process_successful_execution<S: Storage + ParentSync>(
state_view: &mut S,
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-benchmark/src/embedded_reconfig_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ use tracing::{error, info, trace};
/// A ReconfigObserver that polls validators periodically
/// to get new epoch information.
/// Caveat:
/// 1. it does not guarantee to insert every commitee into
/// 1. it does not guarantee to insert every committee into
/// committee store. This is fine in scenarios such as
/// stress, but may not be suitable in some other cases.
/// 2. because of 1, if it misses intermediate committee(s)
/// and we happen to have a big committee rotation, it may
/// fail to get quorum on the latest committee info from
/// demissioned validators and then stop working.
/// Background: this is a temporary solution for stress before
/// we see fullnode reconfiguration stablilizes.
/// we see fullnode reconfiguration stabilizes.
#[derive(Clone, Default)]
pub struct EmbeddedReconfigObserver {}

Expand Down
2 changes: 1 addition & 1 deletion crates/sui-benchmark/src/fullnode_reconfig_observer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use tracing::{debug, error, trace};

/// A ReconfigObserver that polls FullNode periodically
/// to get new epoch information.
/// Caveat: it does not guarantee to insert every commitee
/// Caveat: it does not guarantee to insert every committee
/// into committee store. This is fine in scenarios such
/// as stress, but may not be suitable in some other cases.
#[derive(Clone)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl TestCaseImpl for FullNodeExecuteTransactionTest {
let effects = response.effects.unwrap();
if !matches!(effects.status, SuiExecutionStatus::Success { .. }) {
panic!(
"Failed to execute transfer tranasction {:?}: {:?}",
"Failed to execute transfer transaction {:?}: {:?}",
txn_digest, effects.status
)
}
Expand All @@ -89,7 +89,7 @@ impl TestCaseImpl for FullNodeExecuteTransactionTest {
let effects = response.effects.unwrap();
if !matches!(effects.status, SuiExecutionStatus::Success { .. }) {
panic!(
"Failed to execute transfer tranasction {:?}: {:?}",
"Failed to execute transfer transaction {:?}: {:?}",
txn_digest, effects.status
)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-config/src/p2p.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ pub struct DiscoveryConfig {
#[serde(skip_serializing_if = "Option::is_none")]
pub interval_period_ms: Option<u64>,

/// Target number of conncurrent connections to establish.
/// Target number of concurrent connections to establish.
///
/// If unspecified, this will default to `4`.
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/authority/authority_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ impl ModuleResolver for AuthorityStore {
// TODO: duplicated code with ModuleResolver for InMemoryStorage in memory_storage.rs.
fn get_module(&self, module_id: &ModuleId) -> Result<Option<Vec<u8>>, Self::Error> {
// TODO: We should cache the deserialized modules to avoid
// fetching from the store / re-deserializing them everytime.
// fetching from the store / re-deserializing them every time.
// https://github.com/MystenLabs/sui/issues/809
Ok(self
.get_package(&ObjectID::from(*module_id.address()))?
Expand Down
18 changes: 9 additions & 9 deletions crates/sui-core/src/authority_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ impl TransactionCertifier for NetworkTransactionCertifier {
AuthAggMetrics::new(&registry),
)?;

net.authorty_ask_for_cert_with_retry_and_timeout(transaction, self_store, timeout)
net.authority_ask_for_cert_with_retry_and_timeout(transaction, self_store, timeout)
.await
}
}
Expand All @@ -615,7 +615,7 @@ impl TransactionCertifier for LocalTransactionCertifier {
&Registry::new(),
);

net.authorty_ask_for_cert_with_retry_and_timeout(transaction, self_store, timeout)
net.authority_ask_for_cert_with_retry_and_timeout(transaction, self_store, timeout)
.await
}
}
Expand Down Expand Up @@ -679,7 +679,7 @@ where

pub(crate) async fn quorum_map_then_reduce_with_timeout_and_prefs<'a, S, V, FMap, FReduce>(
&'a self,
authority_prefences: Option<&BTreeSet<AuthorityName>>,
authority_preferences: Option<&BTreeSet<AuthorityName>>,
initial_state: S,
map_each_authority: FMap,
reduce_result: FReduce,
Expand All @@ -694,7 +694,7 @@ where
Result<V, SuiError>,
) -> AsyncResult<'a, ReduceOutput<S>, SuiError>,
{
let authorities_shuffled = self.committee.shuffle_by_stake(authority_prefences, None);
let authorities_shuffled = self.committee.shuffle_by_stake(authority_preferences, None);

// First, execute in parallel for each authority FMap.
let mut responses: futures::stream::FuturesUnordered<_> = authorities_shuffled
Expand Down Expand Up @@ -1068,7 +1068,7 @@ where
.collect::<Vec<_>>();
// Sort by votes. The last item is the one with the most votes, we will examine it.
// We don't order by epoch to prevent it from being stuck when some byzantine validators
// give wrong results. At the end of day, we need quorum to make acertain.
// give wrong results. At the end of day, we need quorum to be certain.
committee_and_votes.sort_by(|lhs, rhs| Ord::cmp(&lhs.1, &rhs.1));
let (committee, votes) = committee_and_votes
.pop()
Expand All @@ -1085,7 +1085,7 @@ where

/// Return all the information in the network regarding the latest state of a specific object.
/// For each authority queried, we obtain the latest object state along with the certificate that
/// lead up to that state. The results from each authority are aggreated for the return.
/// lead up to that state. The results from each authority are aggregated for the return.
/// The first part of the return value is a map from each unique (ObjectRef, TransactionDigest)
/// pair to the content of the object as well as a list of authorities that responded this
/// pair.
Expand Down Expand Up @@ -1503,7 +1503,7 @@ where
signed_effects: SignedTransactionEffects,
) -> Result<(), EffectsCertError> {
// If we get a certificate in the same epoch, then we use it.
// A certificate in a past epoch does not guaranteee finality
// A certificate in a past epoch does not guarantee finality
// and validators may reject to process it.
if certificate.epoch() == self.committee.epoch {
debug!(?tx_digest, name=?name.concise(), weight, "Received prev certificate from validator handle_transaction");
Expand Down Expand Up @@ -1847,7 +1847,7 @@ where
.await
}

pub async fn authorty_ask_for_cert_with_retry_and_timeout(
pub async fn authority_ask_for_cert_with_retry_and_timeout(
&self,
transaction: &VerifiedTransaction,
self_store: &Arc<AuthorityStore>,
Expand Down Expand Up @@ -1889,7 +1889,7 @@ where
}

/// Given an AuthorityAggregator on genesis (epoch 0), catch up to the latest epoch and fill in
/// all past epoches' committee information.
/// all past epochs' committee information.
/// Note: this function assumes >= 2/3 validators on genesis are still serving the network.
pub async fn reconfig_from_genesis(
mut aggregator: AuthorityAggregator<NetworkAuthorityClient>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ async fn init_executor_test(

/// Creates and simulates syncing of a new checkpoint by StateSync, i.e. new
/// checkpoint is persisted, along with its contents, highest synced checkpoint
/// watermark is udpated, and message is broadcasted notifying of the newly synced
/// watermark is updated, and message is broadcasted notifying of the newly synced
/// checkpoint. Returns created checkpoints
fn sync_new_checkpoints(
checkpoint_store: &CheckpointStore,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/consensus_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ pub fn position_submit_certificate(
ourselves: &AuthorityName,
tx_digest: &TransactionDigest,
) -> usize {
// the 32 is as requirement of the deault StdRng::from_seed choice
// the 32 is as requirement of the default StdRng::from_seed choice
let digest_bytes = tx_digest.into_bytes();

// permute the validators deterministically, based on the digest
Expand Down
6 changes: 3 additions & 3 deletions crates/sui-core/src/quorum_driver/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ where
Ok(ticket)
}

// Used when the it is called in a compoent holding the notifier, and a ticket is
// Used when the it is called in a component holding the notifier, and a ticket is
// already obtained prior to calling this function, for instance, TransactionOrchestrator
pub async fn submit_transaction_no_ticket(
&self,
Expand Down Expand Up @@ -366,7 +366,7 @@ where

pub async fn update_validators(&self, new_validators: Arc<AuthorityAggregator<A>>) {
info!(
"Quorum Drvier updating AuthorityAggregator with committee {}",
"Quorum Driver updating AuthorityAggregator with committee {}",
new_validators.committee
);
self.validators.store(new_validators);
Expand Down Expand Up @@ -584,7 +584,7 @@ where
}
}

// Used when the it is called in a compoent holding the notifier, and a ticket is
// Used when the it is called in a component holding the notifier, and a ticket is
// already obtained prior to calling this function, for instance, TransactionOrchestrator
pub async fn submit_transaction_no_ticket(
&self,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/unit_tests/execution_driver_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ async fn test_per_object_overload() {

// Stop execution on the last authority, to simulate having a backlog.
authorities[3].shutdown_execution_for_test();
// Make sure execution driver has exitted.
// Make sure execution driver has exited.
sleep(Duration::from_secs(1)).await;

// Sign and try execute 1000 txns on the first three authorities. And enqueue them on the last authority.
Expand Down
Loading

0 comments on commit 80996ed

Please sign in to comment.