-
Notifications
You must be signed in to change notification settings - Fork 52
implement signing configuration for cardano blocks and transactions #2991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
implement signing configuration for cardano blocks and transactions #2991
Conversation
Test Results 5 files ± 0 172 suites ±0 40m 29s ⏱️ +47s 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.♻️ This comment has been updated with latest results. |
1d90262 to
1f87a4a
Compare
1f87a4a to
ce84c29
Compare
… message part and improve tests
ce84c29 to
092ad84
Compare
092ad84 to
82a9de1
Compare
82a9de1 to
a37ad81
Compare
…guration for artifact builder
… transactions into mithril network configuration provider, and implementation in aggregator
a37ad81 to
3b8657b
Compare
There was a problem hiding this 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
CardanoBlocksTransactionsSigningConfigand propagate it through protocol configuration messages, epoch settings, and network configuration models. - Enable and support
CardanoBlocksTransactionsin 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.
| // 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; |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
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.
mithril-aggregator/src/database/repository/epoch_settings_store.rs
Outdated
Show resolved
Hide resolved
| 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 | ||
| } |
Copilot
AI
Feb 10, 2026
There was a problem hiding this comment.
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.
3b8657b to
32a158d
Compare
…ing configuration
…actions configuration
…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
32a158d to
f41bf0f
Compare
Content
This PR includes
the addition of Cardano Blocks and Transaction signing configuration in :
/protocol-configurationand openapi definitionWiring 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
this PR closes #2971