Commit Graph

449 Commits

Author SHA1 Message Date
Gavin Wood b170d9674f Prepare for final genesis (#1131)
* Update claim statements

* Update URLs

* Minor tweak to make enum agree with URL

* final html multihashes

* New hashes

* Version

* updated SAFT statement hash

* Update runtimes; this relies on substrate #6131

* Bump

* Share transaction filterer and fix Kusama

* Warning

* Gah!

* Tidy

* Westend fixes

* Westend fix

* Tweak constants

* Implement TCF stuff

* Fix

* Warning

* 15 minute lookahead

* 15 minute lookahead in Polkadot

* update max transactions

* Enable utility, disable vested_transfer

* Update runtime/common/src/lib.rs

Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>

* Filter calls for validate unsigned also

* Deduplicate

* Fix

* Introduce Polkadot (mainnet) chainspec

* Fix naming.

* Enable indices and fix comment.

* Fix compilation

* Enable indices and fix comment.

* polkadot: babe: enable secondary VRF slots

* Test JSON

* Allow set_heads

* Fix

* Raw chain spec added

Co-authored-by: keorn <github@i.keorn.org>
Co-authored-by: NikVolf <nikvolf@gmail.com>
Co-authored-by: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
Co-authored-by: Tomasz Drwięga <tomasz@parity.io>
Co-authored-by: André Silva <andre.beat@gmail.com>
2020-05-26 15:27:48 +02:00
Gavin Wood 8cb7cdbc64 Extra requirements for claimants (#1091)
* Introduce mandatory statement signing into claims

* Introduce SignedExtension

* Tests passing

* Bump runtime version

* Bump version, fix test

* Test for validate

* Another couple of tests

* Enable PrevalidateAttests on Polkadot

* Enable PrevalidateAttests on Polkadot

* Fix build

* Fixes

* More fixes

* Fix bench tests

* Fix & test Preclaim clobbering.

* Fix for errant claim logic

* Add test

* Update tests, always use Vec as input

* mint_claim can add signature, some_benchmarks

* Add claim with statement test

* finish benchmarks

* put the correct number of claims with benchmarks

* fix compiler warning

* Update weights

* Weight comments for validation

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2020-05-16 12:56:49 +02:00
André Silva 41699f5d6e grandpa: report equivocations on all runtimes (#1000)
* grandpa: report equivocations on all runtimes

* runtime: fix test-runtime compilation

* runtime: enable historical session manager on all runtimes

* runtime: fix indentation

* runtime: use strong key types in KeyOwnerProofSystem definitions

* update substrate

* bump spec_version of runtimes
2020-05-06 19:27:28 +01:00
Gavin Wood efd738be82 Bump version (#1070) 2020-05-05 18:20:36 +02:00
Gavin Wood f6b9cd4e4d Prep v0.7.32 (#1056)
* Bump Westend runtime version

* Bump Substrate

* Prep for release of 0.7.32

* Update lock
2020-04-29 19:27:37 +02:00
Nikolay Volf e54811646a update substrate, set new version (#1043) 2020-04-28 10:25:35 +02:00
Nikolay Volf 59f5743852 Companion PR for 5795 (#1041)
* add storage_append

* Bump versions

Co-authored-by: Gav Wood <gavin@parity.io>
2020-04-27 18:23:09 +02:00
Bastian Köcher eab3624096 Release 0.7.30 (#1006)
* Release 0.7.30

* Update Substrate & libp2p
2020-04-17 23:01:00 +02:00
Fedor Sakharov cf7cf4bd7d Adds an offchain call to submit double vote reports (#966)
* Adds an offchain call to submit double vote reports

* Some tweaks

* Remove unnecessary IdentifyAccount impls

* Adds ValidateDoubleVoteReports to test runtime

* sp-application-crypto is only a dev dependency
2020-04-16 16:19:51 +01:00
Bastian Köcher c6134cf91a Release 0.7.29 (#998)
* Release 0.7.29

* Update `Cargo.lock`
2020-04-14 16:46:20 +02:00
ddorgan 4f9f1c879f Westend Mark II (#983)
* Initial draft

* More work

* Build

* Docs

* Insert westend keys

* Add badBlock to fork from old chain

* Updated spec to reset westend

* Use raw spec

* Fix spec format and use westend2 for both id's

* Correct public key for bootnode 3

* Build

* Extra space

* Fix build

* Lock

* Update lock

* Fixes

* Fix for he startup text

* Bump

Co-authored-by: Gav Wood <gavin@parity.io>
2020-04-14 09:34:40 +02:00
Robert Habermeier a5034dbe98 Use strong types in runtime for parachain heads and validation code (#964)
* use stronger types for HeadData and ValidationCode in runtime

* fix weird debug compile error

* fix runtime build

* update invocations invalidation.rs

* fix tests
2020-04-13 10:24:25 +02:00
Robert Habermeier 10cec3b591 Upgradeable validation functions (#918)
* upgrade primitives to allow changing validation function

* set up storage schema for old parachains code

* fix compilation errors

* fix test compilation

* add some tests for past code meta

* most of the runtime logic for code upgrades

* implement old-code pruning

* add a couple tests

* clean up remaining TODOs

* add a whole bunch of tests for runtime functionality

* remove unused function

* fix runtime compilation

* extract some primitives to parachain crate

* add validation-code upgrades to validation params and result

* extend validation params with code upgrade fields

* provide maximums to validation params

* port test-parachains

* add a code-upgrader test-parachain and tests

* fix collator tests

* move test-parachains to own folder to work around compilation errors

* fix test compilation

* update the Cargo.lock

* fix parachains tests

* remove dbg! invocation

* use new pool in code-upgrader

* bump lockfile

* link TODO to issue
2020-04-06 10:43:19 -04:00
Bastian Köcher c021f854a2 Ensure that table router is always built (#952)
* Ensure that table router is always build

This pr ensures that the table router is always build, aka the future is
resolved. This is important, as the table router internally spawns tasks
to handle gossip messages. Handling gossip messages is not only required
on parachain validators, but also on relay chain validators to receive collations.

Tests are added to ensure that the assumptions hold.

* Fix compilation

* Switch to closures

* Remove empty line

* Revert "Remove empty line"

This reverts commit 0d4aaba1780aec1c8d61e1d5dcf7768918af02d9.

* Revert "Switch to closures"

This reverts commit d128c4ecc02c911552a3bfd2142b5a4f7b1338ba.

* Hybrid approach

* Rename test

* Make trait crate local
2020-04-03 16:33:52 -04:00
Bastian Köcher 1e6f37076d Rework consensus instance communication with the network worker (#958)
Up to now consensus instances used the main channel to communicate with
the background network worker. This lead to a race condition when
sending a local collation and dropping the router before driving the
send local collation future until it is finished. This pr changes the
communication between worker and the instances to use their own
channels. This has the advantage that we don't need an extra
`DropConsensusNetworking` message as the network is dropped
automatically when the last sender is dropped.
2020-04-01 17:01:59 +02:00
Gavin Wood d8e1180030 Companion for #5412 (#942)
* Fixes for democracy using Scheduler

* Revert branch change
2020-04-01 17:01:14 +02:00
Bastian Köcher b4c79556f3 Upgrade bitvec and parity-scale-codec (#947) 2020-03-30 13:08:15 +02:00
Fedor Sakharov dbb4e987fa Remove Parent Hash to Session mapping (#928)
* Adds a SigningContext type

* Bump spec versions

* Fixes requested changes

* Bump ParachainHost api_version and guard signing_context call

* Improve error message

* If there is no signing_context api use default value

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2020-03-25 17:04:05 -04:00
Gav Wood 5f04e1aa52 Version bump 2020-03-23 16:29:10 +01:00
Fedor Sakharov 88ba024489 Parachains double vote handler initial implementation. (#840)
* Parachains double vote handler initial implementation.

* Make tests test the actual slashing.

* Implement SignedExtension validation of double vote reports.

* Fixes build after merge

* Review fixes

* Adds historical session proofs

* Review fixes.

* Bump runtime spec_version

* Get the session number from the proof

* Check that proof matches session

* Change signature type on DoubleVoteReport

* Adds docs and removes blank lines

* Removes leftover code

* Fix build

* Fix build after a merge

* Apply suggestions from code review

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

* Prune ParentToSessionIndex

* Remove a clone and a warning

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Gavin Wood <gavin@parity.io>
2020-03-22 09:48:35 +03:00
Gav Wood 0c435448f9 Bump version 2020-03-21 16:48:06 +01:00
Gavin Wood 95d732beca Introduce progressive democracy (#920)
* Updates for the new democracy

* Introduce progressive democracy

Also move to "master" branch of Substrate ready for continuous
sync with Substrate master.
2020-03-21 16:46:09 +01:00
André Silva 2edc7f13b0 Release version v0.7.27 (#916)
* bump version to v0.7.27

* update to latest substrate polkadot-master

* bump runtime impl_version
2020-03-19 16:24:32 +00:00
Gavin Wood d92963c7dc Bump version (#907) 2020-03-17 15:42:51 +01:00
Gavin Wood d07116a577 Bump version and Substrate (#905)
* Bump version and Substrate

* Version

* Lock
2020-03-17 14:10:15 +01:00
Gavin Wood a81d8cb220 Bump versions & Substrate. (#902) 2020-03-16 11:00:11 +01:00
Gavin Wood 2c85b84cb6 Bump Substrate and runtime version (#900)
* Insert storage for finality tracker

* Bump lock

* Bump version
2020-03-14 17:13:10 +01:00
Gavin Wood 844ca939ab Prepare for version 0.7.23 (#899)
* Bump version

* Cargo lock

* Bump runtime version

* Bump Substrate again to include recent fix
2020-03-13 15:49:33 +01:00
Shawn Tabrizi 70a5bda2ce Benchmark Polkadot Claims Pallet (#876)
* fix

* Starting to add benchmarks

* make compile

* add benchmarks

* Make work with Substrate master

* Bench validate unsigned

* back to polkadot master

* starting to add cli with feature flag

* more stuff

* Add to kusama

* Update Cargo.lock

* fix dev dep

* bump wasm builder

* Remove encode from keccak benchmark

* bump spec

* Add weight documentation

* Update Cargo.lock

* Update check_runtime.sh

* Update publish_draft_release.sh

* Update Cargo.lock

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
2020-03-13 10:42:31 +01: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
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
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
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 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
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
Gav Wood 2e5e256821 Update version 2020-02-03 14:41:18 +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
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
Gavin Wood ddce5fe496 Bump Substrate & versions (#747)
* Bump versions

* Update for tipping treasury

* Bump substrate

* Fixes

* Put send_consensus back in.

* Fix test

* Fixes

* Fixes

* Fix warning
2020-01-10 00:23:43 +01:00
Gavin Wood d9b8ba7707 v0.7.16 (#744)
* Bump Substrate and versions

* Bump Substrate
2020-01-09 01:09:48 +01:00
Bastian Köcher 06386558ae Switch parachain interface to new runtime_interface macro (#665)
* Make use of `runtime_interface` for parachain externalities

This also changes the encoding of the `ValidationResult` return value to
match the default encoding used in Substrate.

* Fix compilation for web

* Update `Cargo.lock`

* Include feedback

* Move proc macro

* Update parachain/src/lib.rs

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2020-01-08 20:44:50 +01:00
Gavin Wood 10f1f3a381 Bumped version to v0.7.15, use minimallly-changed Substrate. (#741)
* Bumped versions

* Bump to latest substrate that exposes load_spec
2020-01-08 14:44:49 +01:00
Gavin Wood bd8db613ef Bump versions (#736)
* Fix up Kusama balance constants

* Bump versions

* Fix for the --dev option
2020-01-07 19:30:06 +01:00
André Silva a869258fc5 polkadot v0.7.13 (#730)
* bump substrate version

* bump version to 0.7.13
2020-01-07 00:12:17 +00:00
Gavin Wood bf858b0a60 Bump version (#729) 2020-01-06 23:45:29 +00:00
Shawn Tabrizi c975d4ee84 Update copyright year (#718) 2020-01-05 17:57:13 +01:00