Skip to content

Commit

Permalink
chore: release v1.3.1 (#750)
Browse files Browse the repository at this point in the history
* chore: release v1.3.1

* Update CHANGELOG.md
  • Loading branch information
niklasad1 authored Dec 27, 2023
1 parent 4b498cb commit 8c8e443
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 10 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "polkadot-staking-miner"
version = "1.3.0"
version = "1.3.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
rust-version = "1.74.0"
Expand Down Expand Up @@ -47,4 +47,4 @@ regex = "1"

[features]
default = []
slow-tests = []
slow-tests = []
8 changes: 7 additions & 1 deletion src/commands/dry_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
12 changes: 9 additions & 3 deletions src/commands/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -571,7 +577,7 @@ async fn submit_and_watch_solution<T: MinerConfig + Send + Sync + 'static>(
);

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 {:?}",
Expand All @@ -587,7 +593,7 @@ async fn submit_and_watch_solution<T: MinerConfig + Send + Sync + 'static>(
);

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 {:?}",
Expand Down
3 changes: 1 addition & 2 deletions src/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<subxt::PolkadotConfig, sp_core::sr25519::Pair>;
Expand All @@ -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())
}
}

Expand Down

0 comments on commit 8c8e443

Please sign in to comment.