Skip to content
Snippets Groups Projects
Commit 956bc300 authored by asynchronous rob's avatar asynchronous rob Committed by GitHub
Browse files

Approval voting guide changes (#2347)

* grab guide updates from approval-voting branch

* focus on control flow and behavior, not functions

* add approval voting preamble info

* tabs -> spaces
parent 29f12f3f
No related merge requests found
...@@ -5,11 +5,11 @@ Yields a vector of events concerning candidates that occurred within the given b ...@@ -5,11 +5,11 @@ Yields a vector of events concerning candidates that occurred within the given b
```rust ```rust
enum CandidateEvent { enum CandidateEvent {
/// This candidate receipt was backed in the most recent block. /// This candidate receipt was backed in the most recent block.
CandidateBacked(CandidateReceipt, HeadData), CandidateBacked(CandidateReceipt, HeadData, CoreIndex, GroupIndex),
/// This candidate receipt was included and became a parablock at the most recent block. /// This candidate receipt was included and became a parablock at the most recent block.
CandidateIncluded(CandidateReceipt, HeadData), CandidateIncluded(CandidateReceipt, HeadData, CoreIndex, GroupIndex),
/// This candidate receipt was not made available in time and timed out. /// This candidate receipt was not made available in time and timed out.
CandidateTimedOut(CandidateReceipt, HeadData), CandidateTimedOut(CandidateReceipt, HeadData, CoreIndex),
} }
fn candidate_events(at: Block) -> Vec<CandidateEvent>; fn candidate_events(at: Block) -> Vec<CandidateEvent>;
......
...@@ -20,6 +20,7 @@ struct CandidatePendingAvailability { ...@@ -20,6 +20,7 @@ struct CandidatePendingAvailability {
relay_parent_number: BlockNumber, // number of the relay-parent. relay_parent_number: BlockNumber, // number of the relay-parent.
backers: Bitfield, // one bit per validator, set for those who backed the candidate. backers: Bitfield, // one bit per validator, set for those who backed the candidate.
backed_in_number: BlockNumber, backed_in_number: BlockNumber,
backing_group: GroupIndex,
} }
``` ```
......
...@@ -63,6 +63,7 @@ enum ApprovalVotingMessage { ...@@ -63,6 +63,7 @@ enum ApprovalVotingMessage {
/// Should not be sent unless the block hash is known. /// Should not be sent unless the block hash is known.
CheckAndImportAssignment( CheckAndImportAssignment(
IndirectAssignmentCert, IndirectAssignmentCert,
CandidateIndex, // The index of the candidate included in the block.
ResponseChannel<AssignmentCheckResult>, ResponseChannel<AssignmentCheckResult>,
), ),
/// Check if the approval vote is valid and can be accepted by our view of the /// Check if the approval vote is valid and can be accepted by our view of the
...@@ -509,6 +510,8 @@ enum RuntimeApiRequest { ...@@ -509,6 +510,8 @@ enum RuntimeApiRequest {
/// Get the contents of all channels addressed to the given recipient. Channels that have no /// Get the contents of all channels addressed to the given recipient. Channels that have no
/// messages in them are also included. /// messages in them are also included.
InboundHrmpChannelsContents(ParaId, ResponseChannel<BTreeMap<ParaId, Vec<InboundHrmpMessage<BlockNumber>>>>), InboundHrmpChannelsContents(ParaId, ResponseChannel<BTreeMap<ParaId, Vec<InboundHrmpMessage<BlockNumber>>>>),
/// Get information about the BABE epoch this block was produced in.
BabeEpoch(ResponseChannel<BabeEpoch>),
} }
enum RuntimeApiMessage { enum RuntimeApiMessage {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment