Commit Graph

333 Commits

Author SHA1 Message Date
Gav Wood ec9060460c Optional storage entries (#75)
* Block builder (substrate)

* Fix wasm build

* Bulid on any block

* Test for block builder.

* Block import tests for client.

* Tidy ups

* Repotted client

* Avoid pointless work

* All backend stuff now manages optional storage.

Also simplified a lot of the backend.

* Native runtime-io now supports empty storage items.

* Finish up the API transition.

* Build fix.

* Fix tests.

* Remerge in changes to client.

* Final fixes.

* Unrevert typos

* Remove accidentally committed change

* Bring back zero copy

* Fix merge.
2018-02-19 20:05:30 +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
Jaco Greeff 8309fdd4b8 Add codec tests (#74)
* Add tests for block & header encoding

* Add encoding tests for transaction/unchecked_transaction
2018-02-15 01:37:40 +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
Jaco Greeff 72fa8f3fe2 Sed explicit parameters (#71)
* Sed replace fix (no . in date)

* Debug sed

* Explicit -e option

* Update sed
2018-02-12 14:28:43 +03:00
Jaco Greeff 71261bb7c6 Publish wasm runtime binaries from CI (#56)
* Publish wasm binaries

* Update package.json version (npm)

* Copy directly to wasm32-unknown-unknown

* Remove debug repo, enable final location

* Always run through build test

* Update for new direectory structure

* Extra space before >

* Copy from subtrate/executor & subtrate/test-runtime
2018-02-09 18:48:17 +01:00
Arkadiy Paronyan a2a299813d Merge pull request #68 from paritytech/update-wasm
fix substrate test runtime and broken ed25519 test
2018-02-09 16:25:10 +01:00
Gav c49503454e Fix warnings. 2018-02-09 14:20:48 +01:00
Gav 96a200b1ef Merge branch 'update-wasm' of github.com:paritytech/polkadot into update-wasm 2018-02-09 14:19:13 +01:00
Gav b20f91d69c Update builds and fix up test-runtime. 2018-02-09 14:17:19 +01:00
Robert Habermeier ecdef68b53 fix runtime_test 2018-02-09 13:29:37 +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 4ca99758df fix runtime_test 2018-02-08 23:01:26 +01:00
Robert Habermeier 6c7e286967 update wasm binaries 2018-02-08 21:07:13 +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
Arkadiy Paronyan 8cacfc75ab Merge pull request #64 from paritytech/gav-split-executor
Fix warning and directory restructure
2018-02-08 15:20:38 +01:00
Gav 9d27cb9b85 Fix runtime paths. 2018-02-08 14:52:35 +01:00
Gav 7d48c78c75 Merge branch 'master' into gav-split-executor 2018-02-08 14:30:16 +01:00
Gav 4582038b3d Fix warning and directory restructure. 2018-02-08 14:29:30 +01:00
Arkadiy Paronyan 09d0f1552a Merge pull request #62 from paritytech/gav-split-executor
Split up substrate-executor into polkadot-executor.
2018-02-08 14:18:19 +01:00
Gav ac5a750f45 some printlns to info 2018-02-08 14:04:20 +01:00
Gav e1ddf32b65 Add needed wasm binaries. 2018-02-08 11:30:02 +01:00
Gav 95366e92b3 Restore some traces. 2018-02-08 11:11:46 +01:00
Gav c1ca0cf3e7 Fix runtime error. 2018-02-08 11:10:34 +01:00
Gav fde80b7b27 Fix more nits. 2018-02-08 08:51:57 +01:00
Gav 8c1b79c7e8 Docs 2018-02-08 00:02:31 +01:00
Gav 290c7bf909 Revert mistaken substitution 2018-02-07 23:57:31 +01:00
Gav 58ac8cdc51 Fix nit. 2018-02-07 23:54:14 +01:00
Gav 73fb64b7c6 Fit nits. 2018-02-07 23:53:27 +01:00
Gav 1be5a71982 Update gitignore. 2018-02-07 23:39:45 +01:00
Gav c57784b850 Remove defunct script 2018-02-07 23:39:14 +01:00
Gav 0410baa494 Remove target files from git. 2018-02-07 23:38:50 +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 652b5705d6 Generate dispatch code from macro impl_stubs. 2018-02-07 21:30:54 +01:00
Gav 692770e03f Split up substrate-executor into polkadot-executor. 2018-02-07 18:44:00 +01:00
Gav Wood 02848dc9f6 Merge pull request #60 from paritytech/gav-refactor-primitives
Start isolating Substrate code from Polkadot
2018-02-07 17:43:34 +01:00
Gav d494d4b89b Fix everything. 2018-02-07 17:07:55 +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 89d8686883 Half of tests fixed. 2018-02-07 16:09:37 +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