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

chore: Fix all typos #1460

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Additionally, this release fixes a couple of issues with the `serde`-based deser

*April 25th, 2024*

This release brings substantial performance improvements to the voting power computation within the light client, improves the handling of misformed blocks (eg. with empty `last_commit` on non-first block) when decoding them from Protobuf or RPC responses, and adds missing `serde` derives on some Protobuf definitions.
This release brings substantial performance improvements to the voting power computation within the light client, improves the handling of malformed blocks (eg. with empty `last_commit` on non-first block) when decoding them from Protobuf or RPC responses, and adds missing `serde` derives on some Protobuf definitions.

This release also technically contains a breaking change in `tendermint-proto`, but this should not impact normal use of the library, as the `ToPrimitive` impl that was removed on `BlockIdFlag` trait did not provide any additional functionality.

Expand Down Expand Up @@ -153,7 +153,7 @@ This release also technically contains a breaking change in `tendermint-proto`,

### IMPROVEMENTS

- `[tendermint]` Allow misformed blocks (eg. with empty `last_commit`
- `[tendermint]` Allow malformed blocks (eg. with empty `last_commit`
on non-first block) when decoding them from Protobuf or RPC responses
([\#1403](https://github.com/informalsystems/tendermint-rs/issues/1403))
- `[tendermint]` Check `index ≤ i32::MAX` invariant when converting `usize`
Expand Down Expand Up @@ -309,7 +309,7 @@ CometBFT data types are serialized and deserialized.
- `[tendermint-proto]` In the `Deserialize` impls derived for
`v*::types::ValidatorSet`, the `total_voting_power` field value is retrieved
when present.
- `[tendermint-proto]` Add serialziation helper module
- `[tendermint-proto]` Add serialization helper module
`serializers::from_str_allow_null`. Use it to allow the `proposed_priority`
field value of null in the deserialization of `v*::types::Validator`.
- Corrected custom serializer helpers to consistently produce the format
Expand Down Expand Up @@ -342,8 +342,8 @@ are exposed to the client.
* Change the `abci::Request` and `abci::Response` reexports to use the
enums defined in `v0_38`.
- `[tendermint]` Define version-specific categorized request/response enums:
`ConsensusRequest`, `MempoolRequest`, `InfoRequest`, `ShapshotRequest`,
`ConsensusResponse`, `MempoolResponse`, `InfoResponse`, `ShapshotResponse`,
`ConsensusRequest`, `MempoolRequest`, `InfoRequest`, `SnapshotRequest`,
`ConsensusResponse`, `MempoolResponse`, `InfoResponse`, `SnapshotResponse`,
in each of the `v0_*::abci` modules, so that the variants are trimmed to the
requests/responses used by the respective protocol version.
Reexport the types from `v0_38::abci` as aliases for these names in the
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adr-002-light-client-adr-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ the core verification library to verify this data, and updates its state accordi
It also makes requests to other full nodes to detect and report on forks.

That said, as much as possible, we would like the implementation here to be
reusable for the IBC protocol, which supports communiction between blockchains.
reusable for the IBC protocol, which supports communication between blockchains.
In this case, instead of making RPC requests, IBC-enabled blockchains receive the relevant data in transactions and
verify it using the same core verification library. Thus implementations should
abstract over the source of data as necessary.
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/lightclient/detection/detection.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sample is chosen at random, this adds a level of probabilistic
reasoning.) If conflicting headers are found, they are evidence that
can be used for punishing processes.

In this document we will focus onn strengthening the light client, and
In this document we will focus on strengthening the light client, and
leave other uses of the detection mechanism (e.g., when run on a full
node) to the future.

Expand Down
2 changes: 1 addition & 1 deletion docs/spec/lightclient/verification/verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ func (ls LightStore) LatestVerified() LightBlock

#### **[LCV-FUNC-UPDATE.1]**:
```go
func (ls LightStore) Update(lightBlock LightBlock, verfiedState VerifiedState)
func (ls LightStore) Update(lightBlock LightBlock, verifiedState VerifiedState)
```
- Expected postcondition
- The state of the LightBlock is set to *verifiedState*.
Expand Down
2 changes: 1 addition & 1 deletion docs/spec/tendermint-fork-cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- this specification focuses on safety, so timeouts are modelled with
with non-determinism

- the proposer function is non-determinstic, no fairness is assumed
- the proposer function is non-deterministic, no fairness is assumed

- the messages by the faulty processes are injected right in the initial states

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- this specification focuses on safety, so timeouts are modelled
with non-determinism

- the proposer function is non-determinstic, no fairness is assumed
- the proposer function is non-deterministic, no fairness is assumed

- the messages by the faulty processes are injected right in the initial states

Expand Down
2 changes: 1 addition & 1 deletion light-client-detector/src/detect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ where
}
}

