Adapt end-to-end test for on-chain configuration parameters - #3489
Adapt end-to-end test for on-chain configuration parameters#3489turmelclem wants to merge 1 commit into
Conversation
Test Results 5 files ± 0 209 suites ±0 44m 54s ⏱️ - 1h 28m 54s Results for commit 1cdfe9b. ± Comparison against base commit c8ff793. This pull request removes 66 tests.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Pull request overview
This PR adapts the mithril end-to-end test lab to exercise the new on-chain protocol configuration path (writing protocol parameters/signing config markers on the devnet chain and configuring signer/aggregator to read them), while keeping a fallback path for older aggregator versions.
Changes:
- Add support for protocol-configuration markers (address discovery, datum generation, chain write) and wire
PROTOCOL_CONFIGURATION_READER_ADAPTER_CONFIGinto signer and aggregator processes. - Introduce a
ProtocolConfigurationmodel in the e2e infrastructure and use it to register startup protocol configuration and perform on-chain protocol-parameter updates when supported. - Add devnet mkfiles script generation for protocol-configuration and a devnet runner method to write protocol-configuration markers on-chain.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-test-lab/mithril-end-to-end/src/toolkit/exec.rs | Adds marker registration helper and switches protocol-parameter updates to on-chain registration when supported. |
| mithril-test-lab/mithril-end-to-end/src/stress_test/aggregator_helpers.rs | Extends aggregator bootstrap config and sets signing config for stress tests. |
| mithril-test-lab/mithril-end-to-end/src/scenario/full.rs | Updates scenario call-site to pass infrastructure + epoch for protocol-parameter updates. |
| mithril-test-lab/mithril-end-to-end/src/mithril/signer.rs | Adds protocol configuration reader adapter env var wiring for signer. |
| mithril-test-lab/mithril-end-to-end/src/mithril/mod.rs | Re-exports ProtocolConfiguration and adds protocol-configuration marker key constants. |
| mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs | Introduces ProtocolConfiguration, stores startup configuration, and registers startup markers when on-chain mode is enabled. |
| mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs | Adds protocol configuration reader adapter env var wiring, on-chain mode detection, datum generation command, and signing-config setter. |
| mithril-test-lab/mithril-end-to-end/src/main.rs | Adds CLI arg + startup protocol configuration construction and passes it into infrastructure config. |
| mithril-test-lab/mithril-end-to-end/src/devnet/runner.rs | Adds protocol-configuration marker address support and a method to write protocol-configuration markers on-chain. |
| mithril-test-lab/cardano-devnet/mkfiles/mkfiles-protocol-configuration.sh | Adds mkfiles script to generate protocol-config address and a script to fund it and write inline datum on-chain. |
| mithril-test-lab/cardano-devnet/devnet-mkfiles.sh | Sources the new mkfiles protocol-configuration generator. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
49c548f to
1cdfe9b
Compare
There was a problem hiding this comment.
If it's not too much maybe we should share most chain writting functions into a mithril-test-lab/cardano-devnet/mkifiles/lib/chain.sh.
See mithril-test-lab/ipfs-devnet/commands/lib/common.sh and the scripts that source it for an example of how to do that.
| self.index == 0 | ||
| } | ||
|
|
||
| pub fn is_leader(&self) -> bool { |
There was a problem hiding this comment.
Either supersede is_first with this method or only use is_first.
| } | ||
|
|
||
| pub fn is_reading_protocol_configurations_on_chain(&self) -> bool { | ||
| self.version().is_above_or_equal("0.9.99") && self.is_leader() |
There was a problem hiding this comment.
Since it's "above or equal" you can use the target version directly.
| self.version().is_above_or_equal("0.9.99") && self.is_leader() | |
| self.version().is_above_or_equal("0.10.0") && self.is_leader() |
Also you should update mithril-test-lab/mithril-end-to-end/backward-compatibility.md "Supported changes / Mithril aggregator" section with something like:
- **since `0.10.0` (next to 2630.0)**: support of on cardano chain protocol parameters| pub async fn set_signing_config( | ||
| &self, | ||
| cardano_transaction_signing_config: Option<CardanoTransactionsSigningConfig>, | ||
| cardano_blocks_transactions_signing_config: Option<CardanoBlocksTransactionsSigningConfig>, |
There was a problem hiding this comment.
There's something strange with this signature and what the code do: for me it means that you can unset the configurations, but the code just ignore them if they are None.
So either remove the option from the signatures or unset the en var if none.
Content
Adapting e2e test to support on chain configuration :
PROTOCOL_CONFIGURATION_READER_ADAPTER_CONFIGin both signer and aggregator configurationis_reading_protocol_configurations_on_chainis temporary and will be fixed in #3393Pre-submit checklist
Closes #3396