Commit Graph

2752 Commits

Author SHA1 Message Date
cheme fdbfd0b150 revert (#4204) 2019-11-26 10:23:11 +01:00
Tomasz Drwięga 309c6c70d8 Remove keystore when doing calls and producing a proof (#4196)
* Remove keystore parameter.

* Fix tests.
2019-11-25 19:55:21 +01:00
Pierre Krieger d8ca2f37df Make spawn_essential_task more strict (#4198) 2019-11-25 17:48:25 +01:00
Alexey d7b9dd300b Refactor construct_runtime to procedural (#3810)
* interim

* interim

* interim

* first working section

* cleanup

* finished parsing

* cleanup

* added system module search

* added clone and find_entry

* generic find_module_entry

* interim

* working event

* added generic event with no instance error

* cleanup

* added decl origin

* cleanup

* added all modules

* added outer dispatch

* added modules expansion

* refactored transformations

* updated error message

* added resolve mechanics

* added metadata

* finished config

* finished inherents

* added validate_unsigned

* added compares

* cleanup

* cleanup

* cleanup

* fix

* updated modules for last one wins

* cleanup

* made nested modules

* updated impl version

* removed comment

* cleanup

* added ui tests

* added optional comma

* removed unnecessary to string cast

* removed no compile

* cleanup

* fmt

* returned nocompile

* Update srml/support/procedural/src/construct_runtime/parse.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>

* added where definition

* updated ui tests

* updated ui test cases

* added test case

* updated tests

* interim

* added parse for module part

* removed totokens

* fixes

* fixed multiple iter

* changed TokenStream

* fmt

* updated trybuild

* added test for arguments

* fmt

* fixes + more tests

* fixes

* fmt

* rolled back runtime

* minor fixes

* empty

* fixes

* fmt

* Update paint/support/procedural/src/lib.rs

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

* Update paint/support/procedural/src/lib.rs

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

* Update paint/support/procedural/src/construct_runtime/parse.rs

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

* interim

* refactored seen_keys

* refactored hash_set

* Update paint/support/procedural/src/construct_runtime/mod.rs

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

* refactored find

* fix

* fixed all_modules

* added double declaration check

* small fix

* fmt

* fix

* fix default

* format
2019-11-25 17:48:18 +01:00
Arkadiy Paronyan d56d6163ef Fixed shared cache race on import (#4194)
* Fixed is_best race on import

* Take import lock outside of backend

* Actually take the lock
2019-11-25 13:38:37 +01:00
Shawn Tabrizi 50b84a6438 Remove frame/ prefix from im_online DB_KEY. (#4191)
* Remove `frame/` prefix from `im_online` DB_KEY.

Caught in the renaming process. It is not obvious to me why `frame/` or `palette/` or `srml/` was included in the DB key.

* Update lib.rs
2019-11-25 11:51:09 +01:00
Ashley 78a758bfba Rewrite elected_edges.sort_unstable_by in phragmen (#4195)
* Rewrite phragmen elected_edges.sort_unstable_by

* map -> and_then
2019-11-25 11:43:26 +01:00
Xiliang Chen 04571d958b PaysFee for DispatchInfo (#4165)
* Add PaysFee trait

* bump version

* Apply suggestions from code review

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

* line width

* Apply suggestions from code review

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

* fix test

* fix test

* fix test
2019-11-25 14:42:51 +08:00
Bastian Köcher 68818929ab Log runtime panic and oom with level error (#4193) 2019-11-24 11:28:29 +01:00
Bastian Köcher f0fc2d89d2 Switch to new kvdb-rocksdb (#4186)
* Switch to new rocksdb with some hacks to resolve linking errors

Rocksdb and `wasmtime-environ` both link `zstd`. In the final link step,
this leads to linking errors because of duplicate symbols. The linked
Rocksdb fixes this by using `zstd-sys` as well. However, this currently
also requires modifications in `zstd-sys`. Someone will need to come up
with a better implementation.

* Switch to new version of kvdb-rocksdb

* Update client/db/src/utils.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
2019-11-23 23:28:42 +01:00
Kian Paimani 1c9316a6c1 elections-phragmen: renounce candidacy [+ remove dead code] (#4123)
* new elections phragmen module.

* Bump

* rename typo

* Few nits

* Fix runner outgoing bond

* remove useused var

* Fix refund logic.

* Update doc.

* Update lock
2019-11-23 18:10:30 +01:00
Shawn Tabrizi c9175b59ff Rename Palette to FRAME (#4182)
* palette -> frame

* PALETTE, Palette -> FRAME

* Move folder pallete -> frame

* Update docs/Structure.adoc

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>

* Update docs/README.adoc

Co-Authored-By: Benjamin Kampmann <ben.kampmann@googlemail.com>

* Update README.adoc
2019-11-22 19:21:25 +01:00
Sergei Pepyakin 68351da29b Renaming and documentation for ApplyResult, ApplyOutcome and et al (#4134)
* Remove superflous errors from the system module

* Rename and document InclusionOutcome

* Rename InclusionError

* Remove unused inclusion errors.

I left the enumeration though since other elements might be used some day.

* Rename and document DispatchOutcome

* Apply suggestions from code review

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* TransactionValidityError instead of InclusionError

* Rename InclusionOutcome to ApplyExtrinsicResult

* Update docs.

* Update lib.rs

should be → is

* Bump the block builder API version.

* Fix the should_return_runtime_version test

* Clean the evidence
2019-11-22 17:15:58 +01:00
Tomasz Drwięga 86b6ac5571 Offchain execution extensions (#4145)
* Pass Extensions instead of individual objects.

* Move TransactionPool to a separate ExternalitiesExtension.

* Fix compilation.?

* Clean up.

* Refactor testing utilities.

* Add docs, fix tests.

* Fix doctest.

* Fix formatting and add some logs.

* Add some docs.

* Remove unused files.
2019-11-22 17:10:23 +01:00
thiolliere f000392cc0 fix storage decode error (#3997) 2019-11-22 16:29:26 +01:00
Ashley 145efab68f Grafana integration (#3913)
* Very WIP

* record_metrics macro works

* Integrate into service

* Licenses and documentation

* Remove unused Debugs, make respond function clearer

* Conform to line widths, fix service test

* Switch to storing the timestamps as millis instead

* Update core/grafana-data-source/src/lib.rs

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

* Transform timestamps to i64 in serialization

* Fix license date

* Binary sort to find selection range for metrics

* Obey maxDataPoints

* Run a cleaning future

* Newlines at EOF

* Update core/service/Cargo.toml

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

* Update core/grafana-data-source/src/lib.rs

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

* Fix indentation

* Improve select_points

* Made test more accurate

* Inprogress

* Use the same futures version as hyper for now

* Error handling

* Remove dependence on hyper's tokio feature

* Added target_os flag

* Update Cargo.toml

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>

* Simplify example

* Remove compat wildcard

* Updated lock file

* Fix indentation 😉
2019-11-22 15:49:49 +01:00
Pierre Krieger 458dba5ce5 Improve logging for reserved peers (#4183) 2019-11-22 15:24:27 +01:00
mattrutherford 9cc16e539e Add instrumentation, with performance profiling capability (#4132)
* Implement instrumentation for performance profiling

* Add profiling to runtime functions declared in `decl_module` inc.
`on_initialize` and `on_finalize`

* Remove changes

* add docs, tidy up

* fix versions

* fix copyright date

* switch to hashmap and instant

* update example

* update example

* implement receiver for logger and make default

* fix comment

* use `if_std!` macro

* remove whitespace

* fix whitespace

* fix nits
2019-11-22 15:21:36 +01:00
Gavin Wood 082c58176e Publish the dispatch info in extrinsic events (#4148)
* Publish the dispatch info in extrinsic events

Place the DispatchInfo (which contains weight information about the
extrinsic that is otherwise difficult to determine) in the dispatch
result value.

* Runtime bump.

* Fix build

* Fix tests

* Fix build?
2019-11-22 15:11:04 +01:00
Seun LanLege 04bd926923 Better docs for TxPool::import_notification_stream (#4157)
* better docs for import_notification_stream

* Apply suggestions from code review

Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
2019-11-22 13:45:05 +01:00
Robert Habermeier 5a8146d64e Updating GRANDPA to v0.10.0 (#4174)
* update finality-grandpa to v0.10.0 rev

* add concluded implementation to environment

* also update state when concluding

* switch to the cargo version

* address comment grumbles
2019-11-22 13:18:31 +01:00
Ashley 1735683cc9 Upgrade from futures-preview to futures 0.3.1, and remove futures 0.1 where currently possible (#4083)
* Migrate node and node-template

* Migrate srml

* Simple changes

* Add async-std for interval

* Fix test-runtime warning

* Small changes

* move futures01 in core/rpc to dev-deps

* Change wasm CI builds

* Switch to async-std 1.0.1

* Remove async-std dep of network

* Add modified lockfile

* Fix node cli browser build

* Remove authority-discovery async-std dep

* Add Send + Sync to interval dyn stream
2019-11-22 13:06:23 +01:00
Gavin Wood 795701608c grandpa: voting rules shouldn't restrict past round base (#4155)
* grandpa: voting rules shouldn't restrict past round base

* grandpa: fix lower bound on vote restriction. add test
2019-11-22 13:05:52 +01:00
Bastian Köcher 7769554af6 Clean up depedencies and cargo tomls (#4180)
* Clean up depedencies and cargo tomls

* Yeah, fuck it
2019-11-22 13:02:51 +01:00
Kian Paimani 11703a5916 Relocate weight to paint + decouple from extensions (#4124)
* Fisr migrated version of weight to paint

* Bump

* Minor nits

* Some review fixes.

* Line width

* Revert spec bump

* Fix build

* Update lock file

* Update palette/executive/src/lib.rs

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

* Update palette/membership/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
2019-11-22 11:23:32 +01:00
Benjamin Kampmann 8185ee925d Fix CI on master (#4160)
* fix runtime check script

* fix subkey deploy

* fix rustdoc-header path

* Remove vulnerable rust-yaml by directly parsing clap in subkey

* Make network and password optional as the test requires
2019-11-21 16:36:29 +01:00
Tomasz Drwięga 872c04b304 Revert "Fix serialization of transaction_paymentInfo" (#4166)
* Revert "Fix serialization of `transaction_paymentInfo` (#4146)"

This reverts commit 613b5e7e2d.

* Revert chain-spec too.

* Bring back camelCase and test.
2019-11-21 16:08:54 +01:00
Jim Posen 502deb9cce Upgrade trie-db crate to 0.16.0. (#4144)
* Upgrade paritytech/trie crates to 0.16.0.

* Fix tests and unexpected Cargo.lock change.

* Bump trie-bench version.
2019-11-21 11:01:49 +01:00
joe petrowski 2783b44207 Rename PAINT to PALETTE (#4161)
* /paint to /palette

* rename paint to palette

* rename the modules in palette to be pallets

* update Structure.adoc

* bump impl

* fix CI directory

* Update docs/Structure.adoc

Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org>
2019-11-21 01:08:25 +01:00
Joshy Orndorff 512c86a72f Fix typo: to -> from (#4163) 2019-11-21 00:22:05 +01:00
Bastian Köcher 3ae18811d7 sr-io remove unused files (#4130) 2019-11-20 22:18:47 +01:00
Bastian Köcher b1625f1a44 Fix node-rpc-client compilation (#4159)
* Fix `node-rpc-client` compilation

* Enable `alloc` feature of `zeroize` on `std`
2019-11-20 21:33:20 +01:00
Sergei Pepyakin df7d3982d7 Use crates.io version of wasmtime (#4135)
* Use crates.io version of wasmtime

* Update cranelift-* to 0.50

* Update trampoline generation code.

* Update wasmtime to 0.8

* pretty print trampoline compilation errors
2019-11-20 20:03:54 +01:00
Bastian Köcher 75b6b51782 Support custom runtime interfaces in native executor (#4129)
This makes it possible to use custom runtime interfaces within your
runtime by registering them at the native executor.
2019-11-20 19:06:52 +01:00
André Silva 16ad04e847 grandpa: increase timeout for catch up requests (#4149) 2019-11-20 11:01:53 -05:00
Kian Paimani e29b261240 genesis check for balances and ED (#4151)
* genesis check for balances

* fix test.

* Update paint/balances/src/lib.rs

Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
2019-11-20 14:36:55 +01:00
Benjamin Kampmann 303843f483 Move inherents to primitives (#4126)
* Split Aura and Timestamp inherents out of paint

* fixup node depedencies

* move babe inherents to primitives

* move authorship inherents into primitives

* Move finalty tracker inherents into primitives

* fix aura primitives import
2019-11-20 12:18:36 +01:00
Gavin Wood 5979a8c3e5 Revert "grandpa: voting rules shouldn't restrict past round base (#4150)" (#4154)
This reverts commit 364df30970.
2019-11-20 10:48:55 +01:00
Pierre Krieger f9a4cff50a Remove the exit parameter from importing and exporting blocks (#3954)
* export_blocks now generates a Future

* Handle the export blocks exit in substrate-cli instead

* Turn import_blocks entirely into a Future

* Move the exit parameter to substrate-cli for imports
2019-11-20 10:03:43 +01:00
Bastian Köcher 75a0a3f6fd Fix forks_should_work_correctly test (#4152)
When we enabled arbitary precision for `serde_json`, the feature leaked
through the whole workspace. The given test fails because of some bug in
serde json when the feature is enabled.
2019-11-20 09:51:09 +01:00
André Silva 364df30970 grandpa: voting rules shouldn't restrict past round base (#4150) 2019-11-20 09:50:36 +01:00
Tomasz Drwięga 309f694f4f Move the bounds from where to trait definition. (#4044) 2019-11-20 09:49:16 +01:00
Xiliang Chen 3d4bee6cd6 add div and checked_div to Fixed64 (#4136)
* add div and checked_div to Fixed64

* add more tests

* div by zero is div by zero
2019-11-19 22:33:29 +01:00
Pierre Krieger 4e8b68dd14 Fix the status-sinks tests, hopefully (#4140) 2019-11-19 18:59:53 +01:00
Tomasz Drwięga 613b5e7e2d Fix serialization of transaction_paymentInfo (#4146)
* Add serialization test for u128

* Fix crash on serde of u128
2019-11-19 18:42:35 +01:00
Demi Obenour 07a05554c3 No balance can be between 0 and EXISTENTIAL_DEPOSIT exlcusive (#4118)
This invariant holds for both the free and reserved balances.  Document
it.  I also reformatted the documentation slightly.
2019-11-19 18:38:47 +01:00
Svyatoslav Nikolsky b5f8eb5ac3 Finality proof: fetch new authorities set instead of previous one (#4112)
* fetch new authorities set instead of previous one

* fixed leftovers + updated test properly

* read initial authorities once

* updated comment

* fix grumbles
2019-11-19 17:37:36 +03:00
André Silva e2e2eb7b32 docs: fix CODEOWNERS paths (#4138)
* docs: fix CODEOWNERS paths

* Apply suggestions from code review
2019-11-19 11:30:39 +01:00
André Silva 9194b2a3c0 gossip: replace LRU cache (#4137)
* peerset: remove unused dependencies

* gossip: replace lru cache

* header-metadata: replace lru cache
2019-11-19 10:58:06 +01:00
brenzi 10925510de fix full_crypto (#4133)
* hopefully fixing api-client with this

* another use statement needed

* using full path for Vec

* next try

* yet again

* cleanup
2019-11-19 09:33:56 +01:00