/// An error that arised when comparing a header from the primary with a header from a witness
/// An error that arose when comparing a header from the primary with a header from a witness
/// with [`compare_new_header_with_witness`].
#[derive(Debug)]
pub enum CompareError {
Expand Down
2 changes: 1 addition & 1 deletion light-client-detector/src/evidence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn make_evidence(
}
}

/// Take a trusted header and match it againt a conflicting header
/// Take a trusted header and match it against a conflicting header
/// to determine whether the conflicting header was the product of a valid state transition
/// or not. If it is then all the deterministic fields of the header should be the same.
/// If not, it is an invalid header and constitutes a lunatic attack.
Expand Down
2 changes: 1 addition & 1 deletion light-client-verifier/src/operations/voting_power.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub trait VotingPowerCalculator: Send + Sync {
/// validator sets.
///
/// This is equivalent to calling [`Self::voting_power_in`] on each set
/// separately but may be more optimised. Implementators are encouraged to
/// separately but may be more optimised. Implementers are encouraged to
/// write a properly optimised method which avoids checking the same
/// signature twice but for a simple unoptimised implementation the
/// following works:
Expand Down
2 changes: 1 addition & 1 deletion light-client/src/light_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ impl LightClient {

// `latest` and `current` are linked together by `last_block_id`,
// therefore it is not relevant which we verified first.
// For consistency, we say that `latest` was verifed using
// For consistency, we say that `latest` was verified using
// `current` so that the trace is always pointing down the chain.
state.light_store.insert(current.clone(), Status::Trusted);
state.light_store.insert(latest.clone(), Status::Trusted);
Expand Down
4 changes: 2 additions & 2 deletions pbt-gen/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ fn num_days_in_month(year: i32, month: u8) -> u8 {
}

prop_compose! {
/// An abitrary [`OffsetDateTime`], offset in UTC,
/// An arbitrary [`OffsetDateTime`], offset in UTC,
/// that is between the given `min` and `max`.
///
/// # Examples
Expand Down Expand Up @@ -150,7 +150,7 @@ prop_compose! {
}

prop_compose! {
/// An abitrary [`UtcOffset`].
/// An arbitrary [`UtcOffset`].
pub fn arb_utc_offset()
(
off in prop_oneof![
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_34/tendermint.crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct DominoOp {
pub output: ::prost::alloc::string::String,
}
/// ProofOp defines an operation used for calculating Merkle root
/// The data could be arbitrary format, providing nessecary data
/// The data could be arbitrary format, providing necessary data
/// for example neighbouring node hash
#[derive(::serde::Deserialize, ::serde::Serialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_34/tendermint.types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pub struct TxProof {
#[prost(message, optional, tag = "3")]
pub proof: ::core::option::Option<super::crypto::Proof>,
}
/// BlockIdFlag indicates which BlcokID the signature is for
/// BlockIdFlag indicates which BlockID the signature is for
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BlockIdFlag {
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_37/tendermint.crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct DominoOp {
pub output: ::prost::alloc::string::String,
}
/// ProofOp defines an operation used for calculating Merkle root
/// The data could be arbitrary format, providing nessecary data
/// The data could be arbitrary format, providing necessary data
/// for example neighbouring node hash
#[derive(::serde::Deserialize, ::serde::Serialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_37/tendermint.types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ pub struct TxProof {
#[prost(message, optional, tag = "3")]
pub proof: ::core::option::Option<super::crypto::Proof>,
}
/// BlockIdFlag indicates which BlcokID the signature is for
/// BlockIdFlag indicates which BlockID the signature is for
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum BlockIdFlag {
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_38/tendermint.abci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ pub mod response_verify_vote_extension {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResponseFinalizeBlock {
/// set of block events emmitted as part of executing the block
/// set of block events emitted as part of executing the block
#[prost(message, repeated, tag = "1")]
pub events: ::prost::alloc::vec::Vec<Event>,
/// the result of executing each transaction including the events
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_38/tendermint.crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct DominoOp {
pub output: ::prost::alloc::string::String,
}
/// ProofOp defines an operation used for calculating Merkle root
/// The data could be arbitrary format, providing nessecary data
/// The data could be arbitrary format, providing necessary data
/// for example neighbouring node hash
#[derive(::serde::Deserialize, ::serde::Serialize)]
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion proto/src/prost/v0_38/tendermint.state.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This file is @generated by prost-build.
/// LegacyABCIResponses retains the responses
/// of the legacy ABCI calls during block processing.
/// Note ReponseDeliverTx is renamed to ExecTxResult but they are semantically the same
/// Note ResponseDeliverTx is renamed to ExecTxResult but they are semantically the same
/// Kept for backwards compatibility for versions prior to v0.38
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down
2 changes: 1 addition & 1 deletion tendermint/src/merkle/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ mod test {
"ops": [
{
"type": "iavl:v",
"key": "Y29uc2Vuc3VzU3RhdGUvaWJjb25lY2xpZW50LzIy",
"key": "Y29uc2Vuc3VzU3RhdGUvaWJjb25lY2xpZW50LzIt",
"data": "8QEK7gEKKAgIEAwYHCIgG9RAkJgHlxNjmyzOW6bUAidhiRSja0x6+GXCVENPG1oKKAgGEAUYFyIgwRns+dJvjf1Zk2BaFrXz8inPbvYHB7xx2HCy9ima5f8KKAgEEAMYFyogOr8EGajEV6fG5fzJ2fAAvVMgRLhdMJTzCPlogl9rxlIKKAgCEAIYFyIgcjzX/a+2bFbnNldpawQqZ+kYhIwz5r4wCUzuu1IFW04aRAoeY29uc2Vuc3VzU3RhdGUvaWJjb25lY2xpZW50LzIyEiAZ1uuG60K4NHJZZMuS9QX6o4eEhica5jIHYwflRiYkDBgX"
},
{
Expand Down
2 changes: 1 addition & 1 deletion tendermint/src/vote/sign_vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ mod tests {
}

#[test]
fn test_vote_rountrip_with_sig() {
fn test_vote_roundtrip_with_sig() {
let dt = datetime!(2017-12-25 03:00:01.234 UTC);
let vote = Vote {
validator_address: AccountId::try_from(vec![
Expand Down
4 changes: 2 additions & 2 deletions testgen/src/tester.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ impl Tester {
tests
}

pub fn unparseable_tests(&self) -> Vec<String> {
pub fn unparsable_tests(&self) -> Vec<String> {
let mut tests = Vec::new();
if let Some(results) = self.results.get("") {
for (path, res) in results {
Expand Down Expand Up @@ -522,7 +522,7 @@ impl Tester {
print(&format!(" {path}"))
}
}
let tests = self.unparseable_tests();
let tests = self.unparsable_tests();
if !tests.is_empty() {
do_panic = true;
print("\nUnparseable tests: ");
Expand Down
Loading