diff --git a/.changelog/unreleased/improvements/962-basic-fee.md b/.changelog/unreleased/improvements/962-basic-fee.md new file mode 100644 index 0000000000..d1fa27df87 --- /dev/null +++ b/.changelog/unreleased/improvements/962-basic-fee.md @@ -0,0 +1,2 @@ +- Added a basic fee implementation for testnet. + ([#962](https://github.com/anoma/namada/pull/962)) \ No newline at end of file diff --git a/.changelog/unreleased/testing/876-faster-epoch-test.md b/.changelog/unreleased/testing/876-faster-epoch-test.md new file mode 100644 index 0000000000..f387dee313 --- /dev/null +++ b/.changelog/unreleased/testing/876-faster-epoch-test.md @@ -0,0 +1,2 @@ +- Run fewer cases on update_epoch_after_its_duration, for a faster test suite. + ([#876](https://github.com/anoma/namada/pull/876)) \ No newline at end of file diff --git a/.changelog/unreleased/testing/911-fix-ledger-txs-and-queries-args.md b/.changelog/unreleased/testing/911-fix-ledger-txs-and-queries-args.md new file mode 100644 index 0000000000..eb5acbfcc3 --- /dev/null +++ b/.changelog/unreleased/testing/911-fix-ledger-txs-and-queries-args.md @@ -0,0 +1,3 @@ +- Use the correct options (--gas-amount, --gas- + token) in the ledger_txs_and_queries E2E test. + ([#911](https://github.com/anoma/namada/pull/911)) \ No newline at end of file diff --git a/.changelog/v0.12.1/bug-fixes/942-vp-verify-masp-failure.md b/.changelog/v0.12.1/bug-fixes/942-vp-verify-masp-failure.md new file mode 100644 index 0000000000..4c3cfdee3c --- /dev/null +++ b/.changelog/v0.12.1/bug-fixes/942-vp-verify-masp-failure.md @@ -0,0 +1,2 @@ +- Avoid panicking unwrap()s in vp_verify_masp, to prevent crashing the node on + malformed transactions. ([#942](https://github.com/anoma/namada/pull/942)) \ No newline at end of file diff --git a/.changelog/v0.12.1/summary.md b/.changelog/v0.12.1/summary.md new file mode 100644 index 0000000000..330b094aec --- /dev/null +++ b/.changelog/v0.12.1/summary.md @@ -0,0 +1,2 @@ +Namada 0.12.1 is a hotfix release, fixing a node crash on malformed +transactions to the MASP. diff --git a/.changelog/v0.12.2/bug-fixes/952-hotfix-prepare-proposal.md b/.changelog/v0.12.2/bug-fixes/952-hotfix-prepare-proposal.md new file mode 100644 index 0000000000..488fd4fcc1 --- /dev/null +++ b/.changelog/v0.12.2/bug-fixes/952-hotfix-prepare-proposal.md @@ -0,0 +1,2 @@ +- Limit block space to under Tendermint's limit, and limit transactions included + in a block by their size. ([#952](https://github.com/anoma/namada/pull/952)) \ No newline at end of file diff --git a/.changelog/v0.12.2/miscellaneous/943-no-matchmaker-in-package.md b/.changelog/v0.12.2/miscellaneous/943-no-matchmaker-in-package.md new file mode 100644 index 0000000000..13758711e4 --- /dev/null +++ b/.changelog/v0.12.2/miscellaneous/943-no-matchmaker-in-package.md @@ -0,0 +1,2 @@ +- Don't attempt to include matchmaker DLLs, which no longer exist, in release + packages. ([#943](https://github.com/anoma/namada/pull/943)) \ No newline at end of file diff --git a/.changelog/v0.12.2/miscellaneous/945-release-include-license.md b/.changelog/v0.12.2/miscellaneous/945-release-include-license.md new file mode 100644 index 0000000000..55d0b60f60 --- /dev/null +++ b/.changelog/v0.12.2/miscellaneous/945-release-include-license.md @@ -0,0 +1,2 @@ +- Include license information in release binary tarballs. + ([#945](https://github.com/anoma/namada/pull/945)) \ No newline at end of file diff --git a/.changelog/v0.12.2/summary.md b/.changelog/v0.12.2/summary.md new file mode 100644 index 0000000000..03de0ee74c --- /dev/null +++ b/.changelog/v0.12.2/summary.md @@ -0,0 +1,2 @@ +Namada 0.12.2 is a hotfix release, limiting transactions included in a +block by size. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 114ca0455d..9de90b80a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -72,6 +72,9 @@ jobs: ~/.cargo/git key: ${{ runner.os }}-namada-release-${{ matrix.namada_cache_version }}-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-namada-release-${{ matrix.namada_cache_version }} + - name: Install cargo-about + run: | + cargo install --version 0.5.2 cargo-about - name: Start sccache server run: sccache --start-server - name: ${{ matrix.make.name }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9aaab24c50..e5e37c9b0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # CHANGELOG +## v0.12.2 + +Namada 0.12.2 is a hotfix release, limiting transactions included in a +block by size. + +### BUG FIXES + +- Limit block space to under Tendermint's limit, and limit transactions included + in a block by their size. ([#952](https://github.com/anoma/namada/pull/952)) + +### MISCELLANEOUS + +- Don't attempt to include matchmaker DLLs, which no longer exist, in release + packages. ([#943](https://github.com/anoma/namada/pull/943)) +- Include license information in release binary tarballs. + ([#945](https://github.com/anoma/namada/pull/945)) + +## v0.12.1 + +Namada 0.12.1 is a hotfix release, fixing a node crash on malformed +transactions to the MASP. + +### BUG FIXES + +- Avoid panicking unwrap()s in vp_verify_masp, to prevent crashing the node on + malformed transactions. ([#942](https://github.com/anoma/namada/pull/942)) + ## v0.12.0 Namada 0.12.0 is a scheduled minor release. diff --git a/Cargo.lock b/Cargo.lock index 60883727ba..73ed4d5b08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3635,7 +3635,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "namada" -version = "0.12.0" +version = "0.12.2" dependencies = [ "assert_matches", "async-trait", @@ -3692,7 +3692,7 @@ dependencies = [ [[package]] name = "namada_apps" -version = "0.12.0" +version = "0.12.2" dependencies = [ "ark-serialize", "ark-std", @@ -3778,7 +3778,7 @@ dependencies = [ [[package]] name = "namada_core" -version = "0.12.0" +version = "0.12.2" dependencies = [ "ark-bls12-381", "ark-ec", @@ -3830,7 +3830,7 @@ dependencies = [ [[package]] name = "namada_encoding_spec" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "itertools", @@ -3841,7 +3841,7 @@ dependencies = [ [[package]] name = "namada_macros" -version = "0.12.0" +version = "0.12.2" dependencies = [ "proc-macro2", "quote", @@ -3850,7 +3850,7 @@ dependencies = [ [[package]] name = "namada_proof_of_stake" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "derivative", @@ -3864,7 +3864,7 @@ dependencies = [ [[package]] name = "namada_tests" -version = "0.12.0" +version = "0.12.2" dependencies = [ "assert_cmd", "borsh", @@ -3908,7 +3908,7 @@ dependencies = [ [[package]] name = "namada_tx_prelude" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "masp_primitives", @@ -3923,7 +3923,7 @@ dependencies = [ [[package]] name = "namada_vm_env" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "hex", @@ -3934,7 +3934,7 @@ dependencies = [ [[package]] name = "namada_vp_prelude" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "namada_core", diff --git a/about.hbs b/about.hbs new file mode 100644 index 0000000000..8dc9490c5d --- /dev/null +++ b/about.hbs @@ -0,0 +1,22 @@ +Third Party Licenses + +Overview of licenses: + +{{#each overview}} +{{{name}}} ({{count}}) +{{/each}} + +All license text: + +{{#each licenses}} +{{{name}}} + +Used by: + +{{#each used_by}} +{{crate.name}} {{crate.version}} +<{{#if crate.repository}}{{crate.repository}}{{else}}https://crates.io/crates/{{crate.name}}{{/if}}> +{{/each}} + +{{{text}}} +{{/each}} diff --git a/about.toml b/about.toml new file mode 100644 index 0000000000..d080250749 --- /dev/null +++ b/about.toml @@ -0,0 +1,17 @@ +accepted = [ + "MIT", + "0BSD", + "ISC", + "Unlicense", + "BSD-2-Clause", + "BSD-3-Clause", + "CC0-1.0", + "MPL-2.0", + "GPL-3.0", + "OSL-3.0", + "OpenSSL", + "Unicode-DFS-2016", + "Apache-2.0 WITH LLVM-exception", + "Apache-2.0", + "NOASSERTION", +] diff --git a/apps/Cargo.toml b/apps/Cargo.toml index bba5ca030e..bd7773e3b3 100644 --- a/apps/Cargo.toml +++ b/apps/Cargo.toml @@ -6,7 +6,7 @@ license = "GPL-3.0" name = "namada_apps" readme = "../README.md" resolver = "2" -version = "0.12.0" +version = "0.12.2" default-run = "namada" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/apps/src/lib/client/signing.rs b/apps/src/lib/client/signing.rs index ed7ab484a9..fc67d6a329 100644 --- a/apps/src/lib/client/signing.rs +++ b/apps/src/lib/client/signing.rs @@ -6,6 +6,7 @@ use namada::proto::Tx; use namada::types::address::{Address, ImplicitAddress}; use namada::types::key::*; use namada::types::storage::Epoch; +use namada::types::token::Amount; use namada::types::transaction::{hash_tx, Fee, WrapperTx}; use super::rpc; @@ -174,7 +175,7 @@ pub async fn sign_wrapper( let tx = { WrapperTx::new( Fee { - amount: args.fee_amount, + amount: Amount::from(100), token: ctx.get(&args.fee_token), }, keypair, diff --git a/apps/src/lib/node/ledger/shell/finalize_block.rs b/apps/src/lib/node/ledger/shell/finalize_block.rs index d762ee91d8..b54f00199a 100644 --- a/apps/src/lib/node/ledger/shell/finalize_block.rs +++ b/apps/src/lib/node/ledger/shell/finalize_block.rs @@ -2,7 +2,10 @@ use namada::ledger::pos::types::into_tm_voting_power; use namada::ledger::protocol; +use namada::ledger::storage::write_log::StorageModification; +use namada::ledger::storage_api::StorageRead; use namada::types::storage::{BlockHash, BlockResults, Header}; +use namada::types::token::Amount; use super::governance::execute_governance_proposals; use super::*; @@ -128,9 +131,80 @@ where } let mut tx_event = match &tx_type { - TxType::Wrapper(_wrapper) => { - self.storage.tx_queue.push(_wrapper.clone()); - Event::new_tx_event(&tx_type, height.0) + TxType::Wrapper(wrapper) => { + let mut tx_event = Event::new_tx_event(&tx_type, height.0); + + // Charge fee + let fee_payer = + if wrapper.pk != address::masp_tx_key().ref_to() { + wrapper.fee_payer() + } else { + address::masp() + }; + + let balance_key = token::balance_key( + &self.storage.native_token, + &fee_payer, + ); + let balance: Amount = + match self.write_log.read(&balance_key).0 { + Some(wal_mod) => { + // Read from WAL + if let StorageModification::Write { value } = + wal_mod + { + Amount::try_from_slice(value).unwrap() + } else { + Amount::default() + } + } + None => { + // Read from storage + let balance = StorageRead::read( + &self.storage, + &balance_key, + ); + // Storage read must not fail, but there might + // be no value, in which + // case default (0) is returned + balance + .expect( + "Storage read in the protocol must \ + not fail", + ) + .unwrap_or_default() + } + }; + + let balance: u64 = balance.into(); + match balance.checked_sub(100) { + Some(v) => { + self.write_log + .write( + &balance_key, + Amount::from(v).try_to_vec().unwrap(), + ) + .unwrap(); + } + None => { + // Burn remaining funds + self.write_log + .write( + &balance_key, + Amount::from(0).try_to_vec().unwrap(), + ) + .unwrap(); + tx_event["log"] = + "Insufficient balance for fee".into(); + tx_event["code"] = ErrorCodes::InvalidTx.into(); + + response.events.push(tx_event); + continue; + } + } + + self.storage.tx_queue.push(wrapper.clone()); + tx_event } TxType::Decrypted(inner) => { // We remove the corresponding wrapper tx from the queue @@ -348,15 +422,26 @@ mod test_finalize_block { let keypair = gen_keypair(); let mut processed_txs = vec![]; let mut valid_wrappers = vec![]; + + // Add unshielded balance for fee paymenty + let balance_key = token::balance_key( + &shell.storage.native_token, + &Address::from(&keypair.ref_to()), + ); + shell + .storage + .write(&balance_key, Amount::from(1000).try_to_vec().unwrap()) + .unwrap(); + // create some wrapper txs - for i in 1..5 { + for i in 1u64..5 { let raw_tx = Tx::new( "wasm_code".as_bytes().to_owned(), Some(format!("transaction data: {}", i).as_bytes().to_owned()), ); let wrapper = WrapperTx::new( Fee { - amount: i.into(), + amount: 100.into(), token: shell.storage.native_token.clone(), }, &keypair, @@ -529,6 +614,16 @@ mod test_finalize_block { let mut processed_txs = vec![]; let mut valid_txs = vec![]; + // Add unshielded balance for fee paymenty + let balance_key = token::balance_key( + &shell.storage.native_token, + &Address::from(&keypair.ref_to()), + ); + shell + .storage + .write(&balance_key, Amount::from(1000).try_to_vec().unwrap()) + .unwrap(); + // create two decrypted txs let mut wasm_path = top_level_directory(); wasm_path.push("wasm_for_tests/tx_no_op.wasm"); @@ -545,7 +640,7 @@ mod test_finalize_block { ); let wrapper_tx = WrapperTx::new( Fee { - amount: 0.into(), + amount: 100.into(), token: shell.storage.native_token.clone(), }, &keypair, @@ -576,7 +671,7 @@ mod test_finalize_block { ); let wrapper_tx = WrapperTx::new( Fee { - amount: 0.into(), + amount: 100.into(), token: shell.storage.native_token.clone(), }, &keypair, diff --git a/apps/src/lib/node/ledger/shell/mod.rs b/apps/src/lib/node/ledger/shell/mod.rs index 4c461568a9..5f17d35e1d 100644 --- a/apps/src/lib/node/ledger/shell/mod.rs +++ b/apps/src/lib/node/ledger/shell/mod.rs @@ -33,16 +33,17 @@ use namada::ledger::storage::{ }; use namada::ledger::{ibc, pos, protocol}; use namada::proto::{self, Tx}; +use namada::types::address; use namada::types::address::{masp, masp_tx_key, Address}; use namada::types::chain::ChainId; use namada::types::key::*; use namada::types::storage::{BlockHeight, Key, TxIndex}; use namada::types::time::{DateTimeUtc, TimeZone, Utc}; +use namada::types::token::{self, Amount}; use namada::types::transaction::{ hash_tx, process_tx, verify_decrypted_correctly, AffineCurve, DecryptedTx, EllipticCurve, PairingEngine, TxType, WrapperTx, }; -use namada::types::{address, token}; use namada::vm::wasm::{TxCache, VpCache}; use namada::vm::WasmCacheRwAccess; use num_derive::{FromPrimitive, ToPrimitive}; @@ -575,7 +576,30 @@ where ) -> response::CheckTx { let mut response = response::CheckTx::default(); match Tx::try_from(tx_bytes).map_err(Error::TxDecoding) { - Ok(_) => response.log = String::from("Mempool validation passed"), + Ok(tx) => { + // Check balance for fee + if let Ok(TxType::Wrapper(wrapper)) = process_tx(tx) { + let fee_payer = if wrapper.pk != masp_tx_key().ref_to() { + wrapper.fee_payer() + } else { + masp() + }; + // check that the fee payer has sufficient balance + let balance = self + .get_balance(&self.storage.native_token, &fee_payer); + + if Amount::from(100) > balance { + response.code = 1; + response.log = String::from( + "The address given does not have sufficient \ + balance to pay fee", + ); + return response; + } + } + + response.log = String::from("Mempool validation passed"); + } Err(msg) => { response.code = 1; response.log = msg.to_string(); diff --git a/apps/src/lib/node/ledger/shell/prepare_proposal.rs b/apps/src/lib/node/ledger/shell/prepare_proposal.rs index 9338ecc482..8f56f9a86a 100644 --- a/apps/src/lib/node/ledger/shell/prepare_proposal.rs +++ b/apps/src/lib/node/ledger/shell/prepare_proposal.rs @@ -13,6 +13,13 @@ use crate::facade::tendermint_proto::abci::{tx_record::TxAction, TxRecord}; use crate::node::ledger::shell::{process_tx, ShellMode}; use crate::node::ledger::shims::abcipp_shim_types::shim::TxBytes; +// TODO: remove this hard-coded value; Tendermint, and thus +// Namada uses 20 MiB max block sizes by default; 16 MiB leaves +// plenty of room for header data, evidence and protobuf serialization +// overhead +const MAX_PROPOSAL_SIZE: usize = 16 << 20; +const HALF_MAX_PROPOSAL_SIZE: usize = MAX_PROPOSAL_SIZE / 2; + impl Shell where D: DB + for<'iter> DBIter<'iter> + Sync + 'static, @@ -20,9 +27,10 @@ where { /// Begin a new block. /// - /// We include half of the new wrapper txs given to us from the mempool - /// by tendermint. The rest of the block is filled with decryptions - /// of the wrapper txs from the previously committed block. + /// We fill half the block space with new wrapper txs given to us + /// from the mempool by tendermint. The rest of the block is filled + /// with decryptions of the wrapper txs from the previously + /// committed block. /// /// INVARIANT: Any changes applied in this method must be reverted if /// the proposal is rejected (unless we can simply overwrite @@ -38,12 +46,11 @@ where // TODO: Craft the Ethereum state update tx // filter in half of the new txs from Tendermint, only keeping // wrappers - let number_of_new_txs = 1 + req.txs.len() / 2; + let mut total_proposal_size = 0; #[cfg(feature = "abcipp")] let mut txs: Vec = req .txs .into_iter() - .take(number_of_new_txs) .map(|tx_bytes| { if let Ok(Ok(TxType::Wrapper(_))) = Tx::try_from(tx_bytes.as_slice()).map(process_tx) @@ -53,12 +60,22 @@ where record::remove(tx_bytes) } }) + .take_while(|tx_record| { + let new_size = total_proposal_size + tx_record.tx.len(); + if new_size > HALF_MAX_PROPOSAL_SIZE + || tx_record.action != TxAction::Unmodified as i32 + { + false + } else { + total_proposal_size = new_size; + true + } + }) .collect(); #[cfg(not(feature = "abcipp"))] let mut txs: Vec = req .txs .into_iter() - .take(number_of_new_txs) .filter_map(|tx_bytes| { if let Ok(Ok(TxType::Wrapper(_))) = Tx::try_from(tx_bytes.as_slice()).map(process_tx) @@ -68,6 +85,15 @@ where None } }) + .take_while(|tx_bytes| { + let new_size = total_proposal_size + tx_bytes.len(); + if new_size > HALF_MAX_PROPOSAL_SIZE { + false + } else { + total_proposal_size = new_size; + true + } + }) .collect(); // decrypt the wrapper txs included in the previous block diff --git a/apps/src/lib/node/ledger/shell/process_proposal.rs b/apps/src/lib/node/ledger/shell/process_proposal.rs index 67ca13101e..0004db48e5 100644 --- a/apps/src/lib/node/ledger/shell/process_proposal.rs +++ b/apps/src/lib/node/ledger/shell/process_proposal.rs @@ -159,10 +159,12 @@ where masp() }; // check that the fee payer has sufficient balance - let balance = - self.get_balance(&tx.fee.token, &fee_payer); + let balance = self.get_balance( + &self.storage.native_token, + &fee_payer, + ); - if tx.fee.amount <= balance { + if Amount::from(100) <= balance { TxResult { code: ErrorCodes::Ok.into(), info: "Process proposal accepted this \ @@ -398,6 +400,15 @@ mod test_process_proposal { ..Default::default() }); let keypair = crate::wallet::defaults::daewon_keypair(); + // reduce address balance to match the 100 token fee + let balance_key = token::balance_key( + &shell.storage.native_token, + &Address::from(&keypair.ref_to()), + ); + shell + .storage + .write(&balance_key, Amount::from(99).try_to_vec().unwrap()) + .unwrap(); let tx = Tx::new( "wasm_code".as_bytes().to_owned(), diff --git a/core/Cargo.toml b/core/Cargo.toml index 7754310669..3df5654132 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_core" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = [] diff --git a/core/src/ledger/storage/mod.rs b/core/src/ledger/storage/mod.rs index 13d0db6c7e..f5ae0a92f5 100644 --- a/core/src/ledger/storage/mod.rs +++ b/core/src/ledger/storage/mod.rs @@ -1156,6 +1156,7 @@ pub mod testing { mod tests { use chrono::{TimeZone, Utc}; use proptest::prelude::*; + use proptest::test_runner::Config; use rust_decimal_macros::dec; use super::testing::*; @@ -1204,6 +1205,10 @@ mod tests { } proptest! { + #![proptest_config(Config { + cases: 10, + .. Config::default() + })] /// Test that: /// 1. When the minimum blocks have been created since the epoch /// start height and minimum time passed since the epoch start time, diff --git a/documentation/docs/src/testnets/README.md b/documentation/docs/src/testnets/README.md index f7a01da96e..220fd4ed72 100644 --- a/documentation/docs/src/testnets/README.md +++ b/documentation/docs/src/testnets/README.md @@ -25,7 +25,7 @@ All public testnets will be listed here: - Namada protocol version: `v0.12.0` - Tendermint version: `v0.1.4-abciplus` - Genesis time: 20th of December 2022 at 17:00 UTC - - CHAIN_ID: `TBD` + - CHAIN_ID: `public-testnet-1.0.05ab4adb9db` ## Block explorer The block explorer is currently in development. The latest version can be found at [namada.world](https://namada.world/) diff --git a/documentation/docs/src/testnets/environment-setup.md b/documentation/docs/src/testnets/environment-setup.md index 3e3af28064..ced6d8af0b 100644 --- a/documentation/docs/src/testnets/environment-setup.md +++ b/documentation/docs/src/testnets/environment-setup.md @@ -2,7 +2,7 @@ - Export the following variables: ```bash - export NAMADA_TAG=v0.12.0 + export NAMADA_TAG=v0.12.2 export TM_HASH=v0.1.4-abciplus ``` @@ -51,4 +51,4 @@ - Make sure you are using the correct tendermint version - `tendermint version` should output `0.1.4-abciplus` - Make sure you are using the correct Namada version - - `namada --version` should output `Namada v0.12.0` + - `namada --version` should output `Namada v0.12.2` diff --git a/documentation/docs/src/testnets/run-your-genesis-validator.md b/documentation/docs/src/testnets/run-your-genesis-validator.md index ccf0c1d314..9edda25eb6 100644 --- a/documentation/docs/src/testnets/run-your-genesis-validator.md +++ b/documentation/docs/src/testnets/run-your-genesis-validator.md @@ -31,7 +31,7 @@ With the new update, the folder will be located in the `.namada` folder rather t - Wait for the genesis file to be ready, `CHAIN_ID`. - Join the network with the `CHAIN_ID` ``` bash - export CHAIN_ID="TBD" + export CHAIN_ID="public-testnet-1.0.05ab4adb9db" namada client utils join-network \ --chain-id $CHAIN_ID --genesis-validator $ALIAS ``` diff --git a/documentation/docs/src/testnets/running-a-full-node.md b/documentation/docs/src/testnets/running-a-full-node.md index b8948f922a..1ce05838ad 100644 --- a/documentation/docs/src/testnets/running-a-full-node.md +++ b/documentation/docs/src/testnets/running-a-full-node.md @@ -2,7 +2,7 @@ - Wait for the genesis file to be ready, you will receive a `$CHAIN_ID`. - Join the network with the `CHAIN_ID` ```bash - export CHAIN_ID="TBD" + export CHAIN_ID="public-testnet-1.0.05ab4adb9db" namada client utils join-network --chain-id $CHAIN_ID ``` - Start your node and sync diff --git a/documentation/docs/src/user-guide/install/README.md b/documentation/docs/src/user-guide/install/README.md index 52b2ff4b87..95e39ec339 100644 --- a/documentation/docs/src/user-guide/install/README.md +++ b/documentation/docs/src/user-guide/install/README.md @@ -4,94 +4,10 @@ At the moment, Namada only supports Linux and macOS. ``` -## Hardware Requirements +Namada can be installed through the following methods: -This section covers the minimum and recommended hardware requirements for engaging with Namada as a validator node. +1. [From source](./from-source.md) +2. [From binaries](./from-binary.md) +3. [From a docker image](./from-docker.md) -### Minimal Hardware Requirements - -| Hardware | Minimal Specifications | -| -------- | -------- | -| CPU | x86_64 or arm64 processor with at least 4 physical cores | -| RAM | 16GB DDR4 | -| Storage | at least 60GB SSD (NVMe SSD is recommended. HDD will be enough for localnet only) | - -There are different ways to install Namada: - -- [From Source](#from-source) -- [From Binaries](#from-binaries) -- [From Docker](#from-docker) - -## From Source - -If you'd like to install Namada from source you will have to install some dependencies first: [Rust](https://www.rust-lang.org/tools/install), [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git), Clang, OpenSSL and LLVM. - -First, [install Rust](https://www.rust-lang.org/tools/install) by following the instructions from the official page. - -At the end of the installation, make sure that Cargo's bin directory ($HOME/.cargo/bin) is available on your PATH environment variable. You can either restart your shell or run `source $HOME/.cargo/env` to continue. - -If you already have Rust installed, make sure you're using the latest version by running: - -```shell -rustup update -``` - -Then, install the remaining dependencies. - -**Ubuntu:** running the following command should install everything needed: - -```shell -sudo apt-get install -y make git-core libssl-dev pkg-config libclang-12-dev build-essential -``` - -**Mac:** installing the Xcode command line tools should provide you with almost everything you need: - -```shell -xcode-select --install -``` - -Now, that you have all dependencies installed you can clone the source code from the [Namada repository](https://github.com/anoma/namada) and build it with: - -```admonish warning -During internal and private testnets, checkout the latest testnet branch using `git checkout $NAMADA_TESTNET_BRANCH`. -``` - -```shell -git clone https://github.com/anoma/namada.git -cd namada -make install -``` - -## From Binaries - -```admonish warning -Prebuilt binaries might not be available for a specific release or architecture, in this case you have to [build from source](#from-source). -``` - -If you'd like to install Namada from binaries you will have to install some dependencies first: [Tendermint](https://docs.tendermint.com/master/introduction/install.html) `0.34.x` and GLIBC `v2.29` or higher. - -Let's install Tendermint. - -You can either follow the instructions on the [Tendermint guide](https://docs.tendermint.com/master/introduction/install.html) or download the `get_tendermint.sh` script from the [Namada repository](https://github.com/anoma/namada/blob/master/scripts/install/get_tendermint.sh) and execute it (will ask you for `root` access): - -```shell -curl -LO https://raw.githubusercontent.com/namada/namada/main/scripts/install/get_tendermint.sh -chmod +x get_tendermint.sh -./get_tendermint.sh -``` - -Finally, you should have GLIBC `v2.29` or higher. - -**MacOS**: the system-provided glibc should be recent enough. - -**Ubuntu 20.04**: this is installed by default and you don't have to do anything more. - -**Ubuntu 18.04**: glibc has `v2.27` by default which is lower than the required version to run Namada. We recommend to directly [install from source](#from-source) or upgrade to Ubuntu 19.04, instead of updating glibc to the required version, since the latter way can be a messy and tedious task. In case, updating glibc would interest you this [website](http://www.linuxfromscratch.org/lfs/view/9.0-systemd/chapter05/glibc.html) gives you the steps to build the package from source. - -Now, that you have all dependencies installed you can download the latest binary release from our [releases page](https://github.com/anoma/namada/releases) by choosing the appropriate architecture. - -[fixme]: <> (update docker config as soon as Namada is transferred fully to Namada) - -## From Docker - -You can find the Namada docker image [here](https://github.com/anoma/namada/pkgs/container/namada) +The hardware requirements for installing and running a Namada full node can be found [here](./hardware.md) \ No newline at end of file diff --git a/documentation/docs/src/user-guide/install/from-docker.md b/documentation/docs/src/user-guide/install/from-docker.md index d4b2febbc5..745c0d71c8 100644 --- a/documentation/docs/src/user-guide/install/from-docker.md +++ b/documentation/docs/src/user-guide/install/from-docker.md @@ -1,3 +1,3 @@ ## From Docker -Go to [heliaxdev dockerhub account](https://hub.docker.com/r/heliaxdev/namada) and pull the image. \ No newline at end of file +The Namada docker image can be found [here](https://github.com/anoma/namada/pkgs/container/namada) \ No newline at end of file diff --git a/documentation/specs/src/base-ledger/default-account.md b/documentation/specs/src/base-ledger/default-account.md index fc40d1d241..ed74374e36 100644 --- a/documentation/specs/src/base-ledger/default-account.md +++ b/documentation/specs/src/base-ledger/default-account.md @@ -1,3 +1,3 @@ -## Default account +# Default account The default account validity predicate authorises transactions on the basis of a cryptographic signature. \ No newline at end of file diff --git a/documentation/specs/src/base-ledger/fungible-token.md b/documentation/specs/src/base-ledger/fungible-token.md index 3fba3fbde2..b52fe37131 100644 --- a/documentation/specs/src/base-ledger/fungible-token.md +++ b/documentation/specs/src/base-ledger/fungible-token.md @@ -1,3 +1,3 @@ -## Fungible token +# Fungible token The fungible token validity predicate authorises token balance changes on the basis of conservation-of-supply and approval-by-sender. \ No newline at end of file diff --git a/documentation/specs/src/base-ledger/multisignature.md b/documentation/specs/src/base-ledger/multisignature.md index 7be36c156a..e169841ed4 100644 --- a/documentation/specs/src/base-ledger/multisignature.md +++ b/documentation/specs/src/base-ledger/multisignature.md @@ -45,7 +45,7 @@ To verify the correctness of the signatures, this VP will proceed with a two-ste Step 1 allows us to short-circuit the validation process and avoid unnecessary processing and storage access. Each signature will be validated **only** against the public key found in the list at the specified index. Step 2 will halt as soon as it retrieves enough valid signatures to match the threshold, meaning that the remaining signatures will not be verified. -## Addresses +## Addresses The vp introduced in the previous section is available for `established` addresses. To generate a multisig account we need to modify the `InitAccount` struct to support multiple public keys and a threshold, as follows: diff --git a/documentation/specs/src/economics/images/cubic_slash.png b/documentation/specs/src/economics/images/cubic_slash.png index fc848ff298..10b441500a 100644 Binary files a/documentation/specs/src/economics/images/cubic_slash.png and b/documentation/specs/src/economics/images/cubic_slash.png differ diff --git a/documentation/specs/src/economics/proof-of-stake/cubic-slashing.md b/documentation/specs/src/economics/proof-of-stake/cubic-slashing.md index efd447cb18..891815cfc0 100644 --- a/documentation/specs/src/economics/proof-of-stake/cubic-slashing.md +++ b/documentation/specs/src/economics/proof-of-stake/cubic-slashing.md @@ -1,21 +1,22 @@ # Cubic slashing -Namada implements cubic slashing, meaning that the amount of a slash is proportional to the cube of the voting power committing infractions within a particular interval. This is designed to make it riskier to operate larger or similarly configured validators, and thus encourage network resilience. +Namada implements a slashing scheme that is called cubic slashing: the amount of a slash is proportional to the cube of the voting power committing infractions within a particular interval. This is designed to make it riskier to operate larger or similarly configured validators, and thus the scheme encourages network resilience. When a slash is detected: -1. Using the height of the infraction, calculate the epoch just after which stake bonded at the time of infraction could have been fully unbonded. Enqueue the slash for processing at the end of that epoch (so that it will be processed before unbonding could have completed, and hopefully long enough for any other misbehaviour from around the same height as this misbehaviour to also be detected). -2. Jail the validator in question (this will apply at the end of the current epoch). While the validator is jailed, it should be removed from the validator set (also being effective from the end of the current epoch). Note that this is the only instance in our proof-of-stake model when the validator set is updated without waiting for the pipeline offset. +1. Using the height of the infraction, calculate the epoch at the unbonding length relative to the current epoch. This is the final epoch before the stake that was used to commit the infraction can be fully unbonded and withdrawn. The slash is enqueued to be processed in this final epoch to allow for sufficient time to detect any other validator misbehaviors while still processing the slash before the infraction stake could be unbonded and withdrawn. +2. Jail the misbehaving validator, effective at the beginning of the next epoch. While the validator is jailed, it is removed from the validator set. Note that this is the only instance in our proof-of-stake model wherein the validator set is updated without waiting for the pipeline offset. 3. Prevent the delegators to this validator from altering their delegations in any way until the enqueued slash is processed. -At the end of each epoch, in order to process any slashes scheduled for processing at the end of that epoch: -1. Iterate over all slashes for infractions committed within a range of (-1, +1) epochs worth of block heights (this may need to be a protocol parameter) of the infraction in question. -2. Calculate the slash rate according to the following formula: +At the end of each epoch, for each slash enqueued to be processed for the end of the epoch: +1. Collect all known infractions committed within a range of [-`window_width`, +`window_width`] epochs around the infraction in question. By default, `window_width` = 1. +2. Sum the fractional voting powers (relative to the total PoS voting power) of the misbehaving validator for each of the collected nearby infractions. +3. The final slash rate for the slash in question is then dependent on this sum. Using $r_\text{nom}$ as the nominal slash rate and $\text{vp}$ to indicate voting power, the slash rate is expressed as: -$$ \sum_{i \in \text{validators}} \max \{ 0.01, \big(\frac{i_{voting-power}}{\sum_{i \in \text{validators}}i_{voting-power}}\big)^2\} $$ +$$ \max \{~r_{\text{nom}}~, ~9*\big(\sum_{i \in \text{infractions}}\frac{\text{vp}_i}{\text{vp}_{\text{tot}}}\big)^2~\}. $$ Or, in pseudocode: -```haskell = + + -As a function, it can be drawn as: +```rust +// Infraction type, where inner field is the slash rate for the type +enum Infraction { + DuplicateVote(Decimal), + LightClientAttack(Decimal) +} + +// Generic validator with an address and voting power +struct Validator { + address: Vec, + voting_power: u64, +} + +// Generic slash object with the misbehaving validator and infraction type +struct Slash { + validator: Validator, + infraction_type: Infraction, +} + +// Calculate the cubic slash rate for a slash in the current epoch +fn calculate_cubic_slash_rate( + current_epoch: u64, + nominal_slash_rate: Decimal, + cubic_window_width: u64, + slashes: Map>, + total_voting_power: u64 +) -> Decimal { + let mut vp_frac_sum = Decimal::ZERO; + + let start_epoch = current_epoch - cubic_window_width; + let end_epoch = current_epoch + cubic_window_width; + + for epoch in start_epoch..=end_epoch { + let cur_slashes = slashes.get(epoch); + let vp_frac_this_epoch = cur_slashes.iter.fold(0, |sum, Slash{validator, _}| + { sum + validator.voting_power / total_voting_power} + ); + vp_frac_sum += vp_frac_this_epoch; + } + let rate = cmp::min( + Decimal::ONE, + cmp::max( + slash.infraction_type.0, + 9 * vp_frac_sum * vp_frac_sum, + ), + ); + rate +} +``` -![cubic_slash](../images/cubic_slash.png) +As a function, it can be drawn as (assuming $r_{\text{min}} = 1\%$): -> Note: The voting power of a slash is the voting power of the validator **when they violated the protocol**, not the voting power now or at the time of any of the other infractions. This does mean that these voting powers may not sum to 1, but this method should still be close to the incentives we want, and can't really be changed without making the system easier to game. +[](../images/cubic_slash.png) 3. Set the slash rate on the now "finalised" slash in storage. -4. Update the validators' stored voting power appropriately. +4. Update the misbehaving validators' stored voting powers appropriately. 5. Delegations to the validator can now be redelegated / start unbonding / etc. -Validator can later submit a transaction to unjail themselves after a configurable period. When the transaction is applied and accepted, the validator updates its state to "candidate" and is added back to the validator set starting at the epoch at pipeline offset (into `consensus`, `below_capacity` or `below_threshold` set, depending on its voting power). +> Note: The voting power associated with a slash is the voting power of the validator **when they violated the protocol**. This does mean that these voting powers may not sum to 1, but this method should still be close to the desired incentives and cannot really be changed without making the system easier to game. + +A jailed validator can later submit a transaction to unjail themselves after a configurable period. When the transaction is applied and accepted, the validator updates its state to "candidate" and is added back to the appropriate validator set (depending on its new voting power) starting at the pipeline offset relative to the epoch in which the unjailing transaction was submitted. At present, funds slashed are sent to the governance treasury. @@ -70,8 +122,6 @@ Slashes should lead to punishment for delegators who were contributing voting po This can be implemented as a negative inflation rate for a particular block. -Instant redelegation is not supported. Redelegations must wait the unbonding period. - \ No newline at end of file diff --git a/documentation/specs/src/economics/proof-of-stake/reward-distribution.md b/documentation/specs/src/economics/proof-of-stake/reward-distribution.md index 674d125e93..3bafc08e25 100644 --- a/documentation/specs/src/economics/proof-of-stake/reward-distribution.md +++ b/documentation/specs/src/economics/proof-of-stake/reward-distribution.md @@ -1,8 +1,8 @@ # Reward distribution -Namada uses the automatically-compounding variant of [F1 fee distribution](https://drops.dagstuhl.de/opus/volltexte/2020/11974/pdf/OASIcs-Tokenomics-2019-10.pdf). +Namada uses the automatically-compounding variant of the [F1 fee distribution](https://drops.dagstuhl.de/opus/volltexte/2020/11974/pdf/OASIcs-Tokenomics-2019-10.pdf). -Rewards are given to validators for proposing blocks, for voting on finalizing blocks, and for being in the [consensus validator set](bonding-mechanism.md#validator-sets): the funds for these rewards can come from **minting** (creating new tokens). The amount that is minted depends on how many staking tokens are locked (staked) and some maximum annual inflation rate. The rewards mechanism is implemented as a [PD controller](../inflation-system.md#detailed-inflation-calculation-model) that dynamically adjusts the inflation rate to achieve a target staking token ratio. When the total fraction of tokens staked is very low, the return rate per validator needs to increase, but as the total fraction of stake rises, validators will receive fewer rewards. Once the desired staking fraction is achieved, the amount minted will just be the desired annual inflation. +Rewards are given to validators for proposing blocks, for voting on finalizing blocks, and for being in the [consensus validator set](bonding-mechanism.md#validator-sets). The funds for these rewards come from **minting** (creating new tokens). The amount that is minted depends on how many staking tokens are locked (staked) and some maximum annual inflation rate. The rewards mechanism is implemented as a [PD controller](../inflation-system.md#detailed-inflation-calculation-model) that dynamically adjusts the inflation rate to achieve a target staked token ratio. When the total fraction of tokens staked is very low, the return rate per validator needs to increase, but as the total fraction of stake rises, validators will receive fewer rewards. Once the desired staking fraction is achieved, the amount minted will just be the desired annual inflation. Each delegation to a validator is initiated at an agreed-upon commission rate charged by the validator. Validators pay out rewards to delegators based on this mutually-determined commission rate. The minted rewards are auto-bonded and only transferred when the funds are unbonded. Once the protocol determines the total amount of tokens to mint at the end of the epoch, the minted tokens are effectively divided among the relevant validators and delegators according to their proportional stake. In practice, the reward products, which are the fractional increases in staked tokens claimed, are stored for the validators and delegators, and the reward tokens are only transferred to the validator’s or delegator’s account upon withdrawal. This is described in the following sections. The general system is similar to what Cosmos does. @@ -148,10 +148,10 @@ in order to calculate the new rewards given out to the delegator during withdraw The commission rate $c_V(e)$ is the same for all delegations to a validator $V$ in a given epoch $e$, including for self-bonds. The validator can change the commission rate at any point, subject to a maximum rate of change per epoch, which is a constant specified when the validator is created and immutable once validator creation has been accepted. -While rewards are given out at the end of every epoch, voting power is only updated after the pipeline offset. According to the [proof-of-stake system](bonding-mechanism.md#epoched-data), at the current epoch `e`, the validator sets an only be updated for epoch `e + pipeline_offset`, and it should remain unchanged from epoch `e` to `e + pipeline_offset - 1`. Updating voting power in the current epoch would violate this rule. +While rewards are given out at the end of every epoch, voting power is only updated after the pipeline offset. According to the [proof-of-stake system](bonding-mechanism.md#epoched-data), at the current epoch `e`, the validator sets can only be updated for epoch `e + pipeline_offset`, and it should remain unchanged from epoch `e` to `e + pipeline_offset - 1`. Updating voting power in the current epoch would violate this rule. -## Distribution to validators +## Distribution of block rewards to validators A validator can earn a portion of the block rewards in three different ways: @@ -165,7 +165,7 @@ $$ R_p + R_s + R_b = 1, $$ where $R_p$ is the proposer reward fraction, $R_s$ is the reward fraction for the set of signers, and $R_b$ is the reward fraction for the whole active validator set. -The reward for proposing a block is dependent on the combined voting power of all validators whose signatures are included in the block. This is to incentivize the block proposer to maximize the inclusion of signatures, as blocks with more signatures are (JUSTIFY THIS POINT HERE). +The reward for proposing a block is dependent on the combined voting power of all validators whose signatures are included in the block. This is to incentivize the block proposer to maximize the inclusion of signatures, as blocks with more signatures have better security guarantees and allow for more efficient light clients. The block proposer reward is parameterized as @@ -198,9 +198,4 @@ The values of the parameters $r_p$ and $r_s$ are set in the proof-of-stake stora These rewards must be determined for every single block, but the inflationary token rewards are only minted at the end of an epoch. Thus, the rewards products are only updated at the end of an epoch as well. -In order to maintain a record of the block rewards over the course of an epoch, a reward fraction accumulator is implemented as a `Map` and held in the storage key `#{PoS}/validator_set/consensus/rewards_accumulator`. When finalizing each block, the accumulator value for each consensus validator is incremented with the fraction of that block's reward owed to the validator. At the end of the epoch when the rewards products are updated, the accumulator value is divided by the number of blocks in that epoch, which yields the fraction of the newly minted inflation tokens owed to the validator. The next entry of the rewards products for each validator can then be created. The map is then reset to be empty in preparation for the next epoch and consensus validator set. - - -TODO describe / figure out: - -- how leftover reward tokens from round-off / truncation are handled +In order to maintain a record of the block rewards over the course of an epoch, a reward fraction accumulator is implemented as a `Map` and held in the storage key `#{PoS}/validator_set/consensus/rewards_accumulator`. When finalizing each block, the accumulator value for each consensus validator is incremented with the fraction of that block's reward owed to the validator. At the end of the epoch when the rewards products are updated, the accumulator value is divided by the number of blocks in that epoch, which yields the fraction of the newly minted inflation tokens owed to the validator. The next entry of the rewards products for each validator can then be created. The map is then reset to be empty in preparation for the next epoch and consensus validator set. \ No newline at end of file diff --git a/encoding_spec/Cargo.toml b/encoding_spec/Cargo.toml index 2fc6c2cc18..6f9b17a5dd 100644 --- a/encoding_spec/Cargo.toml +++ b/encoding_spec/Cargo.toml @@ -6,7 +6,7 @@ license = "GPL-3.0" name = "namada_encoding_spec" readme = "../README.md" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = ["abciplus"] diff --git a/macros/Cargo.toml b/macros/Cargo.toml index dbd4f81cab..1307a5bfd3 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_macros" resolver = "2" -version = "0.12.0" +version = "0.12.2" [lib] proc-macro = true diff --git a/proof_of_stake/Cargo.toml b/proof_of_stake/Cargo.toml index 822ef2fabb..a27f508935 100644 --- a/proof_of_stake/Cargo.toml +++ b/proof_of_stake/Cargo.toml @@ -6,7 +6,7 @@ license = "GPL-3.0" name = "namada_proof_of_stake" readme = "../README.md" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = ["abciplus"] diff --git a/scripts/make-package.sh b/scripts/make-package.sh index 8ae06589bb..90a0429fee 100755 --- a/scripts/make-package.sh +++ b/scripts/make-package.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash # Make a release archive from built Namada binaries and dylib(s) +# depends on cargo-about 0.5.2 set -e @@ -11,8 +12,9 @@ BIN="namada namadac namadan namadaw" mkdir -p ${PACKAGE_NAME} && \ cd target/release && \ -MM_TOKEN_EXCH=$(find . -maxdepth 1 -name 'libmm_token_exch.so' -or -name 'libmm_token_exch.dll' -or -name 'libmm_token_exch.dylib') && \ -ln ${BIN} ${MM_TOKEN_EXCH} ../../${PACKAGE_NAME} && \ +ln ${BIN} ../../${PACKAGE_NAME} && \ cd ../.. && \ +ln LICENSE ${PACKAGE_NAME} && \ +cargo about generate about.hbs > ${PACKAGE_NAME}/LICENSE.thirdparty && \ tar -c -z -f ${PACKAGE_NAME}.tar.gz ${PACKAGE_NAME} && \ rm -rf ${PACKAGE_NAME} diff --git a/shared/Cargo.toml b/shared/Cargo.toml index efcd0e81a0..25b039963e 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada" resolver = "2" -version = "0.12.0" +version = "0.12.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/shared/src/vm/host_env.rs b/shared/src/vm/host_env.rs index 9e61651b5e..c6d572d8db 100644 --- a/shared/src/vm/host_env.rs +++ b/shared/src/vm/host_env.rs @@ -1758,22 +1758,26 @@ where EVAL: VpEvaluator, CA: WasmCacheAccess, { - use masp_primitives::transaction::Transaction; - use crate::types::token::Transfer; + let gas_meter = unsafe { env.ctx.gas_meter.get() }; let (tx_bytes, gas) = env .memory .read_bytes(tx_ptr, tx_len as _) .map_err(|e| vp_host_fns::RuntimeError::MemoryError(Box::new(e)))?; vp_host_fns::add_gas(gas_meter, gas)?; + let full_tx: Transfer = - BorshDeserialize::try_from_slice(tx_bytes.as_slice()).unwrap(); - let shielded_tx: Transaction = full_tx.shielded.unwrap(); - Ok(HostEnvResult::from(crate::ledger::masp::verify_shielded_tx( - &shielded_tx, - )) - .to_i64()) + BorshDeserialize::try_from_slice(tx_bytes.as_slice()) + .map_err(vp_host_fns::RuntimeError::EncodingError)?; + + match full_tx.shielded { + Some(shielded_tx) => Ok(HostEnvResult::from( + crate::ledger::masp::verify_shielded_tx(&shielded_tx), + ) + .to_i64()), + None => Ok(HostEnvResult::Fail.to_i64()), + } } /// Log a string from exposed to the wasm VM Tx environment. The message will be diff --git a/tests/Cargo.toml b/tests/Cargo.toml index 4403453dc9..b4c4065ec0 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_tests" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = ["abciplus", "wasm-runtime"] diff --git a/tests/src/e2e/ledger_tests.rs b/tests/src/e2e/ledger_tests.rs index dc129818c3..6394e79c3d 100644 --- a/tests/src/e2e/ledger_tests.rs +++ b/tests/src/e2e/ledger_tests.rs @@ -323,11 +323,11 @@ fn ledger_txs_and_queries() -> Result<()> { NAM, "--amount", "10.1", - "--fee-amount", + "--gas-amount", "0", "--gas-limit", "0", - "--fee-token", + "--gas-token", NAM, "--ledger-address", &validator_one_rpc, diff --git a/tx_prelude/Cargo.toml b/tx_prelude/Cargo.toml index 945f14ad7b..447867ac7d 100644 --- a/tx_prelude/Cargo.toml +++ b/tx_prelude/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_tx_prelude" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = ["abciplus"] diff --git a/vm_env/Cargo.toml b/vm_env/Cargo.toml index cf4e6a7d9f..11be9ef2e1 100644 --- a/vm_env/Cargo.toml +++ b/vm_env/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_vm_env" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = ["abciplus"] diff --git a/vp_prelude/Cargo.toml b/vp_prelude/Cargo.toml index a0d76feadc..8ea87a3426 100644 --- a/vp_prelude/Cargo.toml +++ b/vp_prelude/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_vp_prelude" resolver = "2" -version = "0.12.0" +version = "0.12.2" [features] default = ["abciplus"] diff --git a/wasm/Cargo.lock b/wasm/Cargo.lock index a3f84ae2e1..35d906c305 100644 --- a/wasm/Cargo.lock +++ b/wasm/Cargo.lock @@ -2456,7 +2456,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "namada" -version = "0.12.0" +version = "0.12.2" dependencies = [ "async-trait", "bellman", @@ -2500,7 +2500,7 @@ dependencies = [ [[package]] name = "namada_core" -version = "0.12.0" +version = "0.12.2" dependencies = [ "ark-bls12-381", "ark-serialize", @@ -2541,7 +2541,7 @@ dependencies = [ [[package]] name = "namada_macros" -version = "0.12.0" +version = "0.12.2" dependencies = [ "proc-macro2", "quote", @@ -2550,7 +2550,7 @@ dependencies = [ [[package]] name = "namada_proof_of_stake" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "derivative", @@ -2564,7 +2564,7 @@ dependencies = [ [[package]] name = "namada_tests" -version = "0.12.0" +version = "0.12.2" dependencies = [ "chrono", "concat-idents", @@ -2593,7 +2593,7 @@ dependencies = [ [[package]] name = "namada_tx_prelude" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "masp_primitives", @@ -2608,7 +2608,7 @@ dependencies = [ [[package]] name = "namada_vm_env" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "hex", @@ -2619,7 +2619,7 @@ dependencies = [ [[package]] name = "namada_vp_prelude" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "namada_core", @@ -2632,7 +2632,7 @@ dependencies = [ [[package]] name = "namada_wasm" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "getrandom 0.2.8", @@ -4602,7 +4602,7 @@ dependencies = [ [[package]] name = "tx_template" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "getrandom 0.2.8", @@ -4739,7 +4739,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vp_template" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "getrandom 0.2.8", diff --git a/wasm/checksums.json b/wasm/checksums.json index eb4686a990..28920cb703 100644 --- a/wasm/checksums.json +++ b/wasm/checksums.json @@ -1,20 +1,20 @@ { - "tx_bond.wasm": "tx_bond.14ebbb45aad0e1301df40a5c412679c05078903794b6caaa2b52e24d9bbb7594.wasm", - "tx_change_validator_commission.wasm": "tx_change_validator_commission.cd861e0e82f4934be6d8382d6fff98286b4fadbc20ab826b9e817f6666021273.wasm", - "tx_ibc.wasm": "tx_ibc.dc7969c3f1a0f1bfb8e1c942e09f9c2678c2217846e607ee39ea0a7022258bdd.wasm", - "tx_init_account.wasm": "tx_init_account.87ece7f13b327f7d15c5b6e7083b510debb1c3205bafe9e36457c8585beeb49c.wasm", - "tx_init_proposal.wasm": "tx_init_proposal.c39152be5435cf3f7588ddcde82b801e98902079a152ae3df30bac69833e3ebb.wasm", - "tx_init_validator.wasm": "tx_init_validator.56d563e4b9001790d9089ff91c6c98cde95032fb57d97122e58e8b5e363fc13f.wasm", - "tx_reveal_pk.wasm": "tx_reveal_pk.47bc922a8be5571620a647ae442a1af7d03d05d29bef95f0b32cdfe00b11fee9.wasm", - "tx_transfer.wasm": "tx_transfer.c75399e44b86e22084937b69b2f6c9b9ae112706ac9f8c472d3646fc36cfaa06.wasm", - "tx_unbond.wasm": "tx_unbond.c0a690d0ad43a94294a6405bae3327f638a657446c74dc61dbb3a4d2ce488b5e.wasm", + "tx_bond.wasm": "tx_bond.ca30060af7fd7e9a8573c6ee157dccc1e2f3612383716d6bb2ca0b06026f1856.wasm", + "tx_change_validator_commission.wasm": "tx_change_validator_commission.7d09576a72068734b8e259df35ce98fabe98db990c337588793a616aa095d24f.wasm", + "tx_ibc.wasm": "tx_ibc.92813d74be4f538b7599236f948498a6f41248f9470cce1410245460f968509b.wasm", + "tx_init_account.wasm": "tx_init_account.9f01fbd633bf6197cec25c1459706e0a9eeb209f02770bebf60b58668f296449.wasm", + "tx_init_proposal.wasm": "tx_init_proposal.61e6a2dcdcbb21e5b75fd222d41bacb8cce8079ee59343c0d6121cf2e979a192.wasm", + "tx_init_validator.wasm": "tx_init_validator.0e467208eedbc236ff899abe2afdd3d4b7ceae5bd2f74a6a884d8de68d77867f.wasm", + "tx_reveal_pk.wasm": "tx_reveal_pk.05dfde69e33f0833fc25ad653066da73ef04a2b2f7894ba9fa509d2dd759ae8b.wasm", + "tx_transfer.wasm": "tx_transfer.67251510b104fc2485fe15c02bea2adb53d5b48b83fb04c19eeceba99d0b3d8c.wasm", + "tx_unbond.wasm": "tx_unbond.59758396baa9c88432610a3912fa98060f07430fc182736eba7bfb1d53f4b71d.wasm", "tx_update_vp.wasm": "tx_update_vp.ee2e9b882c4accadf4626e87d801c9ac8ea8c61ccea677e0532fc6c1ee7db6a2.wasm", - "tx_vote_proposal.wasm": "tx_vote_proposal.263fd9f4cb40f283756f394d86bdea3417e9ecd0568d6582c07a5b6bd14287d6.wasm", - "tx_withdraw.wasm": "tx_withdraw.8f53ce136e07c4d1a09bebf2d3d0eba77828622a8c95d5bb3a14b6f934f0cf0d.wasm", - "vp_implicit.wasm": "vp_implicit.5b71d2ab5a9fe9bc21f116f978d1c6b8889ea835386605f7ccfc1204fff79867.wasm", - "vp_masp.wasm": "vp_masp.5620cb6e555161641337d308851c760fbab4f9d3693cfd378703aa55e285249d.wasm", - "vp_testnet_faucet.wasm": "vp_testnet_faucet.55df1439dfc51ce9bbf592e9dd74036138f749be50e09fbcfb879d582b625b35.wasm", - "vp_token.wasm": "vp_token.dfde368a9e52cbda5aec60fa54d73ee0d36abac31fa3342098ebb29100a0f5b5.wasm", - "vp_user.wasm": "vp_user.33e5dd9f09f7d4ab61330a46edc72ca9063eeff224b9b751e3c1e8124282df2c.wasm", - "vp_validator.wasm": "vp_validator.f5ba5c2dfa46ce3b223df7ec2fd879e86a903ad382beda113c0f0f457a479553.wasm" + "tx_vote_proposal.wasm": "tx_vote_proposal.7764e840c0208e33c1d36248d90bbac1b46b3895da856f3b43023e4514452f7f.wasm", + "tx_withdraw.wasm": "tx_withdraw.b12de7e85658ccf62cf768b4453cfb0874a69b2a44cc6700bfa6d2051cc76951.wasm", + "vp_implicit.wasm": "vp_implicit.6ed791b49045ec27261e443b136890a82503b3647eca8e1e9c41c5fa9718b963.wasm", + "vp_masp.wasm": "vp_masp.55b19f9f592ed699af841905530e4b753117203afb4444c9add61ea10bda8d10.wasm", + "vp_testnet_faucet.wasm": "vp_testnet_faucet.044176fd93e4158f1e0c3a872bcd5a9a5fd6c25cff9b1e0055f9b6ace6a54870.wasm", + "vp_token.wasm": "vp_token.31036edb5bc48f4c9d6915486e61e5c4aadc1e8d8602d658b27f1789b2697e35.wasm", + "vp_user.wasm": "vp_user.675c2a29d5e5383a6d465bd88dd9a4586f4a2821db2f13fd2662963ac3906527.wasm", + "vp_validator.wasm": "vp_validator.cdbd8e31bffe2911e7b4a89f4aad408a8cf7a103b1463acdd932f680f16641d3.wasm" } \ No newline at end of file diff --git a/wasm/tx_template/Cargo.toml b/wasm/tx_template/Cargo.toml index 345ec86237..515a8adfe7 100644 --- a/wasm/tx_template/Cargo.toml +++ b/wasm/tx_template/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "tx_template" resolver = "2" -version = "0.12.0" +version = "0.12.2" [lib] crate-type = ["cdylib"] diff --git a/wasm/vp_template/Cargo.toml b/wasm/vp_template/Cargo.toml index 07ae7758db..d8f3383d9c 100644 --- a/wasm/vp_template/Cargo.toml +++ b/wasm/vp_template/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "vp_template" resolver = "2" -version = "0.12.0" +version = "0.12.2" [lib] crate-type = ["cdylib"] diff --git a/wasm/wasm_source/Cargo.toml b/wasm/wasm_source/Cargo.toml index 36731a505b..043cea9684 100644 --- a/wasm/wasm_source/Cargo.toml +++ b/wasm/wasm_source/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_wasm" resolver = "2" -version = "0.12.0" +version = "0.12.2" [lib] crate-type = ["cdylib"] diff --git a/wasm_for_tests/wasm_source/Cargo.lock b/wasm_for_tests/wasm_source/Cargo.lock index 1abb89a73c..b77ffec187 100644 --- a/wasm_for_tests/wasm_source/Cargo.lock +++ b/wasm_for_tests/wasm_source/Cargo.lock @@ -2456,7 +2456,7 @@ checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" [[package]] name = "namada" -version = "0.12.0" +version = "0.12.2" dependencies = [ "async-trait", "bellman", @@ -2500,7 +2500,7 @@ dependencies = [ [[package]] name = "namada_core" -version = "0.12.0" +version = "0.12.2" dependencies = [ "ark-bls12-381", "ark-serialize", @@ -2541,7 +2541,7 @@ dependencies = [ [[package]] name = "namada_macros" -version = "0.12.0" +version = "0.12.2" dependencies = [ "quote", "syn", @@ -2549,7 +2549,7 @@ dependencies = [ [[package]] name = "namada_proof_of_stake" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "derivative", @@ -2563,7 +2563,7 @@ dependencies = [ [[package]] name = "namada_tests" -version = "0.12.0" +version = "0.12.2" dependencies = [ "chrono", "concat-idents", @@ -2592,7 +2592,7 @@ dependencies = [ [[package]] name = "namada_tx_prelude" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "masp_primitives", @@ -2607,7 +2607,7 @@ dependencies = [ [[package]] name = "namada_vm_env" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "hex", @@ -2618,7 +2618,7 @@ dependencies = [ [[package]] name = "namada_vp_prelude" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "namada_core", @@ -2631,7 +2631,7 @@ dependencies = [ [[package]] name = "namada_wasm_for_tests" -version = "0.12.0" +version = "0.12.2" dependencies = [ "borsh", "getrandom 0.2.8", diff --git a/wasm_for_tests/wasm_source/Cargo.toml b/wasm_for_tests/wasm_source/Cargo.toml index dd17f4c0dc..51fb617201 100644 --- a/wasm_for_tests/wasm_source/Cargo.toml +++ b/wasm_for_tests/wasm_source/Cargo.toml @@ -4,7 +4,7 @@ edition = "2021" license = "GPL-3.0" name = "namada_wasm_for_tests" resolver = "2" -version = "0.12.0" +version = "0.12.2" [lib] crate-type = ["cdylib"]