Skip to content

Conversation

@turmelclem
Copy link
Collaborator

@turmelclem turmelclem commented Feb 9, 2026

Content

This PR includes

  • the addition of Cardano Blocks and Transaction signing configuration in :

    • aggregator configuration
    • database and epoch settings store and services
    • aggregator route /protocol-configuration and openapi definition
    • Mithril network configuration provider
    • github actions files and terraform files for new parameters
    • end to end tests
  • Wiring cardano_blocks_transactions in the new artifact builder

  • Ensuring compatibility in the Mithril signer

  • add documentation about new aggregator's parameters in website

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

this PR closes #2971

@turmelclem turmelclem changed the title implement signing configuration for cardano blocks and transactions DRAFT: implement signing configuration for cardano blocks and transactions Feb 9, 2026
@github-actions
Copy link

github-actions bot commented Feb 9, 2026

Test Results

    5 files  ± 0    172 suites  ±0   40m 29s ⏱️ +47s
2 519 tests + 6  2 519 ✅ +13  0 💤 ±0  0 ❌  - 7 
7 799 runs  +16  7 799 ✅ +23  0 💤 ±0  0 ❌  - 7 

Results for commit f41bf0f. ± Comparison against base commit 78d4c0d.

This pull request removes 1 and adds 7 tests. Note that renamed tests count towards both.
mithril-aggregator ‑ artifact_builder::cardano_blocks_transactions::tests::should_fail_to_compute_artifact_without_cardano_transactions
mithril-aggregator ‑ artifact_builder::cardano_blocks_transactions::tests::should_fail_to_compute_artifact_without_cardano_blocks_transactions
mithril-aggregator ‑ configuration::test::can_build_config_with_cardano_blocks_tx_signing_config_from_default_configuration
mithril-aggregator ‑ configuration::test::get_leader_aggregator_epoch_settings_configuration::fails_when_cardano_blocks_transactions_is_enabled_without_associated_config
mithril-aggregator ‑ configuration::test::get_leader_aggregator_epoch_settings_configuration::succeed_when_cardano_blocks_transactions_is_disabled_and_cardano_blocks_transactions_signing_config_is_not_set
mithril-aggregator ‑ configuration::test::get_leader_aggregator_epoch_settings_configuration::succeed_when_cardano_blocks_transactions_is_enabled_and_cardano_blocks_transactions_signing_config_is_set
mithril-common ‑ entities::protocol_message::tests::test_protocol_message_compute_hash_include_cardano_blocks_transactions_merkle_root
mithril-common ‑ entities::protocol_message::tests::test_set_message_part_calling_order_have_no_influence_on_hash_computed

♻️ This comment has been updated with latest results.

@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch 3 times, most recently from 1d90262 to 1f87a4a Compare February 10, 2026 09:52
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from 1f87a4a to ce84c29 Compare February 10, 2026 10:09
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from ce84c29 to 092ad84 Compare February 10, 2026 10:09
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from 092ad84 to 82a9de1 Compare February 10, 2026 14:04
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from 82a9de1 to a37ad81 Compare February 10, 2026 14:28
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from a37ad81 to 3b8657b Compare February 10, 2026 14:35
@jpraynaud jpraynaud requested a review from Copilot February 10, 2026 14:54
@turmelclem turmelclem marked this pull request as ready for review February 10, 2026 14:55
@turmelclem turmelclem changed the title DRAFT: implement signing configuration for cardano blocks and transactions implement signing configuration for cardano blocks and transactions Feb 10, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Implements end-to-end support for a new signed entity type, CardanoBlocksTransactions, by wiring its signing configuration through aggregator configuration/storage/API, protocol configuration provider, signer epoch services, infra parameters, and tests.

Changes:

  • Add CardanoBlocksTransactionsSigningConfig and propagate it through protocol configuration messages, epoch settings, and network configuration models.
  • Enable and support CardanoBlocksTransactions in signed entity discriminants, protocol message parts, and the artifact builder.
  • Extend infra (Terraform, docker-compose, GitHub Actions) and test scaffolding to provide the new configuration inputs.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
