diff --git a/CHANGELOG.md b/CHANGELOG.md index bcb810fe6..d58ee3044 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,29 @@ The format is based on [Keep a Changelog]. [Keep a Changelog]: http://keepachangelog.com/en/1.0.0/ +## [v1.3.1] - 2023-12-27 + +The main changes of this release are as follows: +- Change the binary name to `polkadot-staking-miner` to publish on crates.io. +- Bump rust MSRV to 1.74 +- Change `submit_signed_solution` extrinsic to be mortal +- A runtime upgrade bug was fixed in this release. + +### Runtime upgrade bug fixed. + +Recently, we noticed that it can be possible that the runtime upgrades won't +upgrade the metadata because the actual runtime upgrade is applied to the block +after `state_subscribeRuntimeVersion`` emits an event. + +For that reason, the polkadot-staking-miner now subscribes to `system().last_runtime_upgrade()` instead to fix that. + +### [Changed] +- refactor: make solution extrinsic mortal ([#728](https://github.com/paritytech/staking-miner-v2/pull/728)) +- rename project to polkadot-staking-miner ([#717](https://github.com/paritytech/staking-miner-v2/pull/717)) + ## [v1.3.0] - 2023-12-15 [YANKED] -The change to subxt-signer was used incorrectly and the release was yanked. +The change to subxt-signer broke previous behaviour. ## [v1.2.0] - 2023-11-23 diff --git a/Cargo.lock b/Cargo.lock index 2912f1df2..bfe67a449 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3179,7 +3179,7 @@ checksum = "14e6ab3f592e6fb464fc9712d8d6e6912de6473954635fd76a589d832cffcbb0" [[package]] name = "polkadot-staking-miner" -version = "1.3.0" +version = "1.3.1" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 798306b39..cbcfd9e45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "polkadot-staking-miner" -version = "1.3.0" +version = "1.3.1" authors = ["Parity Technologies "] edition = "2021" rust-version = "1.74.0" @@ -47,4 +47,4 @@ regex = "1" [features] default = [] -slow-tests = [] \ No newline at end of file +slow-tests = [] diff --git a/src/commands/dry_run.rs b/src/commands/dry_run.rs index c3b695a76..b82bdf229 100644 --- a/src/commands/dry_run.rs +++ b/src/commands/dry_run.rs @@ -105,7 +105,13 @@ where .await? .ok_or(Error::AccountDoesNotExists)?; - log::info!(target: LOG_TARGET, "Loaded account {}, {:?}", signer, account_info); + log::info!(target: LOG_TARGET, "Loaded account {} {{ nonce: {}, free_balance: {}, reserved_balance: {}, frozen_balance: {} }}", + signer, + account_info.nonce, + account_info.data.free, + account_info.data.reserved, + account_info.data.frozen, + ); let nonce = client.rpc().system_account_next_index(signer.account_id()).await?; let tx = epm::signed_solution(raw_solution)?; diff --git a/src/commands/monitor.rs b/src/commands/monitor.rs index 754f7e28e..0134454bd 100644 --- a/src/commands/monitor.rs +++ b/src/commands/monitor.rs @@ -185,7 +185,13 @@ where .ok_or(Error::AccountDoesNotExists)? }; - log::info!(target: LOG_TARGET, "Loaded account {}, {:?}", signer, account_info); + log::info!(target: LOG_TARGET, "Loaded account {} {{ nonce: {}, free_balance: {}, reserved_balance: {}, frozen_balance: {} }}", + signer, + account_info.nonce, + account_info.data.free, + account_info.data.reserved, + account_info.data.frozen, + ); if config.dry_run { // if we want to try-run, ensure the node supports it. @@ -571,7 +577,7 @@ async fn submit_and_watch_solution( ); if let Ok(Some(_)) = solution_stored { - log::info!("Included at {:?}", in_block.block_hash()); + log::info!(target: LOG_TARGET, "Included at {:?}", in_block.block_hash()); } else { return Err(Error::Other(format!( "No SolutionStored event found at {:?}", @@ -587,7 +593,7 @@ async fn submit_and_watch_solution( ); if let Ok(Some(_)) = solution_stored { - log::info!("Finalized at {:?}", finalized.block_hash()); + log::info!(target: LOG_TARGET, "Finalized at {:?}", finalized.block_hash()); } else { return Err(Error::Other(format!( "No SolutionStored event found at {:?}", diff --git a/src/signer.rs b/src/signer.rs index 9b4ba75ce..02f0d8913 100644 --- a/src/signer.rs +++ b/src/signer.rs @@ -18,7 +18,6 @@ use crate::{error::Error, prelude::*}; use sp_core::Pair as _; -use subxt::tx::Signer as _; // A signer type, parameterized for using with `subxt`. pub type PairSigner = subxt::tx::PairSigner; @@ -34,7 +33,7 @@ pub struct Signer { impl std::fmt::Display for Signer { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{:?}", self.signer.address()) + write!(f, "{}", self.signer.account_id()) } }