Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
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.

12 changes: 6 additions & 6 deletions utils/staking-miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"

[dependencies]
clap = { version = "3.0", features = ["derive", "env"] }
codec = { package = "parity-scale-codec", version = "2.0.0" }
tokio = { version = "1.15", features = ["macros"] }
log = "0.4.11"
env_logger = "0.9.0"
clap = { version = "3.0", features = ["derive", "env"] }
jsonrpsee = { version = "0.4.1", default-features = false, features = ["ws-client"] }
serde_json = "1.0"
serde = "1.0.132"
jsonrpsee = { version = "0.8", features = ["ws-client"] }
log = "0.4.11"
paste = "1.0.6"
serde = "1.0.132"
serde_json = "1.0"
thiserror = "1.0.30"
tokio = { version = "1.15", features = ["macros", "rt-multi-thread", "sync"] }

remote-externalities = { git = "https://github.com/paritytech/substrate", branch = "master" }

Expand Down
7 changes: 7 additions & 0 deletions utils/staking-miner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,10 @@ docker run --rm -it \
-e URI=wss://your-node:9944 \
staking-miner dry-run
```

### Test locally
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


1. Modify `EPOCH_DURATION_IN_SLOTS` and `SessionsPerEra` to force an election
more often than once per day.
2. $ polkadot --chain polkadot-dev --tmp --alice --execution Native -lruntime=debug --offchain-worker=Always --ws-port 9999
3. $ staking-miner --uri ws://localhost:9999 --seed //Alice monitor phrag-mms
4 changes: 2 additions & 2 deletions utils/staking-miner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ macro_rules! any_runtime_unit {
#[derive(frame_support::DebugNoBound, thiserror::Error)]
enum Error<T: EPM::Config> {
Io(#[from] std::io::Error),
JsonRpsee(#[from] jsonrpsee::types::Error),
JsonRpsee(#[from] jsonrpsee::core::Error),
RpcHelperError(#[from] rpc_helpers::RpcHelperError),
Codec(#[from] codec::Error),
Crypto(sp_core::crypto::SecretStringError),
Expand Down Expand Up @@ -602,7 +602,7 @@ async fn main() {

let outcome = any_runtime! {
match command.clone() {
Command::Monitor(c) => monitor_cmd(&client, shared, c, signer_account).await
Command::Monitor(c) => monitor_cmd(client, shared, c, signer_account).await
.map_err(|e| {
log::error!(target: LOG_TARGET, "Monitor error: {:?}", e);
}),
Expand Down
Loading