Skip to content

feat: implement fake DMQ node #2635

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

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

jpraynaud
Copy link
Member

Content

Note

This is a work in progress

This PR includes...

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

Issue(s)

Closes #2627

@jpraynaud jpraynaud self-assigned this Jul 8, 2025
Copy link

github-actions bot commented Jul 8, 2025

Test Results

    1 files   -     3     26 suites   - 132   4m 6s ⏱️ - 19m 37s
1 116 tests  - 1 036  1 115 ✅  - 1 037  0 💤 ±0  1 ❌ +1 
1 116 runs   - 5 486  1 115 ✅  - 5 487  0 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit 900fb4e. ± Comparison against base commit 8cb3c05.

♻️ This comment has been updated with latest results.

@jpraynaud jpraynaud requested a review from Copilot July 8, 2025 16:03
Copy link

@Copilot 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

Adds support for a Decentralized Message Queue (DMQ) node across end-to-end tests, relay components, signers, aggregators, and the mithril-dmq crate.

  • Introduce DMQ_NODE_SOCKET_PATH env var and socket setup in end-to-end signer and aggregator.
  • Extend relay components and CLI commands to accept DMQ socket path and Cardano network settings.
  • Refactor mithril-dmq crate to split client/server interfaces and enable future_dmq by default.

Reviewed Changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
mithril-test-lab/.../src/mithril/signer.rs Insert DMQ_NODE_SOCKET_PATH setup in Signer
mithril-test-lab/.../src/mithril/relay_signer.rs Add DMQ socket and network env in RelaySigner
mithril-test-lab/.../src/mithril/relay_aggregator.rs Add DMQ socket and network env in RelayAggregator
mithril-test-lab/.../src/mithril/aggregator.rs Insert DMQ socket env in end-to-end Aggregator
mithril-relay/src/relay/signer.rs Wire up DMQ publisher server in SignerRelay
mithril-relay/src/relay/aggregator.rs Wire up DMQ consumer server in AggregatorRelay
internal/mithril-dmq/src/publisher/client/pallas.rs Rename to client interface and update implementations
Comments suppressed due to low confidence (1)

mithril-test-lab/mithril-end-to-end/src/mithril/signer.rs:99

  • [nitpick] End-to-end tests don’t currently cover the DMQ_NODE_SOCKET_PATH setup. Add tests that exercise DMQ-based workflows to verify this new configuration is applied correctly.
        // TODO: make this configurable

@jpraynaud jpraynaud force-pushed the jpraynaud/2627-fake-dmq-node-in-relay branch from 730ee75 to 3761142 Compare July 15, 2025 16:46
@jpraynaud jpraynaud force-pushed the jpraynaud/2627-fake-dmq-node-in-relay branch 2 times, most recently from 14815a4 to ac101c4 Compare July 16, 2025 10:52
@jpraynaud jpraynaud force-pushed the jpraynaud/2627-fake-dmq-node-in-relay branch from ac101c4 to 054bcb5 Compare July 16, 2025 12:43
@jpraynaud jpraynaud force-pushed the jpraynaud/2627-fake-dmq-node-in-relay branch from b603cb0 to 59f3dc6 Compare July 16, 2025 13:44
@jpraynaud jpraynaud temporarily deployed to testing-preview July 16, 2025 13:57 — with GitHub Actions Inactive
@jpraynaud jpraynaud temporarily deployed to dev-follower-preview July 16, 2025 14:41 — with GitHub Actions Inactive
@jpraynaud jpraynaud force-pushed the jpraynaud/2627-fake-dmq-node-in-relay branch from 59f3dc6 to 57452a5 Compare July 22, 2025 13:48
Comment on lines +82 to +83
let bytes =
bincode::serde::encode_to_vec(self, bincode::config::standard()).map_err(|e| e.into());

Check warning

Code scanning / clippy

returning the result of a let binding from a block Warning

returning the result of a let binding from a block
Comment on lines +82 to +83
let bytes =
bincode::serde::encode_to_vec(self, bincode::config::standard()).map_err(|e| e.into());

Check warning

Code scanning / clippy

returning the result of a let binding from a block Warning

returning the result of a let binding from a block
let bytes =
bincode::serde::encode_to_vec(self, bincode::config::standard()).map_err(|e| e.into());

bytes

Check warning

Code scanning / clippy

returning the result of a let binding from a block Warning

returning the result of a let binding from a block
let bytes =
bincode::serde::encode_to_vec(self, bincode::config::standard()).map_err(|e| e.into());

bytes

Check warning

Code scanning / clippy

returning the result of a let binding from a block Warning

returning the result of a let binding from a block
'mithril_common::test_utils' has been renamed to 'mithril_common::test'.
@jpraynaud jpraynaud force-pushed the jpraynaud/2627-fake-dmq-node-in-relay branch from 57452a5 to 900fb4e Compare August 18, 2025 16:43
use anyhow::{Context, anyhow};
use pallas_network::{
facades::DmqServer,
miniprotocols::localmsgnotification::{Request, State},

Check warning

Code scanning / clippy

unused import: State Warning

unused import: State
logger: Logger,
}

impl DmqConsumerServerPallas {

Check warning

Code scanning / clippy

method drop_server is never used Warning

method drop\_server is never used
}

/// Drops the current `DmqServer`, if it exists.
async fn drop_server(&self) -> StdResult<()> {

Check warning

Code scanning / clippy

method drop_server is never used Warning

method drop\_server is never used
use anyhow::{Context, anyhow};
use pallas_network::{
facades::DmqServer,
miniprotocols::localmsgnotification::{Request, State},

Check warning

Code scanning / clippy

unused import: State Warning

unused import: State
logger: Logger,
}

impl DmqConsumerServerPallas {

Check warning

Code scanning / clippy

method drop_server is never used Warning

method drop\_server is never used
}

/// Drops the current `DmqServer`, if it exists.
async fn drop_server(&self) -> StdResult<()> {

Check warning

Code scanning / clippy

method drop_server is never used Warning

method drop\_server is never used
}
},
None => {
return Err(anyhow!("DMQ message receiver is not registered"));

Check warning

Code scanning / clippy

unneeded return statement Warning

unneeded return statement
}
},
None => {
return Err(anyhow!("DMQ message receiver is not registered"));

Check warning

Code scanning / clippy

unneeded return statement Warning

unneeded return statement
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 a fake DMQ node with Mithril relay
1 participant