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

Gas&fee updates #2091

Merged
merged 18 commits into from
Nov 11, 2023
Merged
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
3 changes: 3 additions & 0 deletions .changelog/unreleased/improvements/2091-gas-fee-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Updated the gas costs. Introduced a local validator configuration
parameter to set the accepted tokens and amounts for fees.
([\#2091](https://github.com/anoma/namada/pull/2091))
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ clean:
$(cargo) clean

bench:
$(cargo) bench
$(cargo) bench --package namada_benchmarks

build-doc:
$(cargo) doc --no-deps
Expand Down
18 changes: 18 additions & 0 deletions apps/src/bin/namada-node/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use eyre::{Context, Result};
use namada::types::time::{DateTimeUtc, Utc};
use namada_apps::cli::{self, cmds};
use namada_apps::config::ValidatorLocalConfig;
use namada_apps::node::ledger;

pub fn main() -> Result<()> {
Expand Down Expand Up @@ -57,6 +58,23 @@ pub fn main() -> Result<()> {
);
}
}
cmds::Config::UpdateLocalConfig(cmds::LocalConfig(args)) => {
// Validate the new config
let updated_config = std::fs::read(args.config_path).unwrap();
let _validator_local_config: ValidatorLocalConfig =
toml::from_slice(&updated_config).unwrap();

// Update the validator configuration file with the new one
let config_path = ctx
.global_args
.base_dir
.join(format!(
"{}",
ctx.chain.unwrap().config.ledger.chain_id
))
.join("validator_local_config.toml");
std::fs::write(config_path, updated_config).unwrap();
}
},
}
Ok(())
Expand Down
Loading
Loading