Repository navigation
feat(setup): guess mithril signer and dmq params for mithril setup command - #3738
Merged
turmelclem merged 12 commits intoDec 3, 2026
Conversation
turmelclem
requested review from
Alenar,
damrobi and
jpraynaud
as code owners
December 1, 2026 10:52
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Approval is blocked by an unresolved critical public API break, along with a moderate malformed-input handling flaw and a guideline violation.
3 open issues
What changed in this PR
This PR introduces the pure guessing foundations for mithril-setup, adding Cardano, DMQ, Mithril network, reader configuration, and signer runtime-default mappings while embedding required repository configuration at build time without changing setup behavior.
Changes:
- Added network models, environment classification, Mithril metadata parsing, and signer runtime defaults.
- Moved
CardanoNetworkinto the guessing module and updated Cardano discovery to use it. - Added build-time embedding and Nix source-filter support for network and reader configuration files.
| File | Description |
|---|---|
| mithril-setup/src/lib.rs | Exposes the new guessing module. |
| mithril-setup/src/guessing/signer_runtime_defaults.rs | Defines signer runtime defaults for each Cardano network. |
| mithril-setup/src/guessing/mod.rs | Declares and re-exports the guessing components. |
| mithril-setup/src/guessing/mithril_networks.rs | Parses embedded Mithril network metadata and reader configuration. |
| mithril-setup/src/guessing/mithril_environment.rs | Classifies Mithril networks by environment. |
| mithril-setup/src/guessing/dmq_network.rs | Maps Cardano networks to their DMQ networks and magic values. |
| mithril-setup/src/guessing/cardano_network.rs | Defines Cardano network identification and network magic mappings. |
| mithril-setup/src/discovery/cardano/node_files/shelley_genesis.rs | Uses the shared guessing Cardano network type when parsing Shelley genesis data. |
| mithril-setup/src/discovery/cardano/node_files/mod.rs | Adjusts node-file module visibility after moving the Cardano network type. |
| mithril-setup/src/discovery/cardano/discovery.rs | Updates discovered Cardano facts to use the shared guessing network type. |
| mithril-setup/src/discovery/cardano/discoverer/node_files_facts.rs | Updates discovery logic and tests for the relocated Cardano network type. |
| mithril-setup/src/discovery/cardano/discoverer/mod.rs | Updates discovery tests to import the shared Cardano network type. |
| mithril-setup/Cargo.toml | Adds build dependencies and disables publication for the repository-dependent crate. |
| mithril-setup/build.rs | Embeds Mithril network metadata and reader configuration files during compilation. |
| flake.nix | Includes the network and reader configuration files required by the setup build in filtered Nix sources. |
Review effort: Lite
Test Results 5 files ± 0 211 suites ±0 56m 17s ⏱️ - 58m 3s Results for commit 26fa4e1. ± Comparison against base commit 742984e. This pull request removes 65 and adds 34 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
turmelclem
temporarily deployed
to
testing-2-preview
December 1, 2026 11:09 — with
GitHub Actions
Inactive
turmelclem
temporarily deployed
to
testing-preview
December 1, 2026 11:09 — with
GitHub Actions
Inactive
Introduce the module that will hold the pure guessing of the Mithril signer and DMQ node parameters. The Shelley genesis parser keeps reading the network magic, and now asks the guessing module for the network it identifies.
Add to read, from the content of , the Mithril networks running on each Cardano network: their first aggregator endpoint, era reader and protocol configuration reader. The readers configuration (address and verification key) is given apart, keyed by the Mithril network name, so that the parsing does no I/O and reads no URL.
turmelclem
force-pushed
the
ctl/3678-Guess-Mithril-signer-and-DMQ-params-for-mithril-setup-command
branch
from
December 1, 2026 16:20
0da5312 to
b0cdc1a
Compare
turmelclem
temporarily deployed
to
testing-preview
December 1, 2026 16:35 — with
GitHub Actions
Inactive
turmelclem
temporarily deployed
to
testing-2-preview
December 1, 2026 16:35 — with
GitHub Actions
Inactive
jpraynaud
approved these changes
Dec 2, 2026
damrobi
approved these changes
Dec 2, 2026
turmelclem
force-pushed
the
ctl/3678-Guess-Mithril-signer-and-DMQ-params-for-mithril-setup-command
branch
from
December 2, 2026 15:33
e3b791c to
340edf8
Compare
Alenar
approved these changes
Dec 2, 2026
The build script embeds and the readers configuration of . Both live outside the crate, so the packaged crate can not be built. makes refuse the crate at once, instead of failing late on the verification build.
…son is not defined
turmelclem
force-pushed
the
ctl/3678-Guess-Mithril-signer-and-DMQ-params-for-mithril-setup-command
branch
from
December 3, 2026 09:42
79dfc12 to
dad53a9
Compare
* mithril-setup from `0.1.3` to `0.1.4`
turmelclem
deleted the
ctl/3678-Guess-Mithril-signer-and-DMQ-params-for-mithril-setup-command
branch
December 3, 2026 10:23
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Content
This PR adds a
guessingmodule tomithril-setup. It provides the data needed to guess the Mithril signer and DMQ node parameters from the facts found by the Cardano discovery (#3677).The Mithril networks come from
networks.jsonand the reader files ofmithril-infra/configuration/, which are embedded at build time, so nothing is downloaded.This PR covers the building blocks only. The
SignerGuesserandDmqGuesser, the new fields of the signer schema, and the wiring intoSignerEffectHandler::guess()come in a follow-up PR. Until then, the setup does not change its behavior.Mithril signer
NETWORKNETWORK_MAGICMITHRIL_NETWORKnetworks.jsonAGGREGATOR_ENDPOINTnetworks.jsonERA_READER_ADAPTER_TYPEnetworks.jsonERA_READER_ADAPTER_PARAMSmithril-infra/configuration/<mithril-network>/era.addrandera.vkey, embedded at build timePROTOCOL_CONFIGURATION_READER_ADAPTER_CONFIGnetworks.json;protocol-config.addrandprotocol-config.vkeyembedded at build timeRUN_INTERVALSTORE_RETENTION_LIMITDATA_STORES_DIRECTORYNetworkMagicThis PR includes...
Pre-submit checklist
Relates to #3678