Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Upgrade dusk-wallet-core to 0.22.0-plonk.0.16
Browse files Browse the repository at this point in the history
See also dusk-network/rusk#1091
Resolves #214
  • Loading branch information
herr-seppia committed Oct 24, 2023
1 parent 99190d3 commit 040533b
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Change the Staking Address generation. [#214]
- Change `dusk-wallet-core` to `0.22.0-plonk.0.16` [#214]

## [0.19.1] - 2023-10-11

### Added
Expand Down Expand Up @@ -437,6 +442,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Implementation of `Store` trait from `wallet-core`
- Implementation of `State` and `Prover` traits from `wallet-core`

[#214]: https://github.com/dusk-network/wallet-cli/issues/214
[#210]: https://github.com/dusk-network/wallet-cli/issues/210
[#98]: https://github.com/dusk-network/wallet-cli/issues/98
[#179]: https://github.com/dusk-network/wallet-cli/issues/179
Expand Down
19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,17 @@ rocksdb = "0.21"
flume = "0.10.14"
reqwest = { version = "0.11", features = ["stream"] }

dusk-wallet-core = "0.20.0-piecrust.0.6"
dusk-wallet-core = "0.22.0-plonk.0.16"
dusk-bytes = "0.1"
dusk-pki = "0.12"
rusk-abi = { version = "0.10.0-piecrust.0.6", default-features = false }
phoenix-core = { version = "0.20.0-rc.0", features = ["alloc"] }
dusk-schnorr = { version = "0.13", default-features = false }
dusk-poseidon = "0.30"
dusk-plonk = "0.14"
dusk-bls12_381-sign = { version = "0.4", default-features = false }
poseidon-merkle = "0.2.1-rc.0"
dusk-pki = "0.13"
rusk-abi = { version = "0.11", default-features = false }
phoenix-core = { version = "0.21", features = ["alloc"] }
dusk-schnorr = { version = "0.14", default-features = false }
dusk-poseidon = "0.31"
dusk-plonk = "0.16"
dusk-bls12_381-sign = { version = "0.5", default-features = false }
ff = { version = "0.13", default-features = false }
poseidon-merkle = "0.3"

tracing = "0.1"
tracing-subscriber = { version = "0.3.0", features = [
Expand Down
3 changes: 2 additions & 1 deletion src/bin/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,8 @@ impl fmt::Display for RunResult {
write!(f, "> {}", str_addrs)
}
Tx(hash) => {
write!(f, "> Transaction sent: {:x}", hash)
let hash = hex::encode(hash.to_bytes());
write!(f, "> Transaction sent: {hash}",)
}
StakeInfo(si, _) => {
let stake_str = match si.amount {
Expand Down
6 changes: 4 additions & 2 deletions src/bin/command/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,12 @@ impl Display for TransactionHistory {
}
};

let tx_id = hex::encode(self.id.to_bytes());
let heigth = self.height;

write!(
f,
"{: >9} | {:x} | {: ^8} | {: >+17.9} | {}",
self.height, self.id, contract, dusk, fee
"{heigth: >9} | {tx_id} | {contract: ^8} | {dusk: >+17.9} | {fee}",
)
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/bin/interactive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ pub(crate) async fn run_loop(

// display address information
println!();
println!("Address: {}", addr);
println!("Address: {addr}");
println!("Balance:");
println!(" - Spendable: {spendable}");
println!(" - Total: {total}");
Expand All @@ -99,25 +99,25 @@ pub(crate) async fn run_loop(
Ok(res) => {
println!("\r{}", res);
if let RunResult::Tx(hash) = res {
let txh = format!("{hash:x}");
let tx_id = hex::encode(hash.to_bytes());

// Wait for transaction confirmation from
// network
let gql = GraphQL::new(
&settings.state.to_string(),
io::status::interactive,
);
gql.wait_for(&txh).await?;
gql.wait_for(&tx_id).await?;

if let Some(explorer) = &settings.explorer {
let url = format!("{explorer}{txh}");
let url = format!("{explorer}{tx_id}");
println!("> URL: {url}");
prompt::launch_explorer(url)?;
}
}
}

Err(err) => println!("{}", err),
Err(err) => println!("{err}"),
}
}
}
Expand Down
12 changes: 5 additions & 7 deletions src/bin/io/gql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,11 @@ async fn test() -> Result<(), Box<dyn std::error::Error>> {
"dbc5a2c949516ecfb418406909d195c3cc267b46bd966a3ca9d66d2e13c47003",
)
.await?;
let r = gql.txs_for_block(90).await?;
r.iter().for_each(|(t, _)| {
let txh = format!(
"{:x}",
rusk_abi::hash::Hasher::digest(t.to_hash_input_bytes())
);
println!("txid: {}", txh);
let block_txs = gql.txs_for_block(90).await?;
block_txs.iter().for_each(|(t, _)| {
let hash = rusk_abi::hash::Hasher::digest(t.to_hash_input_bytes());
let tx_id = hex::encode(hash.to_bytes());
println!("txid: {tx_id}");
});
Ok(())
}
Expand Down
10 changes: 5 additions & 5 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,21 +286,21 @@ async fn exec() -> anyhow::Result<()> {
}
}
RunResult::Address(addr) => {
println!("{}", addr);
println!("{addr}");
}
RunResult::Addresses(addrs) => {
for a in addrs {
println!("{}", a);
println!("{a}");
}
}
RunResult::Tx(hash) => {
let txh = format!("{:x}", hash);
let tx_id = hex::encode(hash.to_bytes());

// Wait for transaction confirmation from network
let gql = GraphQL::new(settings.state, status::headless);
gql.wait_for(&txh).await?;
gql.wait_for(&tx_id).await?;

println!("{}", txh);
println!("{tx_id}");
}
RunResult::StakeInfo(info, reward) => {
if reward {
Expand Down
1 change: 1 addition & 0 deletions src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub use file::{SecureWalletFile, WalletPath};

use bip39::{Language, Mnemonic, Seed};
use dusk_bytes::{DeserializableSlice, Serializable};
use ff::Field;
use flume::Receiver;
use phoenix_core::transaction::ModuleId;
use phoenix_core::Note;
Expand Down

0 comments on commit 040533b

Please sign in to comment.