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

Run codespell on CI #3741

Merged
merged 7 commits into from
Jan 3, 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
3 changes: 3 additions & 0 deletions .github/codespell/codespell.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = *.js,*.ts,*.css,*.svg,./target
ignore-words = .github/codespell/words.txt
4 changes: 4 additions & 0 deletions .github/codespell/words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
crate
shs
ser
numer
12 changes: 11 additions & 1 deletion .github/workflows/cargo-doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@ on:
push:
branches:
- master
pull_request: {}
paths:
- .github/workflows/cargo-doc.yml
- Cargo.toml
- Cargo.lock
- crates/**
pull_request:
paths:
- .github/workflows/cargo-doc.yml
- Cargo.toml
- Cargo.lock
- crates/**

# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Codespell
on:
pull_request:
push:
branches: master

# Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
codespell:
name: Check spelling
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@v2
with:
skip: '*.js,*.ts,*.css,*.svg,./target'
ignore_words_file: .github/codespell/words.txt

35 changes: 0 additions & 35 deletions .github/workflows/specs.yml

This file was deleted.

22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ at a different value for each chain, using the new per-chain `clear_interval` se
The global `clear_interval` setting is used as a default value if the per-chain
setting is not defined.

Additionnaly, operators can now override the CometBFT compatibility mode to be used
Additionally, operators can now override the CometBFT compatibility mode to be used
for a chain by using the new `compat_mode` per-chain setting. The main use case for this
is to override the automatically detected compatibility mode in case Hermes gets it wrong
or encounters a non-standard version number and falls back on the wrong CometBFT version.
Expand Down Expand Up @@ -465,21 +465,21 @@ This patch release adds support for CometBFT in version checks.
*March 27th, 2023*

Hermes v1.4.0 brings compatibility with chains based on Tendermint/CometBFT 0.37,
while retaining compatiblity with Tendermint/CometBFT 0.34. This is transparent
while retaining compatibility with Tendermint/CometBFT 0.34. This is transparent
and does not require any additional configuration.

The relayer now supports ICS consumer chains, which only requires operators
to specify the `unbonding_period` parameter in the chain settings. This is only
a temporary requirement, in the future Hermes will seamlessy support consumer
a temporary requirement, in the future Hermes will seamlessly support consumer
chains with minimal changes to the configuration.

This release also deprecates support for chains based on Cosmos SDK 0.43.x and lower,
and bumps the compatiblity to Cosmos SDK 0.47.x.
and bumps the compatibility to Cosmos SDK 0.47.x.

The relayer now also allows operators to filter out packets to relay based on whether
or not they contain a fee, and the minimal amount of such fee.
Please check the relevant [documentation in the Hermes guide](fee-guide) for more information.
Additionnaly, Hermes now also tracks [metrics for ICS29 fees](fee-metrics).
Additionally, Hermes now also tracks [metrics for ICS29 fees](fee-metrics).

This release includes a new `query client status` CLI to quickly check whether a client is active, expired or frozen.

Expand Down Expand Up @@ -1063,7 +1063,7 @@ This is the third release candidate for Hermes v1.0.0 🎉

- Release version 0.18.0 of `ibc-telemetry`

#### IMROVEMENTS
#### IMPROVEMENTS

- Improve the metrics
- Renamed `oldest_sequence` metric to `backlog_oldest_sequence`
Expand Down Expand Up @@ -1768,7 +1768,7 @@ Before running Hermes v0.11.0, make sure you remove the `mode.packets.filter` op
and consensus states ([#1481](https://github.com/informalsystems/hermes/issues/1481))
- More structural logging in relayer, using tracing spans and key-value pairs.
([#1491](https://github.com/informalsystems/hermes/pull/1491))
- Improved documention w.r.t. keys for Ethermint-based chains
- Improved documentation w.r.t. keys for Ethermint-based chains
([#1785](https://github.com/informalsystems/hermes/issues/1785))
- [Relayer CLI](crates/relayer-cli)
- Add custom options to the `create client` command.
Expand Down Expand Up @@ -2161,7 +2161,7 @@ This release also fixes a bug where the chain runtime within the relayer would c

This release of Hermes is the first to be compatible with the development version of Cosmos SDK 0.43.
Hermes 0.7.0 also improves the performance and reliability of the relayer, notably by waiting asynchronously for transactions to be confirmed.
Additionnally, Hermes now includes a REST server which exposes the relayer's internal state over HTTP.
Additionally, Hermes now includes a REST server which exposes the relayer's internal state over HTTP.

### BUG FIXES

Expand Down Expand Up @@ -2760,7 +2760,7 @@ This release also finalizes the initial implementation of all the ICS 004 handle
- Fix for chains that don't have `cosmos` account prefix ([#416])
- Fix for building the `trusted_validator_set` for the header used in client updates ([#770])
- Don't send `MsgAcknowledgment` if channel is closed ([#675])
- Fix a bug where the keys addresses had their account prefix overriden by the prefix in the configuration ([#751])
- Fix a bug where the keys addresses had their account prefix overridden by the prefix in the configuration ([#751])

- [ibc-relayer-cli]
- Hermes guide: improved installation guideline ([#672])
Expand Down Expand Up @@ -2898,7 +2898,7 @@ Noteworthy changes in this release include:

### FEATURES

- Continous Integration (CI) end-to-end (e2e) testing with gaia v4 ([#32], [#582], [#602])
- Continuous Integration (CI) end-to-end (e2e) testing with gaia v4 ([#32], [#582], [#602])
- Add support for streamlining releases ([#507])

- [ibc-relayer-cli]
Expand Down Expand Up @@ -3055,7 +3055,7 @@ Special thanks to external contributors for this release: @CharlyCst ([#102], [#
- CLI for client update message ([#277])
- Implement the relayer CLI for connection handshake messages ([#358], [#359], [#360])
- Implement the relayer CLI for channel handshake messages ([#371], [#372], [#373], [#374])
- Added basic client, connection, and channel lifecyle in relayer v0 ([#376], [#377], [#378])
- Added basic client, connection, and channel lifecycle in relayer v0 ([#376], [#377], [#378])
- Implement commands to add and list keys for a chain ([#363])
- Allow overriding of peer_id, height and hash in light add command ([#428])
- [proto-compiler]
Expand Down
2 changes: 1 addition & 1 deletion ci/misbehaviour-ics/double_sign_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ do
interchain-security-cd genesis add-genesis-account $CONS_ACCOUNT_ADDR2 $USER_COINS --home ${CONS_NODE_DIR}
sleep 10

### this probably doesnt have to be done for each node
### this probably does not have to be done for each node
# Add consumer genesis states to genesis file
RPC_LADDR_PORT=$(($RPC_LADDR_BASEPORT + $index))
RPC_LADDR=tcp://${NODE_IP}:${RPC_LADDR_PORT}
Expand Down
2 changes: 1 addition & 1 deletion ci/misbehaviour/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ memo_prefix = ''
# [chains.packet_filter.min_fees.'channel-0']
# recv = [ { amount = 20, denom = 'stake' }, { amount = 10, denom = 'uatom' } ]

# Specify that the transaction fees should be payed from this fee granter's account.
# Specify that the transaction fees should be paid from this fee granter's account.
# Optional. If unspecified (the default behavior), then no fee granter is used, and
# the account specified in `key_name` will pay the tx fees for all transactions
# submitted to this chain.
Expand Down
2 changes: 1 addition & 1 deletion ci/misbehaviour/config_fork.toml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ memo_prefix = ''
# [chains.packet_filter.min_fees.'channel-0']
# recv = [ { amount = 20, denom = 'stake' }, { amount = 10, denom = 'uatom' } ]

# Specify that the transaction fees should be payed from this fee granter's account.
# Specify that the transaction fees should be paid from this fee granter's account.
# Optional. If unspecified (the default behavior), then no fee granter is used, and
# the account specified in `key_name` will pay the tx fees for all transactions
# submitted to this chain.
Expand Down
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ id = 'ibc-0'
type = "CosmosSdk"

# Whether or not this is a CCV consumer chain. Default: false
# Only specifiy true for CCV consumer chain, but NOT for sovereign chains.
# Only specify true for CCV consumer chain, but NOT for sovereign chains.
ccv_consumer_chain = false

# Specify the RPC address and port where the chain RPC server listens on. Required
Expand Down Expand Up @@ -374,7 +374,7 @@ memo_prefix = ''
# [chains.packet_filter.min_fees.'channel-0']
# recv = [ { amount = 20, denom = 'stake' }, { amount = 10, denom = 'uatom' } ]

# Specify that the transaction fees should be payed from this fee granter's account.
# Specify that the transaction fees should be paid from this fee granter's account.
# Optional. If unspecified (the default behavior), then no fee granter is used, and
# the account specified in `key_name` will pay the tx fees for all transactions
# submitted to this chain.
Expand Down
4 changes: 2 additions & 2 deletions crates/chain-registry/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ pub struct Grpc {
}

impl Fetchable for ChainData {
fn path(ressource: &str) -> PathBuf {
[ressource, "chain.json"].iter().collect()
fn path(resource: &str) -> PathBuf {
[resource, "chain.json"].iter().collect()
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/chain-registry/src/querier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait QueryTypes {
#[async_trait]
/// `QueryContext` represents the basic expectations for a query
pub trait QueryContext: QueryTypes {
/// Return an error specific to the query which is retured when `query_healthy` fails
/// Return an error specific to the query which is returned when `query_healthy` fails
///
/// # Arguments
///
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-cli/src/cli_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn spawn_chain_runtime(config: &Config, chain_id: &ChainId) -> Result<impl C
spawn_chain_runtime_generic::<BaseChainHandle>(config, chain_id)
}

/// Spawns a chain runtime for the chain in the configuraiton identified by the given chain identifier.
/// Spawns a chain runtime for the chain in the configuration identified by the given chain identifier.
///
/// The `Handle` type parameter allows choosing which kind of [`ChainHandle`] implementation to use.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/relayer-cli/src/commands/create/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use crate::prelude::*;
use ibc_relayer::config::default::connection_delay;

static PROMPT: &str = "Are you sure you want a new connection & clients to be created? Hermes will use default security parameters.";
static HINT: &str = "Consider using the default invocation\n\nhermes create channel --a-port <PORT-ID> --b-port <PORT-ID> --a-chain <CHAIN-A-ID> --a-connection <CONNECTION-A-ID>\n\nto re-use a pre-existing connection.";
static HINT: &str = "Consider using the default invocation\n\nhermes create channel --a-port <PORT-ID> --b-port <PORT-ID> --a-chain <CHAIN-A-ID> --a-connection <CONNECTION-A-ID>\n\nto reuse a pre-existing connection.";

/// The data structure that represents all the possible options when invoking
/// the `create channel` CLI command.
Expand All @@ -31,7 +31,7 @@ static HINT: &str = "Consider using the default invocation\n\nhermes create chan
///
/// `create channel --a-port <A_PORT_ID> --b-port <B_PORT_ID> --a-chain <A_CHAIN_ID> --a-connection <A_CONNECTION_ID>`
/// is the default way in which this command should be used, specifying a `Connection-ID`
/// associated with chain A for this new channel to re-use.
/// associated with chain A for this new channel to reuse.
///
/// `create channel --a-port <A_PORT_ID> --b-port <B_PORT_ID> --a-chain <A_CHAIN_ID> --b-chain <B_CHAIN_ID> --new-client-connection`
/// can alternatively be used to indicate that a new connection/client pair is being
Expand Down
4 changes: 2 additions & 2 deletions crates/relayer-cli/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ fn spawn_rest_server(config: &Config) -> Option<rest::Receiver> {
);

if let Err(e) = handle.await {
error!("REST service crashed with errror: {e}");
error!("REST service crashed with error: {e}");
}
}
Err(e) => {
Expand Down Expand Up @@ -213,7 +213,7 @@ fn spawn_telemetry_server(config: &Config) {
info!("telemetry service running, exposing metrics at http://{addr}/metrics");

if let Err(e) = handle.await {
error!("telemetry service crashed with errror: {e}");
error!("telemetry service crashed with error: {e}");
}
}
Err(e) => error!("telemetry service failed to start: {e}"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ mod test {
#[test]
fn test_ack_ser() {
fn ser_json_assert_eq(ack: Acknowledgement, json_str: &str) {
let ser = serde_json::to_string(&ack).unwrap();
assert_eq!(ser, json_str)
let set = serde_json::to_string(&ack).unwrap();
assert_eq!(set, json_str)
}

ser_json_assert_eq(Acknowledgement::success(), r#"{"result":"AQ=="}"#);
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/applications/transfer/denom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::timestamp::Timestamp;
/// to verify new commits & state roots.
///
/// Users are not expected to implement sealed::ErasedPartialEqConsensusState.
/// Effectively, that trait bound mandates implementors to derive PartialEq,
/// Effectively, that trait bound mandates implementers to derive PartialEq,
/// after which our blanket implementation will implement
/// `ErasedPartialEqConsensusState` for their type.
pub trait ConsensusState: Clone + Debug + Send + Sync // Any: From<Self>,
Expand Down
4 changes: 2 additions & 2 deletions crates/relayer-types/src/core/ics02_client/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ define_error! {
InvalidStringAsHeight
{ value: String }
[ HeightError ]
| e | { format_args!("String {0} cannnot be converted to height", e.value) },
| e | { format_args!("String {0} cannot be converted to height", e.value) },

InvalidHeight
| _ | { "revision height cannot be zero" },
Expand Down Expand Up @@ -246,7 +246,7 @@ define_error! {
update_time: Timestamp,
}
| e | {
format_args!("header not withing trusting period: expires_at={0} now={1}", e.latest_time, e.update_time)
format_args!("header not within trusting period: expires_at={0} now={1}", e.latest_time, e.update_time)
},

MissingLocalConsensusState
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics03_connection/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ define_error! {

VerifyConnectionState
[ client_error::Error ]
| _ | { "error verifying connnection state" },
| _ | { "error verifying connection state" },

Signer
[ SignerError ]
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics03_connection/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,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)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics04_channel/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ define_error! {
| _ | { "missing channel end" },

InvalidVersionLengthConnection
| _ | { "single version must be negociated on connection before opening channel" },
| _ | { "single version must be negotiated on connection before opening channel" },

ChannelFeatureNotSuportedByConnection
| _ | { "the channel ordering is not supported by connection" },
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics04_channel/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer-types/src/core/ics23_commitment/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn calculate_non_existence_root(proof: &NonExistenceProof) -> Result<Vec<u8>, Er
// 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)]
Expand Down
2 changes: 1 addition & 1 deletion crates/relayer/src/chain/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ impl ChainEndpoint for CosmosSdkChain {
/// Note - there is no way to format the packet query such that it asks for Tx-es with either
/// sequence (the query conditions can only be AND-ed).
/// There is a possibility to include "<=" and ">=" conditions but it doesn't work with
/// string attributes (sequence is emmitted as a string).
/// string attributes (sequence is emitted as a string).
/// Therefore, for packets we perform one tx_search for each sequence.
/// Alternatively, a single query for all packets could be performed but it would return all
/// packets ever sent.
Expand Down
Loading
Loading