Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a80c67e
refactor(stm): extract concatenation proof from aggregate signature
jpraynaud Sep 11, 2025
8decd04
feat(stm): make 'AggregateSignature' support multiple proof systems
jpraynaud Sep 11, 2025
bd4b7cd
refactor(stm): move proof type encoding byte to aggregate signature
jpraynaud Sep 12, 2025
d0acad1
feat(stm): implement future proof system placeholder
jpraynaud Sep 12, 2025
927459b
fix(stm): clippy warnings
jpraynaud Sep 15, 2025
140d082
refactor(stm): make prop tests work on concatenation proof
jpraynaud Sep 15, 2025
1ebdc3f
fix(stm): remove unnecessary tests on bincode/serde (de)serialization
jpraynaud Sep 15, 2025
3eba19b
feat(stm): implement support for multiple proof types in clerk
jpraynaud Sep 16, 2025
e45715c
feat(common): re-expose 'AggregateSignatureType' from STM
jpraynaud Sep 16, 2025
38f5859
feat(aggregator): add aggregate signature type in serve configuration
jpraynaud Sep 16, 2025
c6f3945
feat(aggregator): add aggregate signature type in root route
jpraynaud Sep 16, 2025
571c9c0
feat(stm): implement default for 'AggregateSignature'
jpraynaud Sep 17, 2025
8ea1fcd
feat(common): add support for aggregate signature type in multi signe…
jpraynaud Sep 17, 2025
9c3052f
feat(aggregator): add support for aggregate signature type in multi s…
jpraynaud Sep 17, 2025
49a6908
feat(e2e): support for aggregate signature type selection
jpraynaud Sep 17, 2025
a6bf21b
feat(ci): support for aggregate signature type selection
jpraynaud Sep 17, 2025
ed53db7
feat(infa): support for aggregate signature type selection
jpraynaud Sep 17, 2025
143962c
feat(ci): support for aggregate signature type selection
jpraynaud Sep 17, 2025
8cc965e
docs: update aggregator node documentation on wwebsite
jpraynaud Sep 18, 2025
c563417
feat(explorer): display aggregation type in aggregator status
jpraynaud Sep 18, 2025
abf2fa3
chore(stm): apply review comments
jpraynaud Oct 7, 2025
b344bd3
docs: update CHANGELOG
jpraynaud Oct 7, 2025
d4b30d4
chore: upgrade crate versions
jpraynaud Oct 7, 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 @@ -114,6 +114,10 @@ inputs:
description: Mithril aggregator signed entity types parameters (discriminants names in an ordered comma separated list).
required: false
default: ""
mithril_aggregator_aggregate_signature_type:
description: Mithril aggregator aggregate signature type used to create certificates.
required: false
default: "Concatenation"
mithril_aggregator_cdn_cname:
description: Mithril aggregator uses CDN domain for constructing snapshot url.
required: true
Expand Down Expand Up @@ -266,6 +270,7 @@ runs:
mithril_era_reader_verification_key_url = "${{ inputs.mithril_era_reader_verification_key_url }}"
mithril_era_reader_secret_key = "${{ inputs.mithril_era_reader_secret_key }}"
mithril_aggregator_signed_entity_types = "${{ inputs.mithril_aggregator_signed_entity_types }}"
mithril_aggregator_aggregate_signature_type = "${{ inputs.mithril_aggregator_aggregate_signature_type }}"
mithril_aggregator_cdn_cname = "${{ inputs.mithril_aggregator_cdn_cname }}"
mithril_aggregator_snapshot_use_cdn_domain = ${{ inputs.mithril_aggregator_snapshot_use_cdn_domain }}
mithril_aggregator_snapshot_compression_algorithm = "${{ inputs.mithril_aggregator_snapshot_compression_algorithm }}"
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ jobs:
cardano_node_version: ["10.4.1", "10.5.1"]
hard_fork_latest_era_at_epoch: [0]
run_id: ["#1", "#2", "#3"]
extra_args: [""]
extra_args: ["--aggregate-signature-type=Concatenation"]

