Sign security parameter offset - #3168
Merged
Merged
Conversation
Test Results 5 files ± 0 199 suites ±0 1h 17m 39s ⏱️ -39s Results for commit 606eb90. ± Comparison against base commit 6a8101a. This pull request removes 2 and adds 15 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
turmelclem
force-pushed
the
ctl/3098-sign-security-parameter-offset
branch
from
April 3, 2026 08:25
71ac835 to
e0959ef
Compare
turmelclem
marked this pull request as ready for review
April 3, 2026 08:26
There was a problem hiding this comment.
Pull request overview
This PR updates the Cardano blocks/transactions V2 signing and proof pipeline to include (and verify) the security parameter as a signed BlockNumberOffset, and exposes it through the aggregator proof V2 APIs and client-facing tooling.
Changes:
- Introduces
BlockNumberOffsetand threads it throughSignedEntityType::CardanoBlocksTransactions, protocol messages, and signable/artifact builders so it becomes part of what is signed. - Extends proof V2 messages + OpenAPI to return
security_parameter, updates aggregator routes to populate it, and updates client verification to include it in the reconstructed protocol message. - Updates CLI and examples to display/log the resulting certification “block depth”.
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi.yaml | Adds security_parameter to proof V2 schemas and examples. |
| mithril-signer/tests/test_extensions/state_machine_tester.rs | Adjusts test config to use BlockNumberOffset. |
| mithril-common/src/test/double/fake_data.rs | Updates fake blocks+tx snapshots to use BlockNumberOffset. |
| mithril-common/src/test/double/dummies.rs | Updates dummy messages/entities for the new signed entity shape. |
| mithril-common/src/test/crypto_helper/mk_extensions.rs | Updates proof-message test helpers to include BlockNumberOffset. |
| mithril-common/src/test/builder/cardano_transactions_builder.rs | Uses BlockNumberOffset for block numbering in test builder logic. |
| mithril-common/src/signable_builder/signable_builder_service.rs | Changes blocks+tx signable builder beacon type to (BlockNumber, BlockNumberOffset). |
| mithril-common/src/signable_builder/interface.rs | Declares the tuple beacon type as a Beacon. |
| mithril-common/src/signable_builder/cardano_blocks_transactions.rs | Signs the offset via a new protocol message part key. |
| mithril-common/src/messages/proof_v2/cardano_transactions_proof.rs | Adds security_parameter to tx proofs V2 message + verified wrapper. |
| mithril-common/src/messages/proof_v2/cardano_blocks_proof.rs | Adds security_parameter to block proofs V2 message + verified wrapper. |
| mithril-common/src/entities/signed_entity_type.rs | Extends CardanoBlocksTransactions with BlockNumberOffset and updates hashing/JSON beacon. |
| mithril-common/src/entities/signed_entity_config.rs | Refactors blocks+tx signing config to use BlockNumberOffset and propagates it into the signed entity type. |
| mithril-common/src/entities/protocol_message.rs | Adds ProtocolMessagePartKey::CardanoBlocksTransactionsBlockNumberOffset. |
| mithril-common/src/entities/mod.rs | Exposes the new block_number_offset module/type. |
| mithril-common/src/entities/cardano_blocks_transactions_snapshot.rs | Updates snapshot constructor to take an offset newtype. |
| mithril-common/src/entities/block_number.rs | Adds arithmetic ops between BlockNumber and BlockNumberOffset. |
| mithril-common/src/entities/block_number_offset.rs | New BlockNumberOffset newtype + arithmetic wrapper impls + tests. |
| mithril-client/tests/extensions/fake_aggregator/cardano_proof_v2.rs | Updates fake cert protocol message to include the new signed key. |
| mithril-client/src/message.rs | Includes the offset key in message reconstruction for proof verification. |
| mithril-client-cli/src/commands/cardano_transaction/certify/v2.rs | Displays/logs block depth in certify output. |
| mithril-client-cli/src/commands/cardano_block/certify.rs | Displays/logs block depth in certify output. |
| mithril-aggregator/tests/leader_signed_entity_config_propagation.rs | Updates signing config test to use BlockNumberOffset. |
| mithril-aggregator/tests/create_certificate.rs | Updates certificate creation tests for new signed entity type. |
| mithril-aggregator/src/tools/certificates_hash_migrator.rs | Includes offset in formatted identifiers for blocks+tx signed entity types. |
| mithril-aggregator/src/services/signed_entity.rs | Updates artifact builder wiring to use (BlockNumber, BlockNumberOffset) beacons. |
| mithril-aggregator/src/services/network_configuration_provider.rs | Updates tests/config handling to use BlockNumberOffset. |
| mithril-aggregator/src/services/message.rs | Updates message service tests for new config/entity shapes. |
| mithril-aggregator/src/services/epoch_service.rs | Updates epoch service tests for new config/entity shapes. |
| mithril-aggregator/src/http_server/routes/proof_routes.rs | Adds security_parameter to proof V2 responses for blocks and tx. |
| mithril-aggregator/src/dependency_injection/builder/protocol/artifacts.rs | Removes network configuration provider dependency from blocks+tx artifact builder wiring. |
| mithril-aggregator/src/database/record/signed_entity.rs | Updates test-only fake record generation match arm for new enum variant shape. |
| mithril-aggregator/src/database/query/epoch_settings/insert_or_ignore_epoch_settings.rs | Updates epoch settings query tests for BlockNumberOffset. |
| mithril-aggregator/src/configuration.rs | Updates configuration defaults/tests for BlockNumberOffset. |
| mithril-aggregator/src/artifact_builder/cardano_blocks_transactions.rs | Refactors artifact builder to receive offset in the beacon and remove config lookup. |
| internal/mithril-protocol-config/src/test/double/configuration_provider.rs | Updates protocol-config test doubles to use BlockNumberOffset. |
| internal/mithril-protocol-config/src/http.rs | Updates protocol-config HTTP tests to use BlockNumberOffset. |
| internal/mithril-persistence/src/database/hydrator.rs | Updates beacon hydration for blocks+tx to deserialize block_number_offset. |
| internal/mithril-aggregator-client/src/query/get/get_cardano_transaction_proof_v2.rs | Updates client query tests for new security_parameter field. |
| internal/mithril-aggregator-client/src/query/get/get_cardano_block_proof.rs | Updates client query tests for new security_parameter field. |
| examples/client-cardano-transaction-v2/src/main.rs | Logs block depth from verified transactions. |
| examples/client-cardano-block/src/main.rs | Logs block depth from verified blocks. |
turmelclem
force-pushed
the
ctl/3098-sign-security-parameter-offset
branch
3 times, most recently
from
April 3, 2026 09:26
5fd21c2 to
2e5c09d
Compare
turmelclem
temporarily deployed
to
testing-preview
April 3, 2026 11:00 — with
GitHub Actions
Inactive
turmelclem
force-pushed
the
ctl/3098-sign-security-parameter-offset
branch
2 times, most recently
from
April 3, 2026 13:42
2f5f79d to
17d866d
Compare
Alenar
approved these changes
Apr 3, 2026
turmelclem
force-pushed
the
ctl/3098-sign-security-parameter-offset
branch
from
April 3, 2026 15:18
17d866d to
fb4b75b
Compare
turmelclem
temporarily deployed
to
testing-preview
April 3, 2026 15:37 — with
GitHub Actions
Inactive
jpraynaud
approved these changes
Apr 7, 2026
turmelclem
force-pushed
the
ctl/3098-sign-security-parameter-offset
branch
3 times, most recently
from
April 8, 2026 08:40
e5166ab to
3bc737b
Compare
…rove arithmetic operations between BlockNumber and BlockNumberOffset
…NumberOffset type
…ransactions SignedEntityType
…rdanoBlocksTransactions SignedEntityType
…ningConfig using new the new BlockNumberOffset type
…le containing BlockNumber and BlockNumberOffset, remove usage of mithril_network_configuration_provider
…sactionsSnapshot constructor
…ockNumberOffset in blockNumber
…r in Proof v2 routes results
…transactionV2 proof message contain security parameter
…ter) in certify table result for blocks and transactionsV2
…certify command for blocks and transactionsV2
…r CardanoBlocksTransactions signed entity type
…ty_parameter from BlockNumber to BlockNumberOffset
…noBlocksTransactions since beacon are different now
turmelclem
force-pushed
the
ctl/3098-sign-security-parameter-offset
branch
from
April 8, 2026 09:19
3bc737b to
4a4521b
Compare
turmelclem
temporarily deployed
to
testing-preview
April 8, 2026 09:39 — with
GitHub Actions
Inactive
* client-cardano-block from `0.1.1` to `0.1.2` name = "client-cardano-transaction-v2" -version = "0.1.1" +version = "0.1.2" * mithril-aggregator-client from `0.1.9` to `0.1.10` * mithril-persistence from `0.2.70` to `0.2.71` * mithril-protocol-config from `0.1.6` to `0.1.7` * mithril-aggregator from `0.8.41` to `0.8.42` * mithril-client-cli from `0.13.2` to `0.13.3` * mithril-client from `0.14.2` to `0.14.3` * mithril-common from `0.6.62` to `0.6.63` * mithril-signer from `0.3.28` to `0.3.29` * mithril-aggregator-fake from `0.4.18` to `0.4.19` * openapi.yaml from `0.1.60` to `0.1.61`
turmelclem
temporarily deployed
to
testing-preview
April 8, 2026 10:03 — with
GitHub Actions
Inactive
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 includes changes to sign (and verify) security parameter for Cardano Blocks and transactions.
BlockNumberOffsetwith arithmetic operation with exisitingBlockNumberSignedEntityTypeCardanoBlocksTransactionsby adding security parameterBlockNumberOffsetCardanoBlocksTransactionsSigningConfigby changingsecurity_parameterattribute fromBlockNumbertoBlockNumberOffsetProtocolMessagePartKey: CardanoBlocksTransactionsBlockNumberOffsetBlockNumberOffsetin thecompute_protocol_messageof the signable builder implementationBlockNumberOffsetin theproof/v2/routes for blocks and transactionsBlockNumberOffsetis signed by the certificate For both blocks and transactionsV2client-cardano-blockandclient-cardano-transaction-v2has been updated to log depth of the certificationsigned_entityandcertificaterecords of type 'blocks and transactions' to handle the new offsetPre-submit checklist
Closes #3098