Commit Graph

89 Commits

Author SHA1 Message Date
Pierre Krieger 15fe5f7540 Remove the packet ID system (#900) 2018-10-16 12:57:42 +01: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
Tomasz Drwięga a24e61cb29 Longevity handling. (#903) 2018-10-16 09:04:19 +01:00
Pierre Krieger 8050979660 Rename min-peers and max-peers CLI options (#909) 2018-10-16 08:34:59 +01:00
Bastian Köcher 2301163b2d Fixes error in impl_apis! macro, caused by a missing comma (#908)
* Fixes error in `impl_apis!` macro, caused by a missing comma

* Adds another missing comma
2018-10-15 16:01:39 +02:00
guanqun 26b105b472 fix the ignored tests in doc test (#898)
* fix ignored test

* move CI to --release per Gav
2018-10-13 15:16:17 +02:00
Maciej Hirsz 2be621af77 Silence Telemetry WS errors (#904) 2018-10-12 18:10:24 +02:00
Bastian Köcher db427cb45c Adds construct_simple_protocol macro for simplifying the creation of protocols (#897)
* Make `on_message` take the message as `&mut Option<_>`

* Make `ConsensusGossip` implement `Specialization`

* Move `new_session` into `ConsensusGossip`

* Adds `construct_simple_protocol` macro for simplifying the creation of protocols
2018-10-12 13:10:36 +02:00
Tomasz Drwięga 671b0e0007 Tagged transaction queue integration (#893)
* Make the graph generic.

* Adapting pool API for the graph.

* Merge pool & graph.

* Restructure.

* Fix test of transaction pool.

* Get rid of node/transaction-pool.

* Compilation fixes.

* Test7

* Fix compilation of tests.

* Revert runtime changes.

* Add validate_transaction to test-runtime.

* Fix RPC tests.

* Add clearing of the old transactions.

* Trigger pool events.

* Use new queue API.

* Fix wasm build, re-export Hasher.

* No warning if validate transaction fails.

* Get rid of Into<u64> and use As
2018-10-12 13:09:35 +02:00
guanqun 1a1300e845 remove unused nodecode in impl_stubs (#895) 2018-10-10 13:03:55 +02:00
Bastian Köcher 12f12bff28 Make all copyrights use the correct year (#894)
* Adds a script for automatically update all copyrights

* Ran the `update-copyright` script
2018-10-10 10:28:41 +02:00
Bastian Köcher 6b4b8b8f8e Runtime API clean up (#892)
* Rename `NewTxQueue` to `TaggedTransactionQueue`

* Remove `BlockBuilder` API and support adding documentation to the API functions

* Adds new `BlockBuilder` API

* Fixes compilation with new `BlockBuilder` API

* Some more cleanup

* Cargo.lock update

* Try to fix on stable
2018-10-09 14:01:23 +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
Svyatoslav Nikolsky fb058ae235 authorities_at cache update (#836)
* AuthoritiesAt cache update

* fix after merge
2018-10-09 10:54:57 +02:00
guanqun ceda61f13c fix the overflow issue (#891) 2018-10-09 10:50:08 +02:00
Pierre Krieger 0666759b16 Clean up the networking layer (#881) 2018-10-08 18:20:38 +02:00
Robert Habermeier 02f8897648 Fix grumbles from previous GRANDPA PR (#880)
* implement grandpa client

* consensus gossip with arbitrary topics

* defer GRANDPA messages until referenced blocks imported

* set up communication for voter in a transparent way

* instantiate GRANDPA voter

* keep last round state on disk

* switch back to crates.io finality-grandpa

* update cargo.lock

* use new `collect_garbage` API

* update sync test framework and make public

* test that observers can observe

* fix warning

* use more idiomatic predicate for collecting garbage in gossip

* kill spaces

* fix date

* fatal error when unable to complete

* rename run_voter to run_grandpa

* switch back to crates.io
2018-10-05 14:26:28 -04:00
Svyatoslav Nikolsky f851dcf41c Filter peers on light nodes (#862)
* do not send OnDemand request to node who, we believe, can't process it

* ignore peers with too old best block on light nodes

* non-weird temporary

* fix condition

* compilation
2018-10-05 13:51:28 -04:00
Robert Habermeier 68b4be14ff Initial GRANDPA integration (#866)
* implement grandpa client

* consensus gossip with arbitrary topics

* defer GRANDPA messages until referenced blocks imported

* set up communication for voter in a transparent way

* instantiate GRANDPA voter

* keep last round state on disk

* switch back to crates.io finality-grandpa

* update cargo.lock

* use new `collect_garbage` API

* update sync test framework and make public

* test that observers can observe

* fix warning

* use more idiomatic predicate for collecting garbage in gossip

* kill spaces

* fix date
2018-10-05 16:30:39 +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
Svyatoslav Nikolsky 200a716a1a Extract search of digest item into Digest::log() function (#874)
* Digest::log fn

* change DigestItem::log impl
2018-10-05 14:17:00 +02:00
Svyatoslav Nikolsky 187c232629 Compare digests item-by-item (#869)
* compare digest item-by-item

* update comment
2018-10-05 14:16:22 +02:00
Maciej Hirsz 4d18c50e67 Version bump on sysinfo (#871) 2018-10-04 16:51:05 +02:00
Sergey Pepyakin 608f6ae5d9 Use transfer for sandboxed memory get/set (#863) 2018-10-03 13:26:38 +01:00
Sergey Pepyakin 270d0186c1 Refine sandbox errors (#860) 2018-10-03 13:23:50 +01:00
guanqun 35f3fe7e77 use the map! macro instead of defining it all over the place (#867)
* remove one map implementation in test

* remove one map macro

* remove one map macro

* remove one map macro
2018-10-03 13:22:58 +01:00
Pierre Krieger d14700f7b6 The NodeId is always available in the session info (#859) 2018-10-01 18:31:07 +01:00
Tomasz Drwięga ec8dda0dd4 Return correct hash for finalised transactions. (#858) 2018-10-01 17:49:48 +01:00
Tomasz Drwięga e8d88fcb7b Global unique subscription ids. (#848)
* Global unique subscription ids.

* Fix tests.
2018-10-01 16:31:52 +01:00
Arkadiy Paronyan 04cf0072ba Auxiliary data storage in client backend (#849)
* Auxiliary data storage in client backend

* Runtime error handling
2018-10-01 00:10:45 +01:00
Arkadiy Paronyan 2e728005c9 Fixed transaction propagation (#854) 2018-09-30 19:41:18 +01:00
Sergey Pepyakin 2414ffdac0 Fix sandbox::Memory lifecycle + sandox get memory function for no_std env (#845)
* Fix `sandbox::Memory` lifecycle for no_std env

* Retain memories in env_def builder and instance

* Add scoped memory creation to test RC semantics

* Add deploying_wasm_contract_should_work test.

* Fix sandboxed memory set function.
2018-09-30 17:23:32 +01:00
Arkadiy Paronyan a5a7dd2480 Fixed transaction propagation (#850) 2018-09-30 16:48:41 +01:00
Sergey Pepyakin cad28aa283 metadata returns Bytes (#846) 2018-09-30 13:16:31 +01:00
Sergey Pepyakin 68b6fd1ebd Remove #![feature(panic_handler)] (#844) 2018-09-29 18:56:20 +01:00
Sergey Pepyakin f4eb08dae5 Take and return the result in bytes (#842) 2018-09-29 18:56:00 +01:00
Arkadiy Paronyan d4dbc306e8 Fixed consensus message garbage collection & DB initialization (#841)
* Consensus cleanup

* Fixed DB initialization issue

* Spacing
2018-09-29 16:53:47 +02:00
Arkadiy Paronyan e1e6c19f64 Limit gossip for non-authorities (#838)
* Limit gossip for non-authorities

* Random shuffle
2018-09-29 13:08:22 +01:00
Pierre Krieger 79d538ee66 Clean up the "custom protocol" code (#832)
* No longer use a channel for custom protocols

* Fix warnings

* Add graceful shutdown and comments

* Minor cleanups

* Add warning if queue goes over threshold

* Increase threshold

* Address grumble
2018-09-29 12:01:23 +01:00
Svyatoslav Nikolsky c54350661d Fetching changes proof from remote nodes (#769)
* changes_trie

* changs_trie: continue

* changes_trie: adding tests

* fixed TODO

* removed obsolete ExtrinsicChanges

* encodable ChangesTrieConfiguration

* removed polkadot fle

* fixed grumbles

* ext_storage_changes_root returns u32

* moved changes trie root to digest

* removed commented code

* read storage values from native code

* fixed grumbles

* fixed grumbles

* missing comma

* key changes proof generation + query

* fix grumbles

* check that changes trie config is not changed by block.finalize()

* fixed changes trie config check
2018-09-29 09:47:29 +01:00
Bastian Köcher fdfd4672c1 Remove serde_json stuff from the metadata RPC (#833)
The metadata call does not work anymore with JSON and just returns an
opaque blob.
2018-09-29 09:37:06 +01:00
Arkadiy Paronyan 9a660f82ed Integration tests (#805)
* Started substrate tests

* Sync test

* Test updates

* Improved tests

* Use on-chain block delay

* Parallel test execution

* Otimized tests

* Logging

* Fixed racing test

* Fixed compilation

* Fixed timestamp test

* Removed rlp dependency

* Minor fixes

* Fixed tests

* Removed best_block_id and resolved fdlimit issue

* Whitespace

* Use keyring

* Style

* Added API execution setting

* Removed stale import
2018-09-28 10:37:55 +01:00
snd 41a6f54c4a pass correct header column to read_meta again (#827)
* pass correct header column to read_meta again

fixes #826

* make COLUMN_META exist in a single place

* pass COLUMN_META as arg for more consistency with other db utils

* remove unused import
2018-09-27 20:43:18 +01:00
Gav Wood acc83202bc SS58 addresses in BFT (#823)
* SS58 addresses in BFT

Closes #590

* Fix wasm compile
2018-09-27 17:53:57 +01: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 65b9e11cd8 Renaming 2018-09-27 16:25:53 +01:00
Robert Habermeier a3285e43f6 ensure meta is actually in the right column and sanity check on iterator (#820) 2018-09-27 16:05:24 +01:00
Gav Wood e5b48030b5 Fix newline. (#821) 2018-09-27 15:31:44 +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
Arkadiy Paronyan 29c9719568 Support authoring for multiple runtime versions (#816) 2018-09-27 13:56:40 +01:00