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::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§

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.
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
ServeCommandConfiguration
Serve command configuration
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
ConfigurationSource
This trait defines the configuration interface for the aggregator.
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
ProtocolParametersRetriever
Retrieve the ProtocolParameters for the given epoch.
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.