diff --git a/.changelog/v0.30.0/improvements/2374-fix-bond-amount.md b/.changelog/v0.30.0/improvements/2374-fix-bond-amount.md index 42703b0184..6493eab169 100644 --- a/.changelog/v0.30.0/improvements/2374-fix-bond-amount.md +++ b/.changelog/v0.30.0/improvements/2374-fix-bond-amount.md @@ -1,2 +1,2 @@ -- Fix the function to more accurately account for slashes. - ([\#2374](https://github.com/anoma/namada/pull/2374)) \ No newline at end of file +- Fix the function `bond_amount` to more accurately account for slashes. + ([\#2374](https://github.com/anoma/namada/pull/2374)) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98873b4536..691141f409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ Namada 0.30.0 is a minor release that primarily upgrades the MASP and WASM VM me - Added validator's consensus key look-up to `client find-validator` command, which now also accepts a native validator address. ([\#2368](https://github.com/anoma/namada/pull/2368)) -- Fix the function to more accurately account for slashes. +- Fix the function `bond_amount` to more accurately account for slashes. ([\#2374](https://github.com/anoma/namada/pull/2374)) - The MASP VP now validates the tx expiration. ([\#2375](https://github.com/anoma/namada/pull/2375)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 841e42fbe2..aaab36eec8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,7 +52,7 @@ for i in $(ls -d .changelog/*/*/); do basename "$i"; done | sort | uniq The Namada SDK is exposed to any developer building upon Namada. Thus, any change made to a public facing function is a breaking change, and therefore should be documented in the Changelog under the `SDK` section. -The message should outline the exact API change, along with a small section describing *how* and *why* the component was change. This should give motivation and context to any developer building upon Namada on how they can update their code to the next version. +The message should outline the exact API change, along with a small section describing *how* and *why* the component was changed. This should give motivation and context to any developer building upon Namada on how they can update their code to the next version. ## Development priorities diff --git a/apps/src/lib/node/ledger/broadcaster.rs b/apps/src/lib/node/ledger/broadcaster.rs index e3b5229452..62c4083a11 100644 --- a/apps/src/lib/node/ledger/broadcaster.rs +++ b/apps/src/lib/node/ledger/broadcaster.rs @@ -25,7 +25,7 @@ impl Broadcaster { } } - /// Loop forever, braodcasting messages that have been received + /// Loop forever, broadcasting messages that have been received /// by the receiver async fn run_loop(&mut self) { let result = time::Sleep { diff --git a/apps/src/lib/node/ledger/shell/init_chain.rs b/apps/src/lib/node/ledger/shell/init_chain.rs index 706d5c479e..53fe6b9415 100644 --- a/apps/src/lib/node/ledger/shell/init_chain.rs +++ b/apps/src/lib/node/ledger/shell/init_chain.rs @@ -133,7 +133,7 @@ where #[cfg(any(test, feature = "testing"))] _num_validators, ); - // propogate errors or panic + // propagate errors or panic validation.error_out()?; // Init masp commitment tree and anchor diff --git a/core/src/ledger/governance/cli/onchain.rs b/core/src/ledger/governance/cli/onchain.rs index c32d583038..df5a453636 100644 --- a/core/src/ledger/governance/cli/onchain.rs +++ b/core/src/ledger/governance/cli/onchain.rs @@ -272,7 +272,7 @@ impl PgfAction { } } -/// Pgf fundings +/// Pgf funding #[derive( Debug, Clone, BorshSerialize, BorshDeserialize, Serialize, Deserialize, )] @@ -283,11 +283,11 @@ pub struct PgfFunding { pub retro: Vec, } -/// Pgf continous funding +/// Pgf continuous funding #[derive( Debug, Clone, BorshSerialize, BorshDeserialize, Serialize, Deserialize, )] -pub struct PgfContinous { +pub struct PgfContinuous { /// Pgf target pub target: PGFTarget, /// Pgf action diff --git a/core/src/ledger/governance/storage/proposal.rs b/core/src/ledger/governance/storage/proposal.rs index 9b91baac45..e14285c5e2 100644 --- a/core/src/ledger/governance/storage/proposal.rs +++ b/core/src/ledger/governance/storage/proposal.rs @@ -7,7 +7,7 @@ use thiserror::Error; use crate::ibc::core::host::types::identifiers::{ChannelId, PortId}; use crate::ledger::governance::cli::onchain::{ - PgfAction, PgfContinous, PgfRetro, PgfSteward, StewardsUpdate, + PgfAction, PgfContinuous, PgfRetro, PgfSteward, StewardsUpdate, }; use crate::ledger::governance::utils::{ProposalStatus, TallyType}; use crate::ledger::storage_api::token::Amount; @@ -22,7 +22,7 @@ pub enum ProposalTypeError { InvalidProposalType, } -/// Storage structure for pgf fundings +/// Storage structure for pgf funding #[derive( Debug, Clone, @@ -286,8 +286,8 @@ impl TryFrom for AddRemove
{ } } -impl From for PGFAction { - fn from(value: PgfContinous) -> Self { +impl From for PGFAction { + fn from(value: PgfContinuous) -> Self { match value.action { PgfAction::Add => { PGFAction::Continuous(AddRemove::Add(value.target)) @@ -306,7 +306,7 @@ impl From for PGFAction { } #[derive(Debug, Clone, BorshSerialize, BorshDeserialize)] -/// Proposal rappresentation when fetched from the storage +/// Proposal representation when fetched from the storage pub struct StorageProposal { /// The proposal id pub id: u64, diff --git a/core/src/ledger/governance/utils.rs b/core/src/ledger/governance/utils.rs index ab64d39250..ebf25e84d7 100644 --- a/core/src/ledger/governance/utils.rs +++ b/core/src/ledger/governance/utils.rs @@ -214,12 +214,12 @@ impl Display for ProposalResult { } } -/// /// General rappresentation of a vote +/// General representation of a vote #[derive(Debug)] pub enum TallyVote { - /// Rappresent a vote for a proposal onchain + /// Represent a vote for a proposal onchain OnChain(ProposalVote), - /// Rappresent a vote for a proposal offline + /// Represent a vote for a proposal offline Offline(OfflineVote), } diff --git a/core/src/ledger/storage/mod.rs b/core/src/ledger/storage/mod.rs index 3c5cf39c35..da6a4545e8 100644 --- a/core/src/ledger/storage/mod.rs +++ b/core/src/ledger/storage/mod.rs @@ -1119,7 +1119,7 @@ where ) -> Result { let value = value.as_ref(); if is_pending_transfer_key(key) { - // The tree of the bright pool stores the current height for the + // The tree of the bridge pool stores the current height for the // pending transfer let height = self.block.height.serialize_to_vec(); self.block.tree.update(key, height)?; diff --git a/documentation/dev/src/README.md b/documentation/dev/src/README.md index aa66afe484..909a96e95b 100644 --- a/documentation/dev/src/README.md +++ b/documentation/dev/src/README.md @@ -7,8 +7,7 @@ Welcome to Namada's docs! Namada is a sovereign, proof-of-stake blockchain protocol that enables private, asset-agnostic cash and private bartering among any number of parties. To learn more about the protocol, we recommend the following resources: - [Introducing Namada: Interchain Asset-agnostic Privacy](https://blog.namada.net/introducing-namada-interchain-asset-agnostic-privacy/) -- [Namada's Whitepaper](https://namada.network/papers/whitepaper.pdf) -- [Namada's Vision paper](https://namada.network/papers/vision-paper.pdf) +- [Namada's mission](https://forum.namada.net/t/the-namada-mission/275) > ⚠️ Here lay dragons: this codebase is still experimental, try at your own risk! diff --git a/documentation/dev/src/explore/design/ledger/storage/data-schema.md b/documentation/dev/src/explore/design/ledger/storage/data-schema.md index aa98631b64..8e2c170b24 100644 --- a/documentation/dev/src/explore/design/ledger/storage/data-schema.md +++ b/documentation/dev/src/explore/design/ledger/storage/data-schema.md @@ -4,7 +4,7 @@ At high level, all the data in the [accounts' dynamic sub-spaces](../accounts.md#dynamic-storage-sub-space) is just keys associated with arbitrary bytes and intents are just wrapper around arbitrary data. To help the processes that read and write this data (transactions, validity predicates, -matchmaker) interpret it and implement interesting functionality on top it, the +matchmaker) interpret it and implement interesting functionality on top of it, the ledger could provide a way to describe the schema of the data. For storage data encoding, we're currently using the borsh library, which diff --git a/encoding_spec/src/main.rs b/encoding_spec/src/main.rs index 5ac27daf22..3be5e88915 100644 --- a/encoding_spec/src/main.rs +++ b/encoding_spec/src/main.rs @@ -250,11 +250,11 @@ fn main() -> Result<(), Box> { // tables.push(pos_bonds_table); // Then add the rest of definitions sorted by their names - for (declaration, defition) in definitions + for (declaration, definition) in definitions .into_iter() .sorted_by_key(|(key, _val)| key.clone()) { - tables.push(definition_to_table(&declaration, defition)) + tables.push(definition_to_table(&declaration, definition)) } // Print the tables to markdown diff --git a/examples/README.md b/examples/README.md index 7ff0b4fbc2..eb30173551 100644 --- a/examples/README.md +++ b/examples/README.md @@ -3,7 +3,7 @@ This directory contains examples and additional tooling to help in the development of Namada. The currently provided examples are listed below: ## `generate-txs` This utility serves to randomly generate Namada transaction test vectors -offline. These test vectors are useful for ensuring compatability with hardware +offline. These test vectors are useful for ensuring compatibility with hardware wallets. This example is included in the Namada repository in order to ensure that the test vector generation logic is maintained and remains up to date with the latest changes in transaction formats. diff --git a/light_sdk/src/reading/tx.rs b/light_sdk/src/reading/tx.rs index 036f38ee59..64f23d1350 100644 --- a/light_sdk/src/reading/tx.rs +++ b/light_sdk/src/reading/tx.rs @@ -4,7 +4,7 @@ use namada_sdk::rpc::{TxEventQuery, TxResponse}; use super::*; /// Call the corresponding `tx_event_query` RPC method, to fetch -/// the current status of a transation. +/// the current status of a transaction. pub fn query_tx_events( tendermint_addr: &str, tx_hash: &str, diff --git a/proof_of_stake/src/lib.rs b/proof_of_stake/src/lib.rs index efded0ec42..47a253f8ed 100644 --- a/proof_of_stake/src/lib.rs +++ b/proof_of_stake/src/lib.rs @@ -931,7 +931,7 @@ where remaining = token::Amount::zero(); // NOTE: When there are multiple `src_validators` from which we're - // unbonding, `validator_to_modify` cannot get overriden, because + // unbonding, `validator_to_modify` cannot get overridden, because // only one of them can be a partial unbond (`new_entry` // is partial unbond) if let Some((bond_epoch, new_bond_amount)) = diff --git a/proof_of_stake/src/slashing.rs b/proof_of_stake/src/slashing.rs index 4b91a84527..b5a4d41db0 100644 --- a/proof_of_stake/src/slashing.rs +++ b/proof_of_stake/src/slashing.rs @@ -249,7 +249,7 @@ where /// In the context of a redelegation, the function computes how much a validator /// (the destination validator of the redelegation) should be slashed due to the /// misbehaving of a second validator (the source validator of the -/// redelegation). The function computes how much the validator whould be +/// redelegation). The function computes how much the validator would be /// slashed at all epochs between the current epoch (curEpoch) + 1 and the /// current epoch + 1 + PIPELINE_OFFSET, accounting for any tokens of the /// redelegation already unbonded. @@ -815,8 +815,8 @@ where } /// Compute a token amount after slashing, given the initial amount and a set of -/// slashes. It is assumed that the input `slashes` are those commited while the -/// `amount` was contributing to voting power. +/// slashes. It is assumed that the input `slashes` are those committed while +/// the `amount` was contributing to voting power. pub fn get_slashed_amount( params: &PosParams, amount: token::Amount, @@ -986,7 +986,7 @@ where /// Process a slash by (i) slashing the misbehaving validator; and (ii) any /// validator to which it has redelegated some tokens and the slash misbehaving -/// epoch is wihtin the redelegation slashing window. +/// epoch is within the redelegation slashing window. /// /// `validator` - the misbehaving validator. /// `slash_rate` - the slash rate. diff --git a/proof_of_stake/src/tests/test_helper_fns.rs b/proof_of_stake/src/tests/test_helper_fns.rs index 594965fe43..cb9eb3fa40 100644 --- a/proof_of_stake/src/tests/test_helper_fns.rs +++ b/proof_of_stake/src/tests/test_helper_fns.rs @@ -2000,13 +2000,13 @@ fn test_from_sm_case_1() { let (new_entry_epoch, new_bond_amount) = bonds_to_unbond.new_entry.unwrap(); assert_eq!(outer_epoch_1, new_entry_epoch); // The modified bond should be sum of all redelegations less the unbonded - // amouunt + // amount assert_eq!( epoch_1_redeleg_1 + epoch_1_redeleg_2 + epoch_2_redeleg_2 - unbond_amount, new_bond_amount ); - // The current bond should be sum of redelegations fom the modified epoch + // The current bond should be sum of redelegations from the modified epoch let cur_bond_amount = bonds_handle .get_delta_val(&storage, new_entry_epoch) .unwrap()