Skip to content

Conversation

@jpraynaud
Copy link
Member

@jpraynaud jpraynaud commented Sep 2, 2025

Content

This PR includes the update of the DMQ implementation to:

  • Support the new structure of the DmqMsg message in pallas
  • Fix the implementation of the KES signature for a DMQ message
  • Implementation the expiration of messages in the consumer server with the new expires_at field

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are 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
    • No new TODOs introduced

Issue(s)

Relates to #2670

@jpraynaud jpraynaud self-assigned this Sep 2, 2025
@jpraynaud jpraynaud requested a review from Copilot September 2, 2025 16:04

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Sep 2, 2025

Test Results

    4 files  ±0    164 suites  ±0   23m 5s ⏱️ +30s
2 182 tests +1  2 182 ✅ +1  0 💤 ±0  0 ❌ ±0 
6 709 runs  +3  6 709 ✅ +3  0 💤 ±0  0 ❌ ±0 

Results for commit fee0ce1. ± Comparison against base commit 27753f4.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
mithril-dmq ‑ consumer::server::queue::tests::enqueue_blocks_over_max_size_drains_oldest_messages
mithril-dmq ‑ consumer::server::queue::tests::queue_drains_expired_message
mithril-dmq ‑ consumer::server::queue::tests::queue_drains_oldest_messages_when_full

♻️ This comment has been updated with latest results.

@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from fcfaa19 to cae7150 Compare September 2, 2025 16:15
@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from cae7150 to 5c6966f Compare September 3, 2025 15:05
@jpraynaud jpraynaud requested a review from Copilot September 3, 2025 15:40

This comment was marked as outdated.

@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch 2 times, most recently from ff0aa40 to 9c8f847 Compare September 4, 2025 14:45
@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from 9c8f847 to 8936033 Compare September 5, 2025 10:38
@jpraynaud jpraynaud requested a review from Copilot September 5, 2025 12:45
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

Refactors the DMQ (Decentralized Message Queue) implementation to support the new structure of the DmqMsg message in pallas, including updates to KES signature implementation and message expiration handling.

  • Updates the DmqMsg structure to use new pallas message format with separated payload and signature components
  • Replaces block-based TTL with timestamp-based message expiration using expires_at field
  • Modifies operational certificate handling to support separate cold verification key

Reviewed Changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
mithril-signer/src/runtime/runner.rs Updates OpCert field access to use getter method
mithril-common/src/test/crypto_helper/cardano/kes/signer_fake.rs Enhances fake KES signer to track signed messages for testing
mithril-common/src/crypto_helper/types/protocol_key.rs Adds method to consume ProtocolKey and return inner key
mithril-common/src/crypto_helper/mod.rs Exports new OpCertWithoutColdVerificationKey type
mithril-common/src/crypto_helper/codec/binary.rs Adds binary codec support for OpCertWithoutColdVerificationKey
mithril-common/src/crypto_helper/cardano/opcert.rs Restructures OpCert to separate cold verification key and adds getter methods
mithril-common/src/crypto_helper/cardano/key_certification.rs Updates OpCert field access to use getter method
mithril-common/src/crypto_helper/cardano/kes/verifier_standard.rs Updates OpCert field access to use getter methods
mithril-aggregator/src/services/signer_registration/verifier.rs Updates OpCert field access to use getter method
internal/mithril-dmq/src/publisher/server/pallas.rs Updates test to use new DmqMsg structure with separated payload
internal/mithril-dmq/src/model/timestamp.rs Adds timestamp provider abstraction for Unix timestamps
internal/mithril-dmq/src/model/mod.rs Exports new timestamp module
internal/mithril-dmq/src/model/message.rs Updates tests to use new DmqMsg structure
internal/mithril-dmq/src/model/builder.rs Refactors message builder to use timestamp-based expiration and new signing approach
internal/mithril-dmq/src/consumer/server/queue.rs Implements message expiration based on timestamps and adds queue cleaning logic
internal/mithril-dmq/src/consumer/server/pallas.rs Updates tests to use new DmqMsg structure
internal/mithril-dmq/src/consumer/client/pallas.rs Updates client to parse separated operational certificate and cold verification key
internal/mithril-dmq/Cargo.toml Updates pallas dependencies to use updated branch with new DMQ message structure

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from 8936033 to 6607e7e Compare September 5, 2025 15:02
@jpraynaud jpraynaud requested a review from turmelclem September 5, 2025 15:22
@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from 6607e7e to 83a40a4 Compare September 5, 2025 15:55
Copy link
Collaborator

@turmelclem turmelclem left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from 83a40a4 to 6794796 Compare September 8, 2025 16:06
@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from 6794796 to 0f1382b Compare September 16, 2025 13:33
@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from 0f1382b to e6c6573 Compare September 18, 2025 14:32
Following the move of operational certificate and cold verification out of the signed payload.
Following the move of operational certificate and cold verification out of the signed payload.
Following the move of operational certificate and cold verification out of the signed payload.
Following the move of operational certificate and cold verification out of the signed payload.
Following the move of operational certificate and cold verification out of the signed payload.
* mithril-dmq from `0.1.10` to `0.1.11`
* mithril-aggregator from `0.7.85` to `0.7.86`
* mithril-common from `0.6.18` to `0.6.19`
* mithril-signer from `0.2.269` to `0.2.270`
@jpraynaud jpraynaud force-pushed the jpraynaud/2670-update-dmq-message branch from e6c6573 to fee0ce1 Compare September 22, 2025 12:39
@jpraynaud jpraynaud marked this pull request as ready for review September 22, 2025 13:17
@jpraynaud jpraynaud merged commit 67b18cd into main Sep 22, 2025
82 of 85 checks passed
@jpraynaud jpraynaud deleted the jpraynaud/2670-update-dmq-message branch September 22, 2025 14:28
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.

3 participants