Commit Graph

4614 Commits

Author SHA1 Message Date
Max Inden 4e9256aba2 client/network: Allow configuring Kademlia's disjoint query paths (#7356)
The Rust libp2p-kad implementation can require iterative queries to use
disjoint paths for increased resiliency in the presence of potentially
adversarial nodes.

Allow Substrate users to enable this feature via the
`--kademlia-disjoint-query-paths` flag.
2020-10-21 11:08:39 +00:00
Nikolay Volf a062bc2f1d Runtime worker threads (#7089)
* std variant

* principal work

* format and naming

* format and naming continued

* working nested fork

* add comment

* naming and tabs

* line width

* fix wording

* address review

* refactor dynamic dispatch

* update wasmtime

* some care

* move ext

* more refactor

* doc effort

* simplify

* doc effort

* tests and docs

* address review

* naming

* explain some args

* add example

* unwinding for native and tests

* rename stray

* fix refs

* fix tests

* fix warnings

* stray naming

* fixes and comments

* Update primitives/io/src/tasks.rs

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

* make examples "compile"

* dyn_dispatch -> spawn_call

* fix impl

* address review

* Update primitives/io/src/lib.rs

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

* Update primitives/io/src/tasks.rs

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

* Update primitives/io/src/async_externalities.rs

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

* Update primitives/io/src/tasks.rs

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

* Update frame/example-parallel/src/lib.rs

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

* fix compilation

* Update client/executor/common/src/wasm_runtime.rs

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

* address review

* Update client/executor/wasmtime/src/instance_wrapper.rs

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

* Update client/executor/src/native_executor.rs

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

* Update primitives/io/src/tasks.rs

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

* Update client/executor/src/native_executor.rs

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

* Update primitives/io/src/tasks.rs

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

* Update client/executor/wasmtime/src/instance_wrapper.rs

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

* address some issues

* address more issues

* wasm_only interface

* define sp_tasks

* avoid anyhow

* fix example

Co-authored-by: cheme <emericchevalier.pro@gmail.com>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-20 12:41:51 +00:00
Bastian Köcher 203acda659 Fix logging from inside the WASM runtime (#7355)
* Fix logging from inside the WASM runtime

When using `RuntimeLogger` to log something from the runtime, we didn't
set any logging level. So, we actually did not log anything from the
runtime as logging is disabled by default. This pr fixes that by setting
the logging level to `TRACE`. It also adds a test to ensure this does
not break again ;)

* Update frame/support/src/debug.rs
2020-10-20 12:51:51 +02:00
Max Inden 918a0c8077 *: Bump async-std to v1.6.5 (#7306)
* *: Bump async-std to v1.6.5

Prevent users from using v1.6.4 which faces issues receiving incoming
TCP connections. See https://github.com/async-rs/async-std/issues/888
for details.

* client/network/src/gossip: Use channel instead of condvar

`async_std::sync::Condvar::wait_timeout` uses
`gloo_timers::callback::Timeout` when compiled for
`wasm32-unknown-unknown`. This timeout implementation does not fulfill
the requirement of being `Send`.

Instead of using a `Condvar` use a `futures::channel::mpsc` to signal
progress from the `QueuedSender` to the background `Future`.

* client/network/Cargo.toml: Remove async-std unstable feature

* client/network/src/gossip: Forward all queued messages

* client/network/gossip: Have QueuedSender methods take &mut self

* client/network/gossip: Move queue_size_limit into QueuedSender

The `queue_size_limit` field is only accessed by `QueuedSender`, thus
there is no need to share it between the background future and the
`QueuedSender`.

* client/network/gossip: Rename background task to future

To be a bit picky the background task is not a task in the sense of an
asynchonous task, but rather a background future in the sense of
`futures::future::Future`.
2020-10-20 09:23:27 +00:00
Max Inden bd2dbc055c client/network: Remove option to disable yamux flow control (#7358)
With the `OnRead` flow control option yamux "send[s] window updates only
when data is read on the receiving end" and not as soon as "a Stream's
receive window drops to 0".

Yamux flow control has proven itself. This commit removes the feature
flag. Yamux flow control is now always enabled.
2020-10-19 21:43:32 +02:00
André Silva 9f61b5b9f4 grandpa: remove duplicate function to fetch local authority id (#7359)
* grandpa: remove duplicate authority_id function

* grandpa: rename is_voter to local_authority_id

* grandpa: cleanup rebuild_voter telemetry event
2020-10-19 17:07:18 +00:00
Bastian Köcher 23382db1b4 Make wasm-builder print the rustc version (#7351)
* Make `wasm-builder` print the rustc version

This makes `wasm-builder` print the rustc version that is being used to
compile the project. This is rather useful, because people can check
faster if the used rustc version is maybe known for being broken with
Substrate.

* Apply suggestions from code review

* Add some comments
2020-10-19 14:45:09 +02:00
Guillaume Thiolliere 7ca9baf9b6 Derive no bound macros (to be also used in pallet macro) (#7280)
* derive no bound macros

* explicit different variant for partialeq

* fix ui for 1.47

* Apply suggestions from code review

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

* move test to frame-support-test

* renames, code organization and remove expect as suggested

* better doc

* remove DebugStripped introduce RuntimeDebugNoBound

* rename

* fix test

* fix ui test

* fix line width

* Update frame/support/src/lib.rs

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

* Update frame/support/procedural/src/clone_no_bound.rs

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

* Apply suggestions from code review

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

* fix confusing dead code

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-19 09:11:51 +00:00
Bastian Köcher 87c18598fc Move IsSubType and write some docs for the trait (#7350)
* Move `IsSubType` and write some docs for the trait

This moves the `IsSubType` trait from dispatch.rs to traits.rs. It also
adds docs to make the trait better understandable.

* Update frame/support/src/traits.rs

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

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-19 08:24:13 +00:00
Bastian Köcher 74e8691aa8 Make queryStorage and storagePairs unsafe RPC functions (#7342)
The RPC calls can be rather expensive and can easily bring a RPC node in
some problems ;)
2020-10-18 19:58:52 +02:00
Shawn Tabrizi 13be04e0a7 Constant Weight Signature in Benchmarking CLI (#7233)
* Don't remove unused components

* add more metadata to generated file

* unused code

* proposed format

* Revert "proposed format"

This reverts commit ce522c3480157ab6670bcbd9b17e1398168cabf4.

* Update weight signatures and unused components in benchmarks

* Keep timestamp constant time

* remove component from as_derivative
2020-10-17 12:35:15 +00:00
Bastian Köcher 158fdecc0b Adds support for inspecting a hex encoded public key (#7344)
* Adds support for inspecting a hex encoded public key

This adds support for inspecting hex encoded public keys to subkey. The
command looks like:

`subkey inspect --public 0xPUBLICHEX`

* Update client/cli/src/commands/utils.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-17 09:43:46 +02:00
s3krit da8ce4f258 remove github release action (#7338) 2020-10-16 16:27:20 +02:00
André Silva 463ba54d00 consensus: prioritize finality work over block import in queue (#7307)
* consensus: prioritize finality work over block import in queue

* consensus: add test for import queue task priority
2020-10-16 16:22:50 +02:00
Pierre Krieger 385c4ddf69 No longer actively open legacy substreams (#7076)
* Allow remotes to not open a legacy substream

* No longer actively open legacy substreams

* Misc fixes

* Line width

* Special case first protocol as the one bearing the handshake

* Legacy opening state no longer keeps connection alive

* Remove now-unused code

* Simplify inject_dial_upgrade_error

* [chaos:basic]

* [chaos:basic]

* [chaos:basic]
2020-10-16 11:07:05 +00:00
André Silva 0dcb16b513 sync: only restart peers not doing finality related requests (#7322)
* sync: only restart peers not doing finality related requests

* sync: add test for sync restart

* sync: add better docs to restart method
2020-10-16 12:15:56 +02:00
André Silva f3ea1624f6 frame: remove finality-tracker (#7228)
* frame: remove finality-tracker

* node: remove unused parameter types

* node: bump spec_version
2020-10-15 20:58:51 +00:00
Aten 8e8a37f7a1 Update token info about ChainX. (#7330) 2020-10-15 15:49:47 +02:00
Ashley d1ef8507d7 Add missing fields to the light sync state (#7225)
* Initial draft

* Add an iterator that helps us get most items

* Revert changes to grandpa

* Change fields to just be the grandpa authority set and babe epoch changes

* Only use the fields we need from the shared authority set

* Switch to RPC call

* Revert "Only use the fields we need from the shared authority set"

This reverts commit 6ede87b0c5fe53f251d7cb45951006a7dc8f9b83.

* Add babe_finalized_block_weight from `ashley-improve-sync-state-WIP-loading`

* Fix rpc test

* Move sync state rpc stuff into sc-sync-state-rpc

* Remove as_json_value and remove unwraps from sc-sync-state-rpc

* Add clone_inner to SharedAuthoritySet
2020-10-15 10:10:43 +00:00
Jon Häggblad a297e447f2 babe: make secondary slot randomness available on-chain (#7053)
* babe: make secondary slot randomness available on-chain

* babe: extract out vrf_output function

* babe: add missing comment

* babe: fix incorrectly storing primary randomness

* babe: add test for onchain author vrf

* babe: fix reviewer nits

* runtime: bump spec_version

* babe: remove outer Option for AuthorVrfRandomness

* babe: fix reviewer nits on doc strings

* babe: move make_vrf_output to mock.rs

* babe: cleanup docs

* babe: kill ephemeral entry instead of take

* babe: use type alias for maybe randomness

Co-authored-by: André Silva <andrerfosilva@gmail.com>
2020-10-15 08:32:12 +00:00
Guillaume Thiolliere 1164ced041 allow where clause in decl_error (#7324) 2020-10-14 15:39:27 +00:00
HarryHong 8503cc0892 test simnet-image [chaos:basic] (#7108) 2020-10-14 11:50:36 +00:00
Jaco Greeff 3d50ed12fe Adjust ss58-registry websites to conform to schema (#7320)
* Adjust ss58-registry websites to conform to schema

* Adjust decimals to conform to schema
2020-10-14 13:16:28 +02:00
Bastian Köcher b427bbb363 Make run_node_until_exit take a future (#7318)
The function takes a closure that resolved before to a `TaskManager`,
now it resolves to a `Future` which output is a `TaskManager`. This is
required for node setups that are async.
2020-10-14 08:03:37 +00:00
Pierre Krieger bcde7b4f3f Add an system_syncState RPC method (#7315)
* Add system_syncState RPC method

* Update client/rpc-api/src/system/helpers.rs

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

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-13 17:53:49 +02:00
marco bahn e4cb862123 add zero.io (#7310)
* feat(zero): add zero.io + alphaville

* update zero.io testnet

* Update crypto.rs

* Update crypto.rs
2020-10-13 16:43:43 +02:00
s3krit 1632f98161 bump matrix-message-action to v0.0.3 (#7313) 2020-10-13 16:21:42 +02:00
mattrutherford 246cb29627 Add profiling targets to tracing_subscriber (#7308)
* Add profiling targets to tracing_subscriber

* comment

Co-authored-by: Matt <mattrutherford@users.noreply.github.com>
2020-10-12 22:07:07 +00:00
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
Xiliang Chen 5172777c7d handle returns correctly for transactional (#7301) 2020-10-12 12:00:19 +02:00
Xiliang Chen 806dc9a659 Implements require_transactional (#7261)
* Implements require_transactional

* support wasm

* only enable for debug build

* remove wasm support and add feature flag

* Apply suggestions from code review

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

* only use check for debug_assertions

* update per review

* update docs

* Apply suggestions from code review

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

* remove duplicated tests

* fix test

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-10-12 09:46:15 +02:00
Vladislav 3c0a049bee Add CompactAs derive for Fixed* types (#7293)
Signed-off-by: Vladislav Markushin <negigic@gmail.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-09 23:35:09 +02:00
Alan Sapede a954ce5f2d Fixes evm ripemd160 impl to use 32 bytes (#7296)
Co-authored-by: Alan <alan@ip-172-31-37-206.us-east-2.compute.internal>
2020-10-09 23:34:07 +02:00
Shawn Tabrizi a992770318 Allow schedule_after(0, ...) to work (#7284)
* Allow schedule_after(0) to work

* better choice
2020-10-09 17:20:11 +00:00
Andronik Ordian 44bb722861 sc-network: expose add_to_priority_group and `remove_from_priority_… (#7247)
* sc-network: expose `add_to_priority_group` and `remove_from_priority_group` in `NetworkService`

* sc-network: fix a typo

* Update client/network/src/service.rs

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

* s/parse_multiaddr/split_multiaddr_and_peer_id/g

* sc-network: mark new functions as async and add comments

* Apply suggestions from code review

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

Co-authored-by: Max Inden <mail@max-inden.de>
2020-10-09 14:12:57 +00:00
AsceticBear d4a8f253c0 Update darwinia info (#7289) 2020-10-09 15:05:48 +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
Bastian Köcher db8a0cafa9 Fixes logging of target names with dashes (#7281)
* Fixes logging of target names with dashes

There was a bug in tracing-core which resulted in not supporting dashes
in target names. This was fixed upstream. Besides that a test was added
to ensure that we don't break this again.

* Extend test
2020-10-08 18:40:27 +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
Eliott Teissonniere e3682fa2f4 add ss58 id for nodle (#7279)
* add ss58 id for nodle

* update json ss58-registry as requested
2020-10-08 16:55:36 +02: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
Sergei Shulepov aba0128f6f bump-allocator: document & poison (#7277)
* bump-allocator: refine comments

* Rename EMPTY_MARKER to Nil

It's a misnomer since it doesn't actually denote an empty list as it might suggest but rather the end of a list. So I borrowed Nil from Cons/Nil.I could've gone with Null, especially considering that the variant name is already named `Null`, but I preferred `Nil` because the NIL_MARKER is not 0 as `null` may suggest, but rather 0xFFFFFFFF.

* Rename N to N_ORDERS; docs;

Supply a, hopefully, more readable comment as well.

* allocator poisoning: document and enforce.

* Review: Fix line wrapping for a call

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

* add a test on oom

* Update primitives/allocator/src/freeing_bump.rs

* Make ui tests happy

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
2020-10-08 11:40:52 +00:00
ddorgan 5f80929184 Reset flaming fir network (#7274) 2020-10-07 17:03:10 +02:00
Xiliang Chen f6e95f5d51 reschedule (#6860)
* reschedule

* add tests

* Apply suggestions from code review

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

* add test for reschedule named perodic

* update test

* handle the case when reschedule does not change time

Co-authored-by: Dan Forbes <dan@danforbes.dev>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-07 14:51:44 +00: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
André Silva 601e2fa139 client: improve log formatting (#7272) 2020-10-07 10:53:19 +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
Sergei Shulepov 2cf4fb2cbc SystemOrigin trait (#7226)
* SystemOrigin trait

* OriginTrait provides AccountId

* Use new trait definition

* Consolidate trait

Co-authored-by: Gav Wood <gavin@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-10-05 17:13:12 +00:00
Lovesh Harchandani 2e72767034 Update ss58 registry for Dock network (#7263)
Signed-off-by: lovesh <lovesh.bond@gmail.com>
2020-10-05 11:48:28 +00:00