Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iota): more typos #943

Merged
merged 10 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
[default]
extend-ignore-re = [
"[a-zA-Z0-9]{44}",
]
extend-ignore-re = ["[a-zA-Z0-9]{44}", "[a-zA-Z0-9]{9}"]

[default.extend-words]
groth = "groth"
BA = "BA"
DAA = "DAA"
UE = "UE"
tto = "tto"
ser = "ser"
pn = "pn"
strat = "strat"
DaughterOfMars marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion apps/core/src/hooks/useGetValidatorsEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type GetValidatorsEvent = {
order: 'ascending' | 'descending';
};

// NOTE: This copys the query limit from our Rust JSON RPC backend, this needs to be kept in sync!
// NOTE: This copies the query limit from our Rust JSON RPC backend, this needs to be kept in sync!
const QUERY_MAX_RESULT_LIMIT = 50;
const VALIDATORS_EVENTS_QUERY = '0x3::validator_set::ValidatorEpochInfoEventV2';

Expand Down
2 changes: 1 addition & 1 deletion consensus/core/src/block_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl BlockVerifier for SignedBlockVerifier {
});
}

// Verifiy the block's signature.
// Verify the block's signature.
block.verify_signature(&self.context)?;

// Verify the block's ancestor refs are consistent with the block's round,
Expand Down
34 changes: 17 additions & 17 deletions consensus/core/src/tests/base_committer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
#[test]
fn try_direct_commit() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -77,7 +77,7 @@ fn try_direct_commit() {
#[test]
fn idempotence() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -121,7 +121,7 @@ fn idempotence() {
#[test]
fn multiple_direct_commit() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -162,7 +162,7 @@ fn multiple_direct_commit() {
#[test]
fn direct_skip() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -214,7 +214,7 @@ fn direct_skip() {
#[test]
fn indirect_commit() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -357,7 +357,7 @@ fn indirect_commit() {
#[test]
fn indirect_skip() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -411,7 +411,7 @@ fn indirect_skip() {
dag_state.clone(),
));

// Add enough blocks to reach the decison round of wave 3.
// Add enough blocks to reach the decision round of wave 3.
let decision_round_wave_3 = committer.decision_round(3);
build_dag(
context.clone(),
Expand Down Expand Up @@ -487,7 +487,7 @@ fn indirect_skip() {
#[test]
fn undecided() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -576,7 +576,7 @@ fn undecided() {
#[test]
fn test_byzantine_direct_commit() {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down Expand Up @@ -659,19 +659,19 @@ fn test_byzantine_direct_commit() {
// non-votes C13 but there are enough good votes to prevent a skip.
// Additionally only one of the non-votes per authority should be counted so
// we should not skip leader A12.
let decison_block_a14 = VerifiedBlock::new_for_test(
let decision_block_a14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 0)
.set_ancestors(good_references_voting_round_wave_4.clone())
.build(),
);
dag_state.write().accept_block(decison_block_a14.clone());
dag_state.write().accept_block(decision_block_a14.clone());

let good_references_voting_round_wave_4_without_c13 = good_references_voting_round_wave_4
.into_iter()
.filter(|r| r.author != AuthorityIndex::new_for_test(2))
.collect::<Vec<_>>();

let decison_block_b14 = VerifiedBlock::new_for_test(
let decision_block_b14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 1)
.set_ancestors(
good_references_voting_round_wave_4_without_c13
Expand All @@ -682,9 +682,9 @@ fn test_byzantine_direct_commit() {
)
.build(),
);
dag_state.write().accept_block(decison_block_b14.clone());
dag_state.write().accept_block(decision_block_b14.clone());

let decison_block_c14 = VerifiedBlock::new_for_test(
let decision_block_c14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 2)
.set_ancestors(
good_references_voting_round_wave_4_without_c13
Expand All @@ -695,9 +695,9 @@ fn test_byzantine_direct_commit() {
)
.build(),
);
dag_state.write().accept_block(decison_block_c14.clone());
dag_state.write().accept_block(decision_block_c14.clone());

let decison_block_d14 = VerifiedBlock::new_for_test(
let decision_block_d14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 3)
.set_ancestors(
good_references_voting_round_wave_4_without_c13
Expand All @@ -708,7 +708,7 @@ fn test_byzantine_direct_commit() {
)
.build(),
);
dag_state.write().accept_block(decison_block_d14.clone());
dag_state.write().accept_block(decision_block_d14.clone());

// DagState Update:
// - We have A13, B13, D13 & C13 as good votes in the voting round of wave 4
Expand Down
26 changes: 13 additions & 13 deletions consensus/core/src/tests/pipelined_committer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,20 +655,20 @@ fn test_byzantine_validator() {
// Additionally only one of the non-votes per authority should be counted so
// we should not skip leader A12.
let mut references_round_14 = vec![];
let decison_block_a14 = VerifiedBlock::new_for_test(
let decision_block_a14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 0)
.set_ancestors(good_references_voting_round_wave_4.clone())
.build(),
);
references_round_14.push(decison_block_a14.reference());
dag_state.write().accept_block(decison_block_a14.clone());
references_round_14.push(decision_block_a14.reference());
dag_state.write().accept_block(decision_block_a14.clone());

let good_references_voting_round_wave_4_without_b13 = good_references_voting_round_wave_4
.into_iter()
.filter(|r| r.author != AuthorityIndex::new_for_test(1))
.collect::<Vec<_>>();

let decison_block_b14 = VerifiedBlock::new_for_test(
let decision_block_b14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 1)
.set_ancestors(
good_references_voting_round_wave_4_without_b13
Expand All @@ -679,10 +679,10 @@ fn test_byzantine_validator() {
)
.build(),
);
references_round_14.push(decison_block_b14.reference());
dag_state.write().accept_block(decison_block_b14.clone());
references_round_14.push(decision_block_b14.reference());
dag_state.write().accept_block(decision_block_b14.clone());

let decison_block_c14 = VerifiedBlock::new_for_test(
let decision_block_c14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 2)
.set_ancestors(
good_references_voting_round_wave_4_without_b13
Expand All @@ -693,10 +693,10 @@ fn test_byzantine_validator() {
)
.build(),
);
references_round_14.push(decison_block_c14.reference());
dag_state.write().accept_block(decison_block_c14.clone());
references_round_14.push(decision_block_c14.reference());
dag_state.write().accept_block(decision_block_c14.clone());

let decison_block_d14 = VerifiedBlock::new_for_test(
let decision_block_d14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 3)
.set_ancestors(
good_references_voting_round_wave_4_without_b13
Expand All @@ -707,8 +707,8 @@ fn test_byzantine_validator() {
)
.build(),
);
references_round_14.push(decison_block_d14.reference());
dag_state.write().accept_block(decison_block_d14.clone());
references_round_14.push(decision_block_d14.reference());
dag_state.write().accept_block(decision_block_d14.clone());

// DagState Update:
// - We have A13, B13, D13 & C13 as good votes in the voting round of leader A12
Expand Down Expand Up @@ -777,7 +777,7 @@ fn basic_test_setup() -> (
super::UniversalCommitter,
) {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down
18 changes: 9 additions & 9 deletions consensus/core/src/tests/universal_committer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -664,19 +664,19 @@ fn test_byzantine_direct_commit() {
// non-votes C13 but there are enough good votes to prevent a skip.
// Additionally only one of the non-votes per authority should be counted so
// we should not skip leader A12.
let decison_block_a14 = VerifiedBlock::new_for_test(
let decision_block_a14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 0)
.set_ancestors(good_references_voting_round_wave_4.clone())
.build(),
);
dag_state.write().accept_block(decison_block_a14.clone());
dag_state.write().accept_block(decision_block_a14.clone());

let good_references_voting_round_wave_4_without_c13 = good_references_voting_round_wave_4
.into_iter()
.filter(|r| r.author != AuthorityIndex::new_for_test(2))
.collect::<Vec<_>>();

let decison_block_b14 = VerifiedBlock::new_for_test(
let decision_block_b14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 1)
.set_ancestors(
good_references_voting_round_wave_4_without_c13
Expand All @@ -687,9 +687,9 @@ fn test_byzantine_direct_commit() {
)
.build(),
);
dag_state.write().accept_block(decison_block_b14.clone());
dag_state.write().accept_block(decision_block_b14.clone());

let decison_block_c14 = VerifiedBlock::new_for_test(
let decision_block_c14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 2)
.set_ancestors(
good_references_voting_round_wave_4_without_c13
Expand All @@ -700,9 +700,9 @@ fn test_byzantine_direct_commit() {
)
.build(),
);
dag_state.write().accept_block(decison_block_c14.clone());
dag_state.write().accept_block(decision_block_c14.clone());

let decison_block_d14 = VerifiedBlock::new_for_test(
let decision_block_d14 = VerifiedBlock::new_for_test(
TestBlock::new(14, 3)
.set_ancestors(
good_references_voting_round_wave_4_without_c13
Expand All @@ -713,7 +713,7 @@ fn test_byzantine_direct_commit() {
)
.build(),
);
dag_state.write().accept_block(decison_block_d14.clone());
dag_state.write().accept_block(decision_block_d14.clone());

// DagState Update:
// - We have A13, B13, D13 & C13 as good votes in the voting round of wave 4
Expand Down Expand Up @@ -747,7 +747,7 @@ fn basic_test_setup() -> (
super::UniversalCommitter,
) {
telemetry_subscribers::init_for_testing();
// Commitee of 4 with even stake
// Committee of 4 with even stake
let context = Arc::new(Context::new_for_test(4).0);
let dag_state = Arc::new(RwLock::new(DagState::new(
context.clone(),
Expand Down
4 changes: 2 additions & 2 deletions crates/data-transform/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ fn main() {
println!("Unable to find event_json {}", target_id);
}
Err(_) => {
println!("An error occured while fetching event_json {}", target_id);
println!("An error occurred while fetching event_json {}", target_id);
}
}

Expand Down Expand Up @@ -326,7 +326,7 @@ fn main() {
exit(0);
}
Err(_) => {
println!("An error occured while fetching event {}", target_id);
println!("An error occurred while fetching event {}", target_id);
exit(0);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
// Modifications Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

// Test Identifer length limits
// Test identifier length limits

//# init --addresses Test=0x0

//# publish

/// Test Identifer length limits enforced for module name
/// Test identifier length limits enforced for module name
module Test::M1_1234567891234567890123456789012345678912345678901234567890123456789123456789012345678908901234567891234567890123456789078912345678901234567890 {

public entry fun create_n_idscreate_n_idscreate_n_() {
Expand All @@ -17,7 +17,7 @@ module Test::M1_1234567891234567890123456789012345678912345678901234567890123456

//# publish

/// Test Identifer length limits enforced for function name
/// Test identifier length limits enforced for function name
module Test::M1_12345678912345678901234567890 {
public entry fun create_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_idscreate_n_ids() {
}
Expand All @@ -26,7 +26,7 @@ module Test::M1_12345678912345678901234567890 {

//# publish

/// Test normal Identifer lengths
/// Test normal identifier lengths
module Test::M1_1234567891234567890123456789012345678912345678901234567 {

public entry fun create_n_(n: u64, ctx: &mut TxContext) {
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-bridge/src/action_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ mod tests {
let action_digest = action.digest();

// Wait for 1 second. It should still in the process of retrying requesting sigs
// becaues we mock errors above.
// because we mock errors above.
tokio::time::sleep(tokio::time::Duration::from_secs(1)).await;
tx_subscription.try_recv().unwrap_err();
// And the action is still in WAL
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-bridge/src/iota_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ impl IotaClientInner for IotaSdkClient {
}
};

// get_dynamic_field_object does not return bcs, so we have to issue anothe
// get_dynamic_field_object does not return bcs, so we have to issue another
// query
let bcs_bytes = self
.read_api()
Expand Down
2 changes: 1 addition & 1 deletion crates/iota-bridge/src/server/governance_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct GovernanceVerifier {

impl GovernanceVerifier {
pub fn new(approved_actions: Vec<BridgeAction>) -> BridgeResult<Self> {
// TOOD(audit-blocking): verify chain ids
// TODO(audit-blocking): verify chain ids
let mut approved_goverance_actions = HashMap::new();
for action in approved_actions {
if !action.is_governace_action() {
Expand Down
Loading
Loading