pub struct SingleDiskFarmOptions<'a, NC>where
NC: Clone,{Show 16 fields
pub directory: PathBuf,
pub farmer_app_info: FarmerAppInfo,
pub allocated_space: u64,
pub max_pieces_in_sector: u16,
pub node_client: NC,
pub reward_address: Address,
pub plotter: Arc<dyn Plotter + Send + Sync>,
pub erasure_coding: ErasureCoding,
pub cache_percentage: u8,
pub farming_thread_pool_size: usize,
pub plotting_delay: Option<Receiver<()>>,
pub global_mutex: Arc<Mutex<()>>,
pub max_plotting_sectors_per_farm: NonZeroUsize,
pub disable_farm_locking: bool,
pub registry: Option<&'a Mutex<&'a mut Registry>>,
pub create: bool,
}Expand description
Options used to open single disk farm
Fields§
§directory: PathBufPath to directory where farm is stored.
farmer_app_info: FarmerAppInfoInformation necessary for farmer application
allocated_space: u64The amount of space in bytes that was allocated
max_pieces_in_sector: u16How many pieces one sector is supposed to contain (max)
node_client: NCRPC client connected to the node
reward_address: AddressAddress where farming rewards should go
plotter: Arc<dyn Plotter + Send + Sync>Plotter
erasure_coding: ErasureCodingErasure coding instance to use.
cache_percentage: u8Percentage of allocated space dedicated for caching purposes
farming_thread_pool_size: usizeThread pool size used for farming (mostly for blocking I/O, but also for some compute-intensive operations during proving)
plotting_delay: Option<Receiver<()>>Notification for plotter to start, can be used to delay plotting until some initialization has happened externally
global_mutex: Arc<Mutex<()>>Global mutex that can restrict concurrency of resource-intensive operations and make sure that those operations that are very sensitive (like proving) have all the resources available to them for the highest probability of success
max_plotting_sectors_per_farm: NonZeroUsizeHow many sectors a will be plotted concurrently per farm
disable_farm_locking: boolDisable farm locking, for example if file system doesn’t support it
registry: Option<&'a Mutex<&'a mut Registry>>Prometheus registry
create: boolWhether to create a farm if it doesn’t yet exist
Trait Implementations§
Auto Trait Implementations§
impl<'a, NC> Freeze for SingleDiskFarmOptions<'a, NC>where
NC: Freeze,
impl<'a, NC> !RefUnwindSafe for SingleDiskFarmOptions<'a, NC>
impl<'a, NC> Send for SingleDiskFarmOptions<'a, NC>where
NC: Send,
impl<'a, NC> Sync for SingleDiskFarmOptions<'a, NC>where
NC: Sync,
impl<'a, NC> Unpin for SingleDiskFarmOptions<'a, NC>where
NC: Unpin,
impl<'a, NC> !UnwindSafe for SingleDiskFarmOptions<'a, NC>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more