From 088861bf573634d3179709e414b3176e7a893091 Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Mon, 27 Feb 2023 15:29:17 +0200 Subject: [PATCH] Fix typos (#472) --- .changelog/unreleased/bug/472-fix-typos.md | 1 + CONTRIBUTING.md | 2 +- README.md | 2 +- ci/no-std-check/README.md | 4 ++-- crates/ibc/src/applications/transfer/denom.rs | 2 +- crates/ibc/src/applications/transfer/error.rs | 2 +- crates/ibc/src/core/context/timeout.rs | 4 ++-- crates/ibc/src/core/ics02_client/error.rs | 2 +- crates/ibc/src/core/ics03_connection/error.rs | 2 +- crates/ibc/src/core/ics03_connection/version.rs | 2 +- crates/ibc/src/core/ics04_channel/error.rs | 6 +++--- crates/ibc/src/core/ics04_channel/handler/chan_open_init.rs | 2 +- crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs | 2 +- crates/ibc/src/core/ics04_channel/timeout.rs | 2 +- crates/ibc/src/core/ics23_commitment/merkle.rs | 2 +- docs/architecture/adr-001-handler-implementation.md | 4 ++-- docs/architecture/adr-003-ics20-implementation.md | 2 +- docs/architecture/adr-template.md | 4 ++-- 18 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 .changelog/unreleased/bug/472-fix-typos.md diff --git a/.changelog/unreleased/bug/472-fix-typos.md b/.changelog/unreleased/bug/472-fix-typos.md new file mode 100644 index 000000000..fe6c7ecd5 --- /dev/null +++ b/.changelog/unreleased/bug/472-fix-typos.md @@ -0,0 +1 @@ +- Fix typos ([\#472](https://github.com/cosmos/ibc-rs/issues/472)) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 66b96a44f..76efed06f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -267,6 +267,6 @@ Our release process is as follows: GitHub: `git tag -s -a vX.Y.Z`. In the tag message, write the version and the link to the corresponding section of the changelog. 10. Once the tag is pushed, create a GitHub release and append - `[📖CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)` + `[📖CHANGELOG](https://github.com/cosmos/ibc-rs/blob/main/CHANGELOG.md#vXYZ)` to the release description. 11. All done! 🎉 diff --git a/README.md b/README.md index f98c71baf..be0061f01 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ![Rust Stable][rustc-image] ![Rust 1.60+][rustc-version] -Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts +Rust implementation of the Inter-Blockchain Communication (IBC) protocol. This project hosts the `ibc` rust crate which defines the main data structures and on-chain logic for the IBC protocol. See the [ibc](crates/ibc) crate's README.md for more detailed information on the `ibc` crate. diff --git a/ci/no-std-check/README.md b/ci/no-std-check/README.md index 16468ae76..18960529d 100644 --- a/ci/no-std-check/README.md +++ b/ci/no-std-check/README.md @@ -78,7 +78,7 @@ Now we have to modify [lib.rs](./src/lib.rs) again and only import the crate if use my_package; ``` -Retore the original `use-unsupported` list, and add `my-package` to the end of the list: +Restore the original `use-unsupported` list, and add `my-package` to the end of the list: ```toml use-unsupported = [ @@ -130,7 +130,7 @@ error: could not compile `no-std-check` - Crates must be listed on both `Cargo.toml` and `lib.rs`. - Crates that are listed in `Cargo.toml` but not imported inside `lib.rs` are not checked. -### Overrride std crates using Cargo Nightly +### Override std crates using Cargo Nightly This uses the unstable `build-std` feature provided by [Cargo Nightly](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#build-std). diff --git a/crates/ibc/src/applications/transfer/denom.rs b/crates/ibc/src/applications/transfer/denom.rs index 97566a853..90d002ac7 100644 --- a/crates/ibc/src/applications/transfer/denom.rs +++ b/crates/ibc/src/applications/transfer/denom.rs @@ -213,7 +213,7 @@ pub fn is_receiver_chain_source( // A: sender chain in this transfer, port "transfer" and channel "c2b" (to B) // B: receiver chain in this transfer, port "transfer" and channel "c2a" (to A) // - // If B had originally sent the token in a previous tranfer, then A would have stored the token as + // If B had originally sent the token in a previous transfer, then A would have stored the token as // "transfer/c2b/{token_denom}". Now, A is sending to B, so to check if B is the source of the token, // we need to check if the token starts with "transfer/c2b". let prefix = TracePrefix::new(source_port, source_channel); diff --git a/crates/ibc/src/applications/transfer/error.rs b/crates/ibc/src/applications/transfer/error.rs index ec477677b..95d052fa3 100644 --- a/crates/ibc/src/applications/transfer/error.rs +++ b/crates/ibc/src/applications/transfer/error.rs @@ -37,7 +37,7 @@ pub enum TokenTransferError { InvalidPacketTimeoutTimestamp { timestamp: u64 }, /// base denomination is empty EmptyBaseDenom, - /// invalid prot id n trace at postion: `{pos}`, validation error: `{validation_error}` + /// invalid prot id n trace at position: `{pos}`, validation error: `{validation_error}` InvalidTracePortId { pos: usize, validation_error: ValidationError, diff --git a/crates/ibc/src/core/context/timeout.rs b/crates/ibc/src/core/context/timeout.rs index 3ec5de845..1e07462ea 100644 --- a/crates/ibc/src/core/context/timeout.rs +++ b/crates/ibc/src/core/context/timeout.rs @@ -274,7 +274,7 @@ mod tests { assert!(res.is_ok()); - // Unordered channnels only emit one event + // Unordered channels only emit one event assert_eq!(ctx.events.len(), 1); assert!(matches!( ctx.events.first().unwrap(), @@ -311,7 +311,7 @@ mod tests { assert!(res.is_ok()); - // Ordered channnels emit 2 events + // Ordered channels emit 2 events assert_eq!(ctx.events.len(), 2); assert!(matches!(ctx.events[0], IbcEvent::TimeoutPacket(_))); assert!(matches!(ctx.events[1], IbcEvent::ChannelClosed(_))); diff --git a/crates/ibc/src/core/ics02_client/error.rs b/crates/ibc/src/core/ics02_client/error.rs index d35d0f786..a818324b4 100644 --- a/crates/ibc/src/core/ics02_client/error.rs +++ b/crates/ibc/src/core/ics02_client/error.rs @@ -89,7 +89,7 @@ pub enum ClientError { }, /// timestamp is invalid or missing, timestamp=`{time1}`, now=`{time2}` InvalidConsensusStateTimestamp { time1: Timestamp, time2: Timestamp }, - /// header not withing trusting period: expires_at=`{latest_time}` now=`{update_time}` + /// header not within trusting period: expires_at=`{latest_time}` now=`{update_time}` HeaderNotWithinTrustPeriod { latest_time: Timestamp, update_time: Timestamp, diff --git a/crates/ibc/src/core/ics03_connection/error.rs b/crates/ibc/src/core/ics03_connection/error.rs index f5ad2bcbb..bb9ee8f02 100644 --- a/crates/ibc/src/core/ics03_connection/error.rs +++ b/crates/ibc/src/core/ics03_connection/error.rs @@ -39,7 +39,7 @@ pub enum ConnectionError { MissingConsensusHeight, /// invalid connection proof error InvalidProof, - /// verifying connnection state error: `{0}` + /// verifying connection state error: `{0}` VerifyConnectionState(client_error::ClientError), /// invalid signer error: `{0}` Signer(SignerError), diff --git a/crates/ibc/src/core/ics03_connection/version.rs b/crates/ibc/src/core/ics03_connection/version.rs index 5a018934a..2602e8257 100644 --- a/crates/ibc/src/core/ics03_connection/version.rs +++ b/crates/ibc/src/core/ics03_connection/version.rs @@ -32,7 +32,7 @@ pub struct Version { } impl Version { - /// Checks whether or not the given feature is supported in this versin + /// Checks whether or not the given feature is supported in this version pub fn is_supported_feature(&self, feature: String) -> bool { self.features.contains(&feature) } diff --git a/crates/ibc/src/core/ics04_channel/error.rs b/crates/ibc/src/core/ics04_channel/error.rs index 5dcd9681a..2eae3c3a2 100644 --- a/crates/ibc/src/core/ics04_channel/error.rs +++ b/crates/ibc/src/core/ics04_channel/error.rs @@ -33,14 +33,14 @@ pub enum ChannelError { NonUtf8PacketData, /// missing counterparty MissingCounterparty, - /// no commong version + /// no common version NoCommonVersion, /// missing channel end MissingChannel, - /// single version must be negociated on connection before opening channel + /// single version must be negotiated on connection before opening channel InvalidVersionLengthConnection, /// the channel ordering is not supported by connection - ChannelFeatureNotSuportedByConnection, + ChannelFeatureNotSupportedByConnection, /// the channel end (`{port_id}`, `{channel_id}`) does not exist ChannelNotFound { port_id: PortId, diff --git a/crates/ibc/src/core/ics04_channel/handler/chan_open_init.rs b/crates/ibc/src/core/ics04_channel/handler/chan_open_init.rs index d6c2f191f..ebfcb176d 100644 --- a/crates/ibc/src/core/ics04_channel/handler/chan_open_init.rs +++ b/crates/ibc/src/core/ics04_channel/handler/chan_open_init.rs @@ -28,7 +28,7 @@ where let channel_feature = msg.ordering.to_string(); if !conn_version.is_supported_feature(channel_feature) { - return Err(ChannelError::ChannelFeatureNotSuportedByConnection.into()); + return Err(ChannelError::ChannelFeatureNotSupportedByConnection.into()); } Ok(()) diff --git a/crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs b/crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs index af92e452b..449ffa12d 100644 --- a/crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs +++ b/crates/ibc/src/core/ics04_channel/handler/chan_open_try.rs @@ -40,7 +40,7 @@ where let channel_feature = msg.ordering.to_string(); if !conn_version.is_supported_feature(channel_feature) { - return Err(ChannelError::ChannelFeatureNotSuportedByConnection) + return Err(ChannelError::ChannelFeatureNotSupportedByConnection) .map_err(ContextError::ChannelError); } diff --git a/crates/ibc/src/core/ics04_channel/timeout.rs b/crates/ibc/src/core/ics04_channel/timeout.rs index 3c21c8e5f..5dac73e38 100644 --- a/crates/ibc/src/core/ics04_channel/timeout.rs +++ b/crates/ibc/src/core/ics04_channel/timeout.rs @@ -54,7 +54,7 @@ impl TimeoutHeight { } } - /// Check if a height is *stricly past* the timeout height, and thus is + /// Check if a height is *strictly past* the timeout height, and thus is /// deemed expired. pub fn has_expired(&self, height: Height) -> bool { match self { diff --git a/crates/ibc/src/core/ics23_commitment/merkle.rs b/crates/ibc/src/core/ics23_commitment/merkle.rs index 09856e78f..777dcdaaa 100644 --- a/crates/ibc/src/core/ics23_commitment/merkle.rs +++ b/crates/ibc/src/core/ics23_commitment/merkle.rs @@ -205,7 +205,7 @@ fn calculate_non_existence_root(proof: &NonExistenceProof) -> Result, Co // Merkle Proof serialization notes: // "Proof" id currently defined in a number of forms and included in a number of places // - TmProof: in tendermint-rs/src/merkle/proof.rs:Proof -// - RawProofOps: in tendermint-proto/tendermint.cyrpto.rs:ProofOps +// - RawProofOps: in tendermint-proto/tendermint.crypto.rs:ProofOps // - RawMerkleProof: in ibc-proto/ibc.core.commitment.v1.rs:MerkleProof // - structure that includes a RawProofOps in its only `proof` field. // #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/docs/architecture/adr-001-handler-implementation.md b/docs/architecture/adr-001-handler-implementation.md index 38d67d435..0b662ad75 100644 --- a/docs/architecture/adr-001-handler-implementation.md +++ b/docs/architecture/adr-001-handler-implementation.md @@ -316,7 +316,7 @@ pub fn keep( > the actual requirements. Each submodule is responsible for dispatching the messages it is given to the appropriate -message processing function and, if successful, pass the resulting data to the persistance +message processing function and, if successful, pass the resulting data to the persistence function defined in the previous section. To this end, the submodule should define an enumeration of all messages, in order @@ -554,7 +554,7 @@ pub trait ClientKeeper { This way, only one implementation of the `ClientReader` and `ClientKeeper` trait is required, as it can delegate eg. the serialization of the underlying datatypes to the `Serialize` bound -of the `Any...` wrappper. +of the `Any...` wrapper. Both the `process` and `keep` function are defined to take a message generic over the actual client type: diff --git a/docs/architecture/adr-003-ics20-implementation.md b/docs/architecture/adr-003-ics20-implementation.md index 26604f726..251f34c2c 100644 --- a/docs/architecture/adr-003-ics20-implementation.md +++ b/docs/architecture/adr-003-ics20-implementation.md @@ -206,7 +206,7 @@ pub fn on_acknowledgement_packet(ctx: &Ctx, ack: ICS20Acknowledgement, data where Ctx: ICS20Context { match ack { - ICS20Acknowledgement::Sucess => Ok(()), + ICS20Acknowledgement::Success => Ok(()), _ => refund_packet_token(ctx, data) } } diff --git a/docs/architecture/adr-template.md b/docs/architecture/adr-template.md index 28a5ecfbb..7905409bb 100644 --- a/docs/architecture/adr-template.md +++ b/docs/architecture/adr-template.md @@ -5,7 +5,7 @@ ## Context -> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution. +> This section contains all the context one needs to understand the current state, and why there is a problem. It should be as succinct as possible and introduce the high level idea behind the solution. ## Decision > This section explains all of the details of the proposed solution, including implementation details. @@ -31,6 +31,6 @@ If the proposed change will be large, please also indicate a way to do the chang ## References -> Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here! +> Are there any relevant PR comments, issues that led up to this, or articles referenced for why we made the given design choice? If so link them here! * {reference link}