Commit Graph

643 Commits

Author SHA1 Message Date
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
ddorgan bb8a0802fe Final commit of tested westend config (#800)
* Final commit of tested westend config

* Minor update for validator 4's stake amount
2020-01-24 22:14:52 +00:00
ddorgan 082bb6c51b Rotate sudo key, update endowment and add websocket bootnodes (#797) 2020-01-24 18:16:07 +01:00
gabriel klawitter c9e2e5ea0c ci: only tag breaksapi if there were changes to the runtime sources (#798) 2020-01-24 22:41:41 +08:00
joe petrowski f50d0c6505 Use decl_error in common runtime modules (#796)
* use decl_error in common runtime modules

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2020-01-23 21:55:59 +01:00
ddorgan 5621c18632 Add spec for westend network (#792)
* add json

* Add spec changes

* Fix config method

* spaces -> tabs
2020-01-23 17:46:40 +01:00
Ashley 8b39c79fe5 Add missing default-features = false (#787) 2020-01-22 17:51:46 +01:00
Bastian Köcher e6f4c36ed9 Update to latest Substrate master (#783)
* Update to latest Substrate master

* Update wasm-builder and make `run` work
2020-01-22 12:27:28 +01:00
gabriel klawitter 5b129f1292 ci: backport runtime version checks from v0.6 branch (#774)
* ci: backport runtime version checks from v0.6 branch

* adjust substrate version file path
2020-01-22 00:31:03 +08:00
Fedor Sakharov 9a9860c8bd Asyncify launch_work a bit more (#777)
* Asyncify launch_work a bit more

* An error message misword

* A bit more async in collator
2020-01-20 19:13:48 +03:00
André Silva 3a49649a51 grandpa: increase gossip duration to 1s (#781) 2020-01-19 23:24:21 +01:00
Gavin Wood 524b6f0254 Bump substrate (#780) 2020-01-18 18:50:43 +01:00
André Silva 2b081f9edd v0.17.18: Update latest substrate (#776)
* update latest substrate polkadot-master

* fix test compilation

* bump version to 0.7.18

* bump impl_version

* update substrate

* Revert "Instantiate environment with asynchronous API (#768)"

This reverts commit a5d9645bf4.

* update substrate

* remove unused parameter type

* bump trie-db version for tests

* fix collator test

* update substrate

* remove unnecessary service changes
2020-01-17 18:37:55 +00:00
Xiliang Chen b9cc23a6e0 remove unused dependency (#775) 2020-01-17 12:40:31 +00:00