ore_api/state/bus.rs
1use steel::*;
2
3use super::OreAccount;
4
5/// Bus accounts are responsible for distributing mining rewards. There are 8 busses total
6/// to minimize write-lock contention and allow Solana to process mine instructions in parallel.
7#[repr(C)]
8#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
9pub struct Bus {
10 /// The ID of the bus account.
11 pub id: u64,
12
13 /// The remaining rewards this bus has left to payout in the current epoch.
14 pub rewards: u64,
15
16 /// The rewards this bus would have paid out in the current epoch if there no limit.
17 /// This is used to calculate the updated reward rate.
18 pub theoretical_rewards: u64,
19
20 /// The largest known stake balance seen by the bus this epoch.
21 #[deprecated(since = "2.8.0", note = "Top balance is no longer tracked or used")]
22 pub top_balance: u64,
23}
24
25account!(OreAccount, Bus);