openapi.yaml Expose Cardano blocks+tx signing config and entity type in the public API schema.
mithril-test-lab/mithril-end-to-end/src/mithril/aggregator.rs Provide env vars for blocks+tx signing config in E2E setup.
mithril-signer/tests/test_extensions/state_machine_tester.rs Extend signer test harness with blocks+tx signing config.
mithril-signer/src/services/epoch_service.rs Carry blocks+tx signing config through signer epoch service and config provider.
mithril-signer/src/services/certifier.rs Update certifier tests to provide blocks+tx signing config.
mithril-infra/variables.tf Add Terraform variables for blocks+tx signing config parameters.
mithril-infra/mithril.aggregator.tf Export blocks+tx signing config env vars to aggregator VM/container.
mithril-infra/assets/docker/docker-compose-aggregator-base.yaml Add blocks+tx signing config env vars to docker compose.
mithril-common/src/test/double/dummies.rs Extend common dummies to include blocks+tx signing config.
mithril-common/src/messages/protocol_configuration.rs Add blocks+tx signing config to protocol configuration message payload.
mithril-common/src/entities/signed_entity_type.rs Re-enable CardanoBlocksTransactions in the “all” discriminants iterator.
mithril-common/src/entities/signed_entity_config.rs Add blocks+tx signing config and derivation logic from a TimePoint.
mithril-common/src/entities/protocol_message.rs Add protocol message key for blocks+tx merkle root; update hashing tests.
mithril-aggregator/src/test/double/dummies.rs Extend aggregator dummies with blocks+tx signing config.
mithril-aggregator/src/store/epoch_settings_storer.rs Persist blocks+tx signing config when saving epoch settings.
mithril-aggregator/src/services/network_configuration_provider.rs Include blocks+tx signing config in local network configuration provider.
mithril-aggregator/src/services/message.rs Include blocks+tx signing config in /protocol-configuration message when enabled.
mithril-aggregator/src/services/epoch_service.rs Store blocks+tx signing config in epoch settings for registration/aggregation.
mithril-aggregator/src/entities/aggregator_epoch_settings.rs Add blocks+tx signing config to aggregator epoch settings model.
mithril-aggregator/src/database/test_helper.rs Update DB test helper to include new epoch settings field.
mithril-aggregator/src/database/repository/epoch_settings_store.rs Persist blocks+tx signing config to DB epoch settings records.
mithril-aggregator/src/database/record/epoch_settings.rs Add DB record field + hydration/projection for blocks+tx signing config.
mithril-aggregator/src/database/query/epoch_settings/insert_or_ignore_epoch_settings.rs Insert new blocks+tx signing config field during epoch settings upsert.
mithril-aggregator/src/database/migration.rs Add migration to introduce new DB column for blocks+tx signing config.
mithril-aggregator/src/configuration.rs Add config plumbing/defaults for blocks+tx signing config and validation when enabled.
mithril-aggregator/src/artifact_builder/cardano_blocks_transactions.rs Build blocks+tx snapshot artifact using the blocks+tx merkle root and config.
internal/mithril-protocol-config/src/test/double/dummies.rs Extend protocol-config dummies with blocks+tx signing config.
internal/mithril-protocol-config/src/test/double/configuration_provider.rs Update fake configuration provider tests with blocks+tx signing config.
internal/mithril-protocol-config/src/model.rs Extend signed entity type configuration model with blocks+tx signing config.
internal/mithril-protocol-config/src/http.rs Extend HTTP protocol-config parsing tests to include blocks+tx signing config.
.github/workflows/test-deploy-network.yml Pass new Terraform inputs for blocks+tx signing config in test deploy workflow.
.github/workflows/release.yml Pass new Terraform inputs for blocks+tx signing config in release workflow.
.github/workflows/pre-release.yml Pass new Terraform inputs for blocks+tx signing config in pre-release workflow.
.github/workflows/ci.yml Pass new Terraform inputs for blocks+tx signing config in CI workflow.
.github/workflows/actions/deploy-terraform-infrastructure/action.yml Add action inputs for blocks+tx signing config parameters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +198 to +200
// TODO: See if we can remove this adjustment by including a "partial" block range in
// the signed data.
let adjusted_step = BlockRange::from_block_number(self.step).start;
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

New TODO comment added in CardanoBlocksTransactionsSigningConfig::compute_block_number_to_be_signed (the Cardano-transactions config already has one). This contradicts the PR checklist item about not introducing TODOs; please remove it or convert it into a tracked issue reference.

Copilot uses AI. Check for mistakes.
Comment on lines +197 to +207
pub fn compute_block_number_to_be_signed(&self, block_number: BlockNumber) -> BlockNumber {
// TODO: See if we can remove this adjustment by including a "partial" block range in
// the signed data.
let adjusted_step = BlockRange::from_block_number(self.step).start;
// We can't have a step lower than the block range length.
let adjusted_step = std::cmp::max(adjusted_step, BlockRange::LENGTH);

let block_number_to_be_signed =
(block_number - self.security_parameter) / adjusted_step * adjusted_step;
block_number_to_be_signed - 1
}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

CardanoBlocksTransactionsSigningConfig::compute_block_number_to_be_signed is newly introduced but there are no dedicated unit tests for it. Please add tests mirroring the existing CardanoTransactionsSigningConfig cases (step adjustment to block range start, security_parameter > tip, small tip values) to ensure both configs behave identically where intended.

Copilot uses AI. Check for mistakes.
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from 3b8657b to 32a158d Compare February 10, 2026 15:19
…route with Cardano block and transaction signing configuration, put CardanoBlocksTransactions in SignedEntityTypeDiscriminants 'all' function
…new Cardano blocks and transactions signing configuration
…iables for the new signed entity Cardano blocks ans transaction
…n variables for the new signed entity Cardano blocks ans transaction
@turmelclem turmelclem force-pushed the ctl/2971-implement-signing-configuration-for-cardano-blocks-and-transactions branch from 32a158d to f41bf0f Compare February 10, 2026 15:23
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.

Implement signing configuration for Cardano Blocks and Transactions

1 participant