Approval types (#2111)

* start approval types

* doc

* finish basic types

* add debug and codec impls to approval types

* grumbles

* remove unused AssignmentId

* remove aux-schema file
This commit is contained in:
Robert Habermeier
2020-12-15 15:53:17 -06:00
committed by GitHub
parent 5c605e150b
commit 33da3f5128
5 changed files with 109 additions and 36 deletions
@@ -98,40 +98,4 @@ struct CheckedAssignmentCert {
```rust
type DelayTranche = u32;
```
## RelayVRFStory
Assignment criteria are based off of possible stories about the relay-chain block that included the candidate. More information on stories is available in [the informational page on approvals.](../protocol-approval.md#stories).
```rust
/// A story based on the VRF that authorized the relay-chain block where the candidate was
/// included.
///
/// VRF Context is "A&V RC-VRF"
struct RelayVRFStory(VRFInOut);
```
## RelayEquivocationStory
```rust
/// A story based on the candidate hash itself. Should be used when a candidate is an
/// equivocation: when there are two relay-chain blocks with the same RelayVRFStory, but only
/// one contains the candidate.
///
/// VRF Context is "A&V RC-EQUIV"
struct RelayEquivocationStory(Hash);
```
## ExecutionTimePair
```rust
struct ExecutionTimePair {
// The absolute time in milliseconds that the validator claims to have taken
// with the block.
absolute: u32,
// The validator's believed ratio in execution time to the average, expressed as a fixed-point
// 16-bit unsigned integer with 8 bits before and after the point.
ratio: FixedU16,
}
```