battleware_node/application/
mod.rs

1use std::num::NonZero;
2
3use crate::indexer::Indexer;
4use battleware_types::Evaluation;
5use commonware_cryptography::{
6    bls12381::primitives::{group, poly::Poly},
7    ed25519::PublicKey,
8};
9
10mod actor;
11pub use actor::Actor;
12mod ingress;
13use commonware_runtime::buffer::PoolRef;
14pub use ingress::Mailbox;
15mod mempool;
16
17/// Configuration for the application.
18pub struct Config<I: Indexer> {
19    /// Participants active in consensus.
20    pub participants: Vec<PublicKey>,
21
22    /// The unevaluated group polynomial associated with the current dealing.
23    pub polynomial: Poly<Evaluation>,
24
25    /// The share of the secret.
26    pub share: group::Share,
27
28    /// Number of messages from consensus to hold in our backlog
29    /// before blocking.
30    pub mailbox_size: usize,
31
32    /// The prefix for the partition.
33    pub partition_prefix: String,
34
35    /// The number of items per blob for the MMR.
36    pub mmr_items_per_blob: NonZero<u64>,
37
38    /// The number of items per write for the MMR.
39    pub mmr_write_buffer: NonZero<usize>,
40
41    /// The number of items per section for the log.
42    pub log_items_per_section: NonZero<u64>,
43
44    /// The number of items per write for the log.
45    pub log_write_buffer: NonZero<usize>,
46
47    /// The number of items per blob for the locations.
48    pub locations_items_per_blob: NonZero<u64>,
49
50    /// The buffer pool to use.
51    pub buffer_pool: PoolRef,
52
53    /// The indexer to upload to.
54    pub indexer: I,
55
56    /// The number of threads to use for execution.
57    pub execution_concurrency: usize,
58}