Commit Graph

39 Commits

Author SHA1 Message Date
dependabot[bot] 564c0532a6 Bump async-trait from 0.1.52 to 0.1.53 (#1117)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.52 to 0.1.53.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.52...0.1.53)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 23:20:18 +02:00
Dan Shields 65454fbf96 Update Cumulus to common Cargo formmating scheme (#1050)
* Update throughout with common Cargo formating scheme
2022-03-02 00:07:29 -07:00
Dan Shields ad5dd362b4 Add wasmtime feature to all parachain clients (#1058)
* add wasmtime feature to all parachain clients

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
2022-03-01 20:41:21 +00:00
Sebastian Kunert 234c42c2df Introduce rpc client for relay chain full node (#963)
* Initial network interface preparations

* Implement get_storage_by_key

* Implement `validators` and `session_index_for_child`

* Implement persisted_validation_data and candidate_pending_availability

* Fix method name for persisted_validation_data and add encoded params

* Implement `retrieve_dmq_contents` and `retrieve_all_inbound_hrmp_channel_contents`

* Implement `prove_read`

* Introduce separate RPC client, expose JsonRpSee errors

* Simplify closure in call_remote_runtime_function

* Implement import stream, upgrade JsonRpSee

* Implement finality stream

* Remove unused method from interface

* Implement `is_major_syncing`

* Implement `wait_on_block`

* Fix tests

* Unify error handling `ApiError`

* Replace WaitError with RelayChainError

* Wrap BlockChainError in RelayChainError

* Unify error handling in relay chain intefaces

* Fix return type of proof method

* Improve error handling of new methods

* Improve error handling and move logging outside of interface

* Clean up

* Remove unwanted changes, clean up

* Remove unused import

* Add format for StatemachineError and remove nused From trait

* Use 'thiserror' crate to simplify error handling

* Expose error for overseer, further simplify error handling

* Reintroduce network interface

* Implement cli option

* Adjust call_state method to use hashes

* Disable PoV recovery when RPC is used

* Add integration test for network full node

* Use Hash instead of BlockId to ensure compatibility with RPC interface

* Fix cargo check warnings

* Implement retries

* Remove `expect` statements from code

* Update jsonrpsee to 0.8.0 and make collator keys optional

* Make cli arguments conflicting

* Remove unused `block_status` method

* Add clippy fixes

* Cargo fmt

* Validate relay chain rpc url

* Clean up dependencies and add one more integration test

* Clean up

* Clean up dependencies of relay-chain-network

* Use hash instead of blockid for rpc methods

* Fix tests

* Update client/cli/src/lib.rs

Co-authored-by: Koute <koute@users.noreply.github.com>

* Improve error message of cli validation

* Add rpc client constructor

* Do not use debug formatting for errors

* Improve logging for remote runtime methods

* Only retry on transport problems

* Use PHash by value, rename test

* Improve tracing, return error  on relay-chain-interface build

* Fix naming, use generics instead of deserializing manually

* Rename RelayChainLocal and RelayChainNetwork

* lock

* Format

* Use impl trait for encodable runtime payload

* Only instantiate full node in tests when we need it

* Upgrade scale-codec to 3.0.0

* Improve expect log

Co-authored-by: Koute <koute@users.noreply.github.com>
2022-03-01 12:37:51 +01:00
wigy 6af1dd5f6f Companion to "Updating scale to v3" (#1013)
* Updating dependencies

* Adapting code to scale v3

* cargo fmt

* Fix compilation

* Update Cargo.lock

* TIL  exists

Co-authored-by: Bastian Köcher <info@kchr.de>
2022-02-25 13:40:24 +00:00
dependabot[bot] 307080e59a Bump parking_lot from 0.10.2 to 0.12.0 (#1030)
Bumps [parking_lot](https://github.com/Amanieu/parking_lot) from 0.10.2 to 0.12.0.
- [Release notes](https://github.com/Amanieu/parking_lot/releases)
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.10.2...0.12.0)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 19:39:09 +01:00
Koute 222d5cfaa1 Bump tokio to 1.17.0 (#1014) 2022-02-22 11:01:17 +00:00
Keith Yeung e141b72ec7 Update rand to v0.8.5 (#987)
* Update rand to v0.8.5

* Enable std_rng feature on rand

* Enable std_rng only when std is enabled

* Revert "Enable std_rng only when std is enabled"

This reverts commit 8fb3b72dbd6dc18bc19868b999b5b07cea4b7392.
2022-02-14 23:14:05 +00:00
Bastian Köcher 9dd0f5c225 pov-recovery: Enable pov-recovery as well on full nodes (#927)
* pov-recovery: Enable pov-recovery as well on full nodes

Pov recovery was before only enabled for collators. The reason behind this was prevention of spam of
the relay chain for block recovery. However, recent events has shown that this wasn't a good idea.
So, this pr enables pov-recover for normal full nodes as well, but with a much higher delay before
trying to recover a block. This means that full nodes will wait in minimum 2.5 minutes and in
maximum 5 minutes before recovering a block. This should give collators in "normal mode" enough time
to recover a block (they wait in maximum 6 seconds after they have seen a new candidate in the relay
chain) before recovering a block. So, we should hopefully not spam the relay chain.

* FMT

* Fixes

* Fix documentation
2022-01-21 20:16:11 +01:00
Sebastian Kunert 7b42df10f3 Introduce interface for relay chain interaction (#835) 2021-12-22 19:02:11 +01:00
Keith Yeung 1856c5df34 Update serde to 1.0.132 (#871) 2021-12-21 09:15:50 +01:00
Keith Yeung 1a71d006a7 Update serde to 1.0.131 (#853) 2021-12-11 14:10:51 +01:00
Dan Shields ec401ce1d0 move to rust 2021 (#759)
* move to rust 2021

* fix formatting, more moves
2021-11-16 15:12:06 +01:00
sandreim b968e54fe5 Companion to substrate #10196 - Add group name in task metrics (#732)
* Use blank task group name

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* cargo fmt

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Update

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* update Cargo.lock and switch from 0.9.12 to master

* format with LATEST nightly

Co-authored-by: Andronik Ordian <write@reusable.software>
2021-11-11 19:41:36 +00:00
Sebastian Kunert d4045c85e7 Port transaction pool benchmark (#738)
Adds a benchmark to measure transaction throughput.
2021-11-11 10:30:54 +01:00
Bastian Köcher 6b4fd91ad5 Rework the runtime upgrade test (#727)
* Rework the runtime upgrade test

* Update test/service/tests/runtime_upgrade.rs

* Update test/service/tests/runtime_upgrade.rs

* Update Cargo.lock

* FMT

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
2021-11-09 15:02:34 +01:00
Keith Yeung 1aab3349cc Use DecodeLimit for decoding XCM messages (#605)
* Use DecodeLimit for decoding XCM messages

* Use decode_all_with_depth_limit in appropriate places

* Use decode_all while decoding byte vector

* cargo fmt
2021-09-19 15:29:34 +03:00
Bastian Köcher 5af2990cfd Upgrade Substrate & Polkadot (#612) 2021-09-16 06:57:29 +02:00
Squirrel a0532634e1 less deps (#606) 2021-09-12 23:22:14 +02:00
Gavin Wood 968c91e357 Bump Tokio to 1.10 (#592)
* Bump Tokio to 1.10

* Missed one
2021-08-28 14:33:56 +00:00
Bastian Köcher 52bc169b52 Upgrade Substrate & Polkadot (#583) 2021-08-22 21:22:36 +02:00
Bastian Köcher 71ed6b272c Update Substrate & Polkadot (#557)
* Update Substrate & Polkadot

* Format

* Update again
2021-08-03 11:59:37 +02:00
Bastian Köcher a2a97be872 Bring back runtime upgrade test (#525)
This brings back the runtime upgrade test and also updates Substrate &
Polkadot.
2021-07-06 16:21:19 +02:00
Bastian Köcher d3b4279f14 Adds support for checking the timestamp inherent while validating a block (#494)
* Adds support for checking the timestamp inherent while validating a block

This adds support for checking the timestamp inherent while validating a
block. This will use the relay chain slot number * relay chain slot
duration to calculate a timestamp. This timestamp is used to check the
timestamp in the timestamp inherent.

* Update polkadot-parachains/rococo-runtime/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update polkadot-parachains/statemine-runtime/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update primitives/timestamp/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Fix warnings

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-06-16 10:53:47 +02:00
Bastian Köcher 7ffb205b0d Pov recovery for parachains (#445)
* Start with a failing integration test & some refactorings

* More work

* Make it "work"

* Add `NullConsensus` for the test

* More refactorings

* Move stuff over to its own crate

* Refactorings

* Integrate it into `service` and make the test working

* Docs and some exit condition

* Use the real import queue

* Fix tests

* Update client/pov-recovery/src/active_candidate_recovery.rs

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>

* Fetch slot duration from the relay chain

* Docs

* Fixes

Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
2021-05-26 15:02:42 +02:00
Bastian Köcher d01bc247cb Aura consensus for parachains (#371)
* Update polkadot

* Migrate all uses of MQC heads to merkle proofs

* Mass rename `relay_parent_storage_root`

* Restore parachain-system tests

* Update polkadot and libp2p swarm for testing

* Collapse match into an if let

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Start with something

* Update Substrate & Polkadot

* Start to make it compile

* Make it compile

* Begin with something

* Yep

* I'm a hacker

* Bring back the builder

* Make it work in some way

* Compile

* Parachains use their own "slot"

* Adds cumulus-pallet-aura

* Wrap AuRa import queue to disable equivocation checking by default

* Pass slot duration

* Check the seal when validating a block

* Adds missing file

* Try to make the seal working

* Fix it

* Some fixes

* Bring in the latest features to cleanup the code

* Update and make it compile

* Improve the import

* Start fixing

* More work

* Fix fix fix

* Make everything compile

* Small cleanups

* Rename and more docs

* Docs

* Fixes fixes fixes

* Update rococo-parachains/src/chain_spec.rs

* Update client/consensus/aura/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update client/consensus/aura/src/lib.rs

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/parachain-inherent/Cargo.toml

Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>

* Update primitives/parachain-inherent/Cargo.toml

* Update primitives/parachain-inherent/Cargo.toml

* Update primitives/parachain-inherent/Cargo.toml

Co-authored-by: Sergei Shulepov <sergei@parity.io>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
2021-05-10 14:43:00 +02:00
Bastian Köcher 6364eeeef1 Update Substrate & Polkadot (#427)
* Update Substrate & Polkadot

* Fixes
2021-05-04 09:48:41 +02:00
Cecile Tonglet 8c37b0d450 Runtime upgrade test (#364) 2021-04-16 09:48:13 +02:00
Gavin Wood 5fe32eb0d4 XCM revamp & Ping pallet (#391)
* Add spambot

* Fixes

* Add some extra functions to spambot, bump version

* Lock..

* Aggregate HRMP (XCMP/HMP) messages. Payloads for spambot.

* Fix tests, bump Polkadot.

* Fix HMP tests

* Rename Hrmp -> Xcmp for handler/sender

* Use master branch

* Test Xcm message passing & rename away from HMP

* Docs

* Introduce fee payment mechanics into XCM.

* Rename spambot -> ping

* Lock

* XCMP message dispatch system reimagining

- Moved most of the logic into xcm-handler pallet
- Altered the outgoing XCMP API from push to pull
- Changed underlying outgoing queue data structures to avoid multi-page read/writes
- Introduced queuing for incoming messages
- Introduced signal messages as a flow-control sub-stream
- Introduced flow-control with basic threshold back-pressure
- Introduced overall weight limitation on messages executed
- Additonal alterations to XCM APIs for the new system

* Should process any remaining XCM messages when we're not doing anything else.

* Update API usage and preparation for the big build.

* Some build fixes

* Build fixes

* xcm-handler builds

* Fix warnings

* Docs

* Parachains system builds

* Parachain runtime building

* Fix build

* Introduce transfer_asset specialisation.

* Fixes

* Two-stage upgrade for parachains.

* Fixes

* Fixes

* Updates for message sending.

* Repotting/renaming. Add primitives/utility.

* Remove real-overseer and bump refs

* Configure & document Rococo XCM runtime.

* Add shell runtime, some companion changes for #8589

* Bumps & fixes

* Fix test

* Build fix

* Update pallets/xcmp-queue/src/lib.rs

Co-authored-by: Amar Singh <asinghchrony@protonmail.com>

* Make tests compile

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* remove unused

* remove unused event stuff

* Adds proper validation-worker to make integration tests work

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* import saturating

* remove panic test

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Amar Singh <asinghchrony@protonmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: Bastian Köcher <info@kchr.de>
2021-04-14 09:36:59 +02:00
Bastian Köcher cb9d1019c4 Fix block propagation between non-collator nodes (#363)
* Create builder for test nodes

* Fix syncing issue

* Adds missing file
2021-03-11 22:29:19 +01:00
Bastian Köcher 4820fa16b1 Parachain Consensus abstractions (#329)
* Move consensus to consensus-common crate

* Move the parachain consensus out of the collator

* Add first relay chain consensus stuff

* Remove some warnings

* Fix more stuff

* Fix collator test

* Change `ParachainConsensus` to take a mutable self

* Make everything compile

* Feedback
2021-02-16 12:45:30 +01:00
Bastian Köcher ec08d11d39 New genesis (#327)
* Update Substrate & Polkadot

* Update chainspecs

* Update again to fix test
2021-02-15 11:20:36 +01:00
Bastian Köcher fbacfe7937 The great refactor (#325)
* Move pallets to pallets folder and rename them

* Move genesis file to service

* Rename primitives to primitives-core

* Delete cumulus-runtime

* Move stuff to client folder and rename
2021-02-10 13:07:21 +01:00
Cecile Tonglet 6438d328b8 Complete telemetry for parachain & relaychain (#301)
* Complete telemetry for parachain & relaychain

* Update Substrate & Polkadot
2021-01-29 16:02:31 +01:00
Cecile Tonglet 8c6febdd3b Update Polkadot & Substrate (#300) 2021-01-20 17:35:05 +01:00
Black3HDF 8b815c759b eliminate space (#288) 2021-01-14 17:06:57 +01:00
Bastian Köcher 182109ef5f Switch to polkadot master branch (#230)
* Switch to polkadot master branch

* Fix compilation
2020-11-09 13:05:00 +01:00
Bastian Köcher 76f9ecae47 Update Cumulus for Parachains V1 (#224)
* Start with something

* Whatever

* Update

* MOARE

* Make cumulus-network compile and tests work

* Update more and fixes

* More stuff

* More fixes

* Make collator build

* Make test almost work

* Remove contracts runtime

* More test work

* Make service compile

* Fix test-service

* Fix test client

* More fixes

* Fix collator test

* Fix network tests (again)

* Make everything compile, finally

* Fix tests

* Update to latest masters

* Remove ignore

* Switch to different branch in polkadot for now

* Update reference

* Make it compile with latest changes

* Update collator/src/lib.rs

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>

* Update to latest upstream

* Update to latest master

* Fix test

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
2020-11-08 22:18:09 +01:00
Cecile Tonglet 4d150a0199 Uniformize tests (#220)
* Initial commit

Forked at: 5bbab68f02
Parent branch: origin/master

* Copy runtime module from rococo

Forked at: 5bbab68f02
Parent branch: origin/master

* Also copy dependencies pallets and primitives

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* test-service

* Move integration test

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* Not sure what went wrong...

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* fmt

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* Remove pallet contracts (not used)

* Remove pallet parachain-info and token-dealer (not used)

* Sort dependencies alphabetically

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* CumulusTestNode for testing

* Speed up block generation

* Fix improper shutdown

* rustfmt

* runtime: replace const by storage

* Fix for previous commit

* Remove some generics

* Move generate_genesis_state to cumulus-primitives

* fmt

* Remove message_example

* fixup! Remove message_example

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* Half the solution to previous commit :(

* Revert "Fix for previous commit"

This reverts commit 60010bab6797487093ac8c790b3a536f7ca0895b.

* Revert "runtime: replace const by storage"

This reverts commit c64b3a46f0325a98922015e0cbf3570e2e431774.

Not working for some reason...

* Use helper

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* Remove test-primitives

* Revert "Half the solution to previous commit :("

This reverts commit 9a8f89f9f06252198e6405057043c6b313f1aea4.

* Revert "Revert "Half the solution to previous commit :(""

This reverts commit 6a93f0f09d74ccdc3738dd78a777c483427c03ce.

* Test with some extra extrinsics

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* WIP

Forked at: 5bbab68f02
Parent branch: origin/master

* CLEANUP

Forked at: 5bbab68f02
Parent branch: origin/master

* Remove message broker
2020-10-07 08:51:01 +00:00