Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v1.3.1 #750

Merged
merged 2 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
niklasad1 marked this conversation as resolved.
Show resolved Hide resolved

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 <[email protected]>"]
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