include:
# Include a test for partial decentralization with leader/follower signer registration and P2P signature registration
Expand All @@ -355,31 +355,31 @@ jobs:
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"
extra_args: "--number-of-aggregators=2 --use-relays --relay-signer-registration-mode=passthrough --relay-signature-registration-mode=p2p --aggregate-signature-type=Concatenation"
# 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.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"
extra_args: "--number-of-aggregators=2 --use-relays --relay-signer-registration-mode=p2p --relay-signature-registration-mode=p2p --aggregate-signature-type=Concatenation"
# 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.4.1"
hard_fork_latest_era_at_epoch: 0
run_id: "#1"
extra_args: ""
extra_args: "--aggregate-signature-type=Concatenation"
# 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.4.1"
hard_fork_latest_era_at_epoch: 0
run_id: "#1"
extra_args: "--mithril-era-regenesis-on-switch"
extra_args: "--mithril-era-regenesis-on-switch --aggregate-signature-type=Concatenation"
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -798,6 +798,7 @@ jobs:
mithril_era_reader_verification_key_url: ${{ vars.ERA_READER_VERIFICATION_KEY_URL }}
mithril_era_reader_secret_key: ${{ secrets.ERA_READER_SECRET_KEY }}
mithril_aggregator_signed_entity_types: ${{ vars.AGGREGATOR_SIGNED_ENTITY_TYPES }}
mithril_aggregator_aggregate_signature_type: ${{ vars.AGGREGATOR_AGGREGATE_SIGNATURE_TYPE }}
mithril_aggregator_cdn_cname: ${{ vars.AGGREGATOR_CDN_CNAME }}
mithril_aggregator_snapshot_use_cdn_domain: ${{ vars.AGGREGATOR_USE_CDN_DOMAIN }}
mithril_aggregator_snapshot_compression_algorithm: ${{ vars.AGGREGATOR_SNAPSHOT_COMPRESSION_ALGORITHM }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ jobs:
mithril_era_reader_verification_key_url: ${{ vars.ERA_READER_VERIFICATION_KEY_URL }}
mithril_era_reader_secret_key: ${{ secrets.ERA_READER_SECRET_KEY }}
mithril_aggregator_signed_entity_types: ${{ vars.AGGREGATOR_SIGNED_ENTITY_TYPES }}
mithril_aggregator_aggregate_signature_type: ${{ vars.AGGREGATOR_AGGREGATE_SIGNATURE_TYPE }}
mithril_aggregator_cdn_cname: ${{ vars.AGGREGATOR_CDN_CNAME }}
mithril_aggregator_snapshot_use_cdn_domain: ${{ vars.AGGREGATOR_USE_CDN_DOMAIN }}
mithril_aggregator_snapshot_compression_algorithm: ${{ vars.AGGREGATOR_SNAPSHOT_COMPRESSION_ALGORITHM }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ jobs:
mithril_era_reader_address_url: ${{ vars.ERA_READER_ADDRESS_URL }}
mithril_era_reader_verification_key_url: ${{ vars.ERA_READER_VERIFICATION_KEY_URL }}
mithril_aggregator_signed_entity_types: ${{ vars.AGGREGATOR_SIGNED_ENTITY_TYPES }}
mithril_aggregator_aggregate_signature_type: ${{ vars.AGGREGATOR_AGGREGATE_SIGNATURE_TYPE }}
mithril_aggregator_cdn_cname: ${{ vars.AGGREGATOR_CDN_CNAME }}
mithril_aggregator_snapshot_use_cdn_domain: ${{ vars.AGGREGATOR_USE_CDN_DOMAIN }}
mithril_aggregator_snapshot_compression_algorithm: ${{ vars.AGGREGATOR_SNAPSHOT_COMPRESSION_ALGORITHM }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ jobs:
mithril_era_reader_verification_key_url: ${{ vars.ERA_READER_VERIFICATION_KEY_URL }}
mithril_era_reader_secret_key: ${{ secrets.ERA_READER_SECRET_KEY }}
mithril_aggregator_signed_entity_types: ${{ vars.AGGREGATOR_SIGNED_ENTITY_TYPES }}
mithril_aggregator_aggregate_signature_type: ${{ vars.AGGREGATOR_AGGREGATE_SIGNATURE_TYPE }}
mithril_aggregator_cdn_cname: ${{ vars.AGGREGATOR_CDN_CNAME }}
mithril_aggregator_snapshot_use_cdn_domain: ${{ vars.AGGREGATOR_USE_CDN_DOMAIN }}
mithril_aggregator_snapshot_compression_algorithm: ${{ vars.AGGREGATOR_SNAPSHOT_COMPRESSION_ALGORITHM }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ As a minor extension, we have adopted a slightly different versioning convention

- **BREAKING** changes in aggregator OpenAPI: removed the `next_cardano_transactions_signing_config` in `/epoch-settings` route.

- Support for multiple aggregate signature proof systems.

- Crates versions:

| Crate | Version |
Expand Down
9 changes: 4 additions & 5 deletions Cargo.lock

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

8 changes: 7 additions & 1 deletion demo/protocol-demo/src/demonstrator.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use hex::ToHex;
use mithril_stm::AggregateSignatureType;
use rand_core::{CryptoRng, RngCore};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
Expand Down Expand Up @@ -142,7 +143,12 @@ impl Party {
message: &Vec<u8>,
signatures: &[ProtocolSingleSignature],
) -> Option<&ProtocolMultiSignature> {
let msig = self.clerk.as_ref().unwrap().aggregate_signatures(signatures, message);
let aggregate_signature_type = AggregateSignatureType::Concatenation;
let msig = self.clerk.as_ref().unwrap().aggregate_signatures_with_type(
signatures,
message,
aggregate_signature_type,
);
match msig {
Ok(aggregate_signature) => {
println!("Party #{}: aggregate signature computed", self.party_id);
Expand Down
2 changes: 1 addition & 1 deletion demo/protocol-demo/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub type ProtocolKeyRegistrationNotCertified = KeyRegistration;
/// Alias of [MithrilStm:SingleSignature](struct@mithril_stm::SingleSignature).
pub type ProtocolSingleSignature = SingleSignature;

/// Alias of [MithrilStm:AggregateSignature](struct@mithril_stm::AggregateSignature).
/// Alias of [MithrilStm:AggregateSignature](enum@mithril_stm::AggregateSignature).
pub type ProtocolMultiSignature = AggregateSignature<D>;

/// Alias of [MithrilStm:VerificationKeyProofOfPossession](type@mithril_stm::VerificationKeyProofOfPossession).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ Here is a list of the available parameters for the serve command:
| `metrics_server_port` | `--metrics-server-port` | - | `METRICS_SERVER_PORT` | Metrics HTTP server listening port | `9090` | - | - |
| `persist_usage_report_interval_in_seconds` | | - | `PERSIST_USAGE_REPORT_INTERVAL_IN_SECONDS` | Duration in seconds between two recording of usage metrics | `10` | `5` | - |
| `leader_aggregator_endpoint` | `--leader-aggregator-endpoint` | - | `LEADER_AGGREGATOR_ENDPOINT` | Leader aggregator endpoint (used with unstable feature) | - | `https://aggregator.pre-release-preview.api.mithril.network/aggregator` | - |
| `aggregate_signature_type` | - | - | `AGGREGATE_SIGNATURE_TYPE` | Aggregate signature type used to create certificates | `Concatenation` | - | :heavy_check_mark: |

`genesis bootstrap` command:

Expand Down
2 changes: 1 addition & 1 deletion mithril-aggregator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mithril-aggregator"
version = "0.7.86"
version = "0.7.87"
description = "A Mithril Aggregator server"
authors = { workspace = true }
edition = { workspace = true }
Expand Down
20 changes: 19 additions & 1 deletion mithril-aggregator/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use mithril_common::entities::{
HexEncodedGenesisVerificationKey, HexEncodedKey, ProtocolParameters, SignedEntityConfig,
SignedEntityTypeDiscriminants,
};
use mithril_common::{CardanoNetwork, StdResult};
use mithril_common::{AggregateSignatureType, CardanoNetwork, StdResult};
use mithril_doc::{Documenter, DocumenterDefault, StructDoc};
use mithril_era::adapters::EraReaderAdapterType;

Expand Down Expand Up @@ -382,6 +382,11 @@ pub trait ConfigurationSource {

white_list
}

/// Aggregate signature type
fn aggregate_signature_type(&self) -> AggregateSignatureType {
panic!("get_aggregate_signature_type is not implemented.");
}
}

/// Serve command configuration
Expand Down Expand Up @@ -557,6 +562,9 @@ pub struct ServeCommandConfiguration {
/// Custom origin tag of client request added to the whitelist (comma
/// separated list).
pub custom_origin_tag_white_list: Option<String>,

/// Aggregate signature type used to create certificates
pub aggregate_signature_type: AggregateSignatureType,
}

/// Uploader needed to copy the snapshot once computed.
Expand Down Expand Up @@ -689,6 +697,7 @@ impl ServeCommandConfiguration {
persist_usage_report_interval_in_seconds: 10,
leader_aggregator_endpoint: None,
custom_origin_tag_white_list: None,
aggregate_signature_type: AggregateSignatureType::Concatenation,
}
}

Expand Down Expand Up @@ -880,6 +889,10 @@ impl ConfigurationSource for ServeCommandConfiguration {
None => self.get_local_server_url(),
}
}

fn aggregate_signature_type(&self) -> AggregateSignatureType {
self.aggregate_signature_type
}
}

/// Default configuration with all the default values for configurations.
Expand Down Expand Up @@ -955,6 +968,9 @@ pub struct DefaultConfiguration {

/// Time interval at which metrics are persisted in event database (in seconds).
pub persist_usage_report_interval_in_seconds: u64,

/// Aggregate signature type used to create certificates
pub aggregate_signature_type: String,
}

impl Default for DefaultConfiguration {
Expand Down Expand Up @@ -986,6 +1002,7 @@ impl Default for DefaultConfiguration {
metrics_server_ip: "0.0.0.0".to_string(),
metrics_server_port: 9090,
persist_usage_report_interval_in_seconds: 10,
aggregate_signature_type: "Concatenation".to_string(),
}
}
}
Expand Down Expand Up @@ -1069,6 +1086,7 @@ impl Source for DefaultConfiguration {
("step".to_string(), ValueKind::from(*v.step),)
])
);
register_config_value!(result, &namespace, myself.aggregate_signature_type);
Ok(result)
}
}
Expand Down
1 change: 1 addition & 0 deletions mithril-aggregator/src/dependency_injection/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ impl DependenciesBuilder {
cardano_node_version: self.configuration.cardano_node_version(),
allow_http_serve_directory: self.configuration.allow_http_serve_directory(),
origin_tag_white_list: self.configuration.compute_origin_tag_white_list(),
aggregate_signature_type: self.configuration.aggregate_signature_type(),
},
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ impl DependenciesBuilder {
}

