Commit Graph
100 Commits
Author SHA1 Message Date
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
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
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
Robert Habermeier ecdef68b53 fix runtime_test 2018-02-09 13:29:37 +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
Robert Habermeier 8bae8510f6 combine relay chain primitives into one module 2018-02-06 18:30:21 +01:00
Robert Habermeier 6672cf5196 merge duty roster changes 2018-02-06 17:26:52 +01:00
Robert Habermeier 10ba24673e remove debug impl in runtime-std 2018-02-06 16:44:30 +01:00
Robert Habermeier 6aaf446352 move function and proposal types to transaction module 2018-02-06 16:42:32 +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 d43c93a7dc update native executor tests to use new tx format 2018-02-06 12:44:08 +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
Robert Habermeier 2bc7c57359 reintroduce slicable to primitives 2018-02-05 16:15:45 +01:00
Robert Habermeier e4e755a87a refactor codec 2018-02-01 13:29:16 +01:00
Robert Habermeier 188332cc4b extract out all primitives 2018-02-01 11:13:55 +01:00
Robert Habermeier a3b9c2af7d fix compiler warning 2018-01-31 22:28:11 +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
Robert Habermeier 4b2bd5ec72 fully refactor runtime-std to use conditional compilation 2018-01-30 23:47:29 +01:00
Robert Habermeier 2c39e247d6 clean up workspaces a little 2018-01-30 19:35:09 +01:00
Robert Habermeier 8e6cb1b6e2 more idiomatic std features 2018-01-30 19:28:57 +01:00
Robert Habermeier a68b187f4d extract out runtime-codec to a separate crate 2018-01-30 18:51:12 +01:00
Robert Habermeier e014c8a553 make more readable 2018-01-23 19:50:56 +01:00
Robert Habermeier 9b930a18a5 using non-static traits for environmental 2018-01-23 19:45:36 +01:00
Robert Habermeier 21a4f9f821 fix grumbles 2018-01-23 17:43:35 +01:00
Robert Habermeier c27ea0b73b Merge branch 'master' into runtime-tweaks 2018-01-23 17:22:04 +01:00
Robert Habermeier 954a4dc8ef clean up some unsafety in Slicable 2018-01-23 17:21:20 +01:00
Robert Habermeier b9cc928495 update the WASM runtime imports 2018-01-23 17:05:35 +01:00
Robert Habermeier ce5f4da907 reorganize native-support exports 2018-01-23 16:51:04 +01:00
Robert Habermeier 9c9a197f3a Merge branch 'polkadot-runtime-skeleton' into environmental-api 2018-01-17 19:30:46 +01:00
Robert Habermeier 3ed6784911 use new environmental API 2018-01-17 19:27:38 +01:00
Robert Habermeier 21ab1935e7 fix unsafety hole around unwinding 2018-01-17 19:20:38 +01:00
Robert Habermeier 3c67ac115b fix unsafety hole in environmental using function 2018-01-17 18:12:50 +01:00
Robert Habermeier 5137d1a1d0 validator -> authority 2018-01-16 20:04:32 +01:00
Robert Habermeier 02bdf0ee29 test consensus completion 2018-01-16 20:01:17 +01:00
Robert Habermeier 76fafcb39f initial test harness 2018-01-16 17:47:09 +01:00
Robert Habermeier f87893cd87 test context for full agreement protocol 2018-01-14 23:44:19 +01:00
Robert Habermeier 5a369064a4 import a local candidate when it is available 2018-01-13 19:19:41 +01:00
Robert Habermeier 379bcb46c0 add test for batch filling 2018-01-12 16:22:09 +01:00
Robert Habermeier 0e8458491f fill batch statements from table 2018-01-12 14:50:28 +01:00
Robert Habermeier 89d344fb3f update parking_lot 2018-01-10 22:03:34 +01:00
Robert Habermeier 649fbf2938 Merge branch 'master' into rh-candidate-agreement-glue 2018-01-10 22:02:57 +01:00
Robert Habermeier 00c4ee2d81 create the overarching agreement and IO futures 2018-01-10 21:58:56 +01:00
Robert Habermeier 3d9cc2697c incoming message handler 2018-01-10 21:20:53 +01:00
Robert Habermeier 7b67bc63da round-robin message handler 2018-01-09 21:03:06 +01:00
Robert Habermeier 2fbc256b66 instantiate the agreement future 2018-01-08 16:36:35 +01:00
Robert Habermeier 9ff2fa550f beginnings of shared table 2018-01-08 15:34:21 +01:00
Robert Habermeier acca871d20 define context trait and initialize statement table 2018-01-03 17:06:04 +01:00
Robert Habermeier 45c3e40a62 Candidate Agreement + Consensus (#29)
* candidate statement importing

* import votes on validity

* import availability votes

* candidate receipt type

* make table mod public

* test context for table

* add harness for tests

* some tests for misbehavior

* produce proposal from table

* count candidate issuance as implicit vote

* keep track of messages known by validators

* fix primitives compilation

* simple BFT agreement

* kill unused macro_use annotation

* tests for BFT agreement

* test for not concluding on different prepares

* return summary upon statement import

* accept bft agreement on proposal not locally submitted

* check justification set for BFT

* BFT rewrite: vote accumulator with tests

* squash some warnings

* a few more tests for the accumulator

* add sender to table's signed statement

* implement honest node strategy for BFT

* inex -> index

* import and broadcast lock proofs

* poll repeatedly when state changes

* don't broadcast advance vote immediately if locked

* do not check validity of locked candidate

* basic tests for the strategy

* remove unused context trait and fix warning

* address some review grumbles

* address some more review nits

* fix lock import logic and add a test

* fix spaces

* fix a couple more style grumbles

* more type-safe justifications

* rename Communication enum variants

* improve some panic guard proofs

* add trailing comma
2018-01-03 15:50:05 +01:00
Robert Habermeier f2cbae5948 add trailing comma 2018-01-01 20:36:54 +01:00
Robert Habermeier 53bc9e85bc improve some panic guard proofs 2018-01-01 20:25:22 +01:00
Robert Habermeier 8310cae9f0 rename Communication enum variants 2018-01-01 20:06:03 +01:00
Robert Habermeier cd438e51a8 more type-safe justifications 2018-01-01 20:00:44 +01:00
Robert Habermeier e0b7e77f2c fix a couple more style grumbles 2017-12-31 20:10:37 +01:00
Robert Habermeier b44e8fd781 fix spaces 2017-12-29 15:41:39 +01:00
Robert Habermeier a03d16c862 fix lock import logic and add a test 2017-12-29 15:15:10 +01:00
Robert Habermeier 6ab0fcef97 address some more review nits 2017-12-29 14:40:47 +01:00
Robert Habermeier 43b68b52bf address some review grumbles 2017-12-29 14:28:13 +01:00
Robert Habermeier 136645aa4c remove unused context trait and fix warning 2017-12-29 02:56:04 +01:00
Robert Habermeier 4b3b1249dc basic tests for the strategy 2017-12-27 21:35:19 +01:00
Robert Habermeier 1503a23c43 do not check validity of locked candidate 2017-12-27 19:14:55 +01:00
Robert Habermeier eec6d47a80 don't broadcast advance vote immediately if locked 2017-12-27 18:48:35 +01:00
Robert Habermeier 80e23bbfb4 poll repeatedly when state changes 2017-12-27 18:35:21 +01:00
Robert Habermeier a16c06da5b import and broadcast lock proofs 2017-12-27 18:27:18 +01:00
Robert Habermeier cb7d407880 inex -> index 2017-12-27 18:03:41 +01:00
Robert Habermeier 2540a8728d implement honest node strategy for BFT 2017-12-27 17:46:41 +01:00
Robert Habermeier d5684c96c9 add sender to table's signed statement 2017-12-22 17:42:10 +01:00
Robert Habermeier 4a2162868b a few more tests for the accumulator 2017-12-22 17:11:21 +01:00
Robert Habermeier b89007122d squash some warnings 2017-12-21 22:54:51 +01:00
Robert Habermeier 38b4dc2f22 BFT rewrite: vote accumulator with tests 2017-12-21 22:53:17 +01:00
Robert Habermeier 8e075e9963 check justification set for BFT 2017-12-18 16:07:55 +01:00
Robert Habermeier dcce39c441 accept bft agreement on proposal not locally submitted 2017-12-18 15:49:35 +01:00
Robert Habermeier dd7061e0d7 return summary upon statement import 2017-12-18 14:17:22 +01:00
Robert Habermeier 534b046040 test for not concluding on different prepares 2017-12-18 12:45:30 +01:00
Robert Habermeier 224efd656b tests for BFT agreement 2017-12-18 11:47:56 +01:00
Robert Habermeier 6da40e8a7a kill unused macro_use annotation 2017-12-18 11:08:43 +01:00
Robert Habermeier 9a030d6e09 simple BFT agreement 2017-12-18 11:08:29 +01:00
Robert Habermeier afdc9d69e2 fix primitives compilation 2017-12-14 11:56:14 +01:00
Robert Habermeier 8d433278de Merge branch 'master' into rh-candidate-agreement 2017-12-14 11:54:25 +01:00
Robert Habermeier 233d88fdb8 keep track of messages known by validators 2017-12-13 18:45:08 +01:00
Robert Habermeier 655b8ce275 count candidate issuance as implicit vote 2017-12-13 16:41:58 +01:00
Robert Habermeier 9612e1d7c1 Minimal collation work-flow and necessary traits (#25)
* collator crate skeleton and description

* parachain primitives: proof -> witness and egress format

* collation of ingress queues through trait

* add ingress collation test

* structure for collated ingress

* add collated ingress to proposal

* witness -> proof

* ingress collation and candidate creation + code cleanup

* update collator lib to new definitions

* address formatting grumble
2017-12-13 15:04:58 +01:00
Robert Habermeier 57f6dd4cc5 produce proposal from table 2017-12-13 12:12:26 +01:00
Robert Habermeier ee05b9dbdf some tests for misbehavior 2017-12-13 10:39:33 +01:00
Robert Habermeier f8a28e4de4 add harness for tests 2017-12-13 10:11:41 +01:00
Robert Habermeier 45ac233cd1 test context for table 2017-12-12 18:27:24 +01:00
Robert Habermeier 2fa8fad0ef make table mod public 2017-12-12 18:13:08 +01:00
Robert Habermeier 47d93e2cbd candidate receipt type 2017-12-12 18:09:07 +01:00
Robert Habermeier 10312920b5 import availability votes 2017-12-12 17:57:03 +01:00
Robert Habermeier cf4e4d7001 import votes on validity 2017-12-12 17:48:13 +01:00
Robert Habermeier 4ec91d687c candidate statement importing 2017-12-12 17:24:28 +01:00