block based sha256 mining

This commit is contained in:
Hardhat Chad
2025-05-10 10:36:37 -07:00
parent 3492feef67
commit ae53d0e829
7 changed files with 136 additions and 896 deletions

View File

@@ -1,9 +1,7 @@
mod bus;
mod config;
mod proof;
mod treasury;
pub use bus::*;
pub use config::*;
pub use proof::*;
pub use treasury::*;
@@ -15,17 +13,11 @@ use crate::consts::*;
#[repr(u8)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, IntoPrimitive, TryFromPrimitive)]
pub enum OreAccount {
Bus = 100,
Config = 101,
Proof = 102,
Treasury = 103,
}
/// Fetch the PDA of a bus account.
pub fn bus_pda(id: u8) -> (Pubkey, u8) {
Pubkey::find_program_address(&[BUS, &[id]], &crate::id())
}
/// Derive the PDA of the config account.
pub fn config_pda() -> (Pubkey, u8) {
Pubkey::find_program_address(&[CONFIG], &crate::id())