mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-19 15:10:29 +00:00
comments and tests
This commit is contained in:
@@ -7,7 +7,7 @@ use crate::{
|
||||
instruction::UpdateDifficultyArgs, loaders::*, state::Treasury, utils::AccountDeserialize,
|
||||
};
|
||||
|
||||
/// UpdateDifficulty updates the program's global difficulty value. It has 1 responsibility:
|
||||
/// UpdateDifficulty updates the program's global difficulty value. Its responsibilities include:
|
||||
/// 1. Update the difficulty.
|
||||
///
|
||||
/// Safety requirements:
|
||||
@@ -18,14 +18,14 @@ use crate::{
|
||||
/// - Ore subdivides into 1 billion indivisible atomic units. Therefore if global hashpower
|
||||
/// were to increase to the point where >1B valid hashes were submitted to the protocol for
|
||||
/// validation per epoch, the Ore inflation rate could be pushed above the 1 ORE / min target.
|
||||
/// - The strict limits on bus reward counters guarantee inflation can never exceed 2 ORE / min,
|
||||
/// - The strict limits on bus reward counters guarantee inflation can never exceed 2 ORE / min,
|
||||
/// but it is the responsibility of the admin to adjust mining difficulty if needed to maintain
|
||||
/// the 1 ORE / min target average.
|
||||
/// - It is worth noting that Solana today processes well below 1 million real TPS or
|
||||
/// - It is worth noting that Solana today processes well below 1 million real TPS or
|
||||
/// (60 * 1,000,000) = 60,000,000 transactions per minute. Even if every transaction on Solana
|
||||
/// were a mine operation, this would still be two orders of magnitude below the boundary
|
||||
/// condition where Ore inflation targets would be challenged. So in practice, Solana is likely
|
||||
/// to reach its network saturation point long before Ore ever hits its theoretical limits.
|
||||
/// were a mine operation, this would still be two orders of magnitude below the boundary
|
||||
/// condition where Ore inflation targets would be challenged. So in practice, Solana is likely
|
||||
/// to reach its network saturation point long before Ore ever hits its theoretical limits.
|
||||
pub fn process_update_difficulty<'a, 'info>(
|
||||
_program_id: &Pubkey,
|
||||
accounts: &'a [AccountInfo<'info>],
|
||||
|
||||
Reference in New Issue
Block a user