Poh subsystem cleanup, genesis plumbing, enable real PoH on edge testnet (#4292)
* Remove unused PohServiceConfig::Step * Clarify variable name * Poh::hash() now takes an iteration counter * man -> max * Inline functions with single call site * Move PohServiceConfig into GenesisBlock * Add plumbing to enable real PoH on testnets * Batch hashes to improve PoH hash rate * Ensure a constant hashes_per_tick * Remove PohEntry mixin field * Poh/PohEntry no longer maintains tick_height * Ensure a constant hashes_per_tick * ci/localnet-sanity.sh: Use real PoH * Rework Poh/PohService to keep PohRecorder unlocked as much as possible while hashing
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
use crate::account::Account;
|
||||
use crate::fee_calculator::FeeCalculator;
|
||||
use crate::hash::{hash, Hash};
|
||||
use crate::poh_config::PohConfig;
|
||||
use crate::pubkey::Pubkey;
|
||||
use crate::signature::{Keypair, KeypairUtil};
|
||||
use crate::system_program;
|
||||
@@ -21,6 +22,7 @@ pub struct GenesisBlock {
|
||||
pub slots_per_epoch: u64,
|
||||
pub stakers_slot_offset: u64,
|
||||
pub ticks_per_slot: u64,
|
||||
pub poh_config: PohConfig,
|
||||
}
|
||||
|
||||
// useful for basic tests
|
||||
@@ -54,6 +56,7 @@ impl GenesisBlock {
|
||||
slots_per_epoch: DEFAULT_SLOTS_PER_EPOCH,
|
||||
stakers_slot_offset: DEFAULT_SLOTS_PER_EPOCH,
|
||||
ticks_per_slot: DEFAULT_TICKS_PER_SLOT,
|
||||
poh_config: PohConfig::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user