Commit Graph

1014 Commits

Author SHA1 Message Date
Robert Habermeier 4307a55505 special case equality in ancestry function 2018-11-15 17:03:39 +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
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
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