Skip to content

Feat(infra): support follower aggregator in infra #2407

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

Merged
merged 15 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,18 @@ inputs:
description: Mithril use P2P network (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
default: ""
mithril_p2p_signer_relay_signer_registration_mode:
description: Mithril P2P network signer relay signer registration mode ('p2p' or 'passthrough') (experimental, for test only).
required: false
default: "passthrough"
mithril_p2p_signer_relay_signature_registration_mode:
description: Mithril P2P network signer relay signature registration mode ('p2p' or 'passthrough') (experimental, for test only).
required: false
default: "p2p"
mithril_api_domain:
description: Mithril network api domain root.
required: true
Expand Down Expand Up @@ -133,6 +145,10 @@ inputs:
mithril_aggregator_cardano_transactions_signing_config_step:
description: Mithril aggregator number of blocks between signature of the Cardano transactions
required: true
mithril_aggregator_leader_aggregator_endpoint:
description: Mithril aggregator leader aggregator endpoint to follow.
required: false
default: ""
prometheus_auth_username:
description: Prometheus metrics endpoint username.
required: false
Expand Down Expand Up @@ -204,6 +220,9 @@ 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_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 }}"
mithril_api_domain = "${{ inputs.mithril_api_domain }}"
mithril_image_id = "${{ inputs.mithril_image_id }}"
mithril_genesis_verification_key_url = "${{ inputs.mithril_genesis_verification_key_url }}"
Expand All @@ -226,6 +245,7 @@ runs:
mithril_aggregator_cardano_transactions_database_connection_pool_size = "${{ inputs.mithril_aggregator_cardano_transactions_database_connection_pool_size }}"
mithril_aggregator_cardano_transactions_signing_config_security_parameter = "${{ inputs.mithril_aggregator_cardano_transactions_signing_config_security_parameter }}"
mithril_aggregator_cardano_transactions_signing_config_step = "${{ inputs.mithril_aggregator_cardano_transactions_signing_config_step }}"
mithril_aggregator_leader_aggregator_endpoint = "${{ inputs.mithril_aggregator_leader_aggregator_endpoint }}"
prometheus_auth_username = "${{ inputs.prometheus_auth_username }}"
prometheus_auth_password = "${{ inputs.prometheus_auth_password }}"
prometheus_ingest_host = "${{ inputs.prometheus_ingest_host }}"
Expand Down
47 changes: 42 additions & 5 deletions .github/workflows/test-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
type: choice
options:
- dev-preview
- dev-follower-preview
- dev-mainnet
dry_run:
description: Dry run will not deploy the distribution to the Mithril network
Expand All @@ -27,12 +28,14 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: [dev-preview, dev-mainnet]
environment: [dev-preview, dev-follower-preview, dev-mainnet]
include:
- environment: dev-preview
environment_prefix: dev
cardano_network: preview
mithril_use_p2p_network: true
mithril_p2p_signer_relay_signer_registration_mode: passthrough
mithril_p2p_signer_relay_signature_registration_mode: p2p
mithril_api_domain: api.mithril.network
mithril_era_reader_adapter_type: cardano-chain
mithril_protocol_parameters: |
Expand All @@ -44,18 +47,19 @@ jobs:
mithril_signers: |
{
"1" = {
type = "unverified",
type = "unverified-cardano-passive-norelay",
pool_id = "pool1vapqexnsx6hvc588yyysxpjecf3k43hcr5mvhmstutuvy085xpa",
},
"2" = {
type = "unverified",
type = "unverified-cardano-passive-norelay",
pool_id = "pool1t9uuagsat8hlr0n0ga4wzge0jxlyjuhl6mugrm8atc285vzkf2e",
},
"3" = {
type = "unverified",
type = "unverified-cardano-passive-norelay",
pool_id = "pool1r0tln8nct3mpyvehgy6uu3cdlmjnmtr2fxjcqnfl6v0qg0we42e",
},
}
mithril_leader_aggregator_endpoint: ""
terraform_backend_bucket: hydra-terraform-admin
google_region: europe-west1
google_zone: europe-west1-b
Expand All @@ -64,6 +68,36 @@ jobs:
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 250
google_compute_instance_data_disk_type: pd-standard
- environment: dev-follower-preview
environment_prefix: dev-follower
cardano_network: preview
mithril_use_p2p_network: true
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
mithril_api_domain: api.mithril.network
mithril_era_reader_adapter_type: cardano-chain
mithril_protocol_parameters: {
k = 5
m = 100
phi_f = 0.65,
}
mithril_signers: |
{
"1" = {
type = "unverified-cardano-passive-norelay",
pool_id = "pool1y0uxkqyplyx6ld25e976t0s35va3ysqcscatwvy2sd2cwcareq7",
},
}
mithril_leader_aggregator_endpoint: https://aggregator.dev-preview.api.mithril.network/aggregator
terraform_backend_bucket: hydra-terraform-admin
google_region: europe-west1
google_zone: europe-west1-b
google_machine_type: e2-highmem-2
google_compute_instance_boot_disk_size: 200
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 250
google_compute_instance_data_disk_type: pd-standard
- environment: dev-mainnet
environment_prefix: dev
cardano_network: mainnet
Expand All @@ -79,10 +113,11 @@ jobs:
mithril_signers: |
{
"1" = {
type = "unverified-alone",
type = "unverified-cardano-shared",
pool_id = "pool1re8cmjt895tpx8dx2veg0cew5yqtxnt82sll03e433a4ugnh9w7",
}
}
mithril_leader_aggregator_endpoint: ""
terraform_backend_bucket: hydra-terraform-admin
google_region: europe-west1
google_zone: europe-west1-b
Expand Down Expand Up @@ -124,6 +159,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_network_bootstrap_peer: ${{ matrix.mithril_p2p_network_bootstrap_peer }}
mithril_api_domain: ${{ matrix.mithril_api_domain }}
mithril_image_id: ${{ inputs.mithril_image_id }}
mithril_protocol_parameters: ${{ toJSON(matrix.mithril_protocol_parameters) }}
Expand All @@ -146,6 +182,7 @@ jobs:
mithril_aggregator_cardano_transactions_database_connection_pool_size: ${{ vars.AGGREGATOR_CARDANO_TRANSACTIONS_DATABASE_CONNECTION_POOL_SIZE }}
mithril_aggregator_cardano_transactions_signing_config_security_parameter: ${{ vars.AGGREGATOR_CARDANO_TRANSACTIONS_SIGNING_CONFIG_SECURITY_PARAMETER }}
mithril_aggregator_cardano_transactions_signing_config_step: ${{ vars.AGGREGATOR_CARDANO_TRANSACTIONS_SIGNING_CONFIG_STEP }}
mithril_aggregator_leader_aggregator_endpoint: ${{ matrix.mithril_leader_aggregator_endpoint }}
prometheus_auth_username: ${{ secrets.PROMETHEUS_AUTH_USERNAME }}
prometheus_auth_password: ${{ secrets.PROMETHEUS_AUTH_PASSWORD }}
prometheus_ingest_host: ${{ vars.PROMETHEUS_INGEST_HOST }}
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

- Add `with_origin_tag` function to the Mithril client library to record the origin of client requests.

- **UNSTABLE** implement support for leader/follower registration in the infrastructure.

- Crates versions:

| Crate | Version |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
services:
mithril-aggregator:
labels:
- "traefik.http.routers.mithril-aggregator.middlewares=test-auth,test-compress"
- "traefik.http.middlewares.test-auth.basicauth.users=${AUTH_USER_PASSWORD}"
138 changes: 0 additions & 138 deletions mithril-infra/assets/docker/docker-compose-aggregator-auth-p2p.yaml

This file was deleted.

Loading
Loading