pub struct Config {
pub solution_set_failures_to_keep: u32,
pub solution_set_attempts_per_block: NonZero<u32>,
pub parallel_chunk_size: NonZero<usize>,
pub check: Arc<CheckPredicateConfig>,
pub contract_registry: PredicateAddress,
pub program_registry: PredicateAddress,
pub block_state: PredicateAddress,
}
Expand description
Block building configuration.
Fields§
§solution_set_failures_to_keep: u32
The maximum number of solution set failures to keep in the DB, used to provide feedback to the submitters.
Defaults to Config::DEFAULT_SOLUTION_SET_FAILURE_KEEP_LIMIT
.
solution_set_attempts_per_block: NonZero<u32>
The maximum number of solution sets to attempt to check and include in a block.
Defaults to Config::DEFAULT_SOLUTION_SET_ATTEMPTS_PER_BLOCK
.
parallel_chunk_size: NonZero<usize>
The number of sequential solution sets to attempt to check in parallel at a time.
If greater than solution_set_attempts_per_block
, the solution_set_attempts_per_block
is used instead.
If unspecified, uses num_cpus::get()
.
check: Arc<CheckPredicateConfig>
Configuration required by check::solution::check_set_predicates
.
Wrapped in an Arc
as this is shared between tasks.
contract_registry: PredicateAddress
The address of the big bang contract registry contract and its predicate.
program_registry: PredicateAddress
The address of the big bang program registry contract and its predicate.
block_state: PredicateAddress
The address of the big bang block state contract and its predicate.
Implementations§
Source§impl Config
impl Config
Sourcepub const DEFAULT_SOLUTION_SET_FAILURE_KEEP_LIMIT: u32 = 10_000u32
pub const DEFAULT_SOLUTION_SET_FAILURE_KEEP_LIMIT: u32 = 10_000u32
The default number of solution set failures that the builder will retain in its DB.
Sourcepub const DEFAULT_SOLUTION_SET_ATTEMPTS_PER_BLOCK: u32 = 10_000u32
pub const DEFAULT_SOLUTION_SET_ATTEMPTS_PER_BLOCK: u32 = 10_000u32
The default max number of solution sets to attempt to check and include in a block.
Sourcepub fn default_parallel_chunk_size() -> NonZero<usize>
pub fn default_parallel_chunk_size() -> NonZero<usize>
The default number of sequential solution sets to attempt to check in parallel.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.