Skip to content

Commit b81f0ca

Browse files
committed
Merge branch 'main' into yuji/upstream-hermes
2 parents 73d8a00 + e6a385b commit b81f0ca

File tree

44 files changed

+252
-169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+252
-169
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Print tx's events in output of `namadac tx-result`.
2+
([\#4347](https://github.com/anoma/namada/pull/4347))

.changelog/libs-v0.47.2/summary.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Namada libs v0.47.2 patch release.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Updated Namada libraries to lib-v0.47.2
2+
([\#4363](https://github.com/anoma/namada/pull/4363))

.changelog/v1.1.2/summary.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Namada apps v1.1.2 patch release.

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# CHANGELOG
22

3+
## v1.1.2
4+
5+
Namada apps v1.1.2 patch release.
6+
7+
### MISCELLANEOUS
8+
9+
- Updated Namada libraries to lib-v0.47.2
10+
([\#4363](https://github.com/anoma/namada/pull/4363))
11+
312
## v1.1.1
413

514
Namada apps v1.1.1 patch release.
@@ -27,6 +36,15 @@ Namada v1.0.0 is the first stable release of the Namada apps.
2736
- updated namada libraries to libs-v0.46.1
2837
([\#4123](https://github.com/anoma/namada/pull/4123))
2938

39+
## libs-v0.47.2
40+
41+
Namada libs v0.47.2 patch release.
42+
43+
### IMPROVEMENTS
44+
45+
- Print tx's events in output of `namadac tx-result`.
46+
([\#4347](https://github.com/anoma/namada/pull/4347))
47+
3048
## libs-v0.47.1
3149

3250
Namada libs v0.47.1 patch release.

Cargo.lock

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/account/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ proptest = { workspace = true, optional = true }
3131
serde.workspace = true
3232

3333
[dev-dependencies]
34-
namada_core = { workspace = true, features = ["testing"] }
34+
namada_core = { path = "../core", features = ["testing"] }
3535

3636
proptest.workspace = true

crates/apps/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ winapi.workspace = true
7979
[dev-dependencies]
8080

8181
[build-dependencies]
82+
cargo_metadata.workspace = true
8283
git2.workspace = true

crates/apps_lib/build.rs crates/apps/build.rs

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1+
use std::env;
12
use std::fs::File;
23
use std::io::Write;
3-
use std::str;
4+
use std::path::PathBuf;
45

56
use cargo_metadata::MetadataCommand;
67
use git2::{DescribeFormatOptions, DescribeOptions, Repository};
78

8-
/// Path to the .proto source files, relative to `apps_lib` directory
9-
const PROTO_SRC: &str = "./proto";
10-
119
fn main() {
1210
// Discover the repository version, if it exists
1311
println!("cargo:rerun-if-changed=../../.git");
@@ -23,8 +21,10 @@ fn main() {
2321
Some(describe) => describe.format(Some(&describe_format)).ok(),
2422
None => None,
2523
};
24+
let out_dir = env::var("OUT_DIR").unwrap();
2625
let mut version_rs =
27-
File::create("./version.rs").expect("cannot write version");
26+
File::create(PathBuf::from_iter([&out_dir, "version.rs"]))
27+
.expect("cannot write version");
2828
let pre = "pub fn namada_version() -> &'static str { \"";
2929
let post = "\" }";
3030
match version_string {
@@ -47,7 +47,7 @@ fn main() {
4747
"--locked".to_string(),
4848
"--offline".to_string(),
4949
])
50-
.manifest_path("../apps/Cargo.toml")
50+
.manifest_path("./Cargo.toml")
5151
.exec()
5252
.ok()
5353
.and_then(|metadata| {
@@ -69,7 +69,4 @@ fn main() {
6969
.expect("cannot write version");
7070
}
7171
};
72-
73-
// Tell Cargo that if the given file changes, to rerun this build script.
74-
println!("cargo:rerun-if-changed={}", PROTO_SRC);
7572
}

crates/apps/src/bin/namada-client/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async fn main() -> Result<()> {
1515
// run the CLI
1616
CliApi::handle_client_command::<HttpClient, _>(
1717
None,
18-
cli::namada_client_cli()?,
18+
cli::namada_client_cli(namada_apps::namada_version())?,
1919
CliIo,
2020
)
2121
.await

crates/apps/src/bin/namada-node/cli.rs

+13-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use namada_apps_lib::time::{DateTimeUtc, Utc};
1111
use namada_node as node;
1212

1313
pub fn main() -> Result<()> {
14-
let cmd = cli::namada_node_cli()?;
14+
let cmd = cli::namada_node_cli(namada_apps::namada_version())?;
1515
match cmd {
1616
cli::NamadaNode::Ledger(cmd, ctx) => match cmd {
1717
cmds::Ledger::Run(cmds::LedgerRun(args)) => {
@@ -28,15 +28,25 @@ pub fn main() -> Result<()> {
2828
);
2929
ScheduledMigration::from_path(p, hash, height).unwrap()
3030
});
31-
node::run(chain_ctx.config, wasm_dir, scheduled_migration);
31+
node::run(
32+
chain_ctx.config,
33+
wasm_dir,
34+
scheduled_migration,
35+
namada_apps::namada_version(),
36+
);
3237
}
3338
cmds::Ledger::RunUntil(cmds::LedgerRunUntil(args)) => {
3439
let mut chain_ctx = ctx.take_chain_or_exit();
3540
let wasm_dir = chain_ctx.wasm_dir();
3641
sleep_until(args.time);
3742
chain_ctx.config.ledger.shell.action_at_height =
3843
Some(args.action_at_height);
39-
node::run(chain_ctx.config, wasm_dir, None);
44+
node::run(
45+
chain_ctx.config,
46+
wasm_dir,
47+
None,
48+
namada_apps::namada_version(),
49+
);
4050
}
4151
cmds::Ledger::Reset(_) => {
4252
let chain_ctx = ctx.take_chain_or_exit();

crates/apps/src/bin/namada-relayer/_main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ async fn main() -> Result<()> {
1212
// init logging
1313
logging::init_from_env_or(LevelFilter::INFO)?;
1414

15-
let cmd = cli::namada_relayer_cli()?;
15+
let cmd = cli::namada_relayer_cli(namada_apps::namada_version())?;
1616
// run the CLI
1717
CliApi::handle_relayer_command::<HttpClient>(None, cmd, CliIo).await
1818
}

crates/apps/src/bin/namada-wallet/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use namada_apps_lib::cli::api::{CliApi, CliIo};
55
#[tokio::main]
66
pub async fn main() -> Result<()> {
77
color_eyre::install()?;
8-
let (cmd, ctx) = cli::namada_wallet_cli()?;
8+
let (cmd, ctx) = cli::namada_wallet_cli(namada_apps::namada_version())?;
99
// run the CLI
1010
CliApi::handle_wallet_command(cmd, ctx, &CliIo).await
1111
}

crates/apps/src/bin/namada/cli.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use eyre::Result;
1212
use namada_apps_lib::cli;
1313

1414
pub fn main() -> Result<()> {
15-
let (cmd, raw_sub_cmd) = cli::namada_cli();
15+
let (cmd, raw_sub_cmd) = cli::namada_cli(namada_apps::namada_version());
1616
handle_command(cmd, raw_sub_cmd)
1717
}
1818

@@ -69,12 +69,13 @@ fn handle_command(cmd: cli::cmds::Namada, raw_sub_cmd: String) -> Result<()> {
6969
use clap_complete::{generate, shells};
7070
use clap_complete_nushell::Nushell;
7171

72+
let version = namada_apps::namada_version();
7273
for (mut app, name) in [
73-
(cli::namada_app(), "namada"),
74-
(cli::namada_node_app(), "namadan"),
75-
(cli::namada_client_app(), "namadac"),
76-
(cli::namada_wallet_app(), "namadaw"),
77-
(cli::namada_relayer_app(), "namadar"),
74+
(cli::namada_app(version), "namada"),
75+
(cli::namada_node_app(version), "namadan"),
76+
(cli::namada_client_app(version), "namadac"),
77+
(cli::namada_wallet_app(version), "namadaw"),
78+
(cli::namada_relayer_app(version), "namadar"),
7879
] {
7980
match shell {
8081
cli::args::Shell::Bash => {

crates/apps/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Imports `pub fn namada_version() -> &'static str` made by build script
2+
include!(concat!(env!("OUT_DIR"), "/version.rs"));

crates/apps_lib/Cargo.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,11 @@ tracing.workspace = true
8484
zeroize.workspace = true
8585

8686
[dev-dependencies]
87-
namada_sdk = { workspace = true, default-features = true, features = [
87+
namada_sdk = { path = "../sdk", default-features = true, features = [
8888
"testing",
8989
] }
9090

9191
bit-set.workspace = true
9292
proptest.workspace = true
9393
lazy_static.workspace = true
9494
pretty_assertions.workspace = true
95-
96-
[build-dependencies]
97-
cargo_metadata.workspace = true
98-
git2.workspace = true

crates/apps_lib/src/cli.rs

+23-23
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ pub use utils::{safe_exit, Cmd};
2222
pub use self::context::Context;
2323
use crate::cli::api::CliIo;
2424

25-
include!("../version.rs");
26-
2725
const APP_NAME: &str = "Namada";
2826

2927
// Main Namada sub-commands
@@ -9045,16 +9043,16 @@ pub mod args {
90459043
}
90469044
}
90479045

9048-
pub fn namada_cli() -> (cmds::Namada, String) {
9049-
let app = namada_app();
9046+
pub fn namada_cli(version: &'static str) -> (cmds::Namada, String) {
9047+
let app = namada_app(version);
90509048
let matches = app.get_matches();
90519049
let raw_sub_cmd =
90529050
matches.subcommand().map(|(raw, _matches)| raw.to_string());
90539051
let result = cmds::Namada::parse(&matches);
90549052
match (result, raw_sub_cmd) {
90559053
(Some(cmd), Some(raw_sub)) => return (cmd, raw_sub),
90569054
_ => {
9057-
namada_app().print_help().unwrap();
9055+
namada_app(version).print_help().unwrap();
90589056
}
90599057
}
90609058
safe_exit(2);
@@ -9067,8 +9065,8 @@ pub enum NamadaNode {
90679065
Utils(cmds::NodeUtils, args::Global),
90689066
}
90699067

9070-
pub fn namada_node_cli() -> Result<NamadaNode> {
9071-
let app = namada_node_app();
9068+
pub fn namada_node_cli(version: &'static str) -> Result<NamadaNode> {
9069+
let app = namada_node_app(version);
90729070
let matches = app.clone().get_matches();
90739071
match Cmd::parse(&matches) {
90749072
Some(cmd) => {
@@ -9101,8 +9099,8 @@ pub enum NamadaClient {
91019099
WithContext(Box<(cmds::NamadaClientWithContext, Context)>),
91029100
}
91039101

9104-
pub fn namada_client_cli() -> Result<NamadaClient> {
9105-
let app = namada_client_app();
9102+
pub fn namada_client_cli(version: &'static str) -> Result<NamadaClient> {
9103+
let app = namada_client_app(version);
91069104
let matches = app.clone().get_matches();
91079105
match Cmd::parse(&matches) {
91089106
Some(cmd) => {
@@ -9128,8 +9126,10 @@ pub fn namada_client_cli() -> Result<NamadaClient> {
91289126
}
91299127
}
91309128

9131-
pub fn namada_wallet_cli() -> Result<(cmds::NamadaWallet, Context)> {
9132-
let app = namada_wallet_app();
9129+
pub fn namada_wallet_cli(
9130+
version: &'static str,
9131+
) -> Result<(cmds::NamadaWallet, Context)> {
9132+
let app = namada_wallet_app(version);
91339133
cmds::NamadaWallet::parse_or_print_help(app)
91349134
}
91359135

@@ -9139,8 +9139,8 @@ pub enum NamadaRelayer {
91399139
ValidatorSet(cmds::ValidatorSet),
91409140
}
91419141

9142-
pub fn namada_relayer_cli() -> Result<NamadaRelayer> {
9143-
let app = namada_relayer_app();
9142+
pub fn namada_relayer_cli(version: &'static str) -> Result<NamadaRelayer> {
9143+
let app = namada_relayer_app(version);
91449144
let matches = app.clone().get_matches();
91459145
match Cmd::parse(&matches) {
91469146
Some(cmd) => match cmd {
@@ -9168,49 +9168,49 @@ pub fn namada_relayer_cli() -> Result<NamadaRelayer> {
91689168
}
91699169
}
91709170

9171-
pub fn namada_app() -> App {
9171+
pub fn namada_app(version: &'static str) -> App {
91729172
let app = App::new(APP_NAME)
9173-
.version(namada_version())
9173+
.version(version)
91749174
.about("Namada command line interface.")
91759175
.color(ColorChoice::Auto)
91769176
.subcommand_required(true)
91779177
.arg_required_else_help(true);
91789178
cmds::Namada::add_sub(args::Global::def(app))
91799179
}
91809180

9181-
pub fn namada_node_app() -> App {
9181+
pub fn namada_node_app(version: &'static str) -> App {
91829182
let app = App::new(APP_NAME)
9183-
.version(namada_version())
9183+
.version(version)
91849184
.about("Namada node command line interface.")
91859185
.color(ColorChoice::Auto)
91869186
.subcommand_required(true)
91879187
.arg_required_else_help(true);
91889188
cmds::NamadaNode::add_sub(args::Global::def(app))
91899189
}
91909190

9191-
pub fn namada_client_app() -> App {
9191+
pub fn namada_client_app(version: &'static str) -> App {
91929192
let app = App::new(APP_NAME)
9193-
.version(namada_version())
9193+
.version(version)
91949194
.about("Namada client command line interface.")
91959195
.color(ColorChoice::Auto)
91969196
.subcommand_required(true)
91979197
.arg_required_else_help(true);
91989198
cmds::NamadaClient::add_sub(args::Global::def(app))
91999199
}
92009200

9201-
pub fn namada_wallet_app() -> App {
9201+
pub fn namada_wallet_app(version: &'static str) -> App {
92029202
let app = App::new(APP_NAME)
9203-
.version(namada_version())
9203+
.version(version)
92049204
.about("Namada wallet command line interface.")
92059205
.color(ColorChoice::Auto)
92069206
.subcommand_required(true)
92079207
.arg_required_else_help(true);
92089208
cmds::NamadaWallet::add_sub(args::Global::def(app))
92099209
}
92109210

9211-
pub fn namada_relayer_app() -> App {
9211+
pub fn namada_relayer_app(version: &'static str) -> App {
92129212
let app = App::new(APP_NAME)
9213-
.version(namada_version())
9213+
.version(version)
92149214
.about("Namada relayer command line interface.")
92159215
.subcommand_required(true);
92169216
cmds::NamadaRelayer::add_sub(args::Global::def(app))

crates/ethereum_bridge/Cargo.toml

+9-11
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,15 @@ thiserror.workspace = true
5252
tracing = "0.1.30"
5353

5454
[dev-dependencies]
55-
namada_account.workspace = true
56-
namada_core = { workspace = true, features = ["ethers-derive", "testing"] }
57-
namada_gas.workspace = true
58-
namada_governance.workspace = true
59-
namada_proof_of_stake = { workspace = true, features = ["testing"] }
60-
namada_state = { workspace = true, features = ["testing"] }
61-
namada_token = { workspace = true, features = ["testing"] }
62-
namada_tx = { workspace = true, features = ["testing"] }
63-
namada_vm = { workspace = true, default-features = true, features = [
64-
"testing",
65-
] }
55+
namada_account.path = "../account"
56+
namada_core = { path = "../core", features = ["ethers-derive", "testing"] }
57+
namada_gas.path = "../gas"
58+
namada_governance.path = "../governance"
59+
namada_proof_of_stake = { path = "../proof_of_stake", features = ["testing"] }
60+
namada_state = { path = "../state", features = ["testing"] }
61+
namada_token = { path = "../token", features = ["testing"] }
62+
namada_tx = { path = "../tx", features = ["testing"] }
63+
namada_vm = { path = "../vm", default-features = true, features = ["testing"] }
6664
namada_vp.workspace = true
6765

6866
assert_matches.workspace = true

0 commit comments

Comments
 (0)