Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
4e8df76
refactor(dmq): move 'publisher' in 'client' sub-module
jpraynaud Jul 7, 2025
861f97e
refactor(dmq): move 'consumer' in 'client' sub-module
jpraynaud Jul 7, 2025
c0868f0
refactor(dmq): rename 'DmqConsumerPallas' to 'DmqConsumerClientPallas'
jpraynaud Jul 7, 2025
764a4b6
refactor(dmq): rename 'DmqPublisherPallas' to 'DmqPublisherClientPallas'
jpraynaud Jul 7, 2025
dbe6497
refactor(dmq): promote 'message' module to directory
jpraynaud Jul 8, 2025
300d792
feat(dmq): add 'DmqMessage' type to wrap a 'DmqMsg'
jpraynaud Jul 8, 2025
9f583c0
feat(dmq): add 'DmqPublisherServer' trait
jpraynaud Jul 8, 2025
f60fc64
feat(dmq): add 'DmqPublisherServerPallas' implementation of 'DmqPubli…
jpraynaud Jul 8, 2025
8bb5f13
feat(dmq): add 'DmqConsumerServer' trait
jpraynaud Jul 8, 2025
afce429
feat(dmq): add 'MessageQueue' implementation for the consumer server
jpraynaud Jul 8, 2025
ac2d6a7
feat(dmq): add 'DmqConsumerServerPallas' implementation of 'DmqConsum…
jpraynaud Aug 8, 2025
790b635
feat(relay): add support for DMQ messages
jpraynaud Jul 8, 2025
5e7dc51
feat(relay): update passive relay for DMQ messages
jpraynaud Jul 8, 2025
b7d8553
feat(relay): update signer relay for DMQ messages
jpraynaud Jul 8, 2025
723cc51
feat(relay): update signer command for DMQ messages
jpraynaud Jul 8, 2025
46b07c7
feat(relay): update aggregator relay for DMQ messages
jpraynaud Jul 8, 2025
9cbfcc9
feat(relay): update aggregator command for DMQ messages
jpraynaud Jul 8, 2025
5220f94
feat(relay): update integration test for DMQ messages
jpraynaud Jul 8, 2025
3317a41
feat(dmq): export DMQ servers for publisher and consumer
jpraynaud Jul 8, 2025
69fcc10
feat(relay): use binary encoding for exchanging messages in P2P pubsu…
jpraynaud Jul 21, 2025
4cd18ac
fix(dmq): activate Pallas server sides for Unix only
jpraynaud Jul 15, 2025
985ff94
fix(dmq): add missing 'kes_period' in 'DmqMsg'
jpraynaud Jul 15, 2025
a3c77f5
fix(dmq): gate code behind 'future_dmq' feature
jpraynaud Jul 15, 2025
c5ae781
fix(dmq): better support for stopping consumer server
jpraynaud Aug 27, 2025
79bc2bd
fix(dmq): better support for stopping publisher server
jpraynaud Aug 27, 2025
f50beae
fix(dmq): missing wait for Done message in publisher server state mac…
jpraynaud Jul 22, 2025
a6d547b
fix(relay): fix clippy warning
jpraynaud Jul 16, 2025
87954af
feat(infra): support for DMQ protocol in aggregator infrastructure
jpraynaud Jul 16, 2025
c7f69e3
feat(infra): support for DMQ protocol in signer infrastructure
jpraynaud Jul 16, 2025
58b2df6
feat(ci): support for using DMQ in infrastucture deployment
jpraynaud Jul 16, 2025
e199ad1
fix: rebase from main branch
jpraynaud Aug 8, 2025
71760f6
feat(dmq): add 'MessageQueue' size limit
jpraynaud Aug 21, 2025
07e1bfa
fix(dmq): run receive/serve messages on separate threads
jpraynaud Aug 18, 2025
0e1f911
test(dmq): add integration test for publisher client/server
jpraynaud Aug 20, 2025
036ab54
test(dmq): add integration test for consumer client/server
jpraynaud Aug 20, 2025
18da2a0
fix(dmq): consumer can not serve messages multiple times
jpraynaud Aug 20, 2025
80a6571
test(dmq): make publisher integration test check client/server deconn…
jpraynaud Aug 21, 2025
1d34617
test(dmq): make consumer integration test check client/server deconne…
jpraynaud Aug 21, 2025
c7c2c63
fix(dmq): consumer client can't connect more that once to server
jpraynaud Aug 22, 2025
ed95e69
fix(dmq): flakiness in macOS unit tests
jpraynaud Aug 25, 2025
4a74c9f
fix(aggregator): add single signature authentication in signature pro…
jpraynaud Aug 22, 2025
fb5cda7
feat(e2e): support for fake DMQ node
jpraynaud Jul 8, 2025
0800bdd
feat(signer): add support for skipping the signature delayer
jpraynaud Aug 25, 2025
af9fa40
refactor(signer): make signature publisher build more readable in CI
jpraynaud Aug 28, 2025
e73bd0a
feat(e2e): support skipping signature delayer in signer
jpraynaud Aug 25, 2025
ee076df
fix(kes): fake KES signer dummy signature creates flakiness in tests
jpraynaud Aug 28, 2025
218636d
fix(ci): replace remaining Cardano '10.3.1' with '10.4.1'
jpraynaud Aug 25, 2025
e75c1f6
docs: update CHANGELOG
jpraynaud Aug 28, 2025
1eb864b
chore: upgrade crate versions
jpraynaud Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ inputs:
description: Mithril use P2P network (experimental, for test only).
required: false
default: "false"
mithril_p2p_use_dmq_protocol:
description: Mithril P2P network use DMQ protocol (experimental, for test only).
required: false
default: "false"
mithril_p2p_network_bootstrap_peer:
description: Mithril P2P network bootstrap peer (experimental, for test only).
required: false
Expand Down Expand Up @@ -247,6 +251,7 @@ runs:
google_compute_instance_ssh_keys_environment = "${{ inputs.google_compute_instance_ssh_keys_environment }}"
google_service_credentials_json_file = "./google-application-credentials.json"
mithril_use_p2p_network = "${{ inputs.mithril_use_p2p_network }}"
mithril_p2p_use_dmq_protocol = "${{ inputs.mithril_p2p_use_dmq_protocol }}"
mithril_p2p_network_bootstrap_peer = "${{ inputs.mithril_p2p_network_bootstrap_peer }}"
mithril_p2p_signer_relay_signer_registration_mode = "${{ inputs.mithril_p2p_signer_relay_signer_registration_mode }}"
mithril_p2p_signer_relay_signature_registration_mode = "${{ inputs.mithril_p2p_signer_relay_signature_registration_mode }}"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,31 +352,31 @@ jobs:
- mode: "leader-follower"
era: ${{ fromJSON(needs.build-ubuntu.outputs.eras)[0] }}
next_era: [""]
cardano_node_version: "10.3.1"
cardano_node_version: "10.4.1"
hard_fork_latest_era_at_epoch: 0
run_id: "#1"
extra_args: "--number-of-aggregators=2 --use-relays --relay-signer-registration-mode=passthrough --relay-signature-registration-mode=p2p"
# Include a test for full dedentralization P2P signer registration and P2P signature registration
- mode: "decentralized"
era: ${{ fromJSON(needs.build-ubuntu.outputs.eras)[0] }}
next_era: ""
cardano_node_version: "10.3.1"
cardano_node_version: "10.4.1"
hard_fork_latest_era_at_epoch: 0
run_id: "#1"
extra_args: "--number-of-aggregators=2 --use-relays --relay-signer-registration-mode=p2p --relay-signature-registration-mode=p2p"
# Include a test for the era switch without regenesis
- mode: "std"
era: ${{ fromJSON(needs.build-ubuntu.outputs.eras)[0] }}
next_era: ${{ fromJSON(needs.build-ubuntu.outputs.eras)[1] }}
cardano_node_version: "10.3.1"
cardano_node_version: "10.4.1"
hard_fork_latest_era_at_epoch: 0
run_id: "#1"
extra_args: ""
# Include a test for the era switch with regenesis
- mode: "std"
era: ${{ fromJSON(needs.build-ubuntu.outputs.eras)[0] }}
next_era: ${{ fromJSON(needs.build-ubuntu.outputs.eras)[1] }}
cardano_node_version: "10.3.1"
cardano_node_version: "10.4.1"
hard_fork_latest_era_at_epoch: 0
run_id: "#1"
extra_args: "--mithril-era-regenesis-on-switch"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
environment_prefix: dev
cardano_network: preview
mithril_use_p2p_network: true
mithril_p2p_use_dmq_protocol: false
mithril_p2p_signer_relay_signer_registration_mode: passthrough
mithril_p2p_signer_relay_signature_registration_mode: p2p
mithril_api_domain: api.mithril.network
Expand Down Expand Up @@ -72,6 +73,7 @@ jobs:
environment_prefix: dev-follower
cardano_network: preview
mithril_use_p2p_network: true
mithril_p2p_use_dmq_protocol: false
mithril_p2p_network_bootstrap_peer: "/dns4/aggregator.dev-preview.api.mithril.network/tcp/6060"
mithril_p2p_signer_relay_signer_registration_mode: passthrough
mithril_p2p_signer_relay_signature_registration_mode: p2p
Expand Down Expand Up @@ -103,6 +105,7 @@ jobs:
environment_prefix: dev
cardano_network: mainnet
mithril_use_p2p_network: false
mithril_p2p_use_dmq_protocol: false
mithril_api_domain: api.mithril.network
mithril_era_reader_adapter_type: bootstrap
mithril_protocol_parameters: |
Expand Down Expand Up @@ -160,6 +163,7 @@ jobs:
google_compute_instance_ssh_keys_environment: testing
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
mithril_use_p2p_network: ${{ matrix.mithril_use_p2p_network }}
mithril_p2p_use_dmq_protocol: ${{ matrix.mithril_p2p_use_dmq_protocol }}
mithril_p2p_network_bootstrap_peer: ${{ matrix.mithril_p2p_network_bootstrap_peer }}
mithril_api_domain: ${{ matrix.mithril_api_domain }}
mithril_image_id: ${{ inputs.mithril_image_id }}
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ As a minor extension, we have adopted a slightly different versioning convention
- Support for Mithril era transition in the client library, CLI and WASM.

