Mithril signer node
Mithril signer is responsible for producing individual signatures that are collected and aggregated by the Mithril aggregator.
-
For more information about the Mithril network, please see the architecture overview.
-
For more information about the Mithril signer node, please see this overview.
-
Check out the
Run a Mithril signer node as an SPO
guide.
Here is an updated list of all Mithril networks, including their configurations and current statuses:
Last update: 07/21/2023
- Mainnet
- Preprod
- Preview
- Sanchonet
release-mainnet
β
Information | - |
---|---|
Mithril network | release-mainnet |
Cardano network | mainnet |
Cardano magic Id | - |
Supported | Yes βοΈ |
Status | Beta π’ |
Aggregator endpoint | https://aggregator.release-mainnet.api.mithril.network/aggregator βοΈ |
Genesis verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-mainnet/genesis.vkey βοΈ |
Era reader adapter type | cardano-chain |
Era reader address | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-mainnet/era.addr βοΈ |
Era reader verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-mainnet/era.vkey βοΈ |
Build from | Latest release βοΈ |
release-preprod
β
Information | - |
---|---|
Mithril network | release-preprod π |
Cardano network | preprod |
Cardano magic Id | 1 |
Supported | Yes βοΈ |
Status | Release π’ |
Aggregator endpoint | https://aggregator.release-preprod.api.mithril.network/aggregator βοΈ |
Genesis verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-preprod/genesis.vkey βοΈ |
Era reader adapter type | cardano-chain |
Era reader address | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-preprod/era.addr βοΈ |
Era reader verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-preprod/era.vkey βοΈ |
Build from | Latest release βοΈ |
pre-release-preview
β
Information | - |
---|---|
Mithril network | pre-release-preview π |
Cardano network | preview |
Cardano magic Id | 2 |
Supported | Yes βοΈ |
Status | Pre-release π |
Aggregator endpoint | https://aggregator.pre-release-preview.api.mithril.network/aggregator βοΈ |
Genesis verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/pre-release-preview/genesis.vkey βοΈ |
Era reader adapter type | cardano-chain |
Era reader address | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/pre-release-preview/era.addr βοΈ |
Era reader verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/pre-release-preview/era.vkey βοΈ |
Build from | Latest pre-release βοΈ |
testing-preview
β
β οΈ For developers only
Information | - |
---|---|
Mithril network | testing-preview π |
Cardano network | preview |
Cardano magic Id | 2 |
Supported | Yes βοΈ |
Status | Unstable π΄ |
Aggregator endpoint | https://aggregator.testing-preview.api.mithril.network/aggregator βοΈ |
Genesis verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-preview/genesis.vkey βοΈ |
Era reader adapter type | cardano-chain |
Era reader address | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-preview/era.addr βοΈ |
Era reader verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-preview/era.vkey βοΈ |
Build from | Main branch βοΈ |
testing-sanchonet
β
β οΈ For developers only
Information | - |
---|---|
Mithril network | testing-sanchonet π |
Cardano network | sanchonet |
Cardano magic Id | 4 |
Supported | Yes βοΈ |
Status | Unstable π΄ |
Aggregator endpoint | https://aggregator.testing-sanchonet.api.mithril.network/aggregator βοΈ |
Genesis verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-sanchonet/genesis.vkey βοΈ |
Era reader adapter type | cardano-chain |
Era reader address | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-sanchonet/era.addr βοΈ |
Era reader verification key | https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/testing-sanchonet/era.vkey βοΈ |
Build from | Main branch βοΈ |
In this documentation, we use the following generic identifiers:
- YOUR_CARDANO_NETWORK You need to replace this with the name of the network that runs on your Cardano node (eg,
preprod
) - YOUR_AGGREGATOR_ENDPOINT You need to replace this with the endpoint of an aggregator that runs on the Cardano network you are targeting (eg,
https://aggregator.release-preprod.api.mithril.network/aggregator
) - YOUR_GENESIS_VERIFICATION_KEY You need to replace this with the genesis verification key URL that runs on the Cardano network you are targeting (eg,
https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration/release-preprod/genesis.vkey
) - YOUR_ERA_READER_ADAPTER_TYPE You need to replace this with the era reader adapter type used by the Mithril network you are targeting (eg,
cardano-chain
) - YOUR_ERA_READER_ADDRESS You need to replace this with the era reader address URL used by the Mithril network you are targeting (eg,
https://raw.githubusercontent.com/input-output-hk/mithril/main/address.addr
) - YOUR_ERA_READER_VERIFICATION_KEY You need to replace this with the era reader verification key URL used by the Mithril network you are targeting (eg,
https://raw.githubusercontent.com/input-output-hk/mithril/main/TEST_ONLY_era.vkey
)
Resourcesβ
Node | Source repository | Rust documentation | Docker packages |
---|---|---|---|
Mithril signer | βοΈ | βοΈ | βοΈ |
Pre-requisitesβ
-
Install the latest stable version of the correctly configured Rust toolchain.
-
Install Build Tools
build-essential
andm4
. For example, on Ubuntu/Debian/Mint, runsudo apt install build-essential m4
. -
Install OpenSSL development libraries. For example, on Ubuntu/Debian/Mint, run
apt install libssl-dev
.
Download the source fileβ
You can download the source file from GitHub (HTTPS):
git clone https://github.com/input-output-hk/mithril.git
Or (SSH):
git clone git@github.com:input-output-hk/mithril.git
Switch to the desired branch/tag:
# Replace **YOUR_BUILD_BRANCH_OR_TAG** with the appropriate branch or tag name
# Please refer to the **Build from** column of the **Mithril networks** table above
git checkout **YOUR_BUILD_BRANCH_OR_TAG**
Change the directory:
cd mithril/mithril-signer
Development testing and buildingβ
Run tests:
make test
Create the help menu:
make help
Generate the Rust documentation:
make doc
Run in debug mode with the default configuration:
make debug
Release the build and run the binaryβ
To build and run in release mode with the default configuration:
make run
Or, you can build only in release mode:
make build
Display the help menu:
./mithril-signer --help
You should see:
An implementation of a Mithril Signer
Usage: mithril-signer [OPTIONS]
Options:
-r, --run-mode <RUN_MODE>
Run Mode
[env: RUN_MODE=]
[default: dev]
-v, --verbose...
Verbosity level, add more v to increase
-c, --configuration-dir <CONFIGURATION_DIR>
Directory where the configuration file is located
[default: ./config]
--disable-digests-cache
Disable immutables digests cache
--reset-digests-cache
If set the existing immutables digests cache will be reset.
Will be ignored if set in conjunction with `--disable-digests-cache`.
--enable-metrics-server
Enable metrics HTTP server (Prometheus endpoint on /metrics)
[env: ENABLE_METRICS_SERVER=]
--metrics-server-ip <METRICS_SERVER_IP>
Metrics HTTP server IP
[env: METRICS_SERVER_IP=]
[default: 0.0.0.0]
--metrics-server-port <METRICS_SERVER_PORT>
Metrics HTTP server listening port
[env: METRICS_SERVER_PORT=]
[default: 9090]
--allow-unparsable-block
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.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
Run in release mode with the default configuration:
./mithril-signer
Run in release mode using a specific mode:
./mithril-signer -r preview
Run in release mode with a custom configuration using environment variables:
NETWORK=**YOUR_CARDANO_NETWORK** AGGREGATOR_ENDPOINT=**YOUR_AGGREGATOR_ENDPOINT** ./mithril-signer
If you wish to delve deeper and access several levels of logs from the Mithril signer, use the following:
- Add
-v
for some logs (WARN) - Add
-vv
for more logs (INFO) - Add
-vvv
for even more logs (DEBUG) - Add
-vvvv
for all logs (TRACE)
Download the pre-built binaryβ
Each Release / Pre-Release distribution comes with pre compiled binaries ready to use or wrapped in a debian package for linuxΒΉ.
You can download them from the Release / Pre-Release distribution page that depends on the Mithril Network you are targeting.
These links are available in the Build From column of the above Mithril Networks table.
ΒΉ The Linux binaries target glibc
, and have a minimum requirement of glibc 2.31
(compatible with Ubuntu 20.04
or Debian Bullseye
).
Build and run a Docker containerβ
Build a local Docker image:
make docker-build
Run a local Docker container:
make docker-run
Configuration parametersβ
The configuration parameters can be set in either of the following ways:
- In a configuration file, depending on the
--run-mode
parameter. If the runtime mode istestnet
, the file is located in./conf/testnet.json
. - The value can be overridden by an environment variable with the parameter name in uppercase.
Here is a list of the available parameters:
Parameter | Command line (long) | Command line (short) | Environment variable | Description | Default value | Example | Mandatory |
---|---|---|---|---|---|---|---|
verbose | --verbose | -v | VERBOSE | Verbosity level | - | Parsed from the number of occurrences: -v for Warning , -vv for Info , -vvv for Debug and -vvvv for Trace | βοΈ |
run_mode | --run-mode | -r | RUN_MODE | Runtime mode | dev | - | βοΈ |
cardano_cli_path | - | - | CARDANO_CLI_PATH | Cardano CLI tool path | - | cardano-cli | βοΈ |
cardano_node_socket_path | - | - | CARDANO_NODE_SOCKET_PATH | Path of the socket used by the Cardano CLI tool to communicate with the Cardano node | - | /tmp/cardano.sock | βοΈ |
db_directory | --db-directory | - | DB_DIRECTORY | Directory to snapshot from the Cardano node | /db | - | βοΈ |
network | - | - | NETWORK | Cardano network | - | testnet or mainnet or devnet | βοΈ |
network_magic | - | - | NETWORK_MAGIC | Cardano network magic number (for testnet and devnet ) | - | 1097911063 or 42 | - |
party_id | - | - | PARTY_ID | Party Id of the signer, usually the Pool Id of the SPO | - | pool1pxaqe80sqpde7902er5kf6v0c7y0sv6d5g676766v2h829fvs3x | Mandatory in pool Id declaration mode where the owner is not verified (decommissioned, only available when built with allow_skip_signer_certification feature, for test only) |
run_interval | - | - | RUN_INTERVAL | Interval between two runtime cycles in ms | - | 60000 | βοΈ |
aggregator_endpoint | - | - | AGGREGATOR_ENDPOINT | Aggregator node endpoint | - | https://aggregator.pre-release-preview.api.mithril.network/aggregator | βοΈ |
data_stores_directory | - | - | DATA_STORES_DIRECTORY | Directory to store signer data (stake, protocol initializers, ...) | - | ./mithril-signer/stores | βοΈ |
store_retention_limit | - | - | STORE_RETENTION_LIMIT | Maximum number of records in stores. If not set, no limit is set. | - | - | - |
kes_secret_key_path | - | - | KES_SECRET_KEY_PATH | Path to the Cardano KES secret key file. Mandatory in Pool Id certification mode where the owner is verified (experimental, soon to be stable & preferred mode) | - | - | - |
operational_certificate_path | - | - | OPERATIONAL_CERTIFICATE_PATH | Path to the Cardano operational certificate file. Mandatory in Pool Id certification mode where the owner is verified (experimental, soon to be stable & preferred mode) | - | - | - |
era_reader_adapter_type | --era-reader-adapter-type | - | ERA_READER_ADAPTER_TYPE | Era reader adapter type that can be cardano-chain , file or bootstrap . | bootstrap | - | - |
era_reader_adapter_params | --era-reader-adapter-params | - | ERA_READER_ADAPTER_PARAMS | Era reader adapter params that is an optional JSON encoded parameters structure that is expected depending on the era_reader_adapter_type parameter | - | - | - |
enable_metrics_server | --enable-metrics-server | - | ENABLE_METRICS_SERVER | Enable metrics HTTP server (Prometheus endpoint on /metrics) | false | - | - |
metrics_server_ip | --metrics-server-ip | - | METRICS_SERVER_IP | Metrics HTTP server IP | 0.0.0.0 | - | - |
metrics_server_port | --metrics-server-port | - | METRICS_SERVER_PORT | Metrics HTTP server listening port | 9090 | - | - |
allow_unparsable_block | --allow-unparsable-block | - | ALLOW_UNPARSABLE_BLOCK | 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. | false | - | - |
enable_transaction_pruning | - | - | ENABLE_TRANSACTION_PRUNING | If set, the signer will prune the cardano transactions in database older than the [network_security_parameter] | |||
network_security_parameter | - | - | NETWORK_SECURITY_PARAMETER | Also known as k , it defines the number of blocks that are required for the blockchain to be considered final, preventing any further rollback [default: 2160] . | 2160 | - | - |
preload_security_parameter | - | - | PRELOAD_SECURITY_PARAMETER | Blocks offset, from the tip of the chain, to exclude during the cardano transactions preload [default: 3000] . | 3000 | - | - |
transactions_import_block_chunk_size | - | - | TRANSACTIONS_IMPORT_BLOCK_CHUNK_SIZE | Chunk size for importing transactions, combined with transaction pruning it reduces the storage footprint of the signer by reducing the number of transactions stored on disk at any given time. | 1500 | - | - |
cardano_transactions_block_streamer_max_roll_forwards_per_poll | - | - | CARDANO_TRANSACTIONS_BLOCK_STREAMER_MAX_ROLL_FORWARDS_PER_POLL | The maximum number of roll forwards during a poll of the block streamer when importing transactions. | 1000 | - | - |
preloading_refresh_interval_in_seconds | --preloading-refresh-interval-in-seconds | - | PRELOADING_REFRESH_INTERVAL_IN_SECONDS | The preloading refresh interval in seconds. | 7200 | - | - |