Commit Graph

991 Commits

Author SHA1 Message Date
Tomasz Drwięga 3acafa9d2f Last finalised block PubSub & RPC (#1080)
* Finalised blocks PubSub

* Finalised head RPC.

* Unify spelling.
2018-11-07 13:55:00 +01:00
Hero Bird 660c747c51 Update fixed-hash & uint utilities (#1078)
* [core/primitives] Update crunchy 0.1 => 0.2

* [core/primitives] Update fixed-hash 0.2 => 0.3.0-beta

* [core/primitives] Update `uint` 0.4 => 0.5.0-beta

* [core/state-machine] Fix errors emerged by fixed-hash update

* [core/state-db] Fix errors that emerged from fixed-hash update

* [core/sr-io] Fix errors that emerged from the fixed-hash update

* [core/trie] Fix errors emerged from fixed-hash updates

* [core/trie] Make use of new Hash::as_fixed_bytes_mut method in tests

* [core/sr-primitives] Fix errors emerged from updating fixed-hash

* [core/executor] Fix errors that emerged from fixed-hash update

* [core/test-runtime] Fix errors that emerged from updating fixed-hash

* [core/test-runtime] Fix an error that emerged from fixed-hash update

* [core/transaction-pool] Fix errors that emerged from updating fixed-hash

* Add From<u64> impl for hash types defined in core/primitives

* [core/client/db] Fix errors that emerged from fixed-hash update

* [core/{client/network/rpc}]: Fix errors emerged by fixed-hash update

* [node/{cli/executor/runtime}]: Fix errors emerged by updating fixed-hash

* [core/network]: Fix bug in parsing constant str

* Update Cargo.lock

- Add crunchy 0.2.1
- fixed-hash 0.2.2 => 0.3.0-beta.3
- Add static-assertions 0.2.5
- uint 0.4.1 => 0.5.0-beta.1

* [core/primitives]: Add fixed-hash/rustc-hex feature for FromStr impl

* [core/primitives] No longer provide From<u64> impl for hash types if byteorder support is not enabled

* [core/primitives] Revert to using From impl again in primitives tests

* [core/..] Fix some bugs that emerged by recent fixed-hash updates

* Update a bunch of Cargo.lock files

* [core/state-db] Re-add whitespace between attr and extern crate/mod

* [core/primitives] Fix bug in From<u64> impl for hash types using the wrong feature guard
2018-11-06 15:39:55 +01:00
Sergey Pepyakin 9072fce658 srml-contract: Sandbox mem IO according to COMPLEXITY.md (#939)
* Sandbox mem IO according to COMPLEXITY.md

* Fix tests.

* Update root hash for deploying contract test.
2018-11-05 19:23:16 +01:00
Pierre Krieger fcae7ac582 Switch to libp2p master (#931) 2018-11-05 19:22:26 +01:00
azban 94e2589f1e gitattributes: add file and ignore Cargo.lock in diffs and github stats (#1064) 2018-11-05 19:21:37 +01:00
Guanghua Guo c3809fe962 Delete unuse extern (#941) 2018-11-02 21:05:37 +01:00
azban e384cec08f readme: add instructions for running multi-node test (#1055) 2018-11-02 20:31:03 +01:00
Bastian Köcher 26f1381d0d Make balance::Trait::Balance require Member (#1057) 2018-11-02 12:09:58 +01:00
azban 2bd4c5cc05 docker: use alpine to slim down images (#1047) 2018-11-01 10:35:45 +01:00
azban 80cd14fd17 telemetry: wait for logger setup before making connection (#1048) 2018-11-01 09:55:48 +01:00
azban a0b05b0b0c ignore intellij folder in gitignore and dockerignore (#1046) 2018-11-01 09:47:51 +01:00
azban 5a50f15926 improve docker build caching (#1045)
* docker: add Dockerfile and .dockerignore to .dockerignore

* docker: install cargo deps before copying code
2018-11-01 09:47:08 +01:00
Sergey Pepyakin 05a73de366 Refine Complexity.md (#1038) 2018-11-01 09:30:32 +01:00
Wei Tang b21de8a0b5 Support multi trie in genesis generation (#958)
* Support multi trie in genesis generation

* Fix merge issues
2018-11-01 09:30:03 +01:00
Sergey Pepyakin ac4a188e15 Use the upstream version of integer-sqrt. (#1041) 2018-10-31 15:40:59 +01:00
Gav Wood 83683bce43 Update README.adoc 2018-10-29 10:44:38 +01:00
guanqun b8b3f5b7d1 fix one typo (#1029) 2018-10-27 18:03:57 +02:00
Benjamin Kampmann 50adea6220 Consensus Engines Implementation: Aura (#911)
* Generalize BlockImport

 - move ImportBlock, BlockOrigin, ImportResult into shared sr-primitives
 - let Consensus provide  and  traits again
 - update consensus traits to latest development
 - implement traits on client::Client, test_client::TestClient
 - update RHD to use the new import_block API

* Move ImportBlock into consensus-common
* Send import notification in aura tests
* Integrating aura into service
* Make Signatures more generic
* Aura Block Production with the given key
* run aura on the thread pool
* start at exact step start in aura
* Add needed wasm blob, in leiu of better solutions.
* Make API ids consistent with traits and bring upstream for sharing.
* Add decrease_free_balance to Balances module
* Encode `Metadata` once instead of two times
* Bitops include xor
* Upgrade key module.
* Default pages to somewhat bigger.
* Introduce upgrade key into node
* Add `Created` event
2018-10-27 15:59:18 +02:00
guanqun c0f7021427 Remove pub in macros (#1027)
* use :vis in macro_rules!

* use :vis in meta
2018-10-27 12:15:15 +02:00
Tomasz Drwięga 55e53a9898 Use local index for misbehaviour calculation (#934)
* Compute next index for misbehaviour reporting correctly.

* Merge branch 'master' into td-graph-improvements
2018-10-26 19:19:20 +02:00
Bastian Köcher d3f2a00793 Multiple improvements to the decl_module! macro (#953)
* General `decl_module` improvements

* Make `deposit_event` implementable by `decl_module!`

* Make `decl_module!` implement calls directly

* Regenerate the wasm file after master rebase
2018-10-26 12:34:25 +02:00
gabriel klawitter f0eb519318 ci: change rust container tag from substrate to nightly (#1015) 2018-10-26 12:03:56 +02:00
guanqun b1976c9014 mutate returns a value (#945)
* mutate returns a value

* code comment fixes

* fix the compile
2018-10-26 11:13:16 +02:00
Luke Schoen 10210b9520 docs: Remove readme since should not be in src folder (#1004) 2018-10-26 11:10:06 +02:00
Luke Schoen f923e38cc7 docs: Relates to Issue #995. Fix links in existing documentation (#999)
* docs: Remove safe-mix since is no longer local dependency

* docs: Fix existing packages link. Still only includes Substrate Core
2018-10-26 11:09:48 +02:00
Luke Schoen 7b4b98abef docs: Move contribution links to Contribution section (#994) 2018-10-25 18:35:42 +02:00
Luke Schoen 190f167251 docs: Fix broken link to License in Readme (#993)
* docs: Fix link to LICENSE

* fix: Remove surrounding text
2018-10-25 18:35:13 +02:00
Luke Schoen a6596582bf docs: Relates to #578 Minor fixes to documentation section in Readme (#992)
* docs: Fix syntax for module comment. Rename to substrate Core

* docs: Reorder package layers in order of level of abstraction

* docs: Make text more concise

* docs: Add SRML abbreviation
2018-10-25 18:34:49 +02:00
Luke Schoen c207ecfbfc docs: Relates to #578. Add instructions for rustdoc viewing and contributing (#957)
* doc: Relates to #578. Add rustdoc documentation guide to readme

* fix: Fix testing of dot points. Show packages over multiple lines so all visible

* fix: Fix indentation and change from authorting to contributing
2018-10-25 10:13:20 +02:00
Bastian Köcher f8896f954d Make decl_storage! assume less about the environment (#956) 2018-10-25 09:44:47 +02:00
Bastian Köcher 6244b6a3b9 Encode Metadata once instead of two times (#946) 2018-10-25 09:36:57 +02:00
Bastian Köcher 1ba73e0e88 Make decl_module! implement OnFinalise (#947) 2018-10-23 09:58:15 +02:00
Tomasz Drwięga 52093c4b7a Runtime version pub sub. (#948) 2018-10-23 08:21:05 +02:00
Gav Wood 396e258de3 Update README.adoc 2018-10-21 13:26:25 +02:00
Gav Wood f14a8c289d Update README.adoc 2018-10-21 13:25:11 +02:00
Gav f31cfe96e4 Move getgoing script into scripts. 2018-10-21 12:37:39 +02:00
Gav Wood d9a7c74e5c Add simple script to get going on mac 2018-10-21 12:37:01 +02:00
Gav 5579eeb761 Minor fix for subkey 2018-10-20 23:33:18 +02:00
Gav cb6c2fa087 Remove erroneous println 2018-10-20 23:23:41 +02:00
Gav Wood 8a9ffeaea2 Add runtime so that cargo install works (#940) 2018-10-20 23:01:49 +02:00
Gav Wood 1475610880 Remove nonsense code and options, fix score and generally make subkey work (#936)
* Remove nonsense code and options, fix score and generally make subkey work.

* Rename Demo -> Node
2018-10-20 22:15:28 +02:00
Luke Schoen e47f3835fd fix: Fix typo in argument name (#935) 2018-10-20 12:43:20 +02:00
Gav Wood 583c24f017 Add Assets module (#925)
* Add Assets module

* Fixes

* Fix

* Update comments

* Support `GenesisConfig` without any fields

Fixes: #923

* Do not generate an empty `GenesisConfig`, instead generate no `GenesisConfig`
2018-10-20 12:43:00 +02:00
Bastian Köcher 7f6862ba5e Remove node-service (#933)
* Move `chain_spec` into `node-cli`

* Fixes tests

* Adds `construct_simple_service` and `construct_service_factory` macros

* Remove the `node-service` crate

* Add some documentation

* Fixes compilation on stable
2018-10-19 12:22:32 +02:00
Svyatoslav Nikolsky ca38fd72f6 Moved DigestItem impl to impl_outer_log (#932)
* moved DigestItem impl to impl_outer_log

* Enable backtrace collecting on the CI

* internal module is not required in impl_outer_log

* Revert "internal module is not required in impl_outer_log"

This reverts commit 5430446971cdf5fd5735863b86cd08a11d35d1dd.

* Revert "moved DigestItem impl to impl_outer_log"

This reverts commit 8872bbee963dbb4316251222f5c0757303fb3f52.

* Revert "Revert "moved DigestItem impl to impl_outer_log""

This reverts commit 47afd59682f8828665bd9cfb293b40ce4c4787af.

* Revert "Revert "internal module is not required in impl_outer_log""

This reverts commit 9ae640010c00ef134099d5b6a4430d330be134b2.

* More diagnostics

* check if only 1 test fails

* test is back + some "traces"

* removed some traces

* removed "traces"
2018-10-19 09:47:09 +02:00
Wei Tang 2604474880 Multiple storage root support (#902)
* Implement a non generic version of child delta trie

* Use delta_trie_root in state_machine

* Expand InMemory backend to support multi-storage

* Create Consolidate trait

* Fix all crate compile and remove unused OverlayedChanges::drain

* Implement child storage root support and overlay changes

* Add child storage reader

* Add child storage writer

* Implement child storage cleaning

* Fix light backend compile

* Add all required ext functions for wasm executor

* Add ext def to io

* Add all io functions

* Fix nostd compile

* Add simple test

* Remove unnecessary vec copy in child_storage_root_transaction

* Use values_mut/for_each to make it shorter

* Use extend to shorter a for loop

* Move record_all_keys to trie so it's easier to generic them later

* space -> tab

* Remove to_owned in debug format

* Clean out all to_owned

* Break debug_trace to multiple lines

* Remove 0..

* UserError copy/paste typo

* Replace Vec::from_raw_parts by slice::from_raw_parts

* Use iter::empty()

* Wrap some long lines

* Wrap a missing line

* Remove unnecessary map

https://github.com/paritytech/substrate/pull/856#discussion_r226222663

* Call ext_free after from_raw_parts

* Fix tests in other crates
2018-10-18 18:54:02 +02:00
Chevdor 849506daa5 Add docker file for Substrate (#930) 2018-10-18 18:36:43 +02:00
Bastian Köcher e321a645c9 Fixes tests on master (#929) 2018-10-18 13:36:54 +02:00
Bastian Köcher 4132a49fbb Move inherent implementation into the modules (#924)
* Adds new `ProvideInherent` trait

Also implements the new trait for `srml/consensus` and `srml/timestamp`.

* Adds `impl_outer_inherent!` macro

* Reexport macros from `alloc`

* Introduce `RuntimeString` and fix `ProvideInherent` on `no_std`

* Replace `VersionString` with `RuntimeString`

* Improvements for `impl_outer_inherent!`

* Make `construct_runtime!` support `impl_outer_inherent!`

* Fixes after rebase

* Whitespace
2018-10-18 10:55:52 +02:00
Tomasz Drwięga 36625faa9f Pool: parallel ready and runtime changes (#922)
* Revert "Revert runtime changes."

This reverts commit 01a7d1aa83c2918dd63b7dc54eb688d544cfc649.

* Parallel queue reads.

* Avoid recursion in best iterator.
2018-10-18 10:37:29 +02:00