mithril_signer/
lib.rs

1#![warn(missing_docs)]
2//! Mithril Signer crate documentation
3//!
4//! This crate is used by Cardano nodes to participate to Mithril signatures.
5//! It proposes tools to communicate with Mithril aggregators and to issue Single Signatures.
6//! See the [Mithril documentation](https://mithril.network/doc/manual/developer-docs/nodes/mithril-signer)
7//! for more information on how it works.
8
9mod commands;
10mod configuration;
11pub mod database;
12pub mod dependency_injection;
13pub mod entities;
14mod message_adapters;
15pub mod metrics;
16mod runtime;
17pub mod services;
18pub mod store;
19
20pub use commands::*;
21pub use configuration::{Configuration, DefaultConfiguration};
22pub use entities::SignerEpochSettings;
23pub use message_adapters::{FromEpochSettingsAdapter, ToRegisterSignerMessageAdapter};
24pub use metrics::*;
25pub use runtime::*;
26
27/// HTTP request timeout duration in milliseconds
28const HTTP_REQUEST_TIMEOUT_DURATION: u64 = 30000;
29
30/// SQLite file names
31const SQLITE_FILE: &str = "signer.sqlite3";
32const SQLITE_FILE_CARDANO_TRANSACTION: &str = "cardano-transaction.sqlite3";
33
34// Memory allocator (to handle properly memory fragmentation)
35#[cfg(all(not(target_env = "msvc"), feature = "jemallocator"))]
36use tikv_jemallocator::Jemalloc;
37
38#[cfg(all(not(target_env = "msvc"), feature = "jemallocator"))]
39#[global_allocator]
40static GLOBAL: Jemalloc = Jemalloc;
41
42#[cfg(test)]
43pub(crate) mod test_tools {
44    mithril_common::define_test_logger!();
45}