motherlode

This commit is contained in:
Hardhat Chad
2025-06-12 20:57:28 -07:00
parent 4f0d315dca
commit c35d60ff4d
5 changed files with 84 additions and 32 deletions

View File

@@ -71,7 +71,13 @@ pub const HASH_TOKEN_SUPPLY: u64 = 10_000_000;
pub const VIRTUAL_LIQUIDITY: u64 = ONE_ORE * 5;
/// The minimum difficulty required for payout.
pub const MIN_DIFFICULTY: u64 = 10;
pub const NUGGET_DIFFICULTY: u64 = 10;
/// The difficulty threshold for the motherlode payout.
pub const MOTHERLOAD_DIFFICULTY: u64 = 35;
/// The fee to open a block.
pub const OPEN_FEE: u64 = ONE_ORE / 100;
// The reward rate per satisfying hash (0.002048 ORE).
// pub const REWARD_RATE: u64 = 204_800_000;

View File

@@ -44,19 +44,22 @@ pub struct Block {
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct RewardConfig {
/// The reward paid to the submitter of the best hash.
pub best_hash_reward: u64,
pub lode_reward: u64,
/// The authority of the miner who submitted the best hash.
pub best_hash_authority: Pubkey,
pub lode_authority: Pubkey,
/// The best hash.
pub best_hash: [u8; 32],
pub lode_hash: [u8; 32],
/// The threshold difficulty for the motherlode payout.
pub motherlode_threshold: u64,
/// The reward rate paid to hashes satisfying the difficulty threshold.
pub difficulty_reward: u64,
pub nugget_reward: u64,
/// The minimum difficulty required for payout.
pub difficulty_threshold: u64,
pub nugget_threshold: u64,
}
impl Block {