Commit Graph

8072 Commits

Author SHA1 Message Date
Robert Habermeier 11fe84a742 Minimal switch of substrate-node to GRANDPA /Aura (#1128)
* add beginnings of SRML grandpa library

* get srml-grandpa compiling

* tests for srml-grandpa

* add optional session integration to grandpa SRML

* start integration into node runtime

* Allow extracting pending change from header digest

* Make it compile on wasm

* make tests compile again

* Move Authority Key fetching into service, simplify service factory construction

* Generalize Authority Consensus Setup system

* Add Authority Setup Docs

* Allow CLI params to be extensible

 - move params to structopts
 - split parsing and default command execution
 - add custom config to node
 - extended parsing of custom config
 - extending params via structop's flatten

* Minor fixes on cli extension params:
 - added docs
 - re-add actual app name, rather than node-name
 - make strategy and subcommand optional

* better cli params

* synchronize GRANDPA and normal node authorities

* Implement grandpa::network for gossip consensus

* run_grandpa in Node

* Fix missed merge error

* Integrate grandpa import queue

* more specific type def

* link up linkhalf and import block

* make grandpa future send

* get compiling

* Fix new params convention and license header

* get it running

* rebuild node runtime WASM

* change logging level

* Update node/cli/src/params.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/cli/src/params.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/cli/src/lib.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/runtime/src/lib.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Update node/cli/src/lib.rs

Co-Authored-By: rphmeier <rphmeier@gmail.com>

* Clean up and Fixme for mutable config

* Move GrandpaService Integration into grandpa, feature gated but on per default

* Fixing grandpa runtime module test

* Update wasm runtime hashes for tests

* GRANDPA: use post-header hash when logging scheduled changes

* add an extra bit of logging to authorities

* fixing missing constrain

* remove old code

* move `NewAuthorities` to an event in srml-grandpa

* fix node-executor tests to use grandpa log

* Remove GossipConsensus from tests, use newly provided sync-feature, fixes tests

* Update to latest wasm runtimes

* address grumbles

* address grumbles

* only derive deserialize when using std

* Clean up use of Deserialize
2018-11-21 18:42:50 +01:00
Gav Wood 84da9d4a02 Remove unneeded bounds. (#1149)
* Remove unneeded bounds.

* Other wasm.
2018-11-21 15:54:15 +01:00
Luke Schoen 84b959b9e7 docs: Fix typos (#1141) 2018-11-20 08:41:56 +01:00
Robert Habermeier 969c81028c alter DB schema to fix lookup race (#1135) 2018-11-19 14:54:35 +01:00
Robert Habermeier c74daa8afe Fix doc on set_validator_count (#1137) 2018-11-19 14:46:36 +01:00
Wei Tang a42336f849 Fix typo in apply_extrinsic (#1136) 2018-11-19 13:47:49 +01:00
Svyatoslav Nikolsky 62c590ef25 Fix light client startup (#1130)
* fix light client startup

* fix grumbles
2018-11-19 08:58:21 +03:00
Bastian Köcher d149f3358a Revert and redo #952 (#1133)
* Revert "Pruning changes trie without digests (#952)"

This reverts commit 6f9a505fba.

* pruning changes tries without digests

* u64::max_value()

* Update wasm files and fix merge conflict

* Fixes tests
2018-11-18 10:09:18 +01:00
Svyatoslav Nikolsky 6f9a505fba Pruning changes trie without digests (#952)
* pruning changes tries without digests

* u64::max_value()
2018-11-17 18:04:53 +01:00
Sergey Pepyakin 5b28147d27 Update wasmi (#1119)
* Update wasmi to 0.4.2

* Add simple benchmarks.
2018-11-16 17:16:42 +01:00
Bastian Köcher a4e5842915 Introduce a PhantomData field in GenesisConfig (#1116)
This makes it possible to support `GenesisConfig`s that to do not use
generic parameter.
2018-11-16 16:16:10 +01:00
Bastian Köcher 0628ce94bb Make sure to call the runtime trait functions (#1129)
* Make sure to call the runtime trait functions

The runtime trait functions export their functions as extern c
functions. These functions itself call the trait functions. This commit
makes sure that the trait functions are called and not functions with
the same name that are implemented for the runtime.

* Update the wasm files
2018-11-16 16:14:49 +01:00
Robert Habermeier e45a68a009 add extra verification for aura (#1126)
* add extra verification for aura

* fix tests

* adjust documentation wording
2018-11-16 11:36:35 +01:00
Robert Habermeier 5d5bbcccfb rename fg-primitives to more verbose name (#1123) 2018-11-16 08:36:04 +01:00
Bastian Köcher 276ec5f85d Try to get grandpa tests compiling again (#1121)
* Revert "start to refactor block import wrapper a bit"

This reverts commit b919de49e1a82422a0870b66100832d531174771.

* Refactor grandpa stuff to get tests almost compiling

* Fixes after rebase

* Fixes merge compile errors
2018-11-16 07:44:51 +01:00
Robert Habermeier 1b202e1ffb start to refactor block import wrapper a bit 2018-11-15 18:36:16 +01:00
Robert Habermeier d2e928a39f more issues due to core API reshuffle 2018-11-15 18:09:03 +01:00
Robert Habermeier 913513d983 Merge branch 'rh-grandpa-dynamic2' of github.com:paritytech/substrate 2018-11-15 17:49:36 +01:00
Bastian Köcher 3cd2739f66 Fixes GrandpaApi implementation and usage 2018-11-15 17:34:55 +01:00
Robert Habermeier 4307a55505 special case equality in ancestry function 2018-11-15 17:03:39 +01:00
Robert Habermeier 1cb0bbc48b start addressing basti comments 2018-11-15 16:36:28 +01:00
azban a2ba7b71d6 network-libp2p: add derive to ServiceEvent (#1118) 2018-11-15 12:34:44 +01:00
Shawn Tabrizi 46ebef082f Update https:// on getsubstrate.io (#1117) 2018-11-15 12:28:07 +01:00
Sergey Pepyakin 2a9f6bed10 Fix overflow in srml-contract. (#1113) 2018-11-14 18:20:42 +01:00
Svyatoslav Nikolsky fa84cec382 Fetch changes trie roots + CHT-based proof for these roots (#896)
* build CHT for changes tries roots

* collect chnages tries roots proof in key_changes_proof

* flush check_changes_proof

* fixed compilation

* LightDataChecker now has a ref to the blockchain

* continue passing proofs

* new light db tests

* more CHT tests

* more tests for key changes proof when headers are missing

* lost files
2018-11-14 16:06:10 +01:00
Robert Habermeier 7e088f6342 address grumbles 2018-11-14 14:34:32 +01:00
Robert Habermeier e37ab01482 Merge branch 'master' into rh-grandpa-dynamic2 2018-11-14 14:32:30 +01:00
Shawn Tabrizi 7f8ee0f53b Clean up justification (#1111)
* adding mac libraries and how to start testnet

* Clean up Justification struct, Issue #1033

* adding mac libraries and how to start testnet
2018-11-14 13:39:38 +01:00
Pierre Krieger 74e907f3cb Some tweaks in the network crate (#1108)
* Move Roles to network::config

* Make network::config public

* Move NetworkConfig and NonReservedMode to config

* Move Params to config

* Move node_id() to NetworkManager and fix tests

* Rename Specialization to NetworkSpecialization
2018-11-14 11:25:16 +01:00
Gav Wood 6ad88fc623 Fix extrinsic impl. (#1109) 2018-11-14 08:59:54 +01:00
Pierre Krieger f94bba0802 Remove dependency on libp2p from cli (#1107) 2018-11-13 16:26:53 +01:00
Bastian Köcher 9063d1acae Implement runtime api client side directly in the runtime (#1094)
* Move `initialise_block` into `Core` trait as it is crucial calling the API functions

* Switch to first version of new runtime API implementation

* Fixes bug in tests

* Reenable asserts

* Directly use the `TestAPI` in the tests

* Start improving the api traits

:100644 100644 898aadc7 49217199 M	Cargo.lock
:100644 100644 61570436 465ed664 M	core/client/src/backend.rs
:100644 100644 5d0c886b 64d710fd M	core/client/src/block_builder.rs
:100644 100644 c447855e 5ecbe474 M	core/client/src/client.rs
:100644 100644 139cef13 f90dbf3d M	core/client/src/error.rs
:100644 100644 2800c503 3298e66a M	core/client/src/runtime_api.rs
:100644 100644 affa1c5c 809b08bc M	core/primitives/src/lib.rs
:100644 100644 2877dfa9 d5547413 M	core/sr-api/Cargo.toml
:100644 100644 9a49784d 6a625a03 M	core/sr-api/src/lib.rs
:100644 100644 7c28e1c7 a1a444a9 M	core/sr-primitives/src/traits.rs
:100644 100644 2e113ab6 dcc01a6d M	srml/metadata/Cargo.toml
:100644 100644 ea722a70 0809531a M	srml/metadata/src/lib.rs

* Refactoring

* Move `sr-api` into client and more refactoring

* Fixes tests

* Some documentation and cleanup

* Fixes compilation after rebase

* More refactoring and more documentation

* Makes `substrate-client` compilable on `wasm`

On `wasm` it basically just exports the runtime api stuff.

* Fixes grumbles

* Updates wasm files after rebasing the master

* Remove TODO comment

* Remove whitespaces

* Fixes after rebasing master

* Another rebase, another fix commit
2018-11-13 13:33:28 +01:00
Svyatoslav Nikolsky 6e3c56c135 Changes tries: support forks (#950)
* forks support in changes trie storage

* moved convert_hash to primitives

* optimize ChangesTrieRootsStorage::root when anchor is canonicalized
2018-11-13 12:17:14 +01:00
Luke Schoen 037f9dde10 docs: Extends #999. Remove disused package readmes. Rename to sr-metadata. Fix Readme Rustdoc names (#1016)
* docs: Remove safe-mix since is no longer local dependency

* docs: Fix existing packages link. Still only includes Substrate Core

* docs: Remove empty package Readmes. Remove old docs links. Rename to Readme

* docs: Remove link to old docs

* misc: Merge latest from master. Renaem to sr-metadata. Fix list of RustDoc package names

* Rename substrate-metadata to sr-metadata, since it is in the "srml" subdirectory

* Change example to use package name that opens all packages in RustDocs

* Fix list of packages names that are available to open in RustDocs

* fix typo

* fix ordering of CLI options and add missing backslash
2018-11-12 21:18:06 +01:00
Sergey Pepyakin 1f0f3c8f6b srml-contract: Extract schedule (#1044)
* Rename Config → Schedule.

* Fetch and pass config.

* Integrate config everywhere.

* <<<E as Ext>::T as Trait> → <<E::T as Trait>

* Update roots

* Cache existential_deposit

* Update COMPLEXITY.md

* Update roots.
2018-11-12 20:44:05 +01:00
azban 367c99b2bb test-utils: add chain-spec-builder cli (#1061)
* test-utils: add chain-spec-builder cli

* style changes, mostly indentation

* fix padding

* add issue to todo

* more style fixes

* share seed padding with keystore

* fix master rebase error
2018-11-12 20:21:03 +01:00
Chevdor 168de867f5 Also change the image for the second stage (#1103)
The fix in #1101 fixed the build but it produces an image that could not run.
The PR fixes that as well.
Ref #1099
2018-11-12 20:13:13 +01:00
Andrew Jones db075b57f0 RPC: expose chain spec properties (#1104)
* Add properties to chain spec

* Read properties as serde_json::Value

* Use a serde json::map::Map directly for properties

* Add type alias for json Map

* Update chain_spec.rs
2018-11-12 19:58:44 +01:00
Gav Wood 57b2896332 Remove unneeded Serde requirements (#1076)
* Remove superfluous serde requirements.

* Try to ensure hash is serde

* Fixups

* Building again

* Attempt to reenable Block (doesn't build)

* Fixes compilation for node cli

* Fixes test compilation

* Fix wasm

* Fix tests

* Remove unneeded changes

* Fix up comments

* Reenable some code

* Compile error when origin misused.

* Remove unnecessary includes of `serde_derive`

* Cleanups
2018-11-12 18:40:18 +01:00
Pierre Krieger b76ba06472 Some minor TODOs removal (#1102)
* Only reconnect if topology changed

* Minor changes
2018-11-12 17:54:57 +01:00
Chevdor 37e3fc37d7 Fix docker image (#1101)
Fix #1099
2018-11-12 15:30:30 +01:00
David 7eef5cc3f8 Update substrate to use libp2p master as of nov 9 (#1095)
* WIP

* Use latest lip2p master
2018-11-09 13:32:29 +00:00
Sergey Pepyakin 5cbbd2284d Fix the race. (#1081) 2018-11-09 13:31:53 +00:00
Simon Warta 0ab26a9c4f Simplify onboarding when using subkey restore (#1079)
* Switch order of `subkey restore` output

to macht the derivation chain: seed -> keypair -> pubkey -> address

* Use terms public key and address explicitly `subkey restore`
2018-11-09 13:30:07 +00:00
Luke Schoen 6edf23d155 refactor: Fixes #1083. Rename ApplyExtrinsicFailed method without typo (#1084) 2018-11-07 21:42:47 +01:00
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