Gavin Wood
3b8978f1bd
Deprecate Currency: Companion for #12951 ( #2334 )
...
* Fix APIs
* Reflect API changes
* Everything builds
* Fixes
* Fixes
* Update Cargo.toml
* Fixes
* Fixes
* No networks use freezes/holds
* update lockfile for {"polkadot", "substrate"}
* Fix test
ED cannot be zero anymore.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix test
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-03-20 16:52:21 +00:00
Mira Ressel
401efd1469
Bump ci-linux image for rust 1.68
2023-03-20 16:36:23 +01:00
Mira Ressel
058082fcb0
tweak some pattern matches to address a new clippy warning
2023-03-20 16:36:06 +01:00
Mira Ressel
a01de76ca1
Bump ci-linux image for rust 1.68
2023-03-20 16:36:06 +01:00
Mira Ressel
faaa0c2851
address clippy & rustdoc warnings
...
The comment was out of date anyway, State::Live no longer takes a
snapshot_path argument.
2023-03-20 16:35:53 +01:00
Mira Ressel
fc5b3f4f1c
Update ui tests for rust 1.68
2023-03-20 16:35:53 +01:00
Mira Ressel
83068ca822
Bump ci-linux image for rust 1.68
2023-03-20 16:35:53 +01:00
Vsevolod Stakhov
6d902ce073
Revert "Update orchestra to the recent version ( #6854 )" ( #6916 )
...
This reverts commit 5565bb9dbc .
2023-03-20 15:08:05 +00:00
Sebastian Kunert
ccfe5fe08c
Always pass port to jsonrpsee WebSocket client ( #2339 )
...
* Always pass port to jsonrpsee
* Remove useless host check
* Do not silently drop
2023-03-20 14:05:06 +00:00
Javier Viola
45f6fefc82
bump zombienet to v1.3.40 ( #2348 )
2023-03-20 10:32:13 -03:00
Gavin Wood
2e656dcd6e
Deprecate Currency: Companion for #12951 ( #6780 )
...
* Some renames
* Fix
* Fix build for new APIs
* Remove diener
* Fixes
* Fixes
* Fix integration tests
* Fixes
* fix nis issuance
* Update Cargo.toml
* Polkadot doesn't have freezes/holds yet
* No networks use freezes/holds
* update lockfile for {"substrate"}
* Fix tests
There are more failing tests; just starting with the easy ones.
Reserved balance does not count towards ED anymore, therefore reducing
all the reserves by ED (1).
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fixes for Polkadot pallets
* Fix parachains benchmarks
* Update Substrate
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-03-20 13:20:22 +00:00
Oliver Tale-Yazdi
dda99e9ca9
Hotfix NIS benchmark ( #13651 )
...
* Hotfix NIS rounding error
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Also fix communal
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-03-20 12:34:36 +00:00
dependabot[bot]
1dd0dfb319
Bump hashbrown from 0.12.3 to 0.13.2 ( #13570 )
...
Bumps [hashbrown](https://github.com/rust-lang/hashbrown ) from 0.12.3 to 0.13.2.
- [Release notes](https://github.com/rust-lang/hashbrown/releases )
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.2 )
---
updated-dependencies:
- dependency-name: hashbrown
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-20 12:27:43 +00:00
Bastian Köcher
e2ec2e4d9c
Improve build times by disabling wasm-builder in no_std ( #2308 )
...
There is no need to compile wasm-builder in `no_std` as we skip the compilation of the crate any
way. So, we can also directly disable wasm-builder as dependency in `no_std` to improve build times.
2023-03-20 09:53:09 +01:00
dependabot[bot]
f1769cb212
Bump toml from 0.7.2 to 0.7.3 ( #2340 )
...
Bumps [toml](https://github.com/toml-rs/toml ) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/toml-rs/toml/releases )
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.7.2...toml-v0.7.3 )
---
updated-dependencies:
- dependency-name: toml
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-19 23:35:25 +01:00
dependabot[bot]
7f745120ac
Bump serde from 1.0.152 to 1.0.156 ( #2329 )
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.152 to 1.0.156.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.156 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-19 10:17:30 +00:00
Gavin Wood
5d81f23f8f
Deprecate Currency; introduce holds and freezing into fungible traits ( #12951 )
...
* First reworking of fungibles API
* New API and docs
* More fungible::* API improvements
* New ref-counting logic for old API
* Missing files
* Fixes
* Use the new transfer logic
* Use fungibles for the dispatchables
* Use shelve/restore names
* Locking works with total balance.
* repotting and removal
* Separate Holds from Reserves
* Introduce freezes
* Missing files
* Tests for freezing
* Fix hold+freeze combo
* More tests
* Fee-free dispatchable for upgrading accounts
* Benchmarks and a few fixes
* Another test
* Docs and refactor to avoid blanket impls
* Repot
* Fit out ItemOf fully
* Add events to Balanced traits
* Introduced events into Hold traits
* Fix Assets pallet tests
* Assets benchmarks pass
* Missing files and fixes
* Fixes
* Fixes
* Benchmarks fixes
* Fix balance benchmarks
* Formatting
* Expose fungible sub modules
* Move NIS to fungible API
* Fix broken impl and add test
* Fix tests
* API for `transfer_and_hold`
* Use composite APIs
* Formatting
* Upgraded event
* Fixes
* Fixes
* Fixes
* Fixes
* Repot tests and some fixed
* Fix some bits
* Fix dust tests
* Rename `set_balance`
- `Balances::set_balance` becomes `Balances::force_set_balance`
- `Unbalanced::set_balance` becomes `Unbalances::write_balance`
* becomes
* Move dust handling to fungibles API
* Formatting
* Fixes and more refactoring
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Fixes
* Use reducible_balance for better correctness on fees
* Reducing hold to zero should remove entry.
* Add test
* Docs
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/regular.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Update frame/support/src/traits/tokens/fungible/regular.rs
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
* Docs
* Docs
* Docs
* Fix NIS benchmarks
* Doc comment
* Remove post_mutation
* Fix some tests
* Fix some grumbles
* Enumify bool args to fungible(s) functions
* Fix up assets and balances
* Formatting
* Fix contracts
* Fix tests & benchmarks build
* Typify minted boolean arg
* Typify on_hold boolean arg; renames
* Fix numerous tests
* Fix dependency issue
* Privatize dangerous API mutate_account
* Fix contracts (@alext - please check this commit)
* Remove println
* Fix tests for contracts
* Fix broken rename
* Fix broken rename
* Fix broken rename
* Docs
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* remove from_ref_time
* Update frame/executive/src/lib.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/executive/src/lib.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Reenable test
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/currency.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/lottery/src/tests.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/mod.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/regular.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/freeze.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungible/regular.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Update frame/support/src/traits/tokens/fungibles/hold.rs
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
* Rename UnwantedRemoval to UnwantedAccountRemoval
* Docs
* Formatting
* Update frame/balances/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update primitives/runtime/src/lib.rs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
* handle_raw_dust oes nothing
* Formatting
* Fixes
* Grumble
* Fixes
* Add test
* Add test
* Tests for reducible_balance
* Fixes
* Fix Salary
* Fixes
* Disable broken test
* Disable nicely
* Fixes
* Fixes
* Fixes
* Rename some events
* Fix nomination pools breakage
* Add compatibility stub for transfer tx
* Reinstate a safely compatible version of Balances set_balance
* Fixes
* Grumble
* Update frame/nis/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_balances
* disable flakey tests
* Update frame/balances/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Grumbles
* Grumble
---------
Co-authored-by: Muharem Ismailov <ismailov.m.h@gmail.com >
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: Anthony Alaribe <anthonyalaribe@gmail.com >
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
Co-authored-by: command-bot <>
2023-03-18 14:47:55 +00:00
PG Herveou
c699876ab8
Add linguist-generated to gitattributes ( #13628 )
2023-03-18 08:44:46 +01:00
PG Herveou
8fcd235e38
contracts: Refactor trait Ext::*_storage_transparent functions ( #13600 )
...
* Refactor _transparent methods
rewrote commits, stashed the typo changes to remove some diff noise
fixed my unverified email commit
* remove type alias
* Get rid of From<Fix/VarSizedKey> impl blocks
* Get rid of KeyType impl block
* remove unnecessary Key export
* Update frame/contracts/src/exec.rs
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
* PR review comment
---------
Co-authored-by: Sasha Gryaznov <hi@agryaznov.com >
2023-03-17 23:17:21 +01:00
Oliver Tale-Yazdi
c52062b869
Parachains should charge for proof size weight ( #2326 )
...
* Generalize trait requirement
Use the trait directly instead of something that will have a blanket
implementation for it.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Charge for proof size weight
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix doc comments
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
* Fix docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Update lock file
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix imports
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com >
2023-03-17 16:25:13 +00:00
Koute
6c3747ba34
Bump trie-db to 0.27.1 (fix storage iteration bug + change seek behavior with prefix) ( #13630 )
2023-03-17 16:09:28 +00:00
Oliver Tale-Yazdi
58a7f57594
Ignore flaky test ( #13631 )
...
* Ignore flaky test
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Re-enable running_the_node_works_and_can_be_interrupted
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Re-enable notifications_back_pressure
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Unused import
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-03-17 16:06:40 +00:00
Mara Robin B
67035d6436
changelog: template fixup ( #6907 )
2023-03-17 16:03:55 +00:00
PG Herveou
f5773795e9
Fix typos in pallet-contracts ( #13629 )
...
* Fix typos in pallet-contracts
2023-03-17 16:31:51 +01:00
Oleg Plakida
5378c64c39
Fix test-linux-stable excessive run time ( #13597 )
...
* ci-cd#754:Fix slow unit tests
- Add nextest config
- Add slow tests to mutual exclusion list
* Update .config/nextest.toml
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com >
---------
Co-authored-by: Alexander Samusev <41779041+alvicsam@users.noreply.github.com >
2023-03-17 14:14:13 +00:00
Bastian Köcher
38944d85c4
dmp-queue: Store messages if already processed more than the maximum ( #2343 )
...
* dmp-queue: Store messages if already processed more than the maximum
* Put new event at the end
2023-03-17 13:45:01 +00:00
Davide Galassi
bc2724f022
Bump grandpa to 0.16.2 ( #13622 )
2023-03-17 14:21:02 +01:00
Davide Galassi
37329f8dd7
[Companion #13615 ] Keystore overhaul ( #2336 )
...
* Align to Substrate keystore overhaul
* 'sync_keystore' renamed to 'keystore'
* Further fixes after removal of async keystore trait
* update lockfile for {"polkadot", "substrate"}
---------
Co-authored-by: parity-processbot <>
2023-03-17 12:50:38 +00:00
Davide Galassi
46c36e5a4f
[Companion #13615 ] Keystore overhaul ( #6892 )
...
* Remove not required async calls
* Fixed missing renaming
* make_keystore can be sync
* More fixes
* Trivial nitpicks
* Cherry pick test fix from master
* Fixes after master merge
* update lockfile for {"substrate"}
---------
Co-authored-by: parity-processbot <>
2023-03-17 12:09:15 +00:00
Davide Galassi
f110941b7f
Keystore overhaul ( #13615 )
...
* Remove 'supported_keys' 'sign_with_any' and 'sign_with_all' from keystore trait
* Remove the aync keystore
* Renaming:
- SyncCryptoStore -> Keystore
- SyncCryptoStorePtr -> KeystorePtr
- KeyStore -> MemoryKeystore
* Fix authority discovery worker and tests
* Rename 'insert_unknown' to 'insert'
* Remove leftover
2023-03-17 11:24:14 +00:00
Mara Robin B
4d904951fd
update weights ( #6897 )
...
* polkadot: update weights
* westend: update weights
* kusama: update weights
* rococo: update weights
2023-03-17 10:09:21 +00:00
Davide Galassi
163d892d8c
Fix approval voting test ( #6898 )
2023-03-17 08:33:50 +01:00
Alexander Theißen
91bb2d29ca
contracts: Simplify benchmarks ( #13595 )
...
* Remove batching
* Benchmark in bytes not kilobytes
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* ".git/.scripts/commands/bench/bench.sh" pallet dev pallet_contracts
* Add rationale for picking batch numbers
---------
Co-authored-by: command-bot <>
2023-03-16 19:19:48 +00:00
Bastian Köcher
508f3bd19a
parachains-runtime: Less cloning! ( #6896 )
...
* parachains-runtime: Less cloning!
* Fix tests
* FMT
2023-03-16 18:56:52 +00:00
Bradley Olson
8d92debd44
Testing Reversion Speed on Dispute Concluded Against ( #6880 )
...
* First pass adding logs
* fmt
* Adjustments
2023-03-16 18:56:38 +00:00
Oliver Tale-Yazdi
3a3d93afee
Update all weights ( #13614 )
...
* Empty commit
* ".git/.scripts/commands/bench/bench.sh" all
---------
Co-authored-by: Alexander Theißen <alex.theissen@me.com >
Co-authored-by: command-bot <>
2023-03-16 17:57:45 +01:00
dependabot[bot]
0aa857aca2
Bump quote from 1.0.23 to 1.0.26 ( #2331 )
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.23 to 1.0.26.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.23...1.0.26 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 16:51:28 +01:00
Xiliang Chen
b2a15ed8c1
remove duplicated arm and fix version index ( #6884 )
...
* remove duplicated arm
* annotate the version index
* add tests
* fmt
2023-03-16 15:26:55 +00:00
Mira Ressel
b117dbdf08
refactor cargo-check-benches logic
...
* fix fetch refspec
* assume base is master if the api call fails
* merge master into pr branch rather than the other way around; same
effect but imo cleaner and more readable
* don't re-fetch pr branch, we want to test the version our pipeline is
running on
2023-03-16 15:57:05 +01:00
Mira Ressel
3a9e37c0a7
fix BASE lookup in cargo-check-benches
2023-03-16 15:57:05 +01:00
Gonçalo Pestana
ce08e1354f
Integration tests for staking + election-provider-multi-phase ( #12972 )
...
* EPM and staking pallets: Adds new crate for integration tests
a
* Adds ExtBuilder and helpers with initial conditions assertions
* removes account helpers; adds staking, session, etc genesis
* Adds kusama incident test case
* Prepare for slashing test
* Adds solution submission
* slash_through_offending_threshold
* Renames e2e integration tests dir and crate
* consistently slash 10% of validator set
* finishes continous_slashes_below_offending_threshold test
* Update frame/election-provider-multi-phase/test-staking-e2e/src/lib.rs
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com >
* Update frame/election-provider-multi-phase/test-staking-e2e/src/lib.rs
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com >
* Update frame/election-provider-multi-phase/test-staking-e2e/src/lib.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* Update frame/election-provider-multi-phase/test-staking-e2e/src/mock.rs
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
* mock fixes
* Additional checks to delayed solution eras and mock fixes
* nits and addresses review comments; splits ext_builder into one per pallet
* helper to set balances ext builder
* bring up mock.rs to master
* integration test fixes and additions
---------
Co-authored-by: Ankan <10196091+Ank4n@users.noreply.github.com >
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com >
2023-03-16 12:09:50 +00:00
Bastian Köcher
3e73b7557e
Try to fix flaky temp-base-path-work test ( #13505 )
...
* Try to fix flaky `temp-base-path-work` test
The test is most of the time failing when checking if the database path was deleted. The assumption
is that it takes a little bit more time by the OS to actually clean up the temp path under high
load. The pr tries to fix this by checking multiple times if the path was deleted. Besides that it
also ensures that the tests that require the benchmark feature don't fail when compiled without the feature.
* ".git/.scripts/commands/fmt/fmt.sh"
* Capture signals earlier
* Rewrite tests to let them having one big timeout
* Remove unneeded dep
* Update bin/node/cli/tests/common.rs
Co-authored-by: Koute <koute@users.noreply.github.com >
* Review feedback
* Update bin/node/cli/tests/common.rs
Co-authored-by: Anton <anton.kalyaev@gmail.com >
---------
Co-authored-by: command-bot <>
Co-authored-by: Koute <koute@users.noreply.github.com >
Co-authored-by: Anton <anton.kalyaev@gmail.com >
2023-03-16 12:24:20 +01:00
Adrian Catangiu
3708b156d9
sc-consensus-beefy: improve beefy gossip validator ( #13606 )
...
* sc-consensus-beefy: improve beefy gossip validator
Old gossip validator was pretty dumb, being very permissive with
incoming votes - only condition it had was to be newer than best
finalized.
New filter conditions:
- voter rounds are initialized (discarding votes until voter is
actually active),
- only votes for current active set id are accepted,
- only votes for rounds in the current voting session are accepted,
- only votes for GRANDPA finalized blocks are accepted,
- when BEEFY voter reaches mandatory round, only votes for said
mandatory round are accepted.
New validator uses the VoterOracle to easily implement above conditions
and only allow through votes that are immediately useful to the voter.
After every GRANDPA or BEEFY finality, the gossip validator filter is
updated.
* sc-consensus-beefy: remove votes enqueueing
Since gossip validator will simply disallow votes for future rounds,
and only allow votes that the voter can immediately process, there
is no need for the voter to enqueue votes.
It will see these "future" votes later in rebroadcasts, when voter
will also be able to process them. Only at that point does gossip
accept and consume them.
* sc-consensus-beefy: refactor persistent state
Move best-beefy and best-grandpa into VoterOracle instead
of passing them around as params.
VoterOracle ultimately needs to know best-beefy and/or best-grandpa
for most of its functions.
* sc-consensus-beefy: further restrict gossip validator
Assuming mandatory done in current session:
Instead of allowing votes for any round in the current session, only
accept votes for rounds equal or better than best BEEFY finalized.
* sc-consensus-beefy: add a couple of comments
* sc-consensus-beefy: fix tests involving multiple tasks
Finalize blocks one a time in tests where we want gossip to happen
in a certain round. Otherwise, some tasks may be left behind in
terms of gossip round numbers because once "scheduled" a task will
greedily process as much as possible.
This change should be in line with the real-world scenario where
voters run "in parallel" across nodes, the only points of
synchronization being the finality notifications.
* sc-consensus-beefy: address review comments
---------
Signed-off-by: acatangiu <adrian@parity.io >
2023-03-16 11:02:39 +02:00
Bradley Olson
200e9dfa29
Issue 4393: Correcting Unnecessary Use of Arc ( #6882 )
...
* Added participation and queue sizes metrics
* First draft of all metric code
* Tests pass
* Changed Metrics to field on participation + queues
* fmt
* Improving naming
* Refactor, placing timer in ParticipationRequest
* fmt
* Final cleanup
* Revert "Final cleanup"
This reverts commit 02e5608df64b2e0f7810905e4508673b2037d351.
* Changing metric names
* Implementing Eq only for unit tests
* fmt
* Removing Clone trait from ParticipationRequest
* fmt
* Moved clone functionality to tests helper
2023-03-16 10:00:56 +01:00
Sacha Lansky
3d6d2954ce
Fix typos ( #13616 )
2023-03-16 09:29:20 +01:00
Francisco Aguirre
33fd17061e
Make Pay trait from salaries pallet more generic ( #13609 )
...
* Make Pay trait from salaries pallet more generic
* Rename and add missing
* Update frame/support/src/traits/tokens/pay.rs
* Update pay.rs
* Update pay.rs
* Update pay.rs
* Add better documentation for the AssetKind associated type
---------
Co-authored-by: Gavin Wood <gavin@parity.io >
Co-authored-by: parity-processbot <>
2023-03-15 21:04:28 +00:00
Oliver Tale-Yazdi
fd6b971d22
Add dedicated FeePolynomial struct ( #13612 )
...
* Add FeePolynomial struct
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add Weight::without_{ref_time, proof_size}
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Cleanup code
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Add docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* doc
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* Fix docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
* docs
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
---------
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io >
2023-03-15 20:43:22 +00:00
Alexandru Vasile
18432bdc3a
Companion for #13287 ( #2155 )
...
* parachains: Adjust `sp_api::Metadata` to the new API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* parachains: Implement new Metadata trait for bridge/polkadot
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* update lockfile for {"substrate", "polkadot"}
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: parity-processbot <>
2023-03-15 19:22:04 +00:00
Alexandru Vasile
e1e46c26cb
Companion for #13287 ( #6655 )
...
* runtime: Adjust `sp_api::Metadata` to the new API
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
* update lockfile for {"substrate"}
---------
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io >
Co-authored-by: parity-processbot <>
2023-03-15 18:41:56 +00:00
Mira Ressel
84f61ba327
pin specific version of timestamp script ( #13613 )
2023-03-15 18:27:18 +00:00