Consensus utilities and rearchitecture for more dynamic collators (#2382)

* implement a proposer utility for consensus

* tidy up deps of new proposer crate

* implement a collator-service crate

* rewrite cumulus-collator to use new service struct

* implement a module for relay-chain-driven collators

* adapt start_collator to use the new relay_chain_driven module

* move collator-service to a public submodule

* create an interface trait for the proposer

* begin aura reimplementation

* address review comments

* update substrrate git ref

* update polkadot-primitives refs

* rough draft of aura collation using standalone fns

* add a ServiceInterface

* port aura reimpl to use new service trait

* add an import queue utility crate

* remove import queue crate in favor of module in common

* implement new verification queue for aura

* implement remaining behaviors

* split 'collate' into smaller functions that could be pub

* add telemetry

* fix doc job?

* Specify async-trait patch version

Co-authored-by: Bastian Köcher <git@kchr.de>

* remove 'fn@' in doc string.

Co-authored-by: Bastian Köcher <git@kchr.de>

* update variable names to be more readable

* refactor proposer errors to anyhow/thiserror

* remove manual span instrumentation

Co-authored-by: Bastian Köcher <git@kchr.de>

* make slot_claim private

* fix unused import

* fmt

* fmt

* make clippy happy

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
asynchronous rob
2023-05-14 14:56:05 -05:00
committed by GitHub
parent 83de3b7d61
commit 0f06804f22
13 changed files with 1267 additions and 226 deletions
+25
View File
@@ -2225,10 +2225,17 @@ name = "cumulus-client-consensus-aura"
version = "0.1.0"
dependencies = [
"async-trait",
"cumulus-client-collator",
"cumulus-client-consensus-common",
"cumulus-client-consensus-proposer",
"cumulus-primitives-core",
"cumulus-primitives-parachain-inherent",
"cumulus-relay-chain-interface",
"futures",
"parity-scale-codec",
"polkadot-node-primitives",
"polkadot-overseer",
"polkadot-primitives",
"sc-client-api",
"sc-consensus",
"sc-consensus-aura",
@@ -2244,6 +2251,8 @@ dependencies = [
"sp-inherents",
"sp-keystore",
"sp-runtime",
"sp-state-machine",
"sp-timestamp",
"substrate-prometheus-endpoint",
"tracing",
]
@@ -2268,12 +2277,28 @@ dependencies = [
"schnellru",
"sp-blockchain",
"sp-consensus",
"sp-core",
"sp-runtime",
"sp-tracing",
"sp-trie",
"substrate-prometheus-endpoint",
"tracing",
]
[[package]]
name = "cumulus-client-consensus-proposer"
version = "0.1.0"
dependencies = [
"anyhow",
"async-trait",
"cumulus-primitives-parachain-inherent",
"sp-consensus",
"sp-inherents",
"sp-runtime",
"sp-state-machine",
"thiserror",
]
[[package]]
name = "cumulus-client-consensus-relay-chain"
version = "0.1.0"