teminology cleanup: leader slots and voting rounds

This commit is contained in:
Greg Fitzgerald 2018-11-16 17:25:30 -07:00
parent 077d1a41f1
commit 88ddb31477
1 changed files with 17 additions and 17 deletions

View File

@ -12,12 +12,12 @@ Leader selection is decided via a random seed. The process is as follows:
1. Periodically, at a specific PoH tick count, select the signatures of the votes that made up the last supermajority
2. Concatenate the signatures
3. Hash the resulting string for `N` counts
4. The resulting hash is the random seed for `M` counts, `M` leader periods, where M > N
4. The resulting hash is the random seed for `M` counts, `M` leader slots, where M > N
## Leader Rotation
1. The leader is chosen via a random seed generated from stake weights and votes (the leader schedule)
2. The leader is rotated every `T` PoH ticks (leader period), according to the leader schedule
2. The leader is rotated every `T` PoH ticks (leader slot), according to the leader schedule
3. The schedule is applicable for `M` voting rounds
Leader's transmit for a count of `T` PoH ticks. When `T` is reached all the validators should switch to the next scheduled leader. To schedule leaders, the supermajority + `M` nodes are shuffled using the above calculated random seed.
@ -28,7 +28,7 @@ All `T` ticks must be observed from the current leader for that part of PoH to b
Forks can arise at PoH tick counts that correspond to leader rotations, because leader nodes may or may not have observed the previous leader's data. These empty ticks are generated by all nodes in the network at a network-specified rate for hashes-per-tick `Z`.
There are only two possible versions of the PoH during a voting period: PoH with `T` ticks and entries generated by the current leader, or PoH with just ticks. The "just ticks" version of the PoH can be thought of as a virtual ledger, one that all nodes in the network can derive from the last tick in the previous period.
There are only two possible versions of the PoH during a voting round: PoH with `T` ticks and entries generated by the current leader, or PoH with just ticks. The "just ticks" version of the PoH can be thought of as a virtual ledger, one that all nodes in the network can derive from the last tick in the previous slot.
Validators can ignore forks at other points (e.g. from the wrong leader), or slash the leader responsible for the fork.
@ -38,24 +38,24 @@ Validators vote on the longest chain that contains their previous vote, or a lon
#### Validator's View
##### Time Progression
The diagram below represents a validator's view of the PoH stream with possible forks over time. L1, L2, etc. are leader periods, and `E`s represent entries from that leader during that leader's period. The `x`s represent ticks only, and time flows downwards in the diagram.
The diagram below represents a validator's view of the PoH stream with possible forks over time. L1, L2, etc. are leader slots, and `E`s represent entries from that leader during that leader's slot. The `x`s represent ticks only, and time flows downwards in the diagram.
<img alt="Leader scheduler" src="img/leader-scheduler.svg" class="center"/>
Note that an `E` appearing on 2 branches at the same period is a slashable condition, so a validator observing `L3` and `L3'` can slash L3 and safely choose `x` for that period. Once a validator observes a supermajority vote on any branch, other branches can be discarded below that tick count. For any period, validators need only consider a single "has entries" chain or a "ticks only" chain.
Note that an `E` appearing on 2 branches at the same slot is a slashable condition, so a validator observing `L3` and `L3'` can slash L3 and safely choose `x` for that slot. Once a validator observes a supermajority vote on any branch, other branches can be discarded below that tick count. For any slot, validators need only consider a single "has entries" chain or a "ticks only" chain.
##### Time Division
It's useful to consider leader rotation over PoH tick count as time division of the job of encoding state for the network. The following table presents the above tree of forks as a time-divided ledger.
leader period | L1 | L2 | L3 | L4 | L5
leader slot | L1 | L2 | L3 | L4 | L5
-------|----|----|----|----|----
data | E1| E2 | E3 | E4 | E5
ticks since prev | | | | x | xx
Note that only data from leader `L3` will be accepted during leader period
`L3`. Data from `L3` may include "catchup" ticks back to a period other than
Note that only data from leader `L3` will be accepted during leader slot
`L3`. Data from `L3` may include "catchup" ticks back to a slot other than
`L2` if `L3` did not observe `L2`'s data. `L4` and `L5`'s transmissions
include the "ticks since prev" PoH entries.
@ -64,9 +64,9 @@ to the ledger for replay, restart, and checkpoints.
#### Leader's View
When a new leader begins a period, it must first transmit any PoH (ticks)
required to link the new period with the most recently observed and voted
period.
When a new leader begins a slot, it must first transmit any PoH (ticks)
required to link the new slot with the most recently observed and voted
slot.
## Examples
@ -76,7 +76,7 @@ period.
2. The larger partition `K`, with 90% of the stake weight continues to operate as
normal
3. `M` cycles through the ranks until one of them is leader, generating ticks for
periods where the leader is in `K`.
slots where the leader is in `K`.
4. `M` validators observe 10% of the vote pool, finality is not reached.
5. `M` and `K` reconnect.
6. `M` validators cancel their votes on `M`, which has not reached finality, and
@ -84,12 +84,12 @@ period.
### Leader Timeout
1. Next rank leader node `V` observes a timeout from current leader `A`, fills in
`A`'s period with virtual ticks and starts sending out entries.
`A`'s slot with virtual ticks and starts sending out entries.
2. Nodes observing both streams keep track of the forks, waiting for:
* their vote on leader `A` to expire in order to be able to vote on `B`
* a supermajority on `A`'s period
3. If the first case occurs, leader `B`'s period is filled with ticks. if the
second case occurs, A's period is filled with ticks
* a supermajority on `A`'s slot
3. If the first case occurs, leader `B`'s slot is filled with ticks. if the
second case occurs, A's slot is filled with ticks
4. Partition is resolved just like in the [Small Partition](#small-parition)
above
@ -109,7 +109,7 @@ PoH hash for validation
`N` - number of voting rounds for which a leader schedule is considered before
a new leader schedule is used
`T` - number of PoH ticks per leader period (also voting period)
`T` - number of PoH ticks per leader slot (also voting round)
`V` - name of a node that will create virtual ticks