Return relay_parent as result of collation seconded signal as well (#3577)

* Return `relay_parent` as result of collation seconded signal as well

Before we only returned the seconded statement. However, to verify the
statement in a future proof way, we also need the relay parent that was
used as a context to sign the statement.

* FMT
This commit is contained in:
Bastian Köcher
2021-08-05 16:26:02 +02:00
committed by GitHub
parent 49a46f78d3
commit fe5c303893
5 changed files with 25 additions and 14 deletions
@@ -35,8 +35,8 @@ use polkadot_node_network_protocol::{
use polkadot_node_primitives::{
approval::{BlockApprovalMeta, IndirectAssignmentCert, IndirectSignedApprovalVote},
AvailableData, BabeEpoch, BlockWeight, CandidateVotes, CollationGenerationConfig,
DisputeMessage, ErasureChunk, PoV, SignedDisputeStatement, SignedFullStatement,
ValidationResult,
CollationSecondedSignal, DisputeMessage, ErasureChunk, PoV, SignedDisputeStatement,
SignedFullStatement, ValidationResult,
};
use polkadot_primitives::v1::{
AuthorityDiscoveryId, BackedCandidate, BlockNumber, CandidateDescriptor, CandidateEvent,
@@ -158,7 +158,7 @@ pub enum CollatorProtocolMessage {
///
/// The result sender should be informed when at least one parachain validator seconded the collation. It is also
/// completely okay to just drop the sender.
DistributeCollation(CandidateReceipt, PoV, Option<oneshot::Sender<SignedFullStatement>>),
DistributeCollation(CandidateReceipt, PoV, Option<oneshot::Sender<CollationSecondedSignal>>),
/// Report a collator as having provided an invalid collation. This should lead to disconnect
/// and blacklist of the collator.
ReportCollator(CollatorId),