Commit Graph

84 Commits

Author SHA1 Message Date
Gav 2ffcf8ff26 Initial draft of stakeholder democracy. 2018-02-25 18:37:07 +01:00
Gav c43d49084f Use BTreeMap rather than HashMap in demo runtime. 2018-02-25 16:58:07 +01:00
Robert Habermeier 1f2d01566e Proposal creation and evaluation to plug into BFT (#77)
* reshuffle consensus libraries

* polkadot-useful type definitions for statement table

* begin BftService

* primary selection logic

* bft service implementation without I/O

* extract out `BlockImport` trait

* allow bft primitives to compile on wasm

* Block builder (substrate)

* take polkadot-consensus down to the core.

* test for preemption

* fix test build

* Fix wasm build

* Bulid on any block

* Test for block builder.

* Block import tests for client.

* Tidy ups

* clean up block builder instantiation

* justification verification logic

* JustifiedHeader and import

* Propert block generation for tests

* network and tablerouter trait

* use statement import to drive creation of further statements

* Fixed rpc tests

* custom error type for consensus

* create proposer

* asynchronous proposal evaluation

* inherent transactions in polkadot runtime

* fix tests to match real polkadot block constraints

* implicitly generate inherent functions

* add inherent transaction functionality to block body

* block builder logic for polkadot

* some tests for the polkadot API
2018-02-25 10:58:17 +01:00
Gav a5042dd9ae Introduce substrate-demo 2018-02-20 15:53:55 +01:00
Robert Habermeier 1d0ad42230 Verify header justification during import (#76)
* reshuffle consensus libraries

* polkadot-useful type definitions for statement table

* begin BftService

* primary selection logic

* bft service implementation without I/O

* extract out `BlockImport` trait

* allow bft primitives to compile on wasm

* Block builder (substrate)

* take polkadot-consensus down to the core.

* test for preemption

* fix test build

* Fix wasm build

* Bulid on any block

* Test for block builder.

* Block import tests for client.

* Tidy ups

* clean up block builder instantiation

* justification verification logic

* JustifiedHeader and import

* Propert block generation for tests

* Fixed rpc tests
2018-02-16 17:28:42 +01:00
Gav Wood c56859f331 Block builder (substrate) (#73)
* Block builder (substrate)

* Fix wasm build

* Bulid on any block

* Test for block builder.

* Block import tests for client.

* Tidy ups

* clean up block builder instantiation

* Propert block generation for tests

* Fixed rpc tests
2018-02-15 16:38:19 +01:00
Robert Habermeier 03a51a0db8 Split BFT into substrate-bft and runtime-specific proposer logic (#72)
* reshuffle consensus libraries

* polkadot-useful type definitions for statement table

* begin BftService

* primary selection logic

* bft service implementation without I/O

* extract out `BlockImport` trait

* allow bft primitives to compile on wasm

* take polkadot-consensus down to the core.

* test for preemption

* fix test build
2018-02-15 14:20:18 +01:00
Gav Wood f344e15bf8 Additional runtime tests for the test-runtime (#69)
* Remove rustc dependency from ed25519 and refactor a little.

* Runtime support provides more extensive test-key functionality.

* Additional APIs for ed25519 stuff.

* Extensive test for test-runtime.

* Fixes for the new test key API.

* Additional convenience for tests

* Take advantage of more convenient API.

* Redo formating.

* Remove old test identities.

* Remove boilerplate, add test.

* Refactor out unneeded code.

* Clean up algo for determining authorities.

* Remove unneeded API.

* Make `to_*` consume

* Only export keyring when testing

* Fix build & warning

* Extract Keyring into separate library.

* Add tests for Keyring and a trait-based API.

* Address grumbles.
2018-02-12 15:30:38 +01:00
Gav b20f91d69c Update builds and fix up test-runtime. 2018-02-09 14:17:19 +01:00
Gav Wood dec6e82387 Introduce toy runtime for testing inside substrate. (#66)
* Introduce simple blockchain runtime for substrate tests.

* Remove bad files.

* Add needed wasm binaries.

* Refactoring.

- Repot files in test-runtime.
- Rename troublesome `Joiner::join` to `Joiner::and`.
- Rework `Slicable` to dedup code.

* More fixes and refactoring

* Rebuild substrate test wasm.

* Fix merge errors.

* Rename the disasterously named `to_vec` to `encode`.

Also rename `as_slice_then` to `with_encoded`.

* Tests for toy runtime.

* Fix doc nit
2018-02-09 13:24:30 +01:00
Robert Habermeier a00d0e75fd Re-introduce zero copy codec and add minimal polkadot client API which uses linked native runtime (#65)
* client-api type and move duty roster types to primitives

* tuple implementation for slicable

* mild cleanup of deserialization code

* stubs which handle encoding and decoding themselves

* fancier impl_stubs macro

* zero-copy slicable API

* minimal polkadot-client API

* fix WASM API generation

* move native environment stuff to substrate executor

* fix warnings and grumbles
2018-02-08 19:20:34 +01:00
Arkadiy Paronyan f2b3bab61e Networking tests and fixes (#61)
* BlockId in client interface

* Sync fixes and tests

* Updated to latest primitives

* Updated dependencies

* Updated for new (old) primitives

* Network as workspace member

* substrate-network

* Removed obsolete file

* begin_transaction on hash
2018-02-08 17:49:55 +01:00
Gav c1ca0cf3e7 Fix runtime error. 2018-02-08 11:10:34 +01:00
Gav 5c842f77bc Many renames.
- Everything polkadot becomes polkadot-.
- Wasm (substrate) executor tests split from Wasm (Polkadot) runtime and
built independently.
2018-02-07 23:36:34 +01:00
Gav 3d0a44c8a9 Moving rpc to substrate in name. 2018-02-07 22:59:35 +01:00
Gav b1537185fa Unknit rpc from polkadot. 2018-02-07 22:31:22 +01:00
Gav 692770e03f Split up substrate-executor into polkadot-executor. 2018-02-07 18:44:00 +01:00
Gav ef059b81f1 All tests compile. Most tests work. 2018-02-07 16:34:18 +01:00
Gav 4f15a6d488 More tests fixed. 2018-02-07 16:18:20 +01:00
Gav dcff8f1a2f Full native build with new structure.
No tests yet.
Wasm build still pulls in std.
2018-02-07 15:54:18 +01:00
Gav 9fe85fc9f4 Split out substrate-primitives from polkadot-primitives.
Bottom half minus tests builds.
2018-02-07 15:24:54 +01:00
Gav 26b4b56402 Remove CallData/OutData. 2018-02-07 13:02:57 +01:00
Gav a5195dfce6 Rename polkadot-serializer -> substrate-serializer 2018-02-07 11:47:30 +01:00
Gav 6071774f57 Rename polkadot-state-machine -> substrate-state-machine 2018-02-07 11:44:32 +01:00
Gav 13fb513a3d Finish rename. 2018-02-07 11:34:29 +01:00
Gav 2220c6e37a Rename polkadot-primitives -> substrate-primitives. 2018-02-07 11:33:29 +01:00
Gav c0d072a5f3 Rename codec -> substrate-codec, executor -> substrate-executor. 2018-02-07 11:29:10 +01:00
Gav 1b7f34bef2 Refactor primitives. 2018-02-07 11:03:43 +01:00
Robert Habermeier 6672cf5196 merge duty roster changes 2018-02-06 17:26:52 +01:00
Robert Habermeier 4378ce7887 fix tests and review grumbles 2018-02-06 16:35:19 +01:00
Robert Habermeier d2660900de unclobber function changes 2018-02-06 15:41:28 +01:00
Robert Habermeier de65de4758 fix tests after merge 2018-02-06 14:44:25 +01:00
Robert Habermeier 2b691cef06 initial merge 2018-02-06 14:12:54 +01:00
Robert Habermeier 4cba452c31 fix tests 2018-02-06 13:39:29 +01:00
Robert Habermeier aa7432f15e get compiling on wasm 2018-02-06 13:27:09 +01:00
Robert Habermeier af2fdc5478 fix compilation for native 2018-02-06 12:26:04 +01:00
Robert Habermeier 5a675e9c64 fix most issues with compiling on WASM 2018-02-06 12:02:03 +01:00
Robert Habermeier b58df7892f integrate new primitives with native-runtime 2018-02-05 17:40:49 +01:00
Gav 9cd6a674cd Fix misleading names. 2018-02-05 17:05:27 +01:00
Gav 28c64cd673 Replace errant printlns with logging. 2018-02-04 23:03:13 +01:00
Gav e0c1d13be6 Genesis block builder and test. 2018-02-03 19:00:23 +01:00
Gav 248f27c976 Genesis creation utilities. 2018-02-02 22:17:16 +01:00
Robert Habermeier 0035369f82 allow polkadot-primitives to compile on nightly 2018-01-31 22:27:07 +01:00
Robert Habermeier 29c3a585a1 Merge branch 'master' into author-relay-block 2018-01-31 18:11:30 +01:00
Gav e9958a8e5c Convenient block creation logic 2018-01-31 09:55:28 +00:00
Robert Habermeier 4b2bd5ec72 fully refactor runtime-std to use conditional compilation 2018-01-30 23:47:29 +01:00
Gav e19100e76a Implement enumerated trie root throughout. 2018-01-30 22:40:03 +01:00
Gav 69a73f3480 Merge branch 'master' into gav-storage-root-verify 2018-01-30 20:57:33 +01:00
Gav 74139d98da test state root calculation. 2018-01-30 20:52:59 +01:00
Robert Habermeier 8e6cb1b6e2 more idiomatic std features 2018-01-30 19:28:57 +01:00