Commit Graph

22 Commits

Author SHA1 Message Date
Weiliang Li 4f2cdb20c1 Rename: primitives/sr-io -> primitives/sp-io (#4328)
* primitives/sr-io -> primitives/io

* fix

* rename

* runtime-io -> sp-io

* git mv

* fix ci

* remove package name

* fix

* fix

* try minimizing diff

* try minimizing diff again

* try minimizing diff again
2019-12-10 16:08:35 +01:00
Weiliang Li 6da9f59d72 Rename: primitives/sr-std -> primitives/sp-std (#4327)
* primitives/sr-std -> primitives/std

* fix

* fix conflict

* rstd -> sp-std

* git mv

* fix review

* fix merge
2019-12-10 08:26:27 +01:00
Weiliang Li 04fcc71809 Rename folder: primitives/sr-primitives -> primitives/runtime (#4280)
* primitives/sr-primitives -> primitives/runtime

* update
2019-12-09 08:49:32 +01:00
Tomasz Drwięga 3805393a13 Merge txpool-runtime-api with txpool-api (#4320)
* Remove transaction-pool-runtime-api

* Merge runtime-api with transaction-pool.
2019-12-06 17:24:17 +01:00
Gavin Wood 0f1a5f6514 Enumeratable dispatches using unhashed index in key. (#4278) 2019-12-03 00:49:27 +01:00
Andrew Jones 4c2ba5b71f Fix sp-session typo (#4273)
* Fix sp-session typo

* Remove erroneous whitespaces

* Don't mess with the file, editor
2019-12-02 20:24:25 +01:00
thiolliere 22c00ff424 Add swap and decode_len to DoubleMap finishing #3749 (#4264)
* Add `swap` and `decode_len` to `DoubleMap`

*  Add tests to `swap` and `decode_len` for `DoubleMap` (WIP)

* Address review comments

* Remove function that is not in scope

* fix test

* better naming
2019-12-02 13:01:29 +01:00
Benjamin Kampmann 927e13c13a The crate rename (#4223)
* Adding script for rename, could be applicable for nodes on top of it, too

* add stderr and gitlab ci features

* apply script

* fix now minor details in expected stderr

* Update the Cargo.lock

* fix name: sc-transaction -> sc-tracing

* fix rename in script, too
2019-12-02 11:23:53 +01:00
Gavin Wood fd1cec850e Economic fixes for democracy module (#4256)
* Fix up `end_block` mess; add free preimage noting for imminents.

* Fixes

* Bump runtime

* Update frame/democracy/src/lib.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>

* Handle grumble

* Update frame/democracy/src/lib.rs

Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com>
2019-12-01 10:13:09 +01:00
Stanislav Tkach 3e3ec05e56 Make weights compatible with u64 (#4192)
* Use Weight instead of u32 everywhere

* Revert Weight declaration

* Fix benches
2019-11-29 20:20:20 +01:00
Svyatoslav Nikolsky a782021ee8 Recover transaction pool on light client (#3833)
* recover tx pool on light client

* revert local tests fix

* removed import renamings

* futures03::Future -> std::future::Future

* Update core/transaction-pool/graph/src/error.rs

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

* replace remove_from_ready with remove_invalid

* avoid excess hashing

* debug -> warn

* TransactionPool + BasicTransactionPool

* pause future tx reject when resubmitting

* bump impl_version to make CI happy

* and revert back local test fixes

* alter doc to restart CI

* Transaction::clone() -> Transaction::duplicate()

* transactions -> updated_tranasctions

* remove explicit consensus-common ref

* ::std:: -> std::

* manual set/unset flag -> calling clusore with given flag value

* removed comments

* removed force argument

* BestIterator -> Box<Iterator>

* separate crate for TxPool + Maintainer trait

* long line fix

* pos-merge fix

* fix benches compilation

* Rename txpoolapi to txpool_api

* Clean up.

* Finalize merge.

* post-merge fix

* Move transaction pool api to primitives directly.

* Consistent naming for txpool-runtime-api

* Warn about missing docs.

* Move  abstraction for offchain calls to tx-pool-api.

* Merge RPC instantiation.

* Update cargo.lock

* Post merge fixes.

* Avoid depending on client.

* Fix build
2019-11-28 00:00:54 +00:00
Robert Habermeier 4598e13015 safe multi-era slashing for NPoS (#3846)
* define slashing spans

* tests and pruning for slashing-spans record

* validators get slashed before nominators

* apply slash to nominators as well

* chill and end slashing spans

* actually perform slashes

* integration (tests failing)

* prune metadata

* fix compilation

* some tests for slashing and metadata garbage collection

* correctly pass session index to slash handler

* test span-max property for nominators and validators

* test that slashes are summed correctly

* reward value computation

* implement rewarding

* add comment about rewards

* do not adjust slash fraction in offences module

* fix offences tests

* remove unused new_offenders field

* update runtime version

* fix up some docs

* fix some CI failures

* remove no-std incompatible vec! invocation

* try to fix span-max rounding error

* Update srml/staking/src/slashing.rs

Fix type: winow -> window

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

* slashes from prior spans don't kick validator again

* more information for nominators, suppression

* ensure ledger is consistent with itself post-slash

* implement slash out of unlocking funds also

* slashing: create records to be applied after-the-fact

* queue slashes for a few eras later

* method for canceling deferred slashes

* attempt to fix test in CI

* storage migration for `Nominators`

* update node-runtime to use SlashDeferDuration

* adjust migration entry-points somewhat

* fix migration compilation

* add manual Vec import to migration

* enable migrations feature in node-runtime

* bump runtime version

* update to latest master crate renames

* update to use ensure-origin

* Apply suggestions from code review

use `ensure!`

Co-Authored-By: Gavin Wood <gavin@parity.io>

* fix multi-slash removal

* initialize storage version to current in genesis

* add test for version initialization
2019-11-27 19:06:32 +00:00
thiolliere f4035cd5ac Implement all storage after prefix (#4227)
* Implement all storage after prefix

* fix test, bump version and fix doc

* bump metadata version

* Update frame/support/procedural/src/storage/storage_struct.rs
2019-11-27 18:23:20 +00: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
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
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
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
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
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 60e5011c72 Reorganising the repository - external renames and moves (#4074)
* Adding first rough ouline of the repository structure

* Remove old CI stuff

* add title

* formatting fixes

* move node-exits job's script to scripts dir

* Move docs into subdir

* move to bin

* move maintainence scripts, configs and helpers into its own dir

* add .local to ignore

* move core->client

* start up 'test' area

* move test client

* move test runtime

* make test move compile

* Add dependencies rule enforcement.

* Fix indexing.

* Update docs to reflect latest changes

* Moving /srml->/paint

* update docs

* move client/sr-* -> primitives/

* clean old readme

* remove old broken code in rhd

* update lock

* Step 1.

* starting to untangle client

* Fix after merge.

* start splitting out client interfaces

* move children and blockchain interfaces

* Move trie and state-machine to primitives.

* Fix WASM builds.

* fixing broken imports

* more interface moves

* move backend and light to interfaces

* move CallExecutor

* move cli off client

* moving around more interfaces

* re-add consensus crates into the mix

* fix subkey path

* relieve client from executor

* starting to pull out client from grandpa

* move is_decendent_of out of client

* grandpa still depends on client directly

* lemme tests pass

* rename srml->paint

* Make it compile.

* rename interfaces->client-api

* Move keyring to primitives.

* fixup libp2p dep

* fix broken use

* allow dependency enforcement to fail

* move fork-tree

* Moving wasm-builder

* make env

* move build-script-utils

* fixup broken crate depdencies and names

* fix imports for authority discovery

* fix typo

* update cargo.lock

* fixing imports

* Fix paths and add missing crates

* re-add missing crates
2019-11-14 21:51:17 +01:00