Commit Graph

756 Commits

Author SHA1 Message Date
Max Inden e98826977d network/src/legacy: Remove unnecessary super trait on GossipService (#891)
Remove `Send + Sync + 'static` super trait bound on `GossipService`. It
is not required by `GossipService` nor its `impl`s.
2020-03-09 16:35:22 -07:00
Gavin Wood 845ad821ee Bump version to knock the -dev (#887)
* Bump version to knock the -dev

* Update lock
2020-03-07 12:27:38 +01:00
Gavin Wood 2cf2811e16 Update to Substrate master (#886)
* Bump Substrate and some fixes

* Bump runtime

* version bump
2020-03-07 00:03:16 +01:00
joe petrowski 6d3f6bbda6 fix a few typos in docs (#884) 2020-03-06 13:05:53 +01:00
Gavin Wood bae2e79da3 Use jmalloc, align kvdb crate version. (#883)
Co-authored-by: cheme <emericchevalier.pro@gmail.com>
2020-03-05 23:39:10 +01:00
Gavin Wood e13fdc884c Merged companions and update Subtrate (#882)
* expunge legacy code from polkadot-network

* mostly rip out old legacy protocol from service

* ensure validation work is spawned by incoming messages

* decouple availabliity store from network logic; clean up data flow

* av_store: test helpers and use futures-abort

* update polkadot-validation to pass n_validators when submitting chunks

* fallible erasure-chunk fetching

* implement `ErasureNetworking` for new network prot

* API for registering availability store in network

* fully integrate new network service into service

* fix validation tests

* scaffolding for porting collator over to new network

* track connected validators' peer IDs and distribute collators' collations

* helper in network for fetching all checked statements

* fix adder-collator

* actually register notifications protocol

* Update service/src/lib.rs

* Make needed changes to service

* Merge two companion PRs.

- #880
- #881

* Some effort towards compilation

* Fix

* remove `NetworkSpecialization` references from network

* fix compilation errors in service and collator

* ensure protocol name is valid

* Fixes

* Fix

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Ashley <ashley.ruglys@gmail.com>
2020-03-05 23:20:42 +01:00
Gavin Wood 559ea5846f Add Github Action for Matrix release bot (#874)
This action will publish all pre-released, edited and published releases to a dedicated release notes Matrix room using https://github.com/marketplace/actions/matrix-message

@s3krit already added the necessary secrets to the repository settings.
2020-03-05 22:28:11 +01:00
Robert Habermeier 7931380825 Remove legacy network code (#860)
* expunge legacy code from polkadot-network

* mostly rip out old legacy protocol from service

* ensure validation work is spawned by incoming messages

* decouple availabliity store from network logic; clean up data flow

* av_store: test helpers and use futures-abort

* update polkadot-validation to pass n_validators when submitting chunks

* fallible erasure-chunk fetching

* implement `ErasureNetworking` for new network prot

* API for registering availability store in network

* fully integrate new network service into service

* fix validation tests

* scaffolding for porting collator over to new network

* track connected validators' peer IDs and distribute collators' collations

* helper in network for fetching all checked statements

* fix adder-collator

* actually register notifications protocol

* Update service/src/lib.rs

* merge with master
2020-03-05 10:11:21 -08:00
gabriel klawitter b49bf9d5b0 ci: increase artifact retention period (#869)
* ci: increase artifact retention period
2020-03-05 14:12:00 +01:00
Gavin Wood b2df51d296 Update substrate (#878)
* Switch branch

* Small changes

* Update substrate branch

* Switch

* Revert "Switch branch"

This reverts commit b9d48b2ce8f5cbfa379dd385e817e80870391d9d.

* fix

* add `wipe` and `commit`

* Remove deprecated_host_interface

* Switch branch

* HasherFor -> HashFor

* More HasherFor changes

* Final touches

* Revert "Switch branch"

This reverts commit d0da27313839559de01f59690f3826fe587becb8.

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-03-05 13:27:28 +01:00
Bastian Köcher 1058537824 Pass parent head as input to parachain validation (#871) 2020-03-01 20:18:49 -08:00
Bastian Köcher 8a38b7af3c Update to latest Substrate master (#863)
* Begin to update to latest Substrate master

* Fix compilation

* Remove `Balances` from `OnKilledAccount`

* Update cli/src/command.rs

Co-Authored-By: Cecile Tonglet <cecile@parity.io>

* Change gossip name

* Change again

Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-02-28 12:32:16 +01:00
Toralf Wittner 1401eeba3f Update yamux to version 0.4.4. (#868) 2020-02-28 12:17:21 +01:00
Pierre Krieger d1dcaf0b8a Update to libp2p 0.16.2 (#867) 2020-02-28 11:30:57 +01:00
Cecile Tonglet 188a103e20 Spawn a future to start the collator (#851)
* Running a node without a database set in config is a bug, not a user error
2020-02-27 16:18:38 +01:00
s3krit 0c93011760 CI: Label PRs with B2-breaksapi if substrate changes are labelled B2-breaksapi (#862)
* CI: Split common functions into lib.sh and make...

... alert_pending_release.sh check the substrate changes for various
labels. If labelled, will be included in the changelog, otherwise will
silently be left out.

* replace non-standard /bin/bash with /usr/bin/env bash

* CI: make lib.sh /bin/sh-compatible

* lib.sh: fix newline chars sometimes breaking has_label()

* check_runtime.sh: tag change with 'B2-breaksapi'...

... if any substrate changes are also labelled 'B2-breaksapi'

* Remove debug exits and uncomment labelling

* exit early if we label with breaksapi

* fix publish_draft_release.sh
2020-02-26 14:56:18 +01:00
Robert Habermeier b7d30aa379 A more comprehensive model for PoV-Blocks and Candidate receipts (#843)
* encode the candidate statement as only the hash

* refactor CandidateReceipt and CollationInfo

* introduce an abridged candidate receipt type

* erasure coding stores candidate receipt

* store omitted data instead and introduce AvailableData type

* refactor availability-store schema

* tweak schema and APIs a bit more

* get availability-store tests passing

* accept AbridgedCandidateReceipt in `set_heads`

* change statement type in primitives to be hash-only

* fix parachains runtime tests

* fix bad merge

* rewrite validation pipeline

* remove evaluation module

* use abridged candidate hash as canonical

* statement table uses abridged candidate receipts

* kill availability_store::Data struct

* port shared table to new validation pipelines

* extract full validation pipeline to helper

* remove old validation pipeline from collation module

* polkadot-validation compiles

* polkadot-validation tests compile

* make local collation available in validation service

* port legacy network code

* polkadot-network fully ported

* network: ensure fresh statement is propagated

* remove pov_block_hash from LocalValidationData

* remove candidate_hash field from AttestedCandidate and update runtime

* port runtimes to new ParachainHost definition

* port over polkadot-collator

* fix test compilation

* better fix

* remove unrelated validation work dispatch fix

* address grumbles

* fix equality check
2020-02-25 15:16:58 -08:00
s3krit 1f9d2af08e CI: fix bad URL in publish_draft_release.sh (#858) 2020-02-24 12:43:15 +00:00
Pierre Krieger c24c8e9b88 Redefine RequetsId instead of using it from Substrate (#857) 2020-02-21 10:15:29 -08:00
Shawn Tabrizi c01ef7198f Separate WeightToFee calculation for Kusama and Polkadot (#854)
* Separate `WeightToFee` calculation for Kusama and Polkadot

* Bump spec
2020-02-19 13:23:50 -08:00
André Silva b642c4b197 cli: fix version info in config (#855) 2020-02-19 18:04:12 +00:00
Nikolay Volf f7303348ff Update to latest substrate master (#853)
* try to update

* latest updates

* final fixes

* Fix claim w/ vesting logic

* Make claim tests a bit better

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-02-19 17:24:57 +00:00
Ashley bbb2fbc556 Remove TargetedMessage (#848)
* Remove TargetedMessage

* Nitpicks
2020-02-19 08:33:38 -08:00
s3krit 25e2448597 CI: Make alert_pending_release.sh filter substrate changes based on github labels... (#850)
* CI: Split common functions into lib.sh and make...

... alert_pending_release.sh check the substrate changes for various
labels. If labelled, will be included in the changelog, otherwise will
silently be left out.

* replace non-standard /bin/bash with /usr/bin/env bash

* CI: make lib.sh /bin/sh-compatible
2020-02-18 15:59:22 +01:00
Shawn Tabrizi e3a3d05350 Make ED not zero (#838) 2020-02-15 15:14:17 +01:00
Ashley 5f9e602af7 Strip out old XCMP primitives (#823)
* WIP

* WIp

* Mostly get tests to compile

* Fix adder collator

* Remove more stuff

* Revert some changes to av store

* Fix av store tests

* Nitpicks

* Restore some things

* Small changes

* Remvoe unused error variants
2020-02-13 17:12:05 +01:00
Bastian Köcher 5385b9af82 Revert async await to fix collation (#839)
* Revert 9a9860c8bd

* Make it work
2020-02-12 16:39:22 +03:00
Bastian Köcher 2eb7621759 Adds some debug logging (#837) 2020-02-11 22:01:45 +01:00
Robert Habermeier 295151338d Introduce a maximum code size and head data size (#835)
* add a maximum code size and head data size

* get existing tests passing

* add tests for slots logic

* test registrar behavior

* introduce maximums and bump versions

* address review grumbles

* work around publicizing derive

* remove unneeded and wrong doc
2020-02-11 19:21:56 +01:00
Robert Habermeier 9b23f3f1f0 rewrite network code to use notifications_protocol APIs from Substrate (#788)
* extract all network code to legacy submodule

* update references to legacy proto

* skeleton of futures-based protocol

* refactor skeleton to use background task

* rename communication_for to build_table_router

* implement internal message types for validation network

* basic ParachainNetwork and TableRouter implementations

* add some module docs

* remove exit-future from validation

* hack: adapt legacy protocol to lack of exit-future

* generalize RegisteredMessageValidator somewhat

* instantiate and teardown table routers

* clean up RouterInner drop logic

* implement most of the statement import loop

* implement statement loop in async/await

* remove unneeded TODO

* most of the collation skeleton

* send session keys and validator roles

* also send role after status

* use config in startup

* point TODO to issue

* fix test compilation
2020-02-10 15:20:45 +01:00
Cecile Tonglet 6051a2b272 Fix invalid argument order (#832)
Make sure that --dev purge-chain is rejected

```
[0] [11:24:02] ~/r/polkadot master > ./target/debug/polkadot purge-chain --dev -y
"/home/cecile/.local/share/polkadot/chains/dev/db" did not exist.
[0] [11:25:36] ~/r/polkadot cecton-fix-invalid-argument-order > ./target/debug/polkadot --dev purge-chain -y
error: Found argument 'purge-chain' which wasn't expected, or isn't valid in this context

USAGE:
    polkadot --dev

For more information try --help
```
2020-02-10 13:21:21 +01:00
Bastian Köcher eefbaffe4f Be specific about the BitVec generic arguments (#830)
* Be specific about the `BitVec` generic arguments

Currently we use the default generic arguments for `BitVec`. This means
we use `BigEndian` and `u8`. These default values are not stable, with
`0.17` of the `BitVec` crate this changes. To make sure we don't break
anything in the future, make sure we explictly set the generics.

* Update `spec_version`
2020-02-10 10:32:34 +01:00
Cecile Tonglet c93b142692 Test node exits properly (#831)
* Initial commit

Forked at: 703ac8bbbc
Parent branch: origin/master

* Test running node and interrupts

* WIP

Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750
Parent branch: origin/cumulus-branch

* Update Cargo.lock

* WIP

Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750
Parent branch: origin/cumulus-branch

* WIP

Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750
Parent branch: origin/cumulus-branch

* WIP

Forked at: 1942ae27ae23809a40f955545dfbf0467faa7750
Parent branch: origin/cumulus-branch
2020-02-10 10:32:10 +01:00
Robert Habermeier 27bf34522d enable migrations in polkadot and kusama runtimes (#824)
* enable migrations in polkadot and kusama runtimes

* bump runtime version
2020-02-10 10:31:50 +01:00
Robert Habermeier 1c2aff5b4d Include parent head in CandidateReceipt (#826)
* runtime: candidate receipt must pass parent head

* construct parachain candidates using correct parent_head

* validate that the parent header is correct in candidate receipt

* fix test fallout

* bump runtime versions
2020-02-10 10:14:12 +01:00
Gavin Wood 703ac8bbbc Bump Substrate (#816)
* Amalgamate pieces of balance module

* Fixes for vesting split

* Refactoring for vesting/balances split

* Build fixes

* Remove on_free_balance_zero and some docs.

* Indentation.

* Revert branch

* Fix.

* Update substrate: fixes after CLI refactoring

* Reverting removal of exit

* Removed too much again

* Update Cargo.lock

* Cargo.lock

* Update Substrate, ready for #4820

* Fixes

* Update to latest substrate master

* Fix network tests

* Update lock

* Fix tests

* Update futures to get bug fixes

* Fix tests for new balances/vesting logic

* Cargo fix

* Another fix

Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-09 17:50:17 +01:00
Pierre Krieger 9a2bba3ba1 Re-do #810 but properly (#821) 2020-02-03 17:37:29 +01:00
gabriel klawitter 9a2495c66e ci: fix check_runtime on busybox (#820) 2020-02-03 16:53:20 +01:00
Gav Wood 2e5e256821 Update version 2020-02-03 14:41:18 +01:00
Bastian Köcher 83e1096f40 Blacklist invalid block in Kusama (#818) 2020-02-03 14:08:46 +01:00
Ashley 7e4e4108a6 Fix cli/browser.rs and allow selecting a chainspec on wasm. (#815)
* Fix browser.rs

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-02-01 17:32:52 +01:00
Gavin Wood 2e3dd801b9 Bump substrate (#814)
* Bump runtime version

* Bump runtime version
2020-01-31 19:17:08 +00:00
Bastian Köcher 3df4d2843f Update to latest Substrate master (#813) 2020-01-31 14:03:35 +01:00
Gavin Wood 131ad136cb Update Substrate (#812)
* Update to latest Substrate master

* upgrade decl_storage declaration

* Companion PR to Substrate#4752

* Substrate update: Identity should bound additional fields (#4770)

Substrate commit: 2c9ce7296b19934b1ffd50150be2fdb2ddf81a4e

* WIP

* WIP

* Updated substrate and fixes

* Fix compilation and switch to latest wasm-builder-runner

* Fixed missing doc

* Update collator/src/lib.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
Co-authored-by: Cecile Tonglet <cecile.tonglet@cecton.com>
2020-01-31 11:47:02 +00:00
Pierre Krieger cfb9e7c8cb Reduces the number of threads we spawn (#810) 2020-01-30 17:06:35 +00:00
Toralf Wittner 0dc1e415b7 Update yamux to v0.4.1 (#811) 2020-01-30 17:04:40 +00:00
Gavin Wood 6c32055fbe Update Substrate (#808)
* Update to latest Substrate master

* upgrade decl_storage declaration

* Companion PR to Substrate#4752

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
2020-01-29 20:46:51 +01:00
Gavin Wood ed8a4c29bb Fix weights (#807) 2020-01-29 14:03:31 +01:00
Ashley 04eae615b5 Update tokio to 0.2 again and remove TaskExecutors (#786)
* upgrade tokio again

* Remove WrappedExecutor

* switch to spawn_blocking
2020-01-29 12:13:47 +01:00
Muhammad Altabba aa86197ec9 Update docker.md (#802)
* Update docker.md

Few Edits:
 - Use the `latest` version of polkadot.
 - Add a missing `--` when reporting the version.

* Update docker.md use `westend` chain

> Alex doesn't exist anymore, the current test net is `westend`.
According to https://github.com/paritytech/polkadot/issues/803
2020-01-28 23:12:52 +01:00