Commit Graph

48 Commits

Author SHA1 Message Date
thiolliere beeacf9cfa impl HasCompact for Perbill and Permill (#1411)
* impl Compact<> and HasCompact for Permill Perbill

* update parity-codec to 2.2

* add Cargo.lock

* add lock and build for runtime

* rebuild Cargo.lock after rebase
2019-01-17 11:25:48 +01:00
Gav Wood c9f047fe84 Split Indices module from Balances (#1404)
* Indices module

* Remove indices stuff from balances

* Rejob node, move Lookup into system.

* Fix up some modules.

* Fix democracy tests

* Fix staking tests

* Fix more tests

* Final test fixes

* Bump runtime versions

* Assets uses compact dispatchers

* Contracts module uses indexed addressing

* Democracy has more compact encoding

* Example now demonstrates compact eencoding

* Sudo uses indexed address

* Upgrade key also uses indexed lookups

* Assets more compact types.

* Fix test

* Rebuild runtime, whitespace

* Remove TOODs

* Remove TODOs

* Add a couple of tests back to balances.

* Update lib.rs

* Update lib.rs
2019-01-16 15:57:19 +01:00
Sergei Pepyakin a73280728f Update wabt to to not require python dependency (#1420) 2019-01-14 21:53:09 +01:00
Gav Wood d6ef5f9215 Urgent safety fix for #1371 (runtime version) 2019-01-10 16:06:19 +01:00
Gav Wood fc5fdab5f2 Cherry updates (#1373)
- Introduce compact extrinsics into Cherry
- Remove UpgradeKey from Cherry (Sudo is enough)
- Remove networkId from Cherry properties
2019-01-09 12:52:16 +01:00
kyegupov 079eb39559 Test compiled wasm code in test-runtime (#1364)
* Test compiled wasm code in test-runtime

* Drop lazy_static

* Move substrate-executor to dev-dependencies
2019-01-09 11:27:53 +01:00
Shawn Tabrizi c4010edb75 Updating parking_lot dependencies to 0.7.1 (#1361) 2019-01-08 11:15:42 +01:00
Gav Wood 043831cfb0 Invulnerabiity from slashing for certain validators (#1355)
* Invulnerabiity from slashing

* Update srml/staking/src/lib.rs

Co-Authored-By: gavofyork <github@gavwood.com>
2019-01-07 16:07:58 +01:00
Gav Wood ef8b94656e Sudo module (#1315)
* Sudo module

* Fix comment

* Fix errors

* Fix test

* Update hashes

* Final test fixes and build

* Final hex change
2018-12-21 13:43:34 +01:00
cheme 23634b6b95 Include default values in storage metadata (#1264)
* Add a 'default' field to metadata. It contains code to generate the
default value.

* wasm update

* Make 'default' field an `Option`

* Boxed fn is not static, that won't be fine

* static fn won't do it to as it cannot get T param, will try fat trait

* Fat pointer over phantom data compatible with static instantiation

* DecodeDifferent is cool, using it for decoding.

* using once cell to do what would require copying lazy_static internals.

* Remove cache when no_std (non compatible deps)

* wasm bins update

* Fuse tooling struct and enum derive.
2018-12-20 14:31:03 +01:00
Wei Tang 66ad1ed974 Avoid duplicate depencency declare via package re-export (#1287)
* node/runtime: Avoid duplicate dependency via package reexport

* core/test-runtime: Avoid duplicate dependency via package reexport

* Update lock file
2018-12-19 17:47:10 +01:00
Robert Habermeier 6299b42a4d Punish offline validators, aura-style (#1216)
* make offline-reporting infrastructure more generic

* add a listener-trait for watching when the timestamp has been set

* prevent inclusion of empty offline reports

* add test for exclusion

* generate aura-offline reports

* ability to slash many times for being offline "multiple" times

* Logic for punishing validators for missing aura steps

* stub tests

* pave way for verification of timestamp vs slot

* alter aura import queue to wait for timestamp

* check timestamp matches seal

* do inherent check properly

* service compiles

* all tests compile

* test srml-aura logic

* aura tests pass

* everything builds

* some more final tweaks to block authorship for aura

* switch to manual delays before step

* restore substrate-consensus-aura to always std and address grumbles

* update some state roots in executor tests

* node-executor tests pass

* get most tests passing

* address grumbles
2018-12-10 18:37:08 +01:00
Gav Wood 66cbe232f5 Governance: Voters put money where mouth is (#1183)
* Referendums only gett enacted after a delay; successful voters must
lock funds up until enactment.

* Build fixes.

* Configurable council enact delay, fix test builds.

* Fix spelling

* Remove TODO
2018-12-10 17:29:40 +01:00
Wei Tang 52ba9a5605 Update fixed-hash pin version and fix cargo locks (#1241) 2018-12-10 11:58:06 +01:00
Bastian Köcher 1f6719346f Make runtime api generate version and identifier information (#1226)
* Make `decl_runtime_apis!` implement `RuntimeApiInfo` for all runtime
apis

* Make the runtime side generate the info constants as well

* Make `RuntimeApiInfo` implementation use the correct generics

* Adds a test for the runtime api info stuff

* Remove duplicated code by using block from `test-client`

* Adds `compile_fail` tests for `api_version`

* Adds documentation for `api_version`

* Make `impl_runtime_apis!` generate `RUNTIME_API_VERSIONS`

* Update documentation and tests for `RUNTIME_API_VERSIONS`

* Implement `has_api` by using the `RuntimeApiInfo`

* Make `impl_runtime_apis` check that trait identifiers are unique

* Prefix all runtime api function with the corresponding trait

So `execute_block` will be called `Core_execute_block`.
This makes it possible to have traits implement a function with the
same name.

* Rebase master

* Update after master rebase
2018-12-10 11:48:07 +01:00
cheme ed5b78eaf0 decl_storage as a proc_macro (#1176)
* `decl_storage` parsing of the macro (TODO change tool crate structure)

* Start formatting, for now use inner macro.
Still missing optional formating last part (genesis ...).

* Calling extra genesis macro

* decl_storage lines parsing.

* genesis macro as quote (need some cleaning reorg)

* dirty $crate substitute

* proc crate reorg.

* PR impl : skip usage of phantom data, it only applies in test and
council (others required it).

* Remaining macro of decl_storage, warning stringify behave sometime
oddly.

* Formatting code and some cleaning.

* Include line parsing to main struct (cannot use existing macro anymore).

* Remove genesis phantom data when there is already a field with type
parameter.

* Revert wasm files

* Remove old version of `decl_storage`.

* Fix false positive for phantom trait (additional type check on config
build).

* slight changes:
- return token errors instead of panic
- do not use useless intermediate vec

* Update srml/support/procedural/tools/derive/src/lib.rs

remove indent

Co-Authored-By: cheme <emericchevalier.pro@gmail.com>

* Switch iterations to fold, remove unused import.
2018-12-09 21:09:39 +01:00
André Silva e779eeb2ec Grandpa validator set handoff justification (#1190)
* core: make block justification optional

* runtime: update wasm binaries

* core: optionally pass justification on finalize_block

* finality-grandpa: add channel to trigger authority set changes

this will allow the `BlockImport` to trigger an authority set change when
importing a change block that provides a justification (when syncing)

* finality-grandpa: move finalize_block to free function

* finality-grandpa: add GrandpaOracle for auth set liveness checking

this will be used by `BlockImport` to check whether the authority set for a
given block is still live, if the authority set isn't live then importing a
change block requires a justification.

* finality-grandpa: store justification on finalized transition blocks

* finality-grandpa: check justification on authority set change blocks

* finality-grandpa: poll grandpa liveness oracle every 10 seconds

* finality-grandpa: spawn grandpa oracle in service setup

* core: support multiple subscriptions per consensus gossip topic

* finality-grandpa: create and verify justifications

* finality-grandpa: update to local branch of grandpa

* finality-grandpa: update to finality-grandpa v0.5.0

* finality-grandpa: move grandpa oracle code

* finality-grandpa: fix canonality check

* finality-grandpa: clean up error handling

* finality-grandpa: fix canonical_at_height

* finality-grandpa: fix tests

* runtime: update wasm binaries

* core: add tests for finalizing block with justification

* finality-grandpa: improve validation of justifications

* core: remove unused IncompleteJustification block import error

* core: test multiple subscribers for same consensus gossip topic

* Revert "finality-grandpa: improve validation of justifications"

This reverts commit 51eb2c58c2219801e876af6d6c9371bdd9ff2477.

* finality-grandpa: fix commit validation

* finality-grandpa: fix commit ancestry validation

* finality-grandpa: use grandpa v0.5.1

* finality-grandpa: add docs

* finality-grandpa: fix failing test

* finality-grandpa: only allow a pending authority set change per fork

* finality-grandpa: fix validator set transition test
2018-12-08 13:34:59 +08:00
Bastian Köcher ed421c56ee Rewrite impl_runtime_apis! and decl_runtime_apis! as proc-macro (#1174)
* Rewrites `impl_runtime_apis!` macro as `proc-macro`

* Adds some documentation

* Require the `impl_runtime_apis` to use a path for accessing the trait

* Make the runtime implement `GetNodeBlockType`

* Moves first chunk of runtime api code into the `impl_runtime_apis` macro

This also renames `ClientWithApi` into `RuntimeApi`.

* Make `impl_runtime_apis` use `runtime` api version automatically

* `decl_runtime_apis` automatically adds `Block: BlockT` as generic parameter

* Remove function generic arguments in block builder api

* Remove some unnused stuff from the `decl_runtime_apis` macro

* Make `InherentData` working again

* Make `impl_runtime_apis!` implement the `RuntimeApi` side as well

* Make it compile again after rebasing with master

* Split `sr-api-macros` into multiple files

* Reimplement `decl_runtime_apis!` as proc_macro

* Use `decl_runtime_apis!` for `Core` as well and improve error reporting

* Adds documentation for `decl_runtime_apis!` and `impl_runtime_apis!`

* Move some code

* Adds compile fail tests

* Adds a test and fixes some bugs

* Make `impl_runtime_apis!` support `_` as parameter name

* Fixes build errors with wasm

* Wasm rebuild after master rebase

* Apply suggestions from code review

Co-Authored-By: bkchr <bkchr@users.noreply.github.com>

* Addresses some grumbles

* Adds test to ensure that method signatures need to match

* New wasm files
2018-11-30 11:42:46 +01:00
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
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
Robert Habermeier 5d5bbcccfb rename fg-primitives to more verbose name (#1123) 2018-11-16 08:36:04 +01:00
Bastian Köcher 3cd2739f66 Fixes GrandpaApi implementation and usage 2018-11-15 17:34:55 +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
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
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
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
Guanghua Guo c3809fe962 Delete unuse extern (#941) 2018-11-02 21:05:37 +01:00
Sergey Pepyakin ac4a188e15 Use the upstream version of integer-sqrt. (#1041) 2018-10-31 15:40:59 +01: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
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
Gav Wood 8bc5242c92 Compact format for block number, nonce, balance (#910)
* Try to make everything compact

* Make `Clone` work

* Fix

* Move contracts and balances over to compact encoding

* Session and timestamp are compact

* Sataking uses compact numbers

* Treasury now compact

* Compact Democracy

* Council is compact

* Fix
2018-10-16 22:47:30 +02:00
Bastian Köcher 8de663f105 Adds check_inherents function to the BlockerBuilder API (#912)
* Adds new `check_inherents` function to the `BlockBuilder` API

* Switch to `check_inherents` in `node-consensus`

* Remove `CheckedBlock`, because it is not required anymore

* Fixes after rebase

* Fixes compilation on stable
2018-10-16 20:30:04 +02:00
Benjamin Kampmann ac4bcf879f Generalize the Consensus Infrastructure (#883)
* Split out Consensus
* Supply ImportQueue through network-service
  - simplify ImportQueue.import_blocks
  - remove Deadlock on import_block
  - Adding Verifier-Trait
  - Implement import_queue provisioning in service; allow cli to import
* Allow to actually customize import queue
* Consensus Gossip: Cache Message hash per Topic
2018-10-16 13:40:33 +02:00
Bastian Köcher 2c65ad6c7b Refactor the runtime API to use traits. (#878)
* Add missing `As` imports.

* Adds new API traits that will be used by the client and runtime

* Switch consensus to new API's

* Switches transaction-pool to new API's

* Move runtime api stuff into its own crate

* Adds `impl_apis!` macro for implementing the new API traits

* Make `metadata` return directly a blob

* Runtime replace `impl_stubs!` with `impl_apis!`

* Switches to none feature based approach for declaring the different API traits

* Fixes compilation error

* Fixes errors

* Make the `decl_apis!` trait usable from the outside

* Make the `test-client` use the new API traits

* Remove last `impl_stubs!` bits and move some of them into wasm executor for tests

* A little bit more documentation
2018-10-09 10:58:29 +02:00
guanqun 1cc0e3b6ea Enhance decl storage (#777)
* enhance macro decl_storage()

* update the state root hash

* fix one comment
2018-10-05 14:20:32 +02:00
Bastian Köcher 2332d6dd04 More dependency cleanup (#825)
* Removes `rlp` dependency

* Enable warnings about unused crates in the CI

* Remove all the unused crates

* Make tests working again
2018-09-27 17:52:51 +01:00
Gav Wood 851c7f42df Fix block generation by updating codec versions in wasm (#810)
* Fixes for staging testnet

* Fix codec versioning

* Comment unneeded trace

* Update lib.rs

* Update parity-codec

* Add script to update wasm deps and update them.

* Update hashes

* Add BBQ Birch testnet

* it's default-features, apparently.

* Use simpler version spec for parity codec

* Typo
2018-09-27 14:38:56 +01:00
Sergey Pepyakin 98e0a3a55a Contracts: Add transfer event (#801) 2018-09-25 20:49:18 +01:00
Gav Wood 82d6ca3484 Switch to shiny new fast, RLP-less trie (#795)
* Bump codec

* Fix tests

* Patricia trie builds

* Introduce trie

* Some yak shaving.

* Some fixes

* Remove RLP ref

* Fixes

* It builds!

* Some tests fixed

* Another test fix

* Rejig more hashes

* substrate-trie::iterator_works test

* Update lock

* Polish

* Docs

* Undo incorrect "fix" for tests

* Fix nits
2018-09-25 16:32:22 +02:00
Gav Wood f71200ee3c Bump codec (#786)
* Bump codec

* Fix tests
2018-09-21 17:16:15 +02:00
Bastian Köcher 5d64be26c3 Replace JSON metadata with custom metadata structures (#766)
* Move module metadata from json string to custom metadata

* Revisit the metadata structures

1. Move the structures into the metadata crate.
2. Switch to using Cow/MaybeOwnedArray to support Encode/Decode

* Adapt to new metadata structures

* Convert event json metadata to new metadata structures

* Convert storage json metadata to new metadata structures

* Convert runtime metadata from json to new metadata structs

* Implements new metadata structures in client and runtime

* Fixes errors on `no_std`

* Fixes errors after rebasing master

* Do not use `Cow` anymore in metadata

Also replace `String` with our own type definition `StringBuf`.
This fixes compilation on `no_std`.

* Wrap `RuntimeMetadata` in `RuntimeMetadataVersioned` to support versioning

* Move metadata into `srml` and make core unaware of the implementation
2018-09-20 07:35:32 +02:00
Gav Wood f10d8e177d Generalised Transaction Queue API (#741)
* First effort

* API versioning

* Introduce validate_transaction

* Introduce the API plus fixes.

* Docs

* Typo

* Add longevity parameter to transaction validity info.
2018-09-17 18:43:59 +02:00
Bastian Köcher 597ea41cd4 Implement construct_runtime! macro (#751)
* Make `system` module renamable in `impl_outer_event!`

* Implement `construct_runtime!` macro

This macro generates code for calling all the common `impl_outer_*` macros.

* Add documentation

* Fixes wrong declaration of `contract`

* Update dependencies to work on `no_std`

* One more `Cargo.lock` update

* Address comments
2018-09-17 17:27:22 +02:00
Guanghua Guo 11578a8319 Not use extern (#748)
* Not use extern

* Update Cargo.lock
2018-09-17 08:26:33 +02:00
Gav Wood a7f8f0f1bd Remove redundant code and merge rest into rt-std (#735)
* Remove redundant code and merge rest into rt-std

* Update lib.rs
2018-09-13 14:54:24 +02:00
Gav Wood 1e01162505 Phase 1 of repo reorg (#719)
* Remove unneeded script

* Rename Substrate Demo -> Substrate

* Rename demo -> node

* Build wasm from last rename.

* Merge ed25519 into substrate-primitives

* Minor tweak

* Rename substrate -> core

* Move substrate-runtime-support to core/runtime/support

* Rename/move substrate-runtime-version

* Move codec up a level

* Rename substrate-codec -> parity-codec

* Move environmental up a level

* Move pwasm-* up to top, ready for removal

* Remove requirement of s-r-support from s-r-primitives

* Move core/runtime/primitives into core/runtime-primitives

* Remove s-r-support dep from s-r-version

* Remove dep of s-r-support from bft

* Remove dep of s-r-support from node/consensus

* Sever all other core deps from s-r-support

* Forgot the no_std directive

* Rename non-SRML modules to sr-* to avoid match clashes

* Move runtime/* to srml/*

* Rename substrate-runtime-* -> srml-*

* Move srml to top-level
2018-09-12 11:13:31 +02:00