pub trait ConfigurationSource {
Show 52 methods
// Required method
fn environment(&self) -> ExecutionEnvironment;
// Provided methods
fn cardano_cli_path(&self) -> PathBuf { ... }
fn cardano_node_socket_path(&self) -> PathBuf { ... }
fn cardano_node_version(&self) -> String { ... }
fn network_magic(&self) -> Option<u64> { ... }
fn network(&self) -> String { ... }
fn chain_observer_type(&self) -> ChainObserverType { ... }
fn protocol_parameters(&self) -> ProtocolParameters { ... }
fn snapshot_uploader_type(&self) -> SnapshotUploaderType { ... }
fn snapshot_bucket_name(&self) -> Option<String> { ... }
fn snapshot_use_cdn_domain(&self) -> bool { ... }
fn server_ip(&self) -> String { ... }
fn server_port(&self) -> u16 { ... }
fn public_server_url(&self) -> Option<String> { ... }
fn run_interval(&self) -> u64 { ... }
fn db_directory(&self) -> PathBuf { ... }
fn snapshot_directory(&self) -> PathBuf { ... }
fn data_stores_directory(&self) -> PathBuf { ... }
fn genesis_verification_key(&self) -> HexEncodedGenesisVerificationKey { ... }
fn reset_digests_cache(&self) -> bool { ... }
fn disable_digests_cache(&self) -> bool { ... }
fn store_retention_limit(&self) -> Option<usize> { ... }
fn era_reader_adapter_type(&self) -> EraReaderAdapterType { ... }
fn era_reader_adapter_params(&self) -> Option<String> { ... }
fn ancillary_files_signer_config(&self) -> AncillaryFilesSignerConfig { ... }
fn signed_entity_types(&self) -> Option<String> { ... }
fn snapshot_compression_algorithm(&self) -> CompressionAlgorithm { ... }
fn zstandard_parameters(&self) -> Option<ZstandardCompressionParameters> { ... }
fn cexplorer_pools_url(&self) -> Option<String> { ... }
fn signer_importer_run_interval(&self) -> u64 { ... }
fn allow_unparsable_block(&self) -> bool { ... }
fn cardano_transactions_prover_cache_pool_size(&self) -> usize { ... }
fn cardano_transactions_database_connection_pool_size(&self) -> usize { ... }
fn cardano_transactions_signing_config(
&self,
) -> CardanoTransactionsSigningConfig { ... }
fn cardano_transactions_prover_max_hashes_allowed_by_request(&self) -> usize { ... }
fn cardano_transactions_block_streamer_max_roll_forwards_per_poll(
&self,
) -> usize { ... }
fn enable_metrics_server(&self) -> bool { ... }
fn metrics_server_ip(&self) -> String { ... }
fn metrics_server_port(&self) -> u16 { ... }
fn persist_usage_report_interval_in_seconds(&self) -> u64 { ... }
fn leader_aggregator_endpoint(&self) -> Option<String> { ... }
fn custom_origin_tag_white_list(&self) -> Option<String> { ... }
fn get_server_url(&self) -> StdResult<SanitizedUrlWithTrailingSlash> { ... }
fn get_network(&self) -> StdResult<CardanoNetwork> { ... }
fn get_sqlite_dir(&self) -> PathBuf { ... }
fn get_snapshot_dir(&self) -> StdResult<PathBuf> { ... }
fn safe_epoch_retention_limit(&self) -> Option<u64> { ... }
fn compute_allowed_signed_entity_types_discriminants(
&self,
) -> StdResult<BTreeSet<SignedEntityTypeDiscriminants>> { ... }
fn allow_http_serve_directory(&self) -> bool { ... }
fn get_epoch_settings_configuration(&self) -> AggregatorEpochSettings { ... }
fn is_follower_aggregator(&self) -> bool { ... }
fn compute_origin_tag_white_list(&self) -> HashSet<String> { ... }
}
Expand description
This trait defines the configuration interface for the aggregator.
By default, each function panics if not overridden, forcing concrete configuration implementations to explicitly provide the necessary values.
Required Methods§
Sourcefn environment(&self) -> ExecutionEnvironment
fn environment(&self) -> ExecutionEnvironment
What kind of runtime environment the configuration is meant to.
Provided Methods§
Sourcefn cardano_cli_path(&self) -> PathBuf
fn cardano_cli_path(&self) -> PathBuf
Cardano CLI tool path
Sourcefn cardano_node_socket_path(&self) -> PathBuf
fn cardano_node_socket_path(&self) -> PathBuf
Path of the socket used by the Cardano CLI tool to communicate with the Cardano node
Sourcefn cardano_node_version(&self) -> String
fn cardano_node_version(&self) -> String
Cardano node version.
NOTE: This cannot be verified for now (see this issue). This is why it has to be manually given to the Aggregator
Sourcefn network_magic(&self) -> Option<u64>
fn network_magic(&self) -> Option<u64>
Cardano Network Magic number
useful for TestNet & DevNet
Sourcefn chain_observer_type(&self) -> ChainObserverType
fn chain_observer_type(&self) -> ChainObserverType
Cardano chain observer type
Sourcefn protocol_parameters(&self) -> ProtocolParameters
fn protocol_parameters(&self) -> ProtocolParameters
Protocol parameters
Sourcefn snapshot_uploader_type(&self) -> SnapshotUploaderType
fn snapshot_uploader_type(&self) -> SnapshotUploaderType
Type of snapshot uploader to use
Sourcefn snapshot_bucket_name(&self) -> Option<String>
fn snapshot_bucket_name(&self) -> Option<String>
Bucket name where the snapshots are stored if snapshot_uploader_type is Gcp
Sourcefn snapshot_use_cdn_domain(&self) -> bool
fn snapshot_use_cdn_domain(&self) -> bool
Use CDN domain to construct snapshot urls if snapshot_uploader_type is Gcp
Sourcefn server_port(&self) -> u16
fn server_port(&self) -> u16
Server listening port
Sourcefn public_server_url(&self) -> Option<String>
fn public_server_url(&self) -> Option<String>
Server URL that can be accessed from the outside
Sourcefn run_interval(&self) -> u64
fn run_interval(&self) -> u64
Run Interval is the interval between two runtime cycles in ms
Sourcefn db_directory(&self) -> PathBuf
fn db_directory(&self) -> PathBuf
Directory of the Cardano node store.
Sourcefn snapshot_directory(&self) -> PathBuf
fn snapshot_directory(&self) -> PathBuf
Directory to store snapshot
Sourcefn data_stores_directory(&self) -> PathBuf
fn data_stores_directory(&self) -> PathBuf
Directory to store aggregator databases
Sourcefn genesis_verification_key(&self) -> HexEncodedGenesisVerificationKey
fn genesis_verification_key(&self) -> HexEncodedGenesisVerificationKey
Genesis verification key
Sourcefn reset_digests_cache(&self) -> bool
fn reset_digests_cache(&self) -> bool
Should the immutable cache be reset or not
Sourcefn disable_digests_cache(&self) -> bool
fn disable_digests_cache(&self) -> bool
Use the digest caching strategy
Sourcefn store_retention_limit(&self) -> Option<usize>
fn store_retention_limit(&self) -> Option<usize>
Max number of records in stores. When new records are added, oldest records are automatically deleted so there can always be at max the number of records specified by this setting.
Sourcefn era_reader_adapter_type(&self) -> EraReaderAdapterType
fn era_reader_adapter_type(&self) -> EraReaderAdapterType
Era reader adapter type
Sourcefn era_reader_adapter_params(&self) -> Option<String>
fn era_reader_adapter_params(&self) -> Option<String>
Era reader adapter parameters
Sourcefn ancillary_files_signer_config(&self) -> AncillaryFilesSignerConfig
fn ancillary_files_signer_config(&self) -> AncillaryFilesSignerConfig
Configuration of the ancillary files signer
IMPORTANT: The cryptographic scheme used is ED25519
Sourcefn signed_entity_types(&self) -> Option<String>
fn signed_entity_types(&self) -> Option<String>
Signed entity types parameters (discriminants names in an ordered, case-sensitive, comma separated list).
The values MithrilStakeDistribution
and CardanoImmutableFilesFull
are prepended
automatically to the list.
Sourcefn snapshot_compression_algorithm(&self) -> CompressionAlgorithm
fn snapshot_compression_algorithm(&self) -> CompressionAlgorithm
Compression algorithm used for the snapshot archive artifacts.
Sourcefn zstandard_parameters(&self) -> Option<ZstandardCompressionParameters>
fn zstandard_parameters(&self) -> Option<ZstandardCompressionParameters>
Specific parameters when CompressionAlgorithm is set to zstandard.
Sourcefn cexplorer_pools_url(&self) -> Option<String>
fn cexplorer_pools_url(&self) -> Option<String>
Url to CExplorer list of pools to import as signer in the database.
Sourcefn signer_importer_run_interval(&self) -> u64
fn signer_importer_run_interval(&self) -> u64
Time interval at which the signers in cexplorer_pools_url
will be imported (in minutes).
Sourcefn allow_unparsable_block(&self) -> bool
fn allow_unparsable_block(&self) -> bool
If set no error is returned in case of unparsable block and an error log is written instead.
Will be ignored on (pre)production networks.
Sourcefn cardano_transactions_prover_cache_pool_size(&self) -> usize
fn cardano_transactions_prover_cache_pool_size(&self) -> usize
Cardano transactions prover cache pool size
Sourcefn cardano_transactions_database_connection_pool_size(&self) -> usize
fn cardano_transactions_database_connection_pool_size(&self) -> usize
Cardano transactions database connection pool size
Sourcefn cardano_transactions_signing_config(
&self,
) -> CardanoTransactionsSigningConfig
fn cardano_transactions_signing_config( &self, ) -> CardanoTransactionsSigningConfig
Cardano transactions signing configuration
Sourcefn cardano_transactions_prover_max_hashes_allowed_by_request(&self) -> usize
fn cardano_transactions_prover_max_hashes_allowed_by_request(&self) -> usize
Maximum number of transactions hashes allowed by request to the prover of the Cardano transactions
Sourcefn cardano_transactions_block_streamer_max_roll_forwards_per_poll(
&self,
) -> usize
fn cardano_transactions_block_streamer_max_roll_forwards_per_poll( &self, ) -> usize
The maximum number of roll forwards during a poll of the block streamer when importing transactions.
Sourcefn enable_metrics_server(&self) -> bool
fn enable_metrics_server(&self) -> bool
Enable metrics server (Prometheus endpoint on /metrics).
Sourcefn metrics_server_ip(&self) -> String
fn metrics_server_ip(&self) -> String
Metrics HTTP Server IP.
Sourcefn metrics_server_port(&self) -> u16
fn metrics_server_port(&self) -> u16
Metrics HTTP Server listening port.
Sourcefn persist_usage_report_interval_in_seconds(&self) -> u64
fn persist_usage_report_interval_in_seconds(&self) -> u64
Time interval at which usage metrics are persisted in event database (in seconds).
Sourcefn leader_aggregator_endpoint(&self) -> Option<String>
fn leader_aggregator_endpoint(&self) -> Option<String>
Leader aggregator endpoint
This is the endpoint of the aggregator that will be used to fetch the latest epoch settings and store the signer registrations when the aggregator is running in a follower mode. If this is not set, the aggregator will run in a leader mode.
Sourcefn custom_origin_tag_white_list(&self) -> Option<String>
fn custom_origin_tag_white_list(&self) -> Option<String>
Custom origin tag of client request added to the whitelist (comma separated list).
Sourcefn get_server_url(&self) -> StdResult<SanitizedUrlWithTrailingSlash>
fn get_server_url(&self) -> StdResult<SanitizedUrlWithTrailingSlash>
Get the server URL.
Sourcefn get_network(&self) -> StdResult<CardanoNetwork>
fn get_network(&self) -> StdResult<CardanoNetwork>
Get a representation of the Cardano network.
Sourcefn get_sqlite_dir(&self) -> PathBuf
fn get_sqlite_dir(&self) -> PathBuf
Get the directory of the SQLite stores.
Sourcefn get_snapshot_dir(&self) -> StdResult<PathBuf>
fn get_snapshot_dir(&self) -> StdResult<PathBuf>
Get the snapshots directory.
Sourcefn safe_epoch_retention_limit(&self) -> Option<u64>
fn safe_epoch_retention_limit(&self) -> Option<u64>
Get the safe epoch retention limit.
Sourcefn compute_allowed_signed_entity_types_discriminants(
&self,
) -> StdResult<BTreeSet<SignedEntityTypeDiscriminants>>
fn compute_allowed_signed_entity_types_discriminants( &self, ) -> StdResult<BTreeSet<SignedEntityTypeDiscriminants>>
Compute the list of signed entity discriminants that are allowed to be processed.
Sourcefn allow_http_serve_directory(&self) -> bool
fn allow_http_serve_directory(&self) -> bool
Check if the HTTP server can serve static directories.
Sourcefn get_epoch_settings_configuration(&self) -> AggregatorEpochSettings
fn get_epoch_settings_configuration(&self) -> AggregatorEpochSettings
Infer the AggregatorEpochSettings from the configuration.
Sourcefn is_follower_aggregator(&self) -> bool
fn is_follower_aggregator(&self) -> bool
Check if the aggregator is running in follower mode.
Sourcefn compute_origin_tag_white_list(&self) -> HashSet<String>
fn compute_origin_tag_white_list(&self) -> HashSet<String>
White list for origin client request.