Skip to content

Commit

Permalink
Merge branch 'development' into libp2p
Browse files Browse the repository at this point in the history
* development:
  chore: new release esmeralda v1.7.0-pre.0 (tari-project#6625)
  fix: example mainnet config seed section (tari-project#6624)
  feat: improve base node connection from the wallet (tari-project#6619)
  chore: update pre mine funds (tari-project#6623)
  feat: upgrade utils (tari-project#6621)
  feat: update pre-mine specification (tari-project#6622)
  feat: add FFI function to create seed words from Mbase58 encrypted cipher seed (tari-project#6620)
  • Loading branch information
sdbondi committed Oct 14, 2024
2 parents 924e1b5 + 186d0d5 commit 0ee154c
Show file tree
Hide file tree
Showing 58 changed files with 1,971 additions and 724 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ The recommended running versions of each network are:
| Network | Version |
|-----------|----------------|
| Stagenet | 1.0.0-alpha.0a |
| Nextnet | 1.5.1-rc.0 |
| Esmeralda | 1.5.1-pre.0 |
| Nextnet | 1.7.0-rc.0 |
| Esmeralda | 1.7.0-pre.0 |

For more detail about versioning, see [Release Ideology](https://github.com/tari-project/tari/blob/development/docs/src/branching_releases.md).

Expand Down
10 changes: 5 additions & 5 deletions applications/minotari_app_grpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ authors = ["The Tari Development Community"]
description = "This crate is to provide a single source for all cross application grpc files and conversions to and from tari::core"
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
edition = "2021"

[dependencies]
tari_network = { workspace = true }
tari_common_types = { path = "../../base_layer/common_types" }
tari_core = { path = "../../base_layer/core" }
tari_crypto = { version = "0.20.3" }
tari_crypto = { version = "0.21.0" }
tari_script = { path = "../../infrastructure/tari_script" }
tari_max_size = { path = "../../infrastructure/max_size" }
tari_utilities = { version = "0.7" }
tari_utilities = { version = "0.8" }

argon2 = { version = "0.4.1", features = ["std", "password-hash"] }
base64 = "0.13.0"
borsh = "1.2"
borsh = "1.5"
chrono = { version = "0.4.19", default-features = false }
log = "0.4"
prost = "0.13.3"
Expand All @@ -32,7 +32,7 @@ tonic = { version = "0.12.3", features = ["tls"] }
zeroize = "1"

[build-dependencies]
tari_features = { path = "../../common/tari_features", version = "1.6.0-pre.0" }
tari_features = { path = "../../common/tari_features", version = "1.7.0-pre.0" }
tonic-build = "0.12.3"

[package.metadata.cargo-machete]
Expand Down
6 changes: 3 additions & 3 deletions applications/minotari_app_utilities/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minotari_app_utilities"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
authors = ["The Tari Development Community"]
edition = "2018"
license = "BSD-3-Clause"
Expand All @@ -9,7 +9,7 @@ license = "BSD-3-Clause"
tari_common = { path = "../../common" }
tari_common_types = { path = "../../base_layer/common_types" }
tari_network = { workspace = true }
tari_utilities = { version = "0.7" }
tari_utilities = { version = "0.8" }
minotari_app_grpc = { path = "../minotari_app_grpc", optional = true }

clap = { version = "3.2", features = ["derive", "env"] }
Expand All @@ -30,7 +30,7 @@ tari_common = { path = "../../common", features = [
"build",
"static-application-info",
] }
tari_features = { path = "../../common/tari_features", version = "1.6.0-pre.0" }
tari_features = { path = "../../common/tari_features", version = "1.7.0-pre.0" }

[features]
miner_input = ["minotari_app_grpc"]
10 changes: 5 additions & 5 deletions applications/minotari_console_wallet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
[package]
name = "minotari_console_wallet"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
authors = ["The Tari Development Community"]
edition = "2018"
license = "BSD-3-Clause"

[dependencies]
minotari_app_grpc = { path = "../minotari_app_grpc" }
minotari_app_utilities = { path = "../minotari_app_utilities" }
minotari_ledger_wallet_comms = { path = "../../applications/minotari_ledger_wallet/comms", version = "1.6.0-pre.0", optional = true }
minotari_ledger_wallet_comms = { path = "../../applications/minotari_ledger_wallet/comms", version = "1.7.0-pre.0", optional = true }
tari_common = { path = "../../common" }
tari_common_types = { path = "../../base_layer/common_types" }
tari_comms = { path = "../../comms/core" }
tari_comms_dht = { path = "../../comms/dht" }
tari_contacts = { path = "../../base_layer/contacts" }
tari_crypto = { version = "0.20.3" }
tari_crypto = { version = "0.21.0" }
tari_key_manager = { path = "../../base_layer/key_manager" }
tari_libtor = { path = "../../infrastructure/libtor", optional = true }
tari_max_size = { path = "../../infrastructure/max_size" }
tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] }
tari_script = { path = "../../infrastructure/tari_script" }
tari_shutdown = { path = "../../infrastructure/shutdown" }
tari_utilities = { version = "0.7" }
tari_utilities = { version = "0.8" }
minotari_wallet = { path = "../../base_layer/wallet", features = [
"bundled_sqlite",
] }
Expand Down Expand Up @@ -84,7 +84,7 @@ default-features = false
features = ["crossterm"]

[build-dependencies]
tari_features = { path = "../../common/tari_features", version = "1.6.0-pre.0" }
tari_features = { path = "../../common/tari_features", version = "1.7.0-pre.0" }

[features]
default = ["libtor", "ledger"]
Expand Down
28 changes: 23 additions & 5 deletions applications/minotari_console_wallet/src/automation/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,14 @@ use tari_crypto::{
ristretto::{pedersen::PedersenCommitment, RistrettoSecretKey},
};
use tari_key_manager::{
cipher_seed::CipherSeed,
key_manager_service::{KeyId, KeyManagerInterface},
SeedWords,
};
use tari_p2p::{auto_update::AutoUpdateConfig, peer_seeds::SeedPeer, PeerSeedsConfig};
use tari_script::{push_pubkey_script, CheckSigSchnorrSignature};
use tari_shutdown::Shutdown;
use tari_utilities::{hex::Hex, ByteArray, SafePassword};
use tari_utilities::{encoding::MBase58, hex::Hex, ByteArray, SafePassword};
use tokio::{
sync::{broadcast, mpsc},
time::{sleep, timeout},
Expand Down Expand Up @@ -2485,15 +2486,32 @@ pub async fn command_runner(
.join("temp");
println!("saving temp wallet in: {:?}", temp_path);
{
let seed_words = SeedWords::from_str(args.seed_words.as_str())
.map_err(|e| CommandError::General(e.to_string()))?;
let passphrase = if args.passphrase.is_empty() {
None
} else {
Some(SafePassword::from(args.passphrase))
};
let seed = get_seed_from_seed_words(&seed_words, passphrase)
.map_err(|e| CommandError::General(e.to_string()))?;
let seed = match (!args.seed_words.is_empty(), !args.cipher_seed.is_empty()) {
(true, false) => {
let seed_words = SeedWords::from_str(args.seed_words.as_str())
.map_err(|e| CommandError::General(e.to_string()))?;

get_seed_from_seed_words(&seed_words, passphrase)
.map_err(|e| CommandError::General(e.to_string()))?
},
(false, true) => {
let bytes = Vec::<u8>::from_monero_base58(args.cipher_seed.as_str())
.map_err(|e| CommandError::General(e.to_string()))?;
CipherSeed::from_enciphered_bytes(&bytes, passphrase)
.map_err(|e| CommandError::General(e.to_string()))?
},
(_, _) => {
return Err(CommandError::General(
"Either seed words or cipher seed must be provided".to_string(),
))
},
};

let wallet_type = WalletType::DerivedKeys;
let password = SafePassword::from("password".to_string());
let shutdown = Shutdown::new();
Expand Down
4 changes: 2 additions & 2 deletions applications/minotari_console_wallet/src/automation/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use digest::crypto_common::rand_core::OsRng;
use serde::{de::DeserializeOwned, Serialize};
use tari_common_types::types::PrivateKey;
use tari_crypto::keys::SecretKey;
use tari_utilities::encoding::Base58;
use tari_utilities::encoding::MBase58;

use crate::automation::{
commands::{FILE_EXTENSION, SPEND_SESSION_INFO},
Expand Down Expand Up @@ -133,7 +133,7 @@ fn append_to_json_file<P: AsRef<Path>, T: Serialize>(file: P, data: T) -> Result

/// Create a unique session-based output directory
pub(crate) fn create_pre_mine_output_dir(alias: Option<&str>) -> Result<(String, PathBuf), CommandError> {
let mut session_id = PrivateKey::random(&mut OsRng).to_base58();
let mut session_id = PrivateKey::random(&mut OsRng).to_monero_base58();
session_id.truncate(if alias.is_some() { 8 } else { 16 });
if let Some(alias) = alias {
session_id.push('_');
Expand Down
4 changes: 3 additions & 1 deletion applications/minotari_console_wallet/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,11 @@ pub struct ExportViewKeyAndSpendKeyArgs {

#[derive(Debug, Args, Clone)]
pub struct ImportPaperWalletArgs {
#[clap(short, long)]
#[clap(short, long, default_value = "")]
pub seed_words: String,
#[clap(short, long, default_value = "")]
pub cipher_seed: String,
#[clap(short, long, default_value = "")]
pub passphrase: String,
}

Expand Down
4 changes: 2 additions & 2 deletions applications/minotari_console_wallet/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ use tari_key_manager::{
};
use tari_p2p::{auto_update::AutoUpdateConfig, peer_seeds::SeedPeer, PeerSeedsConfig, TransportType};
use tari_shutdown::ShutdownSignal;
use tari_utilities::{encoding::Base58, hex::Hex, ByteArray, SafePassword};
use tari_utilities::{encoding::MBase58, hex::Hex, ByteArray, SafePassword};
use zxcvbn::zxcvbn;

use crate::{
Expand Down Expand Up @@ -972,7 +972,7 @@ pub fn prompt_public_key(prompt: &str) -> Option<PublicKey> {
let input = input.trim();
match PublicKey::from_hex(input) {
Ok(pk) => Some(pk),
Err(_) => match PublicKey::from_base58(input) {
Err(_) => match PublicKey::from_monero_base58(input) {
Ok(pk) => Some(pk),
Err(_) => None,
},
Expand Down
2 changes: 1 addition & 1 deletion applications/minotari_ledger_wallet/common/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "minotari_ledger_wallet_common"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
authors = ["The Tari Development Community"]
license = "BSD-3-Clause"
edition = "2021"
Expand Down
8 changes: 4 additions & 4 deletions applications/minotari_ledger_wallet/comms/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "minotari_ledger_wallet_comms"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
authors = ["The Tari Development Community"]
license = "BSD-3-Clause"
edition = "2021"

[dependencies]
tari_crypto = { version = "0.20.2", default-features = false }
tari_utilities = { version = "0.7" }
tari_crypto = { version = "0.21.0", default-features = false }
tari_utilities = { version = "0.8" }
tari_common = { path = "../../../common" }
tari_common_types = { path = "../../../base_layer/common_types" }
tari_script = { path = "../../../infrastructure/tari_script" }

minotari_ledger_wallet_common = { path = "../common" }
semver = "1.0"
borsh = "1.2"
borsh = "1.5"
dialoguer = { version = "0.11" }
ledger-transport = { git = "https://github.com/Zondax/ledger-rs", rev = "20e2a20" }
ledger-transport-hid = { git = "https://github.com/Zondax/ledger-rs", rev = "20e2a20" }
Expand Down
4 changes: 2 additions & 2 deletions applications/minotari_ledger_wallet/wallet/Cargo.lock

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

8 changes: 4 additions & 4 deletions applications/minotari_ledger_wallet/wallet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
[package]
name = "minotari_ledger_wallet"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
authors = ["The Tari Development Community"]
license = "BSD-3-Clause"
edition = "2021"

[dependencies]
tari_crypto = { version = "0.20.3", default-features = false, features = [
tari_crypto = { version = "0.21.0", default-features = false, features = [
"borsh",
] }
tari_hashing = { path = "../../../hashing", version = "1.6.0-pre.0" }
tari_hashing = { path = "../../../hashing", version = "1.7.0-pre.0" }

minotari_ledger_wallet_common = { path = "../common" }

blake2 = { version = "0.10", default-features = false }
borsh = { version = "1.2", default-features = false }
borsh = { version = "1.5", default-features = false }
digest = { version = "0.10", default-features = false }
include_gif = "1.0.1"
ledger_device_sdk = "1.15"
Expand Down
8 changes: 4 additions & 4 deletions applications/minotari_merge_mining_proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors = ["The Tari Development Community"]
description = "The Tari merge mining proxy for xmrig"
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
edition = "2018"

[features]
Expand All @@ -27,11 +27,11 @@ tari_key_manager = { path = "../../base_layer/key_manager", features = [
"key_manager_service",
] }
tari_max_size = { path = "../../infrastructure/max_size" }
tari_utilities = { version = "0.7" }
tari_utilities = { version = "0.8" }

anyhow = "1.0.53"
bincode = "1.3.1"
borsh = "1.2"
borsh = "1.5"
bytes = "1.1"
chrono = { version = "0.4.19", default-features = false }
clap = { version = "3.2", features = ["derive", "env"] }
Expand All @@ -54,7 +54,7 @@ url = "2.1.1"
scraper = "0.19.0"

[build-dependencies]
tari_features = { path = "../../common/tari_features", version = "1.6.0-pre.0" }
tari_features = { path = "../../common/tari_features", version = "1.7.0-pre.0" }

[dev-dependencies]
markup5ever = "0.11.0"
8 changes: 4 additions & 4 deletions applications/minotari_miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors = ["The Tari Development Community"]
description = "The tari miner implementation"
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
edition = "2018"

[dependencies]
Expand All @@ -17,11 +17,11 @@ minotari_app_utilities = { path = "../minotari_app_utilities", features = [
"miner_input",
] }
minotari_app_grpc = { path = "../minotari_app_grpc" }
tari_crypto = { version = "0.20.3" }
tari_utilities = { version = "0.7" }
tari_crypto = { version = "0.21.0" }
tari_utilities = { version = "0.8" }

base64 = "0.13.0"
borsh = "1.2"
borsh = "1.5"
bufstream = "0.1"
chrono = { version = "0.4.19", default-features = false }
clap = { version = "3.2", features = ["derive"] }
Expand Down
12 changes: 6 additions & 6 deletions applications/minotari_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ authors = ["The Tari Development Community"]
description = "The tari full base node implementation"
repository = "https://github.com/tari-project/tari"
license = "BSD-3-Clause"
version = "1.6.0-pre.0"
version = "1.7.0-pre.0"
edition = "2018"

[dependencies]
Expand All @@ -17,20 +17,20 @@ tari_common_types = { path = "../../base_layer/common_types" }
tari_core = { path = "../../base_layer/core", default-features = false, features = [
"transactions",
] }
tari_crypto = { version = "0.20.3" }
tari_crypto = { version = "0.21.0" }
tari_p2p = { path = "../../base_layer/p2p", features = ["auto-update"] }
tari_storage = { path = "../../infrastructure/storage" }
tari_service_framework = { path = "../../base_layer/service_framework" }
tari_shutdown = { path = "../../infrastructure/shutdown" }
tari_utilities = { version = "0.7" }
tari_utilities = { version = "0.8" }
tari_key_manager = { path = "../../base_layer/key_manager", features = [
"key_manager_service",
], version = "1.6.0-pre.0" }
], version = "1.7.0-pre.0" }

anyhow = "1.0.53"
async-trait = "0.1.52"
bincode = "1.3.1"
borsh = "1.2"
borsh = "1.5"
chrono = { version = "0.4.19", default-features = false }
clap = { version = "3.2", features = ["derive", "env"] }
console-subscriber = "0.1.8"
Expand Down Expand Up @@ -75,7 +75,7 @@ metrics = ["tari_metrics"]
safe = []

[build-dependencies]
tari_features = { path = "../../common/tari_features", version = "1.6.0-pre.0" }
tari_features = { path = "../../common/tari_features", version = "1.7.0-pre.0" }

[package.metadata.cargo-machete]
ignored = [
Expand Down
Loading

0 comments on commit 0ee154c

Please sign in to comment.