Expand description
Mithril aggregator The Aggregator is responsible for:
- registering signers
- producing aggregate multi-signatures
- creating, storing & serving the certificate chain
- creating, storing & serving certified snapshots
This crate is divided in two parts: a HTTP server that exposes an API to communicate with signers and a Runtime that tracks the blockchain to provide signed certificates. You can find more information on how it works reading the documentation website.
Re-exports§
pub use dependency_injection::ServeCommandDependenciesContainer;
pub use services::MithrilSignerRegistrationFollower;
pub use services::MithrilSignerRegistrationLeader;
pub use services::MithrilSignerRegistrationVerifier;
pub use services::SignerRecorder;
pub use services::SignerRegisterer;
pub use services::SignerRegistrationError;
pub use services::SignerRegistrationRound;
pub use services::SignerRegistrationRoundOpener;
pub use services::SignerRegistrationVerifier;
pub use services::SignerSynchronizer;
pub use metrics::*;
Modules§
- database
- database module. This module contains the entities definition tied with database representation with their associated queries.
- dependency_
injection - Dependency injection module. This module provides tools to initialize and share resources and services amongst different threads.
- entities
- Entities module
- event_
store - Event Store module This module proposes tools to send messages between processes and how to persist them in a separate database.
- metrics
- metrics module. This module contains the aggregator metrics service.
- services
- Services
Macros§
- extract_
all - Call
extract_config
on each SubCommand so it could not be forget to implement it. All variant must be listed otherwise there is a compilation error. The associated command to the variant must be the right one otherwise there is a compilation error. - get_
dependency - Retrieve attribute stored in the builder. If not yet initialized, we instantiate it by calling the associated build function (build_<attribute_name>). If we don’t want to to use the default build function, we can pass an expression that build the value. Usage examples: get_dependency!(self.signer_registerer) get_dependency!(self.signer_registerer = self.build_signer_registerer().await?)
- unwrap_
to_ internal_ server_ error - Match the given result and do an early return with an internal server error (500) if it was an Error. Else return the unwrapped value.
Structs§
- Aggregator
Config - Configuration structure dedicated to the AggregatorRuntime.
- Aggregator
Runner - The runner responsibility is to expose a code API for the state machine. It holds services and configuration.
- Aggregator
Runtime - The AggregatorRuntime responsibility is to create a state machine to handle all actions required by the process of getting multi-signatures. See the documentation for more explanations about the Aggregator state machine.
- CExplorer
Signer Retriever - A SignersImporterRetriever fetching signers data from CExplorer.
- Default
Configuration - Default configuration with all the default values for configurations.
- Dumb
Uploader - Dummy uploader for test purposes.
- From
Register Signer Adapter - Adapter to convert RegisterSignerMessage to Signer instances.
- Main
Opts - Mithril aggregator node
- Multi
Signer Impl - MultiSignerImpl is an implementation of the MultiSigner
- Serve
Command Configuration - Serve command configuration
- Signers
Importer - Tool that can import a list of signers
- Single
Signature Authenticator - Authenticates single signatures against a signed message.
- Zstandard
Compression Parameters - Zstandard specific parameters
Enums§
- Command
Type - Identifies the type of command
- Execution
Environment - Different kinds of execution environments
- Runtime
Error - Error encountered or produced by the Runtime. This enum represents the faith of the errors produced during the state transitions.
- Snapshot
Uploader Type - Uploader needed to copy the snapshot once computed.
Traits§
- Aggregator
Runner Trait - This trait is intended to allow mocking the AggregatorRunner in tests. It exposes all the methods needed by the state machine.
- Artifact
Builder - ArtifactBuilder is trait for building an artifact
- Configuration
Source - This trait defines the configuration interface for the aggregator.
- Epoch
Settings Storer - Store and get aggregator epoch settings for given epoch.
- File
Uploader - FileUploader represents a file uploader interactor. It retries the upload operation according to the retry policy.
- Immutable
File Digest Mapper - A trait for mapping ImmutableFileNames to their digests.
- Multi
Signer - MultiSigner is the cryptographic engine in charge of producing multi signatures from individual signatures
- Protocol
Parameters Retriever - Retrieve the ProtocolParameters for the given epoch.
- Signers
Importer Persister - Trait that define how a SignersImporter persist the retrieved signers.
- Signers
Importer Retriever - Trait that define how a SignersImporter retrieve the signers to import.
- Verification
KeyStorer - Store and get signers verification keys for given epoch.