Commit Graph

1553 Commits

Author SHA1 Message Date
Xiliang Chen ea868b6e30 allow trailling comma in decl_event (#2117)
* allow trailling comma in decl_event

* Update srml/support/src/event.rs

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update srml/support/src/event.rs

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update srml/support/src/event.rs

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update srml/support/src/event.rs

Co-Authored-By: xlc <xlchen1291@gmail.com>

* Update srml/support/src/event.rs

Co-Authored-By: xlc <xlchen1291@gmail.com>

* bump version and update wasm
2019-03-29 08:19:35 +01:00
Tomasz Drwięga e22b491783 Fix a race conditon in the pool when transactions are imported during pruning. (#2136)
* Store recently pruned tags to avoid re-importing transactions.

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

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

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

* Update base_pool.rs
2019-03-28 18:57:26 +01:00
Arkadiy Paronyan 7046e13de2 Use prefixed keys for trie node. (#2130)
* Account for pending insertions when pruning

* Prefixed trie storage

* Comments

* Prefixed trie storage

* Fixed tests

* Fixed tests

* Bumped runtime version

* Bumped runtime version again
2019-03-28 18:46:21 +01:00
thiolliere f9d0da0a18 storage doublemap in decl_storage (#1918)
* factorization

* introduce GenericUnhashedStorage

* implement generator and storage

* impl double map in storage macro

* improve StorageDoubleMapXX methods

* remove storage from example and impl test

* remove old comments

* wasm compatible

* improve imports

* rename storages

* update runtime impl version

* make code less verbose

* impl hash config for second key in double map

hash available are all of Hashable trait

* use double map in decl_storage for contract

* fix double map config issue

* add hasher into metadata

* update impl version and build wasm

* doc

* add attrs

* update metadata version

* update runtime version

* fix unused storage
2019-03-28 17:40:50 +01:00
Arkadiy Paronyan e3516d2bf4 Track peers in network-libp2p (#2135) 2019-03-28 17:21:53 +01:00
Gav Wood 3f348d0a18 Ensure timestamp config makes sense. (#2132)
* Timestamp period should be expressed as expected period

* Fix test

* Ensure value never illegal

* Rename

* Remove println

* Add default

* Comment

* Fix, bump and rebuild wasm

* Fix test

* Add TODOs

* Configure only minimum_period.

* Fix

* Update srml/timestamp/src/lib.rs

Co-Authored-By: gavofyork <github@gavwood.com>

* Update srml/timestamp/src/lib.rs

Co-Authored-By: gavofyork <github@gavwood.com>
2019-03-28 15:59:59 +01:00
Gautam Dhameja d6927c2f3e Documentation for system module (#1999)
* srml system docs

* updated docs

* fixed typo

* addressed initial review comments

* addressed review comments

* addressed review comments

* minor fixes in docs

* Various corrections, punctuation.

* updated docs

* minor edit

* fixed doc test

* Update srml/system/src/lib.rs
2019-03-28 15:09:44 +01:00
thiolliere 29001cb469 Decouple contract from balances (#2081)
* decouple contract from balance

* update impls and builds

* set fees in contract module

* builds
2019-03-28 13:46:30 +01:00
Tomasz Drwięga ff4523cbec Make some txpool logs a bit more compact (#1995)
* Improve logging for transaction pool.

* Change Debug in node-template runtime.

* Fix hexdisplay.

* Add some additional logging.

* Rebuild wasm
2019-03-27 23:36:18 +01:00
Gav Wood 039acb9518 Fix subtle indices bug (#2128)
* Fix subtle indices bug

* Also fix balances divide by zero.
2019-03-27 17:46:30 +01:00
Tomasz Drwięga 823abc2fc0 Use NativeWhenPossible for offchain worker. (#2126) 2019-03-27 16:49:53 +01:00
André Silva d17e34b3c8 core: network: reduce log level of peer drop messages (#2125) 2019-03-27 16:49:19 +01:00
Shawn Tabrizi 1c1609342c Introduce ReservableCurrency Trait in Balances Module (#2124)
* Introduce `ReservableCurrency`

* Update Docs for `ReservableCurrency`

* Update Tests

* Bump spec and rebuild wasm

* Extra: Add a note to `slash()`

Discussion in Riot clarified the behavior of `slash()` and `can_slash()`. Trying to sneak clarifying comments about it into this PR

* Update lib.rs

* Don't drop the periods!

CC @shawntabrizi
2019-03-27 16:48:37 +01:00
Shawn Tabrizi b32653d0a8 Update AccountId to use sr25519 in node-template (#2119) 2019-03-27 10:50:14 +01:00
joe petrowski 2ca08a95ba Documentation for balances module (#1943)
* comment updates

* added rustdoc and readme

* clarified LockableCurrency trait

* Currency trait rustdocs

* fixed typo

* fixed suggestions round 1

* UpdateBalanceOutcome docs (open for discussion)

* rm description of enum, consolidation, rm ReclaimRebate

* type clarification, examples overhaul, adoc formatting

* adoc to md

* format change for rustdoc

* update links and fix typos

* typos and links

* updates according to comments

* new example

* small clarifications

* trait implementation section

* missing ```

* small changes, ready for review

* line width update

* small tweaks

* Update srml/balances/src/lib.rs

Co-Authored-By: joepetrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/balances/src/lib.rs

Co-Authored-By: joepetrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/balances/src/lib.rs

Co-Authored-By: joepetrowski <25483142+joepetrowski@users.noreply.github.com>

* Update srml/balances/src/lib.rs

Co-Authored-By: joepetrowski <25483142+joepetrowski@users.noreply.github.com>

* Update lib.rs

* address review by thiolliere

* remove common warning

* Update docs

* updated srml example
2019-03-26 17:00:29 +01:00
thiolliere a2222279ca improve decl storage doc (#2059)
* improve decl storage doc

* nocompile doc

* fix doc

* typo

* Update srml/support/procedural/src/lib.rs
2019-03-26 15:01:46 +01:00
Pierre Krieger a9420424b2 Improvements to system_networkState (#2088) 2019-03-26 14:45:11 +01:00
Kian Peymani da124d74d1 Replace Overflow-Prone Operations in Staking with Saturating Arithmetic (#2115)
* Improve a few doc string

* Replace overflow-prone operation with saturating.

* Remove whitespace.

* Update wasm; Bump spec;

* Bump impl again.

* Fix review comments.
2019-03-26 14:39:14 +01:00
thiolliere 571d094313 improve docs (#2068)
* improve decl_storage instance doc

* use decl_event doc accordignly

* automate doc and while allow to extend it on event

* some missed ones

* Update srml/example/src/lib.rs

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

* Update srml/support/procedural/src/storage/transformation.rs
2019-03-26 14:35:57 +01:00
Stefanie Doll d3ae05b454 Fixed wrong default value for offchain-worker-execution (#2118) 2019-03-26 12:14:02 +01:00
thiolliere e6a4bb1be6 fix macro internal use with $crate (#2060) 2019-03-26 10:44:01 +01:00
André Silva cee2166e4f srml: consensus: kill storage (#2098)
* srml: consensus: kill storage items

* srml: consensus: add test for set and kill storage

* runtime: bump spec_version update wasm blobs
2019-03-25 23:39:23 +00:00
Tomasz Drwięga e2f5e40876 Initial: Offchain Workers (#1942)
* Refactor state-machine stuff.

* Fix tests.

* WiP

* WiP2

* Service support for offchain workers.

* Service support for offchain workers.

* Testing offchain worker.

* Initial version working.

* Pass side effects in call.

* Pass OffchainExt in context.

* Submit extrinsics to the pool.

* Support inherents.

* Insert to inherents pool.

* Inserting to the pool asynchronously.

* Add test to offchain worker.

* Implement convenience syntax for modules.

* Dispatching offchain worker through executive.

* Fix offchain test.

* Remove offchain worker from timestamp.

* Update Cargo.lock.

* Address review comments.

* Use latest patch version for futures.

* Add CLI parameter for offchain worker.

* Fix compilation.

* Fix test.

* Fix extrinsics format for tests.

* Fix RPC test.

* Bump spec version.

* Fix executive.

* Fix support macro.

* Address grumbles.

* Bump runtime
2019-03-25 23:22:11 +01:00
Gav Wood 3ee0e69463 bond_extra should be authorised only from stash (#2096)
* bond_extra should be authorised only from stash, lest the controller
gets compromised.

* Fix tests

* Fix grumbles

* Pass compact balances
2019-03-25 19:35:28 +01:00
gabriel klawitter 7ab7a826d3 ci: fix kubernetes chart (#2111) 2019-03-25 16:33:43 +01:00
André Silva e28ff32b89 core: cli flag to disable grandpa (#2105)
* core: cli flag to disable grandpa

* core: fix test service configuration

* Update core/service/test/src/lib.rs
2019-03-25 15:19:36 +00:00
thiolliere 620e8dc8b9 impl MakePayment for balances instances (#2055) 2019-03-25 15:19:15 +01:00
Pierre Krieger 4fe70ee639 Forgot to handle Banned in inject_connected (#2107)
* Forgot to handle Banned in inject_connected

* Also add debug for the state
2019-03-25 14:48:43 +01:00
Arkadiy Paronyan c6addc9bd5 CLI option to enable authoring when offline (#2104)
* CLI option to enable authoring when offline

* Update core/service/src/config.rs

Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
2019-03-25 11:28:35 +01:00
Pierre Krieger 44db5f44e3 Directly connect if notice that ban has expired (#2100) 2019-03-24 11:49:38 +01:00
Pierre Krieger b6c54b5c40 Always accept incoming connections (#2101) 2019-03-24 11:48:53 +01:00
Pierre Krieger a1f3b0b529 Fix hardcoded values in the PSM config (#2103) 2019-03-24 11:29:45 +01:00
Pierre Krieger 3ba7442dca Properly distinguish in/out connections in the PSM (#2102) 2019-03-24 11:29:29 +01:00
Pierre Krieger 418edcfbac Don't print dozens of the times the handler init warning (#2089) 2019-03-23 12:44:35 +01:00
Arkadiy Paronyan 90d3fe8913 Reduce grandpa interval for substrate node (#2097) 2019-03-23 12:40:43 +01:00
Gav Wood 91c7c7188d Rename ensure_free_balance_is to make_free_balance_be (#2092) 2019-03-23 11:18:14 +01:00
Arkadiy Paronyan ce32bfa923 Version bump (#2095) 2019-03-23 11:18:01 +01:00
Xiliang Chen 36d90ff272 expose linked map info to metadata (#2037)
* expose linked map info to metadata

* Make it non breaking change

* another way

* change to option 1

* bump metadata version

* fix test

* bump version and update wasm
2019-03-23 11:17:29 +01:00
Pierre Krieger 6e394464b8 Replace NodeIndex with PeerId everywhere (#2077)
* Replace NodeIndex with PeerId

* Fix tests

* More test fixing

* Whitespace
2019-03-23 10:34:28 +01:00
Gav Wood 6fa40ec199 Fix up the offline validator API to accept controller (#2090) 2019-03-23 08:16:22 +01:00
Kian Peymani 564c954aa7 Self-Vote for Staking (among others.) (#2078)
* initial doc for the staking module

* Remove md style links.

* Remove todos.

* Add rust code types

* Rename and fix review notes.

* Add new md file

* Final touches.

* Migrate compleatly to rustdoc

* Update link

* Fix heading

* Final touches wrt the new template.

* Remove empty prereq.

* Fix more reviews

* Some final nits.

* Fix some side issues.

* Fix another set of reviews

* Fix + stabilize leftover reivews.

* Remove unused test parameters

* Fix typo.

* Merge redundant loops

* Adds phantom self-vote

* Fix broken tests.

* Refactor some names to match the reference.

* Remove redundant inner loops from election round.

* Introduce phragmen post-processing.

* Some fixes and todos.

* Fix some tests with new phragmen params

* Fix test

* Bump spec

* Fix wasm build

* Fix tests and phragmen fallback. Avoid double-controlling

* Fix and rebuild wasm

* Whitespaces, whitespaces everywhere.

* Rebuild

* Disable post-processing.

* Identify by stash, not controller account.

* Couple of fixes

* Fix first test

* Fix invulnerability_should_work

* Fix a couple more tests

* Fix more tests

* Fix more tests

* Fix more tests

* Fix some tests

* Fix update-ledger.

* Fix update-ledger.

* Fix another test

* Fix another test

* Fix rest of staking tests

* Remove printlns

* Rebuild wasm

* Fix & tests for auth/val syncing

* Fix up threading for tests

* Remove superfluous asserts
2019-03-22 21:41:33 +01:00
André Silva 25ec793e35 Fix handling of justifications (#2086)
* util: fork-tree: check predicate first while traversing tree

* core: sync: keep track of justifications sent to the import queue

* core: grandpa: verify authority set changes dependencies

* core: fork-tree: add more tests

* core: grandpa: extend enacts_standard_change tests
2019-03-22 19:07:24 +01:00
Pierre Krieger 7469713dea Fix #2073 (#2087) 2019-03-22 18:21:24 +01:00
cheme dd47be51c3 Switch contract storage to child trie (#2002) 2019-03-22 18:01:06 +01:00
Arkadiy Paronyan 704d2a49c7 Don't sync on top of pruned blocks (#2079)
* Don't sync to pruned blocks

* Typo

Co-Authored-By: arkpar <arkady.paronyan@gmail.com>
2019-03-22 16:27:50 +01:00
gabriel klawitter 53f40c583d Ci update names and chart (#2076)
* add option to specifiy substrate node name via environment variable file

* gitlab-ci: change job names and adopt to polkadot pipeline

* upgrade helm chart

Signed-off-by: gabriel <gabriel@parity.io>
2019-03-22 13:13:37 +01:00
DemiMarie-parity 000e7a8002 Make AuRa generic over cryptography (#2062)
As is so often the case in Rust, most of the work was fixing compiler
errors and removing spurious type annotations.
2019-03-21 17:26:00 -04:00
Pierre Krieger b712795aa2 Fix #1777 (#2072) 2019-03-21 16:49:21 +01:00
Pierre Krieger 90c6f85db5 Add a substrate-peerset crate (#2042)
* Add a substrate-peerset crate

* Some adjustements

* More adjustements

* Use a temporary libp2p branch

* Add back-off mechanism

* Fix RPC tests

* Some adjustements

* Another libp2p bugfix

* Do a round-robin in the peerset

* Use a real dependency instead of a patch for libp2p

* Initialize reserved nodes correctly

* Better diagnostic for no address

* Don't allocate slots if in reserved only

* Ban node on dial failure

* Fix indentation
2019-03-21 14:02:28 +01:00
kaiyu f6f15b618e Use local executor (#2054) 2019-03-21 13:57:20 +01:00