Boost v3 cutover (#118)

* steel v4

* scaffold boost v3 integration

* fix build

* enforce rotation duration

* update interface

* update deps

* bump version

* boost v3

* rsut version

* deps

* silent error

* remove version flag
This commit is contained in:
Hardhat Chad
2025-03-19 12:19:44 -05:00
committed by GitHub
parent b0145c202c
commit fa1bb1c05b
9 changed files with 405 additions and 293 deletions

View File

@@ -34,7 +34,7 @@ pub const ONE_ORE: u64 = 10u64.pow(TOKEN_DECIMALS as u32);
pub const ONE_MINUTE: i64 = 60;
/// The number of minutes in a program epoch.
pub const EPOCH_MINUTES: i64 = 5;
pub const EPOCH_MINUTES: i64 = 10;
/// The duration of a program epoch, in seconds.
pub const EPOCH_DURATION: i64 = ONE_MINUTE * EPOCH_MINUTES;

View File

@@ -56,7 +56,7 @@ pub fn mine(
authority: Pubkey,
bus: Pubkey,
solution: Solution,
boost_keys: Option<(Pubkey, Pubkey)>,
boost_keys: Option<[Pubkey; 2]>,
) -> Instruction {
let proof = proof_pda(authority).0;
let mut accounts = vec![
@@ -67,10 +67,10 @@ pub fn mine(
AccountMeta::new_readonly(sysvar::instructions::ID, false),
AccountMeta::new_readonly(sysvar::slot_hashes::ID, false),
];
if let Some((boost_address, reservation_address)) = boost_keys {
if let Some([boost_address, boost_config_address]) = boost_keys {
accounts.push(AccountMeta::new_readonly(boost_address, false));
accounts.push(AccountMeta::new(proof_pda(boost_address).0, false));
accounts.push(AccountMeta::new_readonly(reservation_address, false));
accounts.push(AccountMeta::new_readonly(boost_config_address, false));
}
Instruction {
program_id: crate::ID,