- **UNSTABLE** :
- Support for certificates chain synchronization between leader/follower aggregators.

- Support for DMQ signature publisher in the signer and signature consumer in the aggregator.

- Implement automatic certificates chain synchronization between leader/follower aggregators.
- Support for fake DMQ node implementation in the relay for testing purposes.

- Crates versions:

Expand Down
17 changes: 12 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions internal/mithril-dmq/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mithril-dmq"
description = "Mechanisms to publish and consume messages of a 'Decentralized Message Queue network' through a DMQ node"
version = "0.1.9"
version = "0.1.10"
authors.workspace = true
documentation.workspace = true
edition.workspace = true
Expand All @@ -10,18 +10,27 @@ license.workspace = true
repository.workspace = true
include = ["**/*.rs", "Cargo.toml", "README.md", ".gitignore"]

[package.metadata.cargo-machete]
# `serde_bytes` is used for DmqMessage serialization
ignored = ["serde_bytes"]

[lib]
crate-type = ["lib", "cdylib", "staticlib"]

[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
bincode = { version = "2.0.1" }
blake2 = "0.10.6"
mithril-cardano-node-chain = { path = "../cardano-node/mithril-cardano-node-chain" }
mithril-common = { path = "../../mithril-common" }
pallas-codec = { git = "https://github.com/txpipe/pallas.git", branch = "main" }
pallas-network = { git = "https://github.com/txpipe/pallas.git", branch = "main" }
serde = { workspace = true }
serde_bytes = "0.11.17"
slog = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
slog-scope = "4.4.0"
tokio = { workspace = true, features = ["sync","rt-multi-thread"] }

[dev-dependencies]
mockall = { workspace = true }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use std::fmt::Debug;

use mithril_common::{StdResult, crypto_helper::TryFromBytes, entities::PartyId};

/// Trait for consuming messages from a DMQ node.
/// Trait for the client side of consuming messages from a DMQ node.
#[cfg_attr(test, mockall::automock)]
#[async_trait::async_trait]
pub trait DmqConsumer<M: TryFromBytes + Debug + Send + Sync>: Send + Sync {
pub trait DmqConsumerClient<M: TryFromBytes + Debug + Send + Sync>: Send + Sync {
/// Consume messages from the DMQ node.
async fn consume_messages(&self) -> StdResult<Vec<(M, PartyId)>>;
}
5 changes: 5 additions & 0 deletions internal/mithril-dmq/src/consumer/client/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mod interface;
mod pallas;

pub use interface::*;
pub use pallas::*;
Loading
Loading