async fn build_multi_signer(&mut self) -> Result<Arc<dyn MultiSigner>> {
let multi_signer =
MultiSignerImpl::new(self.get_epoch_service().await?, self.root_logger());
let multi_signer = MultiSignerImpl::new(
self.configuration.aggregate_signature_type(),
self.get_epoch_service().await?,
self.root_logger(),
);

Ok(Arc::new(multi_signer))
}
Expand Down
8 changes: 8 additions & 0 deletions mithril-aggregator/src/http_server/routes/root_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ fn root(
.and(middlewares::extract_config(router_state, |config| {
config.allowed_discriminants.clone()
}))
.and(middlewares::extract_config(router_state, |config| {
config.aggregate_signature_type
}))
.and(middlewares::extract_config(router_state, |config| {
config.cardano_transactions_prover_max_hashes_allowed_by_request
}))
Expand All @@ -28,6 +31,7 @@ mod handlers {
use std::collections::BTreeSet;
use std::{convert::Infallible, sync::Arc};

use mithril_common::AggregateSignatureType;
use slog::Logger;
use warp::http::StatusCode;

Expand All @@ -45,6 +49,7 @@ mod handlers {
logger: Logger,
api_version_provider: Arc<APIVersionProvider>,
allowed_signed_entity_type_discriminants: BTreeSet<SignedEntityTypeDiscriminants>,
aggregate_signature_type: AggregateSignatureType,
max_hashes_allowed_by_request: usize,
) -> Result<impl warp::Reply, Infallible> {
let open_api_version = unwrap_to_internal_server_error!(
Expand All @@ -54,6 +59,7 @@ mod handlers {

let mut capabilities = AggregatorCapabilities {
signed_entity_types: allowed_signed_entity_type_discriminants,
aggregate_signature_type,
cardano_transactions_prover: None,
};

Expand Down Expand Up @@ -87,6 +93,7 @@ mod tests {
use warp::test::request;

use mithril_api_spec::APISpec;
use mithril_common::AggregateSignatureType;
use mithril_common::entities::SignedEntityTypeDiscriminants;
use mithril_common::messages::{
AggregatorCapabilities, AggregatorFeaturesMessage, CardanoTransactionsProverCapabilities,
Expand Down Expand Up @@ -155,6 +162,7 @@ mod tests {
SignedEntityTypeDiscriminants::CardanoImmutableFilesFull,
SignedEntityTypeDiscriminants::MithrilStakeDistribution,
]),
aggregate_signature_type: AggregateSignatureType::Concatenation,
cardano_transactions_prover: None,
},
}
Expand Down
4 changes: 3 additions & 1 deletion mithril-aggregator/src/http_server/routes/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use mithril_common::entities::SignedEntityTypeDiscriminants;
#[cfg(test)]
use mithril_common::test::double::Dummy;
use mithril_common::{
CardanoNetwork, MITHRIL_API_VERSION_HEADER, MITHRIL_CLIENT_TYPE_HEADER,
AggregateSignatureType, CardanoNetwork, MITHRIL_API_VERSION_HEADER, MITHRIL_CLIENT_TYPE_HEADER,
MITHRIL_ORIGIN_TAG_HEADER,
};

Expand All @@ -35,6 +35,7 @@ pub struct RouterConfig {
pub cardano_node_version: String,
pub allow_http_serve_directory: bool,
pub origin_tag_white_list: HashSet<String>,
pub aggregate_signature_type: AggregateSignatureType,
}

#[cfg(test)]
Expand All @@ -53,6 +54,7 @@ impl Dummy for RouterConfig {
cardano_node_version: "1.2.3".to_string(),
allow_http_serve_directory: false,
origin_tag_white_list: HashSet::from(["DUMMY_TAG".to_string()]),
aggregate_signature_type: AggregateSignatureType::Concatenation,
}
}
}
Expand Down
Loading
Loading