Schedule node for consecutive slots as leader (#3353)

* Also tweak epoch and slot duration

* new test for leader schedule
This commit is contained in:
Pankaj Garg
2019-03-19 06:36:45 -07:00
committed by GitHub
parent c70412d7bb
commit 56fcc93ef5
7 changed files with 158 additions and 19 deletions

View File

@ -6,8 +6,12 @@ pub const NUM_TICKS_PER_SECOND: u64 = 10;
// At 10 ticks/s, 8 ticks per slot implies that leader rotation and voting will happen
// every 800 ms. A fast voting cadence ensures faster finality and convergence
pub const DEFAULT_TICKS_PER_SLOT: u64 = 160;
pub const DEFAULT_SLOTS_PER_EPOCH: u64 = 16;
pub const DEFAULT_TICKS_PER_SLOT: u64 = 8;
// 1 Epoch = 800 * 4096 ms ~= 55 minutes
pub const DEFAULT_SLOTS_PER_EPOCH: u64 = 4096;
pub const NUM_CONSECUTIVE_LEADER_SLOTS: u64 = 8;
/// The time window of recent block hash values that the bank will track the signatures
/// of over. Once the bank discards a block hash, it will reject any transactions that use