Commit Graph

837 Commits

Author SHA1 Message Date
Sergey Pepyakin 7312a26d09 Smart-contract inspection and instrumentation. (#165)
* Extract mock module.

* Wasm smart-contract instrumentation

* Rebuild binaries.

* Memory limits and tests.
2018-05-23 13:45:57 +02:00
Robert Habermeier d97110733d install wasm-gc using nightly (#167) 2018-05-17 14:26:11 +02:00
Robert Habermeier 491f74ad00 Archive Mode and groundwork for state-preserving handles (#166)
* less eager deletion of DB values

* archive mode
2018-05-17 13:47:53 +02:00
Sergey Pepyakin 37029eb42f Sandbox: run start function. (#153)
* sandbox: run start function.

* Add docs.

* Add a missing_docs to sandbox module.

* Fix typo in the naming.
2018-05-17 12:54:56 +02:00
Gav Wood 2c997769b3 Update README.md 2018-05-16 17:09:41 +02:00
Robert Habermeier a5508ccc2d Store trie nodes in DB (#157)
* move responsibility of storage_root calculation to state backend

* have `storage_root` produce a memoizable transaction

* store trie nodes in kvdb

* fix up test fallout

* remove stray newline

* Fix comment

* test for setting and checking state data

* fiddle with dependencies

* all parity deps on same commit hash

* fix network protocol registration
2018-05-16 16:56:24 +02:00
Robert Habermeier f997a3bdf1 Hook RPC extrinsic import into propagation (#158)
* call `on_new_transactions` when we import

* fix trace

* pass correct bytes to network

* clean up

* cull before repropagating; repropagate on timer

* add a little tracing
2018-05-15 10:27:18 +02:00
Robert Habermeier 413ebf3f19 check if block is known before re-importing (#161) 2018-05-15 10:26:55 +02:00
Arkadiy Paronyan 8bfded8d72 Networking and backend fixes (#155)
* Networking and backend fixes

* Fixed test

* Reverted DB fix

* Reverted DB fix properly

* Preserve messages with unknown parent_hash
2018-05-14 12:48:14 +02:00
Robert Habermeier 8068fdd2af Fix sync: ensure block hash gets read from the DB correctly (#152)
* update bootnodes

* fix block_hash loading

* test block hash gets inserted correctly

* specify revision to pull kvdb-memorydb from

* update parity repo dep
2018-05-11 15:46:54 +02:00
Arkadiy Paronyan 5ef7fc4ab5 Fixed local net CLI example (#154) 2018-05-11 14:00:29 +02:00
Robert Habermeier 35ca02970a update bootnodes (#151)
(insubstantial)
2018-05-09 18:42:49 +02:00
Robert Habermeier 266ae03666 Ensure VoteAdvance messages propagate (#148)
* avoid clobbering accumulator state with late propose

* log state when polling

* trace on input messages
2018-05-09 12:25:17 +02:00
Svyatoslav Nikolsky 6280f84716 node-key cli option (#149) 2018-05-09 12:06:59 +02:00
Robert Habermeier 7d54678331 Ensure all known BFT messages are imported when starting consensus (#147)
* a little more BFT tracing

* import cached BFT messages into the produced stream
2018-05-08 17:01:26 +02:00
Robert Habermeier a0b9c1147f update wasm 2018-05-08 17:00:32 +02:00
Robert Habermeier b10398cefa More testnet fixes (#145)
* initialise dummy block before API calls

* test for random-seed

* revert polkadot-runtime changes
2018-05-08 14:55:21 +02:00
Gav Wood 5d9481140c Fixes and improvements for PoC-1 Testnet (#143)
* Fix initialisations and add a test.

* Fix test.

* Fix overflow bug.

* Minor refactoring and fixes.

* Fix vote threshold.

* Add note.

* Fixes for latest rust and the readme.

* Better readme.

* An extra validator for PoC-1

* Update README.

* PoC-1 bootnodes.

* don't return async::notready for messages without scheduling wakeup

* Fix endowed account

* give polkadot control over round proposer based on random seed

* address grumbles.
2018-05-07 15:25:47 +02:00
Robert Habermeier 2232da2d53 don't return async::notready for messages without scheduling wakeup 2018-05-06 13:25:37 +02:00
Arkadiy Paronyan 04cbcd0655 Database backend (#133)
* DB backend

* DB backend

* Cleanup

* Clean build files after running tests

* Fixed comment

* add OOM lang item to runtime-io
2018-05-02 13:36:36 +02:00
Sergey Pepyakin 5a56fbcea3 Sandboxing and the simplest smart-contract runtime (#140)
* Add primitives for sandboxing.

* Add sandbox module.

* Implement the runtime part of the sandbox.

* Rebuild binaries.

* Implement smart-contract execution.

* Add more documentation.
2018-05-01 20:32:01 +02:00
Tomasz Drwięga f116f67382 Substrate test client crate & chain subscription test (#139)
* Test client used in RPC tests.

* Use test-client for network tests.

* Expose BlockOrigin and clean up the API.
2018-05-01 16:39:55 +02:00
Arkadiy Paronyan 101549238e Improved logging (#138)
* Improved logging

* Removed some unwraps
2018-04-18 15:57:43 +02:00
Robert Habermeier b6132800b7 handle exit and avoid threads hanging (#137)
* barrier on starting network

* handle exit better

* give consensus service its own internal exit signal

* update comment

* remove stop_notifications and fix build
2018-04-18 13:59:46 +02:00
Tomasz Drwięga e253a4cb9f Chain head subscription (#126)
* Start WebSockets server.

* Expose non-working subscription.

* Dummy subscription for testing.

* Proper implementation with event loop.

* Finalized pubsub.

* Bump clap.

* Fix yml.

* Disable WS logs.

* Remove stale TransactionHash mention

* Fix build from nightly API change.

* Don't panic on invalid port.

* Bind server to random port.

* Send only best blocks.
2018-04-17 13:03:57 +02:00
Gav Wood eb6d142846 Ensure authorities don't disappear after block 50 (#132)
* Disable CORS validation, improve logging.

* Fix build from nightly API change.

* Rebuilt binaries

* More logs, keep validators after 50 blocks.
2018-04-16 15:34:46 +02:00
Gav Wood 8ff246eb8a Disable CORS validation, improve logging, fix build on nightly. (#129)
* Disable CORS validation, improve logging.

* Fix build from nightly API change.

* Rebuilt binaries
2018-04-16 14:23:33 +02:00
Robert Habermeier 40c7820c31 ensure proposal evaluation occurs at most once per round (#125)
* ensure proposal evaluation occurs at most once per round

* add test

* remove println
2018-04-15 13:23:59 +02:00
Robert Habermeier 2a53d414a3 prune finalized transactions from the pool (#127) 2018-04-15 12:53:53 +02:00
Robert Habermeier 6e945e40ee Revert "prune finalized transactions from the pool"
This reverts commit 0b59c1bfb9.
2018-04-14 15:35:54 +02:00
Robert Habermeier 0b59c1bfb9 prune finalized transactions from the pool 2018-04-14 15:34:08 +02:00
Gav Wood 808d762158 Add chain RPCs and getHeader. (#124)
* Add chain RPCs and getHeader.

Also:
- finish renaming transaction -> extrinsic;
- rejig development chain spec to be more useful.

* Fix.

* Remove invalid comments.

* Fix.
2018-04-13 14:21:32 +02:00
Robert Habermeier e9cdd45145 delay before voting on proposals (#123) 2018-04-12 16:35:48 +02:00
Robert Habermeier bdf156d35e kill post_finalise (#121)
* kill post_finalise

* update wasm runtimes
2018-04-12 13:17:43 +02:00
Gav Wood 46e3c32e49 Add --chain option. (#122)
* Add --chain option.

* Reinstate bail on unknown runtime.
2018-04-12 13:15:56 +02:00
Gav Wood 1972d612fa Extrinsics root is calculated as part of block-building (#120)
* extrinsics root is calculated as part of block-building.

* Fix build.

* Fix xt root.

* Couple of fixes.

* Logging and more useful APIs.

* Fix test.

* Update log version.

* Switch back to correct version of log.
2018-04-12 12:18:43 +02:00
Arkadiy Paronyan 54d6970efc Fixed block proagation after import and import notifications (#119)
* Fixed block proagation after import and import notifications

* Removed cargo check
2018-04-11 19:25:41 +02:00
Arkadiy Paronyan d978425f05 Basic informant (#118)
* Informant

* Pass Handle instead of Core
2018-04-11 16:47:22 +02:00
Sergey Pepyakin 052c50b536 Refactor Externalities to AccountDb. (#112)
* Refactor Externalities to AccountDb.

* Recompile wasm.
2018-04-11 14:24:57 +02:00
Gav Wood 3024a839f2 Transaction queue integration + submission RPC (#99)
* Implement transaction queue RPC.

* whitespace

* Support without_std env in environmental!  (#110)

* Make environmental crate support without_std env.

* Small doc fixes.

* Remove dead code.
2018-04-09 16:28:06 +02:00
Arkadiy Paronyan f72e9e7e13 Bumped devp2p (#116) 2018-04-07 17:17:06 +02:00
Arkadiy Paronyan b3dd4e74fd Consensus message buffering and more (#114)
* CLI options and keystore integration

* Replace multiqueue with future::mpsc

* BFT gossip

* Revert to app_dirs

* generate_from_seed commented

* Refactor event loop

* Start consensus by timer

* Message buffering

* Minor fixes

* Work around duty-roster issue.

* some more minor fixes

* fix compilation

* more consistent formatting

* make bft input stream never conclude

* Minor fixes

* add timestamp module to executive

* more cleanups and logging

* Fixed message propagation
2018-04-06 19:18:26 +02:00
Sergey Pepyakin 633b9f4c0b Support without_std env in environmental! (#110)
* Make environmental crate support without_std env.

* Small doc fixes.
2018-04-05 17:23:43 +02:00
Gav Wood 1d8a9a6dd3 Make Polkadot use the Substrate traity libraries (#105)
* Initial stuff.

* Various fixes.

* Fix tests.

* Fix another test

* Fix another test.

* Docs in polkadot runtime.

* Fix up ser/de tests.

* Update god keys

* Syntax

* Fix

* Merge remote-tracking branch 'origin/master' into gav-merge-runtime

* Permissions on init.sh

* Port-over the whitespace from @rphmeier

* Rename

* Merge branch 'master' into gav-merge-runtime

* Fix typo.

* Fix grumbles.

* Make more idiomatic.

* Move `Ed25519Signature` out of traits.
2018-04-05 17:13:12 +02:00
Arkadiy Paronyan 6b83f11a11 Expose transaction pool from the polkadot service (#109) 2018-04-05 09:57:44 +02:00
Sergey Pepyakin b0d8eeb526 Migrate from parity-wasmi to wasmi. (#103) 2018-04-04 21:39:41 +02:00
Gav Wood bd066e27a6 Traitify Runtime (#104)
* Factor out safe-mix and dispatch

* Refactor dispatch into something more modular.

* Fix wasm build.

* Fix up timestamp

* fix warnings.

* Borked timestamp example

* Fix build

* Timestamp as skeleton for traity runtime.

* New storage macro.

* Dispatch module has traity API.

* Move consensus module to new API

* Refactoring and outer dispatch

* Avoid unnecessary derives.

* Abstract the low-level half of system.

* nicer outer dispatch syntax.

* Make runtime compile again (albeit in a heavily simplified state)

* Reworking runtime and the upper levels of system.

* Initial reworking of runtime:

- Introduced executive module;
- Introduced trait primitives module;
- Provided an API endpoint.

* Expose an additional function in system

* Another couple of functions traitified in executive.

* another function in executive traitified.

* One more function traitified.

* Finish traitifying executive!

* Traitify session module.

* Cleanups and ensure session gets run.

* First part of traitification of staking module.

* Bit more of staking traitified.

* Additional stuff in staking. Fix up session.

* Penultimate part of staking module.

* Final part of staking (code)

* Update demo runtime to include staking.

* Final tweaks for staking integration.

* Remove old runtime files.

* Schedule staking.

* Minor fixes

* First bits of democracy.

* Democracy module integrated.

* Fix warning.

* Traitify and integrate council module

* Council voting.

* Runtime binary and tweaks.

* Binary update.

* Fix `*Type` grumble.

* Fix up genesis_map

* Remove NonTrivialSlicable

* Staking "test externalities" stuff along with refactor.

* Add session test externalities constructor

* Fixed executor tests.

* Make one test in executive module work.

* Remove test framework stuff into common module.

* Enable other tests in executive

* Session tests reinstated, minor refactoring of keyring.

* Fix staking tests.

* Fix up democracy tests.

* First few tests in council.

* Council tests reinstated :)

* Avoid hardcoding blake2 into Header.

* Fix last few tests.

* Make all primitives generic.

* Fix tests.

* Refactor runtime to remove genesismap.

* Streamline runtime more with macrofied config.

* Clean paths

* Fix warning.

* Consolidate demo runtime crate.

* Remove stale code.

* Refactor away dodgy trait.

* Add corresponding Aux type.

* Fixes

* Rename Digesty -> Digest

* Rename Headery -> Header

* Blocky -> Block

* Fix wasm build.

* kill warnings

* more docs

* minor cleanups
2018-04-04 12:06:39 +02:00
Arkadiy Paronyan 3ec6d2dde6 BFT gossip (#106)
* CLI options and keystore integration

* Replace multiqueue with future::mpsc

* BFT gossip

* Revert to app_dirs

* generate_from_seed commented
2018-04-03 18:06:34 +02:00
Robert Habermeier 5fad9efc0a add delay test (#107) 2018-04-03 13:25:21 +02:00
Arkadiy Paronyan 471761f4b6 Polkadot service (#82)
* Block import notifications

* Build fix

* Consensus messages supported in the networking

* Started consensus service

* BFT service

* Transaction propagation

* Polkadot service

* CLI integration

* Build fix

* Added signatures validation

* Removed executor argument

* Refactored steam loops; Queue size increased

* Limit queue size

* Fixed doc comment

* Fixed wasm build

* Fixed wasm build

* Check id properly
2018-03-30 13:54:37 +02:00