Commit Graph

2810 Commits

Author SHA1 Message Date
Keith Ingram 5edc4350b4 Council members (#4279) 2019-12-03 09:29:46 +01:00
Gavin Wood 0f1a5f6514 Enumeratable dispatches using unhashed index in key. (#4278) 2019-12-03 00:49:27 +01:00
Gavin Wood c1ee9aeec1 Another fix for elections-phragmen (#4276)
* Another fix for elections phragmen

CC @kianenigma

* Test for correct sorting.
2019-12-02 21:11:11 +01:00
Max Inden 3ea742ac47 docs/CODEOWNERS: Add mxinden to authority discovery modules (#4275) 2019-12-02 20:44:09 +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
Denis Pisarev b6b48c4bc6 interruptible test and build jobs (#4271) 2019-12-02 17:58:37 +01:00
Gav Wood da6bb305f8 Whitespace fix from #4266 review. 2019-12-02 14:24:49 +01:00
Gavin Wood 47721b6b01 Fix phragmen elections. (#4266)
CC @kianenigma
2019-12-02 14:21:32 +01:00
Bastian Köcher 2e68c80c20 Improve error message on can_author_with failure (#4262) 2019-12-02 13:07:17 +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 810ac845b5 Fix sc-tracing-* -> sc-transaction- (#4263)
* fixing faulty tracing-rename

* missed one
2019-12-02 12:19:53 +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
Shawn Tabrizi 40f6d05a4c Introduce VestingCurrency trait (#4257)
* Introduce `VestingCurrency` trait

* Return error if account already has vesting schedule
2019-12-01 20:52:00 +01:00
Marcio Diaz bd4f1fc54b Use result. (#4259) 2019-12-01 08:59:56 -05:00
Marcio Diaz 6ba1d5d1fb Fix functions doc. (#4260) 2019-12-01 12:08:24 +01:00
Tomasz Drwięga a401acc690 Add some logs, fix reorg import. (#4250) 2019-12-01 10:14:01 +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
Bastian Köcher 5ccf474d8d Check filename length is valid in keystore (#4255) 2019-11-30 23:20:23 +01:00
Marcio Diaz c791615387 Fix db path on normal run. (#4254) 2019-11-30 19:37:03 +01:00
Bastian Köcher a924230ccb Fix filling the db path in the CLI (#4253) 2019-11-30 12:25:37 +01:00
thiolliere b87b008775 remove unused file (#4251) 2019-11-29 20:25:30 +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
Marcio Diaz 1ceebb5c3a Grandpa: save all completed prior rounds (#4203)
* Save concluded rounds.

* Doc nit

* Fix cargo
2019-11-29 18:54:07 +01:00
mattrutherford 6639e9b254 Tracing - Implement feature to record values with span creation (#4242)
* implement feature to record arbitrary values with span creation

* align dependency versions

* Fix formatting, refactor

* Change `Level` in decl_module from `INFO` to `DEBUG`, because we may
want to use `INFO` in spans added manually in individual pallets, in future.
2019-11-29 15:44:42 +00:00
Bastian Köcher 3da736fdf6 Update kvdb-rocksdb again (#4236)
* Update kvdb-rocksdb again

* Switch to released crates

* Remove last git references
2019-11-29 11:32:44 +01:00
Bastian Köcher accc678640 Check in block authoring that we can author with current authoring version (#4201)
* Check in block authoring that we can author with current authoring version

* Update client/consensus/pow/src/lib.rs

Co-Authored-By: André Silva <andre.beat@gmail.com>

* Fix compilation
2019-11-29 11:01:11 +01:00
Arkadiy Paronyan 0b52f194f5 Fixed node binary (#4244)
* Fixed node binary

* Remove extra params
2019-11-29 09:09:12 +01:00
Gavin Wood e8a655bbef Commission is stated as percent of rewards (#4243) 2019-11-28 14:45:09 +00:00
Arkadiy Paronyan 504e2f8bd5 Check block CLI command (#4240)
* Check block operation

* Update client/cli/src/lib.rs

* Update client/cli/src/params.rs
2019-11-28 11:24:28 +00:00
Tomasz Drwięga f78b83e363 Handle Grafana server bind errors gracefuly. (#4241)
* Fix error handling for grafana sever start.

* Update client/grafana-data-source/src/server.rs

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
2019-11-28 11:16:54 +00:00
thiolliere 2f35d7f003 improve doc (#4239) 2019-11-28 11:06:06 +01:00
Weiliang Li 630f7d8425 Parameter trait for Time::Moment (#4237)
* Debug for Time::Moment

Without this we cannot have a Moment parameter in dispatchable functions

* Update frame/support/src/traits.rs

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

* Update traits.rs
2019-11-28 09:56:01 +01:00
Qinxuan Chen 4a21f9bbfd Prune some duplicate dependencies (#4219)
* Prune some duplicate dependencies

* Remove ed25519-dalek 0.9.1
* Remove hex 0.3.2
* Remove parity-wasm 0.40.3
* Remove pwasm-utils 0.11.0
* Remove wasmi-validation 0.2.0
* Remove quickcheck 0.8.5
* Remove tempdir (Replace tempdir with tempfile)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove useless tempdir_with_prefix

Signed-off-by: koushiro <koushiro.cqx@gmail.com>

* Remove derive_more 0.15

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2019-11-28 09:55:30 +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
Bastian Köcher 3e26fceda4 The storage runtime interface should not enforce a hash type (#4231)
* The storage runtime interface should not enforce a hash type

Currently the runtime interface enforces `H256` as hash type, but in the
future people could use whatever they want as hash type. The hash type
always needs to match between the runtime and the node, but that is
already required.

* Update primitives/externalities/src/lib.rs

Co-Authored-By: thiolliere <gui.thiolliere@gmail.com>
2019-11-28 00:00:28 +00:00
Bryant Eisenbach 39388b826b Use raw public key instead of compressed (#4234)
* refactor: Use raw public key instead of compressed

* Fix whitespace
2019-11-27 23:59:37 +00:00
Robert Habermeier 9973432342 back-off block proposal (#4235) 2019-11-27 21:53:34 +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
Gavin Wood de5686509c Validators don't get slashed for offlineness until 10% at once (#4232)
* Validators don't get slashed for offlineness until 10% at once

* Update frame/im-online/src/tests.rs

Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>

* Update frame/im-online/src/tests.rs

Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com>

* Apply suggestions from code review

Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
2019-11-27 18:57:03 +00:00
Tomasz Drwięga 77d0c065d3 Hard-cap the execution time of custom contract calls. (#4226)
* Reject call requests that allocate too high gas limit.

* Lower to 5x
2019-11-27 18:23:55 +00:00
cheme a7c04a5bce This reverts commit fdbfd0b150. (#4230)
It brings back trie-db 0.16.
2019-11-27 18:23:37 +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
Weiliang Li dcaabbaacf Add sha2-256 hash function (#4218)
* Add sha2-256 hash function

Widely used hash function, supported by bitcoin and ethereum

* Add runtime io support

* add test

* add test

* Update hashing.rs

* Update hashing.rs
2019-11-27 17:32:35 +00:00
Wei Tang f8bf17dc49 Make block proposing remaining duration configurable (#4215)
* Make proposing remaining duration configurable

* Pass chain_head to proposing_remaining_duration and change default
2019-11-27 17:44:34 +01:00
Weiliang Li c5a9b504f9 fix ligature glitch in frame/staking/src/lib.rs (#4217) 2019-11-27 13:13:00 +00:00
Benjamin Kampmann bd652793db Remove all (non-dev) client references from frame, activate dependency enforcer (#4184)
* Move transaction pool to primitives

* move backend, errors into primitives

* remove unused client depencies

* Move rpc-api into primitives

* Move peerset back to client

* Move rpc/api back to client, move palette/support/rpc into utils

* move support-rpc into subfolder

* move system-rpc into utils

* move transaction-pool  and -graph back into client

* fix broken imports

* Clean up test primitives

* Make support test utils independent of frame

* remove unnecessary node dependencies from service

* Reactivate dependency script:
 - only enforce the now achieved status quo will remain
 - allow for primitives to depend on /client for now without failing
 - more discriptive error message so people understand, what it wants
 - minor fix to differentiative between ../client and /client (which may be a subfolder)
 - don't allow this to fail anylonger.

* fix doc comment

* 'Should not' rather than 'must not'.

* Revert unwanted dependency changes

* fix faulty import

* fixup derive_more version

* fix wrong import path
2019-11-26 21:38:28 +01:00
Marcio Diaz b2aab98e69 Add graphs for each function name (#4214) 2019-11-26 20:06:32 +01:00
Wei Tang b362be3ff3 Move block proposing execution to dedicated blocking threadpool (#4202)
* Move block proposing execution to dedicated blocking threadpool

* typo: move comments around

* Fix tests
2019-11-26 20:00:00 +01:00
Qinxuan Chen c7d9c58ce8 Update some dependencies: (#4207)
- derive_more 0.15 -> 0.99
- strum 0.15 -> 0.16
- slog_derive 0.1 -> 0.2

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
2019-11-26 18:39:58 +01:00
Gav Wood a758d54f6e Remove tab (#4212) 2019-11-26 18:39:08 +01:00