Commit Graph

6940 Commits

Author SHA1 Message Date
Sasha Gryaznov d8e9fff3e4 [contracts] API host functions: remove seal_ name prefix + enable aliasing (#12126)
* works but ugly

* refactored + renamed host fns

* fixed tests

* fix benchmarks

* updated marco docs

* Update frame/contracts/proc-macro/src/lib.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* fix for the duplicated prefixed alias bug + test

* refactored a bit

* fix warnings + try to make macro rustdoc compile

* fmt after clearing

* examples update + nocompile

* add seal_ prefixes to unstable host functions

* updated after a review

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2022-09-07 08:54:17 +00:00
NingLin-P 56e536f6e8 staking: avoid proportional slashing leak dust into chunks that should not be slashed (#12058)
* replace slash ratio with remaining ratio

Signed-off-by: linning <linningde25@gmail.com>

* little refactor

Signed-off-by: linning <linningde25@gmail.com>

* fix test

Signed-off-by: linning <linningde25@gmail.com>

* fix typo

Signed-off-by: linning <linningde25@gmail.com>

* revert refactor

Signed-off-by: linning <linningde25@gmail.com>

* rounding up instead of remaining ratio

Signed-off-by: linning <linningde25@gmail.com>

* address comment

Signed-off-by: linning <linningde25@gmail.com>

* Update frame/nomination-pools/test-staking/src/lib.rs

Signed-off-by: linning <linningde25@gmail.com>

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

* Update frame/nomination-pools/test-staking/src/lib.rs

Signed-off-by: linning <linningde25@gmail.com>

Co-authored-by: Roman Useinov <roman.useinov@gmail.com>

Signed-off-by: linning <linningde25@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Roman Useinov <roman.useinov@gmail.com>
Co-authored-by: parity-processbot <>
2022-09-06 12:24:31 +00:00
Sergej Sakac 2795b5fd29 Uniques: Small fix in docs (#12143)
* small fix in docs

* Update frame/uniques/src/lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>

* Update lib.rs

* Update lib.rs

* Update lib.rs

Co-authored-by: Bastian Köcher <git@kchr.de>
2022-09-06 12:16:29 +00:00
Piotr Mikołajczyk 198f94f931 try-runtime::follow-chain - keep connection (#12167)
* Refactor RPC module

* Add flag to `follow-chain`

* Multithreading remark

* fmt

* O_O

* unused import

* cmon

* accidental removal reverted

* remove RpcHeaderProvider

* mut refs

* fmt

* no mutability

* now?

* now?

* arc mutex

* async mutex

* async mutex

* uhm

* connect in constructor

* remove dep

* old import

* another take

* trigger polkadot pipeline

* trigger pipeline
2022-09-06 08:01:35 +00:00
Roman Useinov d213e95784 [Fix] Make sure pool metadata is removed on pool dissolve (#12154)
* [Fix] Make sure pool metadata is removed on pool dissolve

* add migration

* remove_metadata helper removed

* fix typo and add a comment

* fix pre_upgrade

* fix migration

* Update frame/nomination-pools/src/migration.rs

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

* Update frame/nomination-pools/src/migration.rs

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

* address comments

* fix comments

* Update frame/nomination-pools/src/migration.rs

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

* address comments

* permissions fix

Co-authored-by: parity-processbot <>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
2022-09-06 06:34:29 +00:00
Davide Galassi 83aec6f93a Fetch Babe configuration from runtime state (#11760)
* Fetch babe config data from runtime state

* Some renaming

* More renaming

* Final nits

* Fix tests and benches

* Rename  to  in BabeConfiguration

* Remove duplicate babe parameter description

Already specified over the 'PRIMARY_PROBABILITY' constant value

* trigger pipeline

* trigger pipeline
2022-09-05 17:41:32 +00:00
Muharem Ismailov f919894c84 Alliance pallet: split force_set_members call (#12179)
* Alliance pallet: split force_set_members call

* use counts for event

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

Co-authored-by: command-bot <>
2022-09-05 15:08:50 +00:00
Stephen Shelton b6f67b08ed Impl transaction-payment GenesisConfig with NextFeeMultplier support (#12177)
* Impl GenesisConfig with NextFeeMultplier support

* Update lib.rs

* Use documented const

* Unit test multiplier genesis

* fmt

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2022-09-05 14:37:25 +00:00
Nazar Mokrynskyi efa04ed70d Enforce blocks response limit (#12146) 2022-09-05 14:06:20 +00:00
Squirrel 2b80555902 drive by spelling fixes (#12175) 2022-09-05 16:04:14 +02:00
Adrian Catangiu 84acfd5f50 beefy: initialize voter from genesis and fix initial sync (#11959)
* client/beefy: use backend instead of client where possible

* client/beefy: initialize voter from genesis

Now that we have justifications import, we can drop the "lean beefy"
behaviour and start building justifications chain from Genesis with
containing all past sessions' mandatory blocks justifications.

* client/beefy: walk finality tree_route to catch session changes

* client/beefy: fix block import

During initial block import blocks are not finalized, so trying to
validate and append justifications within block import fails (for
initial network sync imported blocks).

Changes:

- Move justification validation to _after_ `inner.block_import()`,
  so block is imported in backend and runtime api can be called to
  get the BEEFY authorities for said block.
- Move append-to-backend for imported BEEFY justification to voter,
  because it already has the required logic to BEEFY-finalize blocks
  only after GRANDPA finalized them.
- Mark voting rounds as concluded when finalizing through
  imported justifications as well as when finalizing through voting.

* client/beefy: valid justifications are one per block number

The only way we'd get _different_ _validated_ justifications for same
block number is if authorities are double voting, which will be handled
later.

* client/beefy: process incoming justifs during major sync

* client/beefy: correct voter initialization

BEEFY voter should resume voting from either:
  - last BEEFY finalized block,
  - session start,
whichever is closest to head.

* client/beefy: test voter initialization

* client/beefy: impl review suggestions

Signed-off-by: acatangiu <adrian@parity.io>
2022-09-05 13:47:15 +03:00
Piotr Mikołajczyk 1fabf067d0 try-runtime::follow-chain - execute all blocks (#12048)
* extract subscription

* FinalizedHeaders

* Fool of a Took

* testability

* tests

* review comments

* clippy
2022-09-05 07:26:45 +00:00
Dmitry Markin 24d09fe8c7 Use custom type for ProtocolName (#12172)
* Add ProtocolName custom type

* Use new ProtocolName in sc_network_common

* Use new ProtocolName in sc_network

* Use new ProtocolName for BEEFY and GRANDPA

* Use new ProtocolName for notifications

* Use new ProtocolName in sc_network (part 2)

* Use new ProtocolName in sc_network_gossip

* Use new ProtocolName in sc_offchain

* Remove unused imports

* Some more fixes

* Add tests

* Fix minor import issues

* Re-export ProtocolName in sc_network

* Revert "Re-export ProtocolName in sc_network"

This reverts commit 8d8ff71927e7750757f29c9bbd88dc0ba181d214.

* Re-export ProtocolName in sc_network

* Remove dependency on sc-network-common from beefy-gadget
2022-09-03 20:34:47 +00:00
Alexander Theißen 09a52ef882 Emit events for inter contract calls (#12136)
* Add topics to contract events

* Add `Call` events

* Fix compilation for no_std

* Added docs
2022-09-03 08:03:36 +00:00
Stephen Shelton 5fb97da337 Add benchmarking support for digest items (#12159)
* Add benchmarking support for digest items

* fmt
2022-09-02 21:33:26 +00:00
Shawn Tabrizi 23a81ee1e3 Remove RefTimeWeight (#12157)
* update api

* update

* remove unused

* remove `one` api

* fix unused

* fmt

* add saturating accrue

* remove `Weight::new()`

* use some macros

* div makes no sense

* Update weight_v2.rs

* missed some

* more patch

* fixes

* more fixes

* more fix

* more fix

* remove RefTimeWeight

* Update frame/contracts/src/storage.rs

Co-authored-by: Alexander Theißen <alex.theissen@me.com>

* not needed

* Fixes

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2022-09-02 18:19:49 +00:00
Muharem Ismailov a9a2fdca7b Alliance pallet: fix func name, fix migration weights (#12174)
* Alliance pallet: fix func name, fix migration weights

* update comment order
2022-09-02 18:54:30 +02:00
Bastian Köcher 907144496e Do not drop the task_manager for benchmarking stuff (#12147)
We can not drop the `task_manager` for benchmarking stuff, because otherwise stuff that may needs
this feature (like background signature verification) will fail. Besides the base path setup is
moved to `SharedParams` directly. Meaning any call to `base_path` will now directly return a tmp
path when `--dev` is given.
2022-09-02 07:27:00 +00:00
Oliver Tale-Yazdi 2ff56f8bc8 Add StorageNoopGuard (#12163)
* Add StorageNoopGuard

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix import

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix feature gate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix feature gate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use sp-std

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-09-01 21:39:30 +00:00
Shawn Tabrizi 1df4561676 Weight v1.5 Follow Ups (#12155)
* update api

* update

* remove unused

* remove `one` api

* fix unused

* fmt

* add saturating accrue

* remove `Weight::new()`

* use some macros

* div makes no sense

* Update weight_v2.rs

* missed some

* more patch

* fixes

* more fixes

* more fix

* more fix

* Update frame/support/src/weights/weight_v2.rs

* not needed

* fix weight file
2022-09-01 17:48:03 +00:00
NingLin-P 6be21e0397 statedb: allow longer state pruning history (#11980)
* introduce DbBackedQueue for the state pruning window

Signed-off-by: linning <linningde25@gmail.com>

* avoid cloning for next_hash

Signed-off-by: linning <linningde25@gmail.com>

* add tests

Signed-off-by: linning <linningde25@gmail.com>

* make clippy happy

Signed-off-by: linning <linningde25@gmail.com>

* impl have_block by checking block number

Signed-off-by: linning <linningde25@gmail.com>

* refactor

Signed-off-by: linning <linningde25@gmail.com>

* fix tests & add test for init db-backed queue

Signed-off-by: linning <linningde25@gmail.com>

* update comment

Signed-off-by: linning <linningde25@gmail.com>

* add check for have_state_at

Signed-off-by: linning <linningde25@gmail.com>

* address comment

Signed-off-by: linning <linningde25@gmail.com>

* renanme unload_blocks to uncached_blocks

Signed-off-by: linning <linningde25@gmail.com>

* address comment

Signed-off-by: linning <linningde25@gmail.com>

* fix syncs_state test

Signed-off-by: linning <linningde25@gmail.com>

* address comment

Signed-off-by: linning <linningde25@gmail.com>

* revert change to make_test_db to add test cases

Signed-off-by: linning <linningde25@gmail.com>

* do not prune unavailable block & add tests

Signed-off-by: linning <linningde25@gmail.com>

* Update client/state-db/src/lib.rs

Signed-off-by: linning <linningde25@gmail.com>

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* Update client/state-db/src/pruning.rs

Signed-off-by: linning <linningde25@gmail.com>

Co-authored-by: cheme <emericchevalier.pro@gmail.com>

* address comment

Signed-off-by: linning <linningde25@gmail.com>

Signed-off-by: linning <linningde25@gmail.com>
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
2022-09-01 15:45:34 +00:00
ZhiYong 3e63e70b26 Name the score of the election in election finalized event (#12069)
* Name the score of the election in ElectionFinalized event

* fmt

* 1.Adjust the logic of the function 'do_elect()'.
2.Add one test that does ElectionCompute::Signed and one that does ElectionCompute::Unsigned to check 'Event::SolutionStored' and 'Event::ElectionFinalized'

* Fix from kian

* fmt and update comment.

Co-authored-by: kianenigma <kian@parity.io>
2022-09-01 10:39:25 +00:00
Kian Paimani f67c06ce22 Runtime State Test + Integration with try-runtime (#10174)
* add missing version to dependencies

* Huh

* add features more

* more fixing

* last touches

* it all finally works

* remove some feature gates

* remove unused

* fix old macro

* make it work again

* fmt

* remove unused import

* ".git/.scripts/fmt.sh" 1

* Cleanup more

* fix and rename everything

* a few clippy fixes

* Add try-runtime feature

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* small fixes

* fmt

* Update bin/node-template/runtime/src/lib.rs

* fix build

* Update utils/frame/try-runtime/cli/src/lib.rs

Co-authored-by: David <dvdplm@gmail.com>

* Update utils/frame/try-runtime/cli/src/commands/execute_block.rs

Co-authored-by: David <dvdplm@gmail.com>

* address all review comments

* fix typos

* revert spec change

* last touches

* update docs

* fmt

* remove some debug_assertions

* fmt

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: David <dvdplm@gmail.com>
2022-09-01 10:33:22 +00:00
Muharem Ismailov d8e951758c Alliance pallet: add force_set_members instead of init_members function (#11997)
* Alliance pallet: add force_set_members instead of init_members function

* benchmark with witness data

* remove invalid limit for clear

* Apply suggestions from code review

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Revert "remove invalid limit for clear"

This reverts commit dba54e3071b63bfea908087aef213f4640e3ccbf.

* compile constructor only for test

* Update comments for force_set_members

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* benchmark - founders count range

* Revert "benchmark - founders count range"

This reverts commit aad16796f8dfed48079fb7f587b8f5b59382cda6.

* witness members count instead votable members count

* update the doc

* use decode_len for witness data checks

* change witness data member count to voting member count; update clear limits

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* merge master

* fixes after merge master

* revert to cb3e63

* disband alliance and return deposits

* revert debug changes

* weights

* update docs

* update test comments

* Apply Joe suggestions from code review

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* rename event from AllianceDisband to AllianceDisbanded

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: command-bot <>
2022-09-01 10:31:32 +00:00
Sergej Sakac 7f1b9a937a Uniques: Reset approved account after transfer (#12145)
* reset approved account

* wrap at 100

* doc

* fmt

* Update frame/uniques/src/tests.rs

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* new test

* Update frame/uniques/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

* fmt

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
2022-09-01 08:45:20 +00:00
Liu-Cheng Xu 9bbf8efd02 Only log when the transaction is actually to be propagated (#12158)
The logging before is confusing as it says Propagating but it's not in fact when gossip_enabled is
false. Now it's also consistent with `propagate_transactions` below.
2022-08-31 22:31:05 +02:00
Sebastian Kunert 800bc5cd8c Simplify trait bounds in network to prepare for collator-rpc (#12082)
* Hack towards PoC

* Abstract away runtime requirement

* blockchainevents

* Remove bitswap

* Remove unused sync more

* Remove unused features in network

* Re-enable bitswap change

* Remove `Chain` trait bound

* Reimplement blockchain-rpc-events

* Move network to cumulus

* Make AuthorityDiscovery async

* Remove `ProofProvider` requirement from network behaviour

* Extract bitswap

* Adjustments after merge

* Remove HeaderMetadata trait from network

* Introduce NetworkHeaderBackend

* Add comments

* Improve comments

* Move NetworkHeaderBackend to new module

* Improve naming, remove redundand send + sync

* Clean up generics

* Fix CI

* Improve comment and readability

* Remove NetworkHeaderBackend

* Fix Cargo.lock

Co-authored-by: Sebastian Kunert <skunert@Sebastians-MacBook-Pro.fritz.box>
2022-08-31 14:55:46 +02:00
Shawn Tabrizi 30951822ba Weight v1.5: Opaque Struct (#12138)
* initial idea

* update frame_support

* update a bunch more

* add ord

* adjust RuntimeDbWeight

* frame_system builds

* re-export

* frame_support tests pass

* frame_executive compile

* frame_executive builds

* frame_system tests passing

* pallet-utility tests pass

* fix a bunch of pallets

* more

* phragmen

* state-trie-migration

* scheduler and referenda

* pallet-election-provider-multi-phase

* aura

* staking

* more

* babe

* balances

* bunch more

* sudo

* transaction-payment

* asset-tx-payment

* last pallets

* fix alliance merge

* fix node template runtime

* fix pallet-contracts cc @athei

* fix node runtime

* fix compile on runtime-benchmarks feature

* comment

* fix frame-support-test

* fix more tests

* weight regex

* frame system works

* fix a bunch

* more

* more

* more

* more

* more

* more fixes

* update templates

* fix contracts benchmarks

* Update lib.rs

* Update lib.rs

* fix ui

* make scalar saturating mul const

* more const functions

* scalar div

* refactor using constant functions

* move impl

* fix overhead template

* use compactas

* Update lib.rs
2022-08-31 11:26:13 +00:00
Oliver Tale-Yazdi 299f4ba541 Fix sporadic test failure (#12140)
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-08-30 09:12:19 +00:00
Muharem Ismailov b74fba5dac Alliance pallet: retirement notice call (#11970)
* Alliance pallet: retirement notice

* add alliance pallet to benchmark list for dev chain

* fix type

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* link weight generated by bench for retirement_notice method

* migration to clear UpForKicking storage prefix

* rename migration from v1 to v0_to_v1

* Apply suggestions from code review

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* rename `retirement-notice to give-retirement-notice

* Apply suggestions from code review

Co-authored-by: Squirrel <gilescope@gmail.com>

* review fixes: update doc, saturating add, BlockNumber type alias

* add suffix to duratin consts *_IN_BLOCKS

* ".git/.scripts/bench-bot.sh" pallet dev pallet_alliance

* add negative tests (#11995)

* add negative tests

* remove tests powerless asserts checking against announcment origin

* assert bad origin from announcement origin checks

Co-authored-by: muharem <ismailov.m.h@gmail.com>

Co-authored-by: command-bot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Squirrel <gilescope@gmail.com>
2022-08-29 16:02:23 +00:00
Koute b922a25ccd Force rustix to use libc (#12123) 2022-08-29 15:30:37 +00:00
Bastian Köcher f6f6570459 Fix flaky trie-db cache test (#12139) 2022-08-29 17:11:19 +02:00
Dmitry Markin 224562729d Make NetworkService::add_reserved_peer() accept MultiaddrWithPeerId (#12102)
* Make `add_reserved_peer()` accept `MultiaddrWithPeerId`

* minor: cargo fmt

* minor: error to string conversion

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2022-08-29 11:54:57 +00:00
Dmitry Novikov 674e73caf0 Bug fix of currencies implementation for pallet-balances (#11875)
* Add test

* Fix the bug

* Add similar test for named reservable

* Extend test with "overflow" repatriation

* Expand test for `NamedReservableCurrency`

* Add notes about return values meaning
2022-08-29 11:22:40 +00:00
Jędrzej Kula 39db847714 Additional constraints for NotificationSender (#12121)
Co-authored-by: Jedrzej Kula <jedrzej.kula@cardinals.cc>
2022-08-29 10:01:37 +02:00
Kian Paimani 8d481f55c3 Fix nomination pools pending rewards RPC (#12095)
* Fix nomination pools pending rewards RPC

* Fix node

* Update frame/nomination-pools/src/lib.rs

* Fix docs
2022-08-28 12:55:54 +00:00
Piotr Mikołajczyk 9e5b211828 try-runtime - support all state versions (#12089)
* Add argument

* Apply

* More verbose parsing

* fmt

* fmt again

* Invalid state version

* reuse parsing

* type mismatch
2022-08-27 04:56:24 +00:00
dependabot[bot] 75a76d967b Bump serde_json from 1.0.79 to 1.0.85 (#12079)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.79 to 1.0.85.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.79...v1.0.85)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-26 09:32:20 +02:00
dependabot[bot] 45655e485b Bump async-trait from 0.1.51 to 0.1.57 (#11948)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.51 to 0.1.57.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.51...0.1.57)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-26 09:31:56 +02:00
dependabot[bot] 5318bf53d4 Bump parking_lot from 0.12.0 to 0.12.1 (#12098)
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/Amanieu/parking_lot/releases)
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.0...0.12.1)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-25 23:52:19 +02:00
Sergejs Kostjucenko 933440197a pin gha versions (#12100) 2022-08-25 17:52:58 +03:00
Bastian Köcher 7c465dfe6a Fix wasm_export_functions when using a return statement (#12107)
When used a return statement before we directly returned from the function which is obviously wrong.
2022-08-25 13:18:53 +02:00
Squirrel 0fb0ef8c2f clone not required as copy. (#12110) 2022-08-25 11:11:15 +00:00
Keith Yeung 948af11977 Allow construct_runtime to take cfg attributes for pallets (#11818)
* Allow construct_runtime to take cfg attributes for pallets

* cargo fmt

* Remove commented out code

* Fixes

* cargo fmt

* Remove inaccurate comments

* Fix typo

* Properly reverse pallets

* Fixes

* cargo fmt

* Add missing newlines
2022-08-25 08:56:18 +00:00
Keith Yeung edc8f7b409 Implement ResultQuery (#11257)
* Implement ResultQuery

* Fix test expectations

* Add more tests

* Fix test expectations

* Clean up some names

* Silence warnings

* Specify error type when supplying error type to ResultQuery

* cargo fmt

* Add support for type parameters in parameter_types macro

* Reduce deeply indented code

* Fixes

* Update test expectation

* Rewrite and document formula for calculating max storage size

* More docs

* cargo fmt

* formatting

Co-authored-by: parity-processbot <>
2022-08-24 17:47:08 +00:00
Oliver Tale-Yazdi 6aba2fdc99 Test bench components with more values (#11963)
* Test values besides low and high.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Only add highest if different and remove check

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add env var

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Update README

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Add tests

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2022-08-24 15:55:48 +00:00
Bastian Köcher e62e670631 Print bootnode mismatch message as warning (#12075)
* Print bootnode mismatch message as `warning`

* Fix test :thinking_face:

* Remove wrong warning
2022-08-23 22:22:58 +02:00
dependabot[bot] 16842c3d64 Bump parity-db from 0.3.13 to 0.3.16 (#12091)
Bumps [parity-db](https://github.com/paritytech/parity-db) from 0.3.13 to 0.3.16.
- [Release notes](https://github.com/paritytech/parity-db/releases)
- [Commits](https://github.com/paritytech/parity-db/commits)

---
updated-dependencies:
- dependency-name: parity-db
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-23 13:19:54 +02:00
Nazar Mokrynskyi b20f83c18f Network sync refactoring (part 7) (#12006)
* Move `MultiaddrWithPeerId` and related parsing functions into `sc-network-common`, remove dependency on `sc-network` from `sc-chain-spec`

* Remove dependency on `sc-network` from `sc-offchain`

* Remove dependency on `sc-network` from `sc-network-gossip`
2022-08-22 15:53:14 +00:00
Sasha Gryaznov c930cd0d79 [contracts] define_env! re-write as a proc macro (#11888)
* define_env proc macro basics + can_satisfy part ready

* expand_impls part done

* fix of the &FunctionType bug

* pallet is compiled

* updated host fn definition syntax

* docs comments allowed to host fn definitions

* all 53 host funcs re-defined by the new macro

* unstable feat fix

* cleanup

* legacy mbe macros cleaned up

* Added Env ident to macro attribute; all tests pass!

* \#[v(..)] -> \#[version(..)]

* some tiny corrections

* save

* builds with non-magic rt; tests fail

* tests pass

* refactored errors + added docs

* merge err fixed

* fixes on @ascjones review, all except moving away from `pub mod env` syntax

* debug printing cleared

* clippy fix
2022-08-22 13:06:43 +00:00