Crate mithril_aggregator

Source
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::DependencyContainer;
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§

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§

AggregatorConfig
Configuration structure dedicated to the AggregatorRuntime.
AggregatorRunner
The runner responsibility is to expose a code API for the state machine. It holds services and configuration.
AggregatorRuntime
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.
CExplorerSignerRetriever
A SignersImporterRetriever fetching signers data from CExplorer.
Configuration
Aggregator configuration
DefaultConfiguration
Default configuration with all the default values for configurations.
DumbUploader
Dummy uploader for test purposes.
FromRegisterSignerAdapter
Adapter to convert RegisterSignerMessage to Signer instances.
MainOpts
Mithril Aggregator Node
MultiSignerImpl
MultiSignerImpl is an implementation of the MultiSigner
SignersImporter
Tool that can import a list of signers
SingleSignatureAuthenticator
Authenticates single signatures against a signed message.
ZstandardCompressionParameters
Zstandard specific parameters

Enums§

CommandType
Identifies the type of command
ExecutionEnvironment
Different kinds of execution environments
RuntimeError
Error encountered or produced by the Runtime. This enum represents the faith of the errors produced during the state transitions.
SnapshotUploaderType
Uploader needed to copy the snapshot once computed.

Traits§

AggregatorRunnerTrait
This trait is intended to allow mocking the AggregatorRunner in tests. It exposes all the methods needed by the state machine.
ArtifactBuilder
ArtifactBuilder is trait for building an artifact
EpochSettingsStorer
Store and get aggregator epoch settings for given epoch.
FileUploader
FileUploader represents a file uploader interactor. It retries the upload operation according to the retry policy.
ImmutableFileDigestMapper
A trait for mapping ImmutableFileNames to their digests.
MultiSigner
MultiSigner is the cryptographic engine in charge of producing multi signatures from individual signatures
SignersImporterPersister
Trait that define how a SignersImporter persist the retrieved signers.
SignersImporterRetriever
Trait that define how a SignersImporter retrieve the signers to import.
VerificationKeyStorer
Store and get signers verification keys for given epoch.