Skip to content

Adapt end-to-end test for on-chain configuration parameters - #3489

Open
turmelclem wants to merge 1 commit into
mainfrom
ctl/3396-adapt-end-to-end-tests-for-on-chain-configuration-parameters-2
Open

Adapt end-to-end test for on-chain configuration parameters#3489
turmelclem wants to merge 1 commit into
mainfrom
ctl/3396-adapt-end-to-end-tests-for-on-chain-configuration-parameters-2

Conversation

@turmelclem

@turmelclem turmelclem commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Content

Adapting e2e test to support on chain configuration :

  • add scripts to create payment address, send funds to address, write datums
  • add new PROTOCOL_CONFIGURATION_READER_ADAPTER_CONFIG in both signer and aggregator configuration
  • regarding aggregator version, write protocol parameters and signing config on chain or in environment variables

⚠️ the aggregator version in function is_reading_protocol_configurations_on_chain is temporary and will be fixed in #3393

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • All check jobs of the CI have succeeded
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)
    • Add ADR blog post or Dev ADR entry (if relevant)
    • No new TODOs introduced

Closes #3396

@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Test Results

     5 files  ± 0     209 suites  ±0   44m 54s ⏱️ - 1h 28m 54s
 3 396 tests  - 66   3 396 ✅  - 66  0 💤 ±0  0 ❌ ±0 
11 250 runs   - 75  11 250 ✅  - 75  0 💤 ±0  0 ❌ ±0 

Results for commit 1cdfe9b. ± Comparison against base commit c8ff793.

This pull request removes 66 tests.
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::index_out_of_bounds
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::index_too_large_for_circuit_range
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::indices_not_increasing
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_merkle_path_mismatch
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_swap_keep_merkle_path
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::leaf_wrong_verification_key
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_corrupt_sibling
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_flip_position
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_length_long
mithril-stm ‑ circuits::halo2::tests::golden::cases::negative::slow::merkle_path_length_short
…

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CONFIG into signer and aggregator processes.
  • Introduce a ProtocolConfiguration model 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.

Comment thread mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs
Comment thread mithril-test-lab/cardano-devnet/mkfiles/mkfiles-protocol-configuration.sh Outdated
Comment thread mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs Outdated
Comment thread mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs Outdated
@turmelclem
turmelclem force-pushed the ctl/3396-adapt-end-to-end-tests-for-on-chain-configuration-parameters-2 branch from 49c548f to 1cdfe9b Compare August 24, 2026 13:10
@turmelclem
turmelclem temporarily deployed to testing-2-preview August 24, 2026 13:33 — with GitHub Actions Inactive

@Alenar Alenar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's "above or equal" you can use the target version directly.

Suggested change
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

Comment on lines +462 to +465
pub async fn set_signing_config(
&self,
cardano_transaction_signing_config: Option<CardanoTransactionsSigningConfig>,
cardano_blocks_transactions_signing_config: Option<CardanoBlocksTransactionsSigningConfig>,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adapt end-to-end test for on-chain configuration parameters

3 participants