Commit Graph

521 Commits

Author SHA1 Message Date
Bastian Köcher 1a01bca647 Fixes bug in wasm-builder with cargo publish (#7299)
* Fixes bug in wasm-builder with cargo publish

There was a bug in wasm-builder which resulted in generating a
`Cargo.lock` in the project directory because of running `cargo
metadata`. This resulted in commands like `cargo publish` to fail (if
there was no `Cargo.lock` before building), because it checks that the
project directory isn't modified.

* Update utils/wasm-builder/src/wasm_project.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-10-12 12:29:53 +02:00
Bastian Köcher 4f447efb65 Release new version of wasm-builder-runner (#7283)
* Release new version of wasm-builder-runner

Besides the new version this merges `SKIP_WASM_BUILD` and
`BUILD_DUMMY_WASM_BINARY`, this means a file is generated with
`SKIP_WASM_BUILD` if no file existed before.

* Update utils/wasm-builder-runner/Cargo.toml

* Update utils/wasm-builder-runner/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update versions

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-10-09 12:34:40 +02:00
Rakan Alhneiti 3aa4bfacfc Async keystore + Authority-Discovery async/await (#7000)
* Asyncify sign_with

* Asyncify generate/get keys

* Complete BareCryptoStore asyncification

* Cleanup

* Rebase

* Add Proxy

* Inject keystore proxy into extensions

* Implement some methods

* Await on send

* Cleanup

* Send result over the oneshot channel sender

* Process one future at a time

* Fix cargo stuff

* Asyncify sr25519_vrf_sign

* Cherry-pick and fix changes

* Introduce SyncCryptoStore

* SQUASH ME WITH THE first commit

* Implement into SyncCryptoStore

* Implement BareCryptoStore for KeystoreProxyAdapter

* authority-discovery

* AURA

* BABE

* finality-grandpa

* offchain-workers

* benchmarking-cli

* sp_io

* test-utils

* application-crypto

* Extensions and RPC

* Client Service

* bin

* Update cargo.lock

* Implement BareCryptoStore on proxy directly

* Simplify proxy setup

* Fix authority-discover

* Pass async keystore to authority-discovery

* Fix tests

* Use async keystore in authority-discovery

* Rename BareCryptoStore to CryptoStore

* WIP

* Remote mutable borrow in CryptoStore trait

* Implement Keystore with backends

* Remove Proxy implementation

* Fix service builder and keystore user-crates

* Fix tests

* Rework authority-discovery after refactoring

* futures::select!

* Fix multiple mut borrows in authority-discovery

* Merge fixes

* Require sync

* Restore Cargo.lock

* PR feedback - round 1

* Remove Keystore and use LocalKeystore directly

Also renamed KeystoreParams to KeystoreContainer

* Join

* Remove sync requirement

* Fix keystore tests

* Fix tests

* client/authority-discovery: Remove event stream dynamic dispatching

With authority-discovery moving from a poll based future to an `async`
future Rust has difficulties propagating the `Sync` trade through the
generated state machine.

Instead of using dynamic dispatching, use a trait parameter to specify
the DHT event stream.

* Make it compile

* Fix submit_transaction

* Fix block_on issue

* Use await in async context

* Fix manual seal keystore

* Fix authoring_blocks test

* fix aura authoring_blocks

* Try to fix tests for auth-discovery

* client/authority-discovery: Fix lookup_throttling test

* client/authority-discovery: Fix triggers_dht_get_query test

* Fix epoch_authorship_works

* client/authority-discovery: Remove timing assumption in unit test

* client/authority-discovery: Revert changes to termination test

* PR feedback

* Remove deadcode and mark test code

* Fix test_sync

* Use the correct keyring type

* Return when from_service stream is closed

* Convert SyncCryptoStore to a trait

* Fix line width

* Fix line width - take 2

* Remove unused import

* Fix keystore instantiation

* PR feedback

* Remove KeystoreContainer

* Revert "Remove KeystoreContainer"

This reverts commit ea4a37c7d74f9772b93d974e05e4498af6192730.

* Take a ref of keystore

* Move keystore to dev-dependencies

* Address some PR feedback

* Missed one

* Pass keystore reference - take 2

* client/finality-grandpa: Use `Arc<dyn CryptoStore>` instead of SyncXXX

Instead of using `SyncCryptoStorePtr` within `client/finality-grandpa`,
which is a type alias for `Arc<dyn SyncCryptoStore>`, use `Arc<dyn
CryptoStore>`. Benefits are:

1. No additional mental overhead of a `SyncCryptoStorePtr`.

2. Ability for new code to use the asynchronous methods of `CryptoStore`
instead of the synchronous `SyncCryptoStore` methods within
`client/finality-granpa` without the need for larger refactorings.

Note: This commit uses `Arc<dyn CryptoStore>` instead of
`CryptoStorePtr`, as I find the type signature more descriptive. This is
subjective and in no way required.

* Remove SyncCryptoStorePtr

* Remove KeystoreContainer & SyncCryptoStorePtr

* PR feedback

* *: Use CryptoStorePtr whereever possible

* *: Define SyncCryptoStore as a pure extension trait of CryptoStore

* Follow up to SyncCryptoStore extension trait

* Adjust docs for SyncCryptoStore as Ben suggested

* Cleanup unnecessary requirements

* sp-keystore

* Use async_std::task::block_on in keystore

* Fix block_on std requirement

* Update primitives/keystore/src/lib.rs

Co-authored-by: Max Inden <mail@max-inden.de>

* Fix wasm build

* Remove unused var

* Fix wasm compilation - take 2

* Revert async-std in keystore

* Fix indent

* Fix version and copyright

* Cleanup feature = "std"

* Auth Discovery: Ignore if from_service is cloed

* Max's suggestion

* Revert async-std usage for block_on

* Address PR feedback

* Fix example offchain worker build

* Address PR feedback

* Update Cargo.lock

* Move unused methods to test helper functions

* Restore accidentally deleted cargo.lock files

* Fix unused imports

Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-08 20:56:35 +00:00
Alexander Theißen 443725f0f6 seal: Add automated weights for contract API calls (#7017)
* seal: Add capability to put uninstrumented code (for benchmarks)

Benchmarks should only measure the overhead of the API calls itself.
For that reason we want to run them without instrumentation.

* seal: Cap the the data length for deposited events

Data used in events has storage implications for archive nodes.
Those need to keep the events in storage forever. For that reason
we want to limit the amount of storage that can be used inside events.

* seal: Fix error reporting in the case out of bound sandbox access

* seal: Refactor existing benchmarks

* seal: Convert benchmark file to tabs

* seal: Add benchmarks for functions called by contracts

* seal: Create a default schedule from benchmark generated WeightInfo

* seal: Make use of WeightInfo in extrinsic weight annotations

* seal: Replace the old schedule by the benchmark generated one

* Review: Fix copy paste typo in schedule construction

* Review: Fix stale docs

* Fix whitespace errors

Co-authored-by: Sergei Shulepov <sergei@parity.io>

* Review: Use checked_div in order to be more defensive

* Review: Rename no_charge to already_charged

* Review: Whitelist caller of extrinsics

* Review: Remove trailing whitespace

* Review: Remove confusing "self::" syntax

* Review: Add docs for the benchmark prepration submodule

* Review: Move code generation functions to own module

* Review: Refactor and document benchmark helper functions

* Remove additional empty line

* Added missing comment on caller_funding

* Update frame/contracts/src/benchmarking/code.rs

Co-authored-by: Sergei Shulepov <sergei@parity.io>

* Fix missing sp_std::prelude import in code.rs

* cargo run --release --features runtime-benchmarks --manifest-path bin/node/cli/Cargo.toml -- benchmark --chain dev --steps 50 --repeat 20 --extrinsic * --execution=wasm --wasm-execution=compiled --output ./bin/node/runtime/src/weights --header ./HEADER --pallet pallet_contracts --heap-pages 4096

* Use weights from the benchmark machine for the substrate node

* Remove prefixes from Schedule members

* Data lengths in the WeightInfo Trait are specified in kilobytes

* Rename ApiWeights to HostFunctionWeights

Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-08 15:36:37 +00:00
Kian Paimani ba229c629f Refactor CurrencyToVote (#6896)
* Refactor CurrencyToVote to avoid calls to total_issuance.

* Update frame/support/src/traits.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Some grumbles

* Fix last grumbles.

* Fix comment

* Final fix

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2020-10-08 14:50:54 +00:00
ddorgan 5f80929184 Reset flaming fir network (#7274) 2020-10-07 17:03:10 +02:00
Nikolay Volf add7c9ed5b Drop system cache for trie benchmarks (#7242)
* add system clear cache

* move to shared

* rearrange a little-a

* add few tricks also

* use tempdir for buf as well

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-07 14:14:14 +02:00
Bastian Köcher 89e06d26b2 Rework InspectState (#7271)
Reworks `InspectState` in two ways:
- Renames `inspect_with` to `inspect_state` to reflect the trait name.
- Make `inspect_state` return the result of the closure
2020-10-06 23:16:14 +00:00
Kian Paimani 4d036e0053 Fix offchain election to respect the weight (#7215)
* Mockup

* Fix offchain election to respect the weight

* Fix builds a bit

* Update frame/staking/src/offchain_election.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update frame/staking/src/offchain_election.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Make it build, binary search

* Fix a number of grumbles

* one more fix.

* remove unwrap.

* better alg.

* Better alg again.

* Final fixes

* Fix

* Rollback to normal

* Final touches.

* Better tests.

* Update frame/staking/src/lib.rs

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* Proper maxExtWeight

* Final fix

* Final fix for the find_voter

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2020-10-02 13:45:17 +00:00
Shawn Tabrizi a56f90fa9a Update Treasury Config to use Propotion of Council Members (#7235)
* Update treasury config to use propotion of council members

* add `_5`
2020-10-01 01:18:32 +00:00
Shawn Tabrizi 721754bc6e Improve Payout Benchmarks in Staking (#7237)
* add additional checks

* fix wasm trap

* Wasm trap?

* Clean up validators before running payout

* fix line width
2020-09-30 20:55:17 +00:00
Sergei Shulepov 54c7e3e9fb Tidy some CLI stuff. (#7227)
Co-authored-by: Gav Wood <gavin@parity.io>
2020-09-28 19:28:32 +00:00
Gavin Wood 26465eadaa Introduce cancel_proposal to rid us of those pesky proposals (#7111)
* Introduce `cancel_proposal`

Also fix proposal weight.

* Support proposal cancellation from runtime.

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fix benchmarks

* fix benchmark

* whitelisted caller weights

* fix build

* Fixes

* Fixes

* Fixes

* Fixes

* Update frame/democracy/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* doc updates

* new weights

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-09-24 21:33:02 +00:00
Shawn Tabrizi 4e5f9fb72b More Improvements to Benchmarking CLI + Generic WeightInfo (#7168)
* Generic WeightInfo, Output File Path

* Make `WeightInfo` generic

* Add support for header file

* fix line width

* add `--spaces` flag

* Configurable trait and struct strings

* make elections phragmen generic

* Add date to generated file

* Apply suggestions from code review

Co-authored-by: Gavin Wood <gavin@parity.io>

* fixes

* add settings metadata to output

Co-authored-by: nikvolf <nikvolf@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
2020-09-23 13:56:30 +00:00
Kian Paimani 313f86ec23 PhragMMS election. (#6685)
* Revamp npos-elections and implement phragmms

* Update primitives/npos-elections/src/phragmms.rs

* Fix build

* Some review grumbles

* Add some stuff for remote testing

* fix some of the grumbles.

* Add remote testing stuff.

* Cleanup

* fix docs

* Update primitives/arithmetic/src/rational.rs

Co-authored-by: Dan Forbes <dan@danforbes.dev>

* Small config change

* Better handling of approval_stake == 0

* Final touhces.

* Clean fuzzer a bit

* Clean fuzzer a bit

* Update primitives/npos-elections/src/balancing.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Fix fuzzer.

* Better api for normalize

* Add noramlize_up

* A large number of small fixes.

* make it merge ready

* Fix warns

* bump

* Fix fuzzers a bit.

* Fix warns as well.

* Fix more tests.

Co-authored-by: Dan Forbes <dan@danforbes.dev>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-09-23 08:16:10 +00:00
Benjamin Kampmann ecdc94420e Releasing 2.0 – two dot 😮 (#7182)
Tagging the release of substrate 2.0


[ci: skip-checks]
2020-09-22 19:47:38 +02:00
Gavin Wood cbf1a282b5 u32 Refcounts, plus migration (#7164)
* u32 Refcounts, plus migration

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-09-22 16:20:39 +00:00
Bastian Köcher 86594727d9 Rename ModuleToIndex to PalletRuntimeSetup (#7148)
* Rename `ModuleToIndex` to `PalletRuntimeSetup`

Besides the renaming it also adds support getting the name of a pallet
as configured in the runtime.

* Rename it to `PalletInfo`

* Remove accidentally added files
2020-09-22 13:39:56 +00:00
Kian Paimani f70ef87a0c Update elections-phragmen weight to WeightInfo (#7161)
* Update elections-phragmen weight to WeightInfo

* Fix benchmark tests

* Update weights

* Update test

* Update another thest :"

* Weights from benchmarking machine

./substrate2/target/release/substrate benchmark --chain dev --steps 50 --repeat 20 --pallet pallet_elections_phragmen --extrinsic "*" --raw --execution=wasm --wasm-execution=compiled --output

* Update weights from the benchmarking machine

* Fix tests one last time

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-09-22 12:06:15 +00:00
Shawn Tabrizi 91b170656c WeightInfo for Multisig Pallet (#7154)
* as multi threshold 1

* add `as_multi_approve_store` benchmark

* finish update

* final weights

* integrate into runtime

* whitelist accounts

* whitelisted caller weights

* clean up comments

* Get up to date `call_len`

* better implementation

* fix spacing

* spacing

* Update frame/multisig/src/benchmarking.rs

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
2020-09-21 14:39:19 +00:00
Shawn Tabrizi 42a4c2eef0 Add WeightInfo to Babe and Grandpa Pallet (#7155)
* Add `WeightInfo` to Babe Pallet

* Also grandpa

* Update frame/grandpa/src/default_weights.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-09-21 13:31:44 +00:00
Shawn Tabrizi 9e9e34fad8 WeightInfo for Session Pallet (#7136)
* whitelist caller in benchmarks

* remove unused component

* Add benchmark weights

* Remove `weightinfo` for `offences`
2020-09-21 09:13:31 +00:00
Maciej Hirsz ae52587f41 Bump jsonrpc-* dependencies to v15 (#7157)
* Bump jsonrpc-* dependencies to v15

* Remove unused imports
2020-09-21 08:46:10 +00:00
Jon Häggblad 8a0ac4c40c grandpa-rpc: use FinalityProofProvider to check finality for rpc (#6215)
* grandpa-rpc: use FinalityProofProvider to check finality for rpc

* grandpa-rpc: minor tidy

* grandpa-rpc: remove dyn FinalityProofProvider

* grandpa-rpc: remove unused dependencies

* node: move finality_proof_provider setup

* grandpa-rpc: print error reported by finality_proof_provider

* grandpa-rpc: add note about unnecessary encode/decode

* grandpa-rpc: dont encode/decode and use correct hash

* grandpa-rpc: set_id is optional

* grandpa-rpc: create test for prove_finality

* grandpa-rpc: set visibility back to how it was

* grandpa-rpc: remove unused dependency

* grandpa-rpc: minor tidy

* grandpa: doc strings

* grandpa-rpc: rename to prove_finality

* grandpa-rpc: use current set id if none is provided

* grandpa-rpc: remove unnecessary check in test

* node: group finality_proof_provider in rpc_setup

* grandpa: make prove_finality concrete in FinalityProofProvider

* grandpa-rpc: wrap finality output in struct and store as Bytes

* grandpa-rpc: exhaustive error codes and wrap

* grandpa-rpc: let prove_finality take a range instead of a starting point

* grandpa-rpc: fix test for changed API

* grandpa-rpc: fix line length

* grandpa: fix reviewer nits

* node/rpc: fix reviewer comments
2020-09-18 16:39:27 +00:00
Shawn Tabrizi 743cf7543b WeightInfo for Scheduler (#7138)
* initial scheduler stuff

* integrate weightinfo

* Update pallet_scheduler.rs
2020-09-18 14:15:40 +00:00
Xiliang Chen 67e1dad940 Bounties (#5715)
* add some compact annotation

* implement bounties for treasury

* fix test build

* remove some duplicated code

* fix build

* add tests

* fix build

* fix tests

* rename

* merge deposit byte fee

* add comments

* refactor storage

* support sub bounty

* emit BountyBecameActive when sub bounty is created

* able to contribute bounty

* allow curator to cancel bounty

* remove bounty contribution

* implement bounty expiry

* Able to extend bounty

* fix build and update tests

* create sub bounty test

* add more tests

* add benchmarks for bounties

* fix build

* line width

* fix benchmarking test

* update trait

* fix typo

* Update lib.rs

Missing documentation on Bounties added on this change. Please check the definitions of `propose_bounty` and `create_bounty`.

* update docs

* add MaximumSubBountyDepth

* put BountyValueMinimum into storage

* rework bount depth

* split on_initialize benchmarks

* remove components from constant functions

* Update weight integration into treasury

* Update reject proposal read/writes

* fix weight calculation

* Ignore weights with 0 factor

* Remove 0 multipliers

* add some docs

* allow unused for generated code

* line width

* allow RejectOrigin to cancel a pending payout bounty

* require BountyValueMinimum > ED

* make BountyValueMinimum configurable by chain spec

* remove sub-bounty features

* update curator

* accept curator

* unassign and cancel

* fix tests

* new tests

* Update lib.rs

- Include on `Assign_curator`, `accept_curator` and `unassign_curator` on Bounties Protocol Section 
- Include curator fee and curator deposit definitions on Terminology
- Update intro.

* fix test

* update extend_bounty_expiry

* fix benchmarking

* add new benchmarking code

* add docs

* fix tests

* Update benchmarking.rs

* Make BountyValueMinimum a trait config instead of stroage value

* fix runtime build

* Update weights

* Update default_weights.rs

* update weights

* update

* update comments

* unreserve curator fee

* update tests

* update benchmarks

* fix curator deposit handling

* trigger CI

* fix benchmarking

* use append instead of mutate push

* additional noop tests

* improve fee hanlding. update event docs

* RejectOrigin to unassign

* update bounty cancel logic

* use Zero::zero() over 0.into()

* fix tests

* fix benchmarks

* proposed fixes to bounties

* fix tests

* fix benchmarks

* update weightinfo

* use closure

* fix compile

* update weights

Co-authored-by: RRTTI <raul@ost.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-09-18 10:19:22 +00:00
Shawn Tabrizi a3080f27f1 Pallet Indices (#7137) 2020-09-18 09:16:41 +00:00
Benjamin Kampmann a9c73113a8 Tracing for wasm with bridging to native (#6916)
* implement events handling, implement parent_id for spans & events

* add events to sp_io::storage

* update test

* add tests

* adjust limit

* let tracing crate handle parent_ids

* re-enable current-id tracking

* add test for threads with CurrentSpan

* fix log level

* remove redundant check for non wasm traces

* remove duplicate definition in test

* Adding conditional events API

* prefer explicit parent_id over current,

enhance test

* limit changes to client::tracing event implementation

* remove From impl due to fallback required on parent_id

* make tracing codecable

* replace with global tracing

* new tracing interface

* impl TracingSubscriber in client

* implement access to global TracingSubscriber from primitives

* span for wasm

* increment towards Wasm Tracing Subscriber implementation

* increment, remove sp-tracing from runtime-interface

* increment, it compiles

* attained original functionality with new mechanism

* implement remaining TracingSubscriber functions

* remove spans from decl_module

* add handling for encoded values

* Revert "replace with global tracing"

This reverts commit 8824a60deea54d9b437407a21c8ceaf6a1902ee5.

* Wasm Side Tracing

* tracing on wasm

* enable tracing wasm on node-runtime

* export all the macros in std

* tracing subscriber on wasm-side only

* pass spans and events over and record them

* reactivate previous code and  cleanup

* further cleaning up

* extend the span macros, activate through executive

* tracking the actual extrinsic, too

* style

* fixing tests

* spaces -> tabs

* attempting to reactivate params

* activate our tests in CI

* some passing

* tests passing

* with core lazy

* global tracer for wasm side with pass over

* fixing metadata referencing

* remove const_fn feature requirement

* reenable dispatch traces

* reset client tracing

* further cleaning up

* fixing runtime-test

* move tracing-build setup into runtime-test

* Merge DebugWriter from tracing and frame-support, move to sp-std

* remove dangling fixme

* Docs for tracing primitives

* cleaning up a bit more

* Wasm interface docs

* optimise docs.rs setup

* adding tracing flags to uncomment

* remove brace

* fixing imports

* fixing broken syntax

* add required modules

* nicer formatting

* better target management

* adding low level storage tracing events into frame

* add custom Debug impl for WasmMetadata

* cloning profiler

* adding info about cloning profiler

* using in-scope for within calls

* proper time tracing, cleaning up println

* allow to disable tracing on runtime_interface-macro

* disable tracing for wasm-tracing-interface

* simplify wasm-tracing-api

* update client to new interface

* fixing docs and tests for sp-tracing

* update integration tests

* re-activating enter_span

* dropping FIXME, it's documented

* fix formatting

* fix formatting

* fix imports

* more debug info

* inform wasm about it being disabled by returning 1

* only one tracer, but enabled multi-all support

* make trait pub again for tests

* Apply suggestions from code review

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

* fixing wasm doc tests for proper usage

* remove unnecessary import

* fixing formatting

* minor style fixes

* downgrading wabt

* update error message for UI

* Fix interface test

* next attempt to fix macros

* geee

* revert tracing on hashed for future PR

* remove local macros, use originals

* we are able to convert to static items

* implement more WasmValue types

* adding support to convert str, debug and encoded values

* more minor fixes

* revert unsafe 'static making

* fix indentation

* remove commented lines

* bump all them tracing versions

* cleaning up docs and info

* document new flag

* the new layered system handles span cloning better

* Apply suggestions from code review

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

Co-authored-by: Matt Rutherford <mattrutherford@users.noreply.github.com>
Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
Co-authored-by: David <dvdplm@gmail.com>
2020-09-18 06:10:59 +00:00
Shawn Tabrizi f089cb42d7 WeightInfo for Identity Pallet (#7107)
* update benchmarks

* add automated weights

* Update benchmarking.rs

* use underscores for file out

* update some weights

* more weights

* finish weights

* add basic verification to benchmarks

* patch benchmarks

* Update benchmarking.rs

* final weights

* update for new type

* add weightinfo to node
2020-09-17 21:52:43 +00:00
Kian Paimani 14df474913 fix the new staking weight in substrate-node (#7131) 2020-09-17 14:06:00 +00:00
Shawn Tabrizi 1ba05216d3 WeightInfo for ImOnline (#7128)
* Add WeightInfo, not final weights

* benchmark machine weights
2020-09-17 13:40:51 +00:00
Wei Tang 9fdd4672b0 Use tracing-based subscriber logging (#6825)
* init_logger: switch from log-based to tracing-based and add compatibility layer

* Move tracing profiling subscriber related config realization

* sp-tracing: change profiling to be a layer instead of a subscriber

* Enable profiling layer in cli

* Change all test env_logger init to sp_tracing::try_init_simple

* Remove all local env_logger dependency

* Add missing tracing-subscriber dependency

* frame-sudo: fix tests

* frame-support: fix tests

* Fix frame/pallet and executor tests

* Fix the remaining tests

* Use subscriber's try_init as recommended by @davidbarsky

* Be explict that the tracing-log feature is needed

* Set subscriber writer to stderr

* Shorter line width

* Update cargo lock tracing version

* Fix sc_tracing crate compile

* Fix sc_authority_discovery crate test

* unremove default-features

* Leave enabled to default true

* Warn if global default cannot be set

* Fix unused import

* Remove unused PROXY_TARGET

* Change all reference from rc5 to rc6

* Change all reference of rc2 to rc6

* Fix styling

* Fix typo

* make logger init error'ing

* re-fixing the test issue

Co-authored-by: Benjamin Kampmann <ben@parity.io>
2020-09-17 11:04:43 +02:00
Shawn Tabrizi ab97e94972 Add benchmarking pipeline to node-template (#7122) 2020-09-17 10:09:59 +02:00
Shawn Tabrizi 9aa8698cfc WeightInfo for Vesting Pallet (#7103)
* WeightInfo for Vesting Pallet

* clean up weight docs

* Update lib.rs

* try to pipe max locks

* Update for new type

* add warning when locks > MaxLocks

* Update lib.rs

* fix compile

* remove aliasing, fix trait def

* Update
2020-09-16 19:48:10 +00:00
Roman Borschel 51706a7620 Upgrade to libp2p-0.28. (#7077)
* Upgrade to libp2p-0.28

* Clean up test imports.

* CI

* CI

* CI?

* CI once more.

* One more.

* CI

* CI

* CI
2020-09-14 14:27:58 +00:00
Wei Tang 96901b9662 pallet-collective: allow customized default vote (#6984)
* collective: add DefaultVote trait

* Fix test and node compile

* Expose the whole prime_vote

* Add test for MoreThanMajorityThenPrimeDefaultVote

* Docs fix
2020-09-14 14:16:11 +00:00
Jon Häggblad 2da6adfdf1 grandpa-rpc don't share subscription manager, only executor (#7039)
* service builder: fix todo about jsonrpc Option workaround

* grandpa-rpc: only share executor instead of sub manager

* grandpa-rpc: fix compilation

* grandpa-rpc: rename to subscription_executor

* node/cli: remove another unused jsonrpc dependency

* grandpa: apply style fixes from code review

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2020-09-14 11:02:37 +00:00
Ashley 614c6a743f Add a build-sync-spec subcommand and remove the CHT roots from the light sync state. (#6999)
* Move subcommands from sc-cli to nodes

* Add --build-sync-spec subcommand

* Remove CHTs from snapshots

* Keep ProvideChtRoots
2020-09-11 14:50:12 +02:00
Sergei Shulepov e9982eb797 What happens if we remove wat? (#7056)
* What happens if we remove wat?

* Update Cargo.lock
2020-09-09 13:23:40 +00:00
Sergei Shulepov a137160924 Change wabt to wat (#7050) 2020-09-08 22:49:54 +02:00
Benjamin Kampmann 4ef025b761 Downgrade wabt = 0.9.1 (#7042) 2020-09-08 08:52:04 +00:00
Ashley 57dd0facbb Move subcommands from sc-cli to nodes (#6948) 2020-09-01 09:06:22 +00:00
Ashley 48269e0031 Change browser-demo build.sh to use python 3 again (#6992) 2020-08-31 17:05:29 +00:00
Andronik Ordian d0a58a7360 update kvdb-rocksdb to 0.9.1 and rocksdb to 6.11.4 (#6963) 2020-08-29 03:30:13 +00:00
Alexander Popiak ff1e8150e1 add generated weight info for pallet-collective (#6789)
* add benchmark for disapprove_proposal

* use generated WeightInfo for pallet-collective weights

* order collective benchmark params alphabetically to get a consistent ordering

* address review comments

* remove default impl of WeightInfo for ()

* remove comments about weight changes

* add default weights

* Apply suggestions from code review

Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>

* whitelist voter account in benchmark

* update weights

* MaxMembers configurable

* remove base weight comment

* add weight to technical collective

* another DB whitelist optimization

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Guillaume Thiolliere <gui.thiolliere@gmail.com>
2020-08-28 08:46:43 +00:00
Shawn Tabrizi 4462f7150d Enable verification logic when executing benchmarks (#6929)
* Add `--verify` flag to benchmark execution

* make it so `--verify` can be used for getting the actual benchmarks

* undo manual testing

* oops

* use benchmark config struct

* verify is default on, docs update

* remove clone

* improve formatting

* fix test

* bump impl for ci
2020-08-24 15:24:00 +02:00
Gavin Wood cf4c744eb3 Time-delay proxies (#6770)
* Time-delay proxies.

* Tests

* Initial couple of benchmarks

* Fix up runtime

* Last couple of benchmarks

* Tests

* Docs

* Migration

* add tests to proxy benchmarks

* generated benchmarks, not integrated

* Fix weight trait

* integrate weightinfo

* default weight

* Grumble

* Deduplication, split proxy from announced_proxy and don't require reauthentication

* Fix

* Remoe superfluous

* Typos

* Indent

* Fix

* Fixes

* rename 'proxy_announced' -> 'announced_proxy'

* flip rename

* comments and spacing

* fix proxy_announced

* remove unneeded `execute` marker

* Avoid unneeded changes to extrinsic indices

* Cleanup

* Fixes

* Update Benchmarks and Weights for Delayed Proxy (#6811)

* update bechmarks to parameterize announcements

* remove announcement param from proxy

* Update pallet_proxy.rs

* Update weights

* Bump runtime

* Fix benchmark

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-08-23 10:52:40 +00:00
Qinxuan Chen 8ae1695526 Remove duplicated dependencies (#6930)
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2020-08-21 16:25:58 +02:00
Max Inden 69e349bd51 *: Update to next libp2p version 0.24.0 (#6891)
* *: Update to next libp2p version (likely v0.24.0)

* Revert "*: Update to next libp2p version (likely v0.24.0)"

This reverts commit ffe1545aba6c2557a2843579de331f3fc1c60743.

* */Cargo.toml: Update to libp2p v0.24.0

* client/network/src/service: Handle ConnectionClosed returning Option

* Cargo.*: Test kad usize conversion

* Revert "Cargo.*: Test kad usize conversion"

This reverts commit ad317879782f982cb4a4c76029a72b5b97e82bec.

* Cargo.lock: Update to libp2p-kad v0.22.1

* client/cli/Cargo.toml: Update to libp2p 0.24.0
2020-08-21 06:25:23 +00:00
Benjamin Kampmann 2416aa7999 prepping for releasing rc6 (#6922)
* Bump version

* update test-utils crates to be ready for publishing

* adding changelog

* Adding automaticly generated READMEs

* fixing versions

* another version mishap
2020-08-20 17:04:42 +02:00