Commit Graph

30 Commits

Author SHA1 Message Date
Niklas Adolfsson 4649e767d8 staking miner: Check the queue one last time before submission (#4819)
* staking miner: use config for emergency solution

Fixes #4678

* bump jsonrpsee

* run `monitor_cmd_for` until the connection is closed

* new tokio task for submit_and_watch xt

* re-use header subscription

* update jsonrpsee + simplify code

* revert polkadot runtime changes

* feat: add `ensure_no_better_solution` function

* storage access for submissions and indices

* check ensure_no_previous_solution before remote ext

* fix todos

* grumbles: Perbill::from_percent

* hacky fix

* use modified EPM pallet and various fixes

* diener update --substrate --branch na-epm-pub

* Revert "diener update --substrate --branch na-epm-pub"

This reverts commit b3b9a58c9313372c8f21cf247ba0c8528d9953c0.

* update substrate

* tokio spawn on concurrent stuff

* cleanup

* Update utils/staking-miner/src/monitor.rs

* Update utils/staking-miner/src/monitor.rs

* more cleanup

* fix nits

* address grumbles

* only run batch reqs when signed phase

* better help menu for submission strategy CLI

* add tests for submission strategy
2022-03-04 09:34:02 +00:00
Niklas Adolfsson 8ea9b676a9 companion for #10945 (#5012)
* companion for #10945

* fix build

* fix bad merge

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-03-03 23:26:05 +00:00
Niklas Adolfsson 3d5e9b3c9c [staking miner]: add CLI tests + fix --version (#5024)
* staking miner: add CLI tests

* cargo fmt

* fix bad merge

* Update utils/staking-miner/Cargo.toml

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* grumbles: derive PartialEq only for tests

* make test `--version` a integration tests

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2022-03-03 22:43:38 +00:00
Kian Paimani 511344e86c Remove balancing iterations from OCW miners (#4995)
* remove random balancing from unsigned solution

* tweak miner a bit

* add comments

* lower kusama staking limits

* Revert "lower kusama staking limits"

This reverts commit 8ccccbb65a97b78505ef71a796698bb067cc6ba0.

* Update utils/staking-miner/src/dry_run.rs

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* last review

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2022-03-02 21:52:42 +00:00
Niklas Adolfsson 4210d014ec staking miner: reuse ws conn for remote-ext (#4849)
* staking miner: use config for emergency solution

Fixes #4678

* bump jsonrpsee

* run `monitor_cmd_for` until the connection is closed

* new tokio task for submit_and_watch xt

* re-use header subscription

* update jsonrpsee + simplify code

* revert polkadot runtime changes

* fix grumbles

* Update utils/staking-miner/src/monitor.rs

* staking miner: reuse ws conn for remote-ext

* Revert "revert polkadot runtime changes"

This reverts commit 5fddbbec40702c122b079526915cabac8facdbc1.

* cargo fmt

* revert unintentional change

* revert unintentional change

* add type SharedRpcClient

* cargo fmt

* fix nits

* spelling

* use tracing_subcriber and cleanup

* remove some needless clones

* fix some nits

* fix spellcheck
2022-02-18 11:41:56 +00:00
Niklas Adolfsson 7273c4b03f Companion for refactor election score #10834 (#4927)
* Companion for refactor election score #10834

https://github.com/paritytech/substrate/pull/10834

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>
2022-02-16 13:57:31 +01:00
Niklas Adolfsson 188840dca1 staking miner: spawn separate task for each block (#4716)
* staking miner: use config for emergency solution

Fixes #4678

* bump jsonrpsee

* run `monitor_cmd_for` until the connection is closed

* new tokio task for submit_and_watch xt

* re-use header subscription

* update jsonrpsee + simplify code

* revert polkadot runtime changes

* fix grumbles

* Update utils/staking-miner/src/monitor.rs

* grumbles: fix logs + nits
2022-02-07 11:21:56 +01:00
Qinxuan Chen f4ec9b0341 Companion for substrate#10632 (#4689)
* Companion for substrate#10632

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* cargo format

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix bags-list

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Update Substrate

* Fix

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Fix bridges test

* FMT

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2022-01-25 10:58:17 +00:00
Bernhard Schuster b7a05fd40b [runtime] follow up relay chain cleanups (#4657)
* fix miscalculation of remaining weight

* rename a var

* move out enforcing filtering by dropping inherents

* prepare for dispute statement validity check being split off

* refactor

* refactor, only check disputes we actually want to include

* more refactor and documentation

* refactor and minimize inherent checks

* chore: warnings

* fix a few tests

* fix dedup regression

* fix

* more asserts in tests

* remove some asserts

* chore: fmt

* skip signatures checks, some more

* undo unwatend changes

* Update runtime/parachains/src/paras_inherent/mod.rs

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>

* cleanups, checking CheckedDisputeStatments makes no sense

* integrity, if called create_inherent_inner, it shall do the checks, and not rely on enter_inner

* review comments

* use from impl rather than into

* remove outdated comment

* adjust tests accordingly

* assure no weight is lost

* address review comments

* remove unused import

* split error into two and document

* use assurance, O(n)

* Revert "adjust tests accordingly"

This reverts commit 3cc9a3c449f82db38cea22c48f4a21876603374b.

* fix comment

* fix sorting

* comment

Co-authored-by: sandreim <54316454+sandreim@users.noreply.github.com>
2022-01-20 11:00:29 +00:00
Niklas Adolfsson d278b63f6d staking miner: use config for emergency solution (#4694) 2022-01-11 19:30:24 +01:00
Bernhard Schuster 1d7efef4cd fix compile with new compiler - dead code (#4530)
* make compiler happy

* node side compile warning quiet

* ffs

* malus: remove unused keystore
2021-12-15 17:11:07 +00:00
Keith Yeung 54423f8b8a Add CheckNonZeroSender to runtime configs (#4493)
* Add CheckNonZeroSender to runtime configs

* cargo fmt

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes
2021-12-12 11:22:08 +01:00
David 62146d849d Companion – Update jsonrpsee to 0.4.1 (#4256)
* Update staking-miner

* fmt

* lockfile

* Point to substrate companion branch

* Revert "Point to substrate companion branch"

This reverts commit 3f8afc5d3137614776f54c7dac3c9077268c5fe5.

* Revert 3f8afc5d3137614776f54c7dac3c9077268c5fe5

* Remove `params` macro in favour of `rpc_macro` from jsonrpsee

* update Cargo.lock

* remove unused import

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-11-11 13:00:58 +00:00
Niklas Adolfsson b5583c26b6 fix(staking miner): use StorageKey in getStorage (#4231)
Use `StorageKey` in the rpc call `getStorage` instead of `[u8;32]`
2021-11-06 07:16:00 +00:00
Kian Paimani 51b694e05c fix restart issue of staking miner (#4073)
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
2021-10-14 13:12:01 +01:00
Squirrel 935d74e906 Companion PR for ss58 crate (#3953)
* Companion PR for ss58 crate

* cargo fmt

* Rename

* into()

* into()

* updating substrate (ideally use bot merge)
2021-10-12 12:06:12 +02:00
Kian Paimani 5bbcb665d9 companion for substrate#9788 (#3858)
* companion for https://github.com/paritytech/substrate/pull/9788

* fmt

* Some fixes

* final fixes

* fix a few small things

* update Substrate

Co-authored-by: parity-processbot <>
2021-09-21 18:08:21 +00:00
Andrew Jones 4c7539cab5 Companion for #8615: enrich metadata with type information (#3336)
* Use beefy branch with scale-info

* Add patches

* Sprinkle some TypeInfo derives

* Add some TypeInfo deriv

* Cargo.lock

* Derive TypeInfo and skip type params for Xcm types

* Cargo.lock

* Fix up scale_info bounds attributes

* Fix up dependencies

* Use my own beefy-primitives branch

* Bump BEEFY

* Update patches

* Add some scale-info dependencies and TypeInfo derives

* More TypeInfo decoration

* Update scale-info

* Some TypeInfos and remove more Event pallet::metadata

* Moar TypeInfos

* TypeInfos galore, fix up metadata runtime API

* TypeInfo

* TypeInfos, update other runtime metadata APIs

* Fix up Kusama, comment out some `usize` QueueSize parameter types

* Remove local diener patches

* Cargo.lock

* Cargo.lock

* Update to scale-info crates.io release

* Update primitive-types branch

* Update pallet-beefy to use custom branch

* Update other parity-common deps

* Update parity-common patches

* bump a bunch of deps in parity-common

* Remove parity-common patches

* Bump finality-grandpa version

* Cargo.lock

* Update scale-info to 0.9.1

* Add recursion_limit for runtime-parachains

* Add some scale_info attributes

* Cargo.lock

* Revert finality-grandpa bump

* Cargo.lock, scale-info update

* cargo update

* Make sure using patched version of finality-grandpa

* Use patched scale-info

* Update to scale-info 0.10.0

* Update finality-grandpa

* Cargo.lock

* Update beefy deps

* Update beefy deps again

* Add scale-info dependency

* Remove deprecated pallet::metadata attributes.

* Add some missing scale-info deps and derives

* Use some variant struct call syntax

* Add missing TypeInfo impl

* Add some more TypeInfo impls

* Convert some call enum struct variant constructors

* More scale-info deps and derives

* Call enum struct variants

* TypeInfo derives

* Call enum variant structs

* scale-info deps and derives

* Call enum variant struct constructors

* Use beefy-primitives scale-info feature

* Use grandpa-bridge-gadget master branch

* Remove finality-grandpa patch

* Add missing scale_info dependency and derive

* Fix up some call variant constructors

* Add missing scale_info dependency

* Fix some test errors

* More TypeInfo derives

* More call variant structs

* Call variant structs in tests

* Cargo.lock

* Fmt

* Fix more call struct variants

* Another call struct variant

* add scale-info/std features explicitly

* More call struct variants

* Add missing scale-info dependency

* Fmt

* review: activate scale-info/std where missing

* Remove some duplicate std feature activation

* review: add scale_info bounds() attr

* More call variant structs

* Remove recursion limit

* Update beefy-primitives

* Update beefy-primitives

* Fix simnet call variant struct errors

* Fmt

* cargo update -p beefy-primitives

* Add some missing TypeInfo derives

* Fix some call variants

* Fix some call variant underscores

* Cargo.lock

* Cargo.lock

* Add missing TypeInfo derive

* Add some more missing TypeInfo derives

* Even more missing TypeInfo derives

* Add TypeInfo derives to new xcm types

* Fmt

* Cargo.lock

* Add missing TypeInfo impls

* Cargo.lock

* More missing TypeInfos

* Fixes

* Cargo.lock

* Cargo.lock

* Add TypeInfo impls to xcm v2

* Update to scale-info 1.0

* Update finality-grandpa 0.14.4, patch for now

* Update beefy

* Remove patched finality-grandpa

* Add TypeInfo impl to Outcome

* Fixes

* Call variant struct

* Call variant struct

* Fix test

* Add TypeInfo impl

* Cargo.lock

* Cargo.lock

* Cargo.lock

* git checkout master Cargo.lock

* update Substrate

* Add missing scale-info features for beefy-primitives

* Fmt

* Remove check for now

* Update beefy-primitives, removes scale-info feature

* Update beefy-primitives again

Co-authored-by: adoerr <0xad@gmx.net>
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: parity-processbot <>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-09-15 15:38:45 -05:00
Zeke Mostov b048be06fe Allow staking miner to use different election algorithms (#3752)
* WIP

* Dry run cmd working

* Monitor cmd works

* Configure balance with parameter type

* Comments

* cleannnn

* Add balancing to PhragMMS

* Move OffchainRanomBalancing to common

* DRY mine_unchecked over config.solver

* FMT

* Apply suggestions from code review

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Improve docs for any_runtime_unit!

* Some cleanup

* fmt

* Correct capitilaztion

* Improve version mismatch log

* Revert "Improve version mismatch log"

This reverts commit 57570403f654f1efa4307956cda2de6f0c64f70a.

* Apply suggestions from code review

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>

* Remove Balancing struct and use Balancing Parameter type instead

* update Substrate

Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: parity-processbot <>
2021-09-09 20:21:54 +00:00
Chevdor 47c75122d1 staking-miner: remove need of a file to pass the seed (#3680)
* staking-miner: remove need of a file to pass the seed

* cleanup

* linting round

* fix linting

* fix naming and remove unused field
2021-08-27 11:29:17 +02:00
Shawn Tabrizi 07301bd693 Companion for 9619 (Private Events) (#3712)
* update runtime api

* use storage_prefix

* update read_events_no_consensus

* update Substrate

Co-authored-by: parity-processbot <>
2021-08-26 14:34:45 +00:00
Kian Paimani 961b9621ec check runtime version in staking miner (#3628)
* check runtime version in staking miner

* fmt

* add short alias for things

* fix fee

* print length as well

* fix build

* review comments
2021-08-16 15:49:03 +00:00
Kian Paimani b8eefc2d47 Companion for substrate/pull/9442 (#3594)
* Fix compact build

* Fix again

* fix staking miner

* fmt

* update Substrate

Co-authored-by: parity-processbot <>
2021-08-11 16:24:13 +00:00
Guillaume Thiolliere f78f803698 companion: for call usage https://github.com/paritytech/substrate/pull/9418 (#3522)
* add test for call size

* fix box arg

* fix xcm variant length + increase limit a bit

* fix para sudo wrapper call length

* reorganize

* fmt

* fix tests

* update Substrate

Co-authored-by: parity-processbot <>
2021-08-07 10:10:28 +00:00
Shawn Tabrizi ff5d56fb76 cargo +nightly fmt (#3540)
* cargo +nightly fmt

* add cargo-fmt check to ci

* update ci

* fmt

* fmt

* skip macro

* ignore bridges
2021-08-02 10:47:33 +00:00
Zeke Mostov ed9208b749 Upgrade staking-miner to use jsonrpsee v0.3 (#3466) 2021-07-14 17:30:46 +00:00
Denis Pisarev fc253e6e4d WIP: CI: add spellcheck (#3421)
* CI: add spellcheck

* revert me

* CI: explicit command for spellchecker

* spellcheck: edit misspells

* CI: run spellcheck on diff

* spellcheck: edits

* spellcheck: edit misspells

* spellcheck: add rules

* spellcheck: mv configs

* spellcheck: more edits

* spellcheck: chore

* spellcheck: one more thing

* spellcheck: and another one

* spellcheck: seems like it doesn't get to an end

* spellcheck: new words after rebase

* spellcheck: new words appearing out of nowhere

* chore

* review edits

* more review edits

* more edits

* wonky behavior

* wonky behavior 2

* wonky behavior 3

* change git behavior

* spellcheck: another bunch of new edits

* spellcheck: new words are koming out of nowhere

* CI: finding the master

* CI: fetching master implicitly

* CI: undebug

* new errors

* a bunch of new edits

* and some more

* Update node/core/approval-voting/src/approval_db/v1/mod.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Update xcm/xcm-executor/src/assets.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Apply suggestions from code review

Co-authored-by: Andronik Ordian <write@reusable.software>

* Suggestions from the code review

* CI: scan only changed files

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-07-14 19:22:58 +02:00
Kian Paimani 7948eae54b Small tweaks to staking miner (#3460)
* Fix miner

* fix miner

* Update utils/staking-miner/src/monitor.rs

* Fix width
2021-07-13 02:02:25 +00:00
Seun Lanlege de445adb6d Seun txpool refactor (#3419)
* companion for paritytech/substrate#9228

* sc_transaction_pool_api

* update Substrate

Co-authored-by: parity-processbot <>
2021-07-08 14:09:54 +00:00
Kian Paimani 505145efd3 Staking Miner (#3141)
Co-authored-by: Peter Goodspeed-Niklaus <coriolinus@users.noreply.github.com>
Co-authored-by: Peter Goodspeed-Niklaus <peter.r.goodspeedniklaus@gmail.com>
2021-07-01 20:22:35 +01:00