Skip to content

Commit

Permalink
chore: fix a bunch of typos
Browse files Browse the repository at this point in the history
Tool-aided by [typos](https://github.com/crate-ci/typos)
  • Loading branch information
huitseeker committed May 5, 2022
1 parent 25dd4a8 commit 412082f
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions nft_mirror/oracle_server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Sui Oracle Service

The oracle service is a trusted entity that faciliates the cross-chain airdrop of NFT tokens on Sui. This implementation is a MVP
The oracle service is a trusted entity that facilitates the cross-chain airdrop of NFT tokens on Sui. This implementation is a MVP
version that's not indended for any production use. The service currently only supports the copying of Ethereum
ERC-721 token to Sui.

Expand All @@ -10,7 +10,7 @@ As shown in the graph below, the main job of the oracle is to validate the user

## Get Started

1. Set up the `.env` file through `cp .env.sample .env`. Rememeber to replace any placeholder value(e.g., ALCHEMY_API_KEY).
1. Set up the `.env` file through `cp .env.sample .env`. Remember to replace any placeholder value(e.g., ALCHEMY_API_KEY).
2. Install the dependencies through `npm i`
3. Start the server through `npm run dev`
4. The easiest way to test out an endpoint is through [http://localhost:8000/docs](http://localhost:8000/docs) by clicking on "Try it out". No need to manually write curl command or example data.
Expand Down
2 changes: 1 addition & 1 deletion sui/src/bin/bench_configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn main() {
accounts.push(account);
}

// For each validator, fill in the account info inot genesis
// For each validator, fill in the account info into genesis
for (i, (_, (_, kp))) in authorities.iter().zip(authority_keys.iter()).enumerate() {
// Create and save the genesis configs for the validators
let genesis_config = GenesisConfig {
Expand Down
4 changes: 2 additions & 2 deletions sui/tests/shared_objects_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ async fn shared_object_flood() {
let (configs, key_pairs) = test_authority_configs();
let _handles = spawn_test_authorities(gas_objects.clone(), &configs, &key_pairs).await;

// Publish the move package to all authorities and get the new pacakge ref.
// Publish the move package to all authorities and get the new package ref.
tokio::task::yield_now().await;
let package_ref = publish_counter_package(gas_objects.pop().unwrap(), &configs).await;

Expand Down Expand Up @@ -353,7 +353,7 @@ async fn shared_object_sync() {
let (configs, key_pairs) = test_authority_configs();
let _handles = spawn_test_authorities(gas_objects.clone(), &configs, &key_pairs).await;

// Publish the move package to all authorities and get the new pacakge ref.
// Publish the move package to all authorities and get the new package ref.
tokio::task::yield_now().await;
let package_ref = publish_counter_package(gas_objects.pop().unwrap(), &configs).await;

Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/authority/authority_notifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl TransactionNotifier {
(transaction_notifier, temp_buffer, next_seq, uniquess_guard),
));
} else {
// If the notifer is closed, then exit
// If the notifier is closed, then exit
if transaction_notifier
.is_closed
.load(std::sync::atomic::Ordering::SeqCst)
Expand Down
4 changes: 2 additions & 2 deletions sui_core/src/authority_active.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
components to perform a number of functions such as:
(1) Share transactions received with other authorities, to complete their execution
in case clients fail before sharing a trasnaction with sufficient authorities.
in case clients fail before sharing a transaction with sufficient authorities.
(2) Share certificates with other authorities in case clients fail before a
certificate has its executon finalized.
(3) Gossip executed certificates digests with other authorities through following
Expand All @@ -15,7 +15,7 @@
protocol.
This component manages the root of all these active processes. It spawns services
and tasks that activelly initiate network operations to progess all these
and tasks that actively initiate network operations to progress all these
processes.
Some ground rules:
Expand Down
4 changes: 2 additions & 2 deletions sui_core/src/authority_active/gossip/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ where
match items {
// Upon receiving a batch
Some(Ok(BatchInfoResponseItem(UpdateItem::Batch(_signed_batch)) )) => {
// Update the longer term seqeunce_number only after a batch that is signed
// Update the longer term sequence_number only after a batch that is signed
self.max_seq = Some(_signed_batch.batch.next_sequence_number);
},
// Upon receiving a trasnaction digest we store it, if it is not processed already.
// Upon receiving a transaction digest we store it, if it is not processed already.
Some(Ok(BatchInfoResponseItem(UpdateItem::Transaction((_seq, _digest))))) => {
if !self.state._database.effects_exists(&_digest)? {
queue.push(async move {
Expand Down
6 changes: 3 additions & 3 deletions sui_core/src/authority_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The architecture is as follows:
- The authority store notifies that a new certificate / effect has
been sequenced.
- If the batch service is running it reaches into the notifier and
finds the highest safe index in the trasaction sequence. An index
finds the highest safe index in the transaction sequence. An index
is safe if no task is handling a lower index (they have either
written to the DB or are dead.)
- The batch service then reads from the database the new items in
Expand Down Expand Up @@ -129,7 +129,7 @@ impl crate::authority::AuthorityState {
.next()
.unwrap();

// Let's ensure we can get (exclusive) access to the trasnaction stream.
// Let's ensure we can get (exclusive) access to the transaction stream.
let mut transaction_stream = self.batch_notifier.iter_from(next_sequence_number)?;

// Then we operate in a loop, where for each new update we consider
Expand Down Expand Up @@ -255,7 +255,7 @@ impl crate::authority::AuthorityState {
return None;
}

// If there are histroical items send them.
// If there are historical items send them.
if let Some(item) = local_state.items.pop_front() {
// Update the last processed items to ensure we do not repeat them
match &item {
Expand Down
2 changes: 1 addition & 1 deletion sui_core/src/gateway_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ where
// Okay to unwrap() since we checked that this is Ok
let (certificate, effects) = res.unwrap();

debug!(?tx, ?certificate, ?effects, "Transaction suceeded");
debug!(?tx, ?certificate, ?effects, "Transaction succeeded");
// Create custom response base on the request type
if let TransactionKind::Single(tx_kind) = tx_kind {
match tx_kind {
Expand Down
4 changes: 2 additions & 2 deletions sui_core/src/unit_tests/server_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn test_start_stop_batch_subsystem() {

// This should return immediately.
join.await
.expect("Error stoping subsystem")
.expect("Error stopping subsystem")
.expect("Subsystem crashed?");
}

Expand Down Expand Up @@ -247,7 +247,7 @@ async fn test_subscription() {
let inner_server2 = state.clone();

loop {
// Send a trasnaction
// Send a transaction
let ticket = inner_server2.batch_notifier.ticket().expect("all good");
db3.executed_sequence
.insert(&ticket.seq(), &tx_zero)
Expand Down
2 changes: 1 addition & 1 deletion sui_programmability/transactional-test-runner/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ fn parse_argument_rec(s: &str) -> anyhow::Result<(SuiTransactionArg, &str)> {
check_not_empty("object(", s)?;
let (id, s) = split_alpha_numeric(s);
let (id, _) = parse_address(id)
.ok_or_else(|| anyhow!("Exepected address after 'object(', got \"{}\"", s))?;
.ok_or_else(|| anyhow!("Expected address after 'object(', got \"{}\"", s))?;
let s = eat(s, ')')?;
(A::Object(id), s)
} else if let Some(_s) = s.strip_prefix("x\"") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ fn single_template_vector_param_key() {
}
it's a valid entry function and verification should FAIL due to
missing Key abilty on the vector's generic type
missing Key ability on the vector's generic type
*/
let (mut builder, _) = ModuleBuilder::default();

Expand Down
4 changes: 2 additions & 2 deletions sui_types/src/committee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ impl Committee {

/// Given a sequence of (AuthorityName, value) for values, provide the
/// value at the particular threshold by stake. This orders all provided values
/// in asceding order and pick the appropriate value that has under it threshold
/// in ascending order and pick the appropriate value that has under it threshold
/// stake. You may use the function `validity_threshold` or `quorum_threshold` to
/// pick the f+1 (1/3 stake) or 2f+1 (2/3 stake) thresholds respectivelly.
/// pick the f+1 (1/3 stake) or 2f+1 (2/3 stake) thresholds respectively.
///
/// This function may be used in a number of settings:
/// - When we pass in a set of values produced by authorities with at least 2/3 stake
Expand Down

0 comments on commit 412082f

Please sign in to comment.