Skip to content

feat(dashmate): allow configuring zmq using dashmate #2697

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

Open
wants to merge 2 commits into
base: v2.1-dev
Choose a base branch
from

Conversation

lklimek
Copy link
Contributor

@lklimek lklimek commented Jul 10, 2025

Issue being fixed or feature implemented

To use dash-evo-tool with a local network, we need to expose zeromq.

What was done?

Added config option core.zmq to control how zeromq is exposed.

How Has This Been Tested?

GHA

Breaking Changes

New config is needed, but migrations are done.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • New Features

    • Added configurable ZeroMQ (ZMQ) interface options (host and port) to the Core service configuration, allowing customization of real-time blockchain event notifications.
    • ZMQ port can now be individually set for each local node, supporting multi-node setups.
  • Bug Fixes

    • Ensured consistent and configurable ZMQ port usage across services via environment variables.
  • Documentation

    • Updated documentation to describe ZMQ configuration options, port exposure, and usage within the Core service and Dashmate.
    • Clarified how to configure and secure the ZMQ interface, including security considerations for public exposure.

Copy link
Contributor

coderabbitai bot commented Jul 10, 2025

Walkthrough

A new zmq configuration section was introduced for the Dashmate core service, specifying host and port settings. Configuration schema, migration logic, and Docker Compose were updated to support and expose these settings. Documentation was expanded to describe ZMQ configuration, exposure, and usage, and port assignment logic was added for multi-node setups.

Changes

File(s) Change Summary
.../configs/defaults/getBaseConfigFactory.js Added zmq section to core config with host and port defaults.
.../configs/getConfigFileMigrationsFactory.js Added migration for version 2.1.0-dev.1 to insert core.zmq config if missing.
.../docker-compose.yml Updated to expose ZMQ port for core; made ZMQ port environment-driven for related services.
.../src/config/configJsonSchema.js Added zmq property to core schema; made zmq required with host and port fields.
.../src/listr/tasks/setup/setupLocalPresetTaskFactory.js Incremented core.zmq.port per node in local group config setup.
.../docs/config/core.md Added documentation for core.zmq configuration, usage, and security notes.
.../docs/services/core.md Documented ZMQ port exposure and configuration for the Core service.
.../docs/services/index.md Clarified Core ZMQ port exposure and configurability; added new section on ZMQ exposure.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Dashmate
    participant Docker
    participant Core Service
    participant DAPI

    User->>Dashmate: Configure core.zmq.host/port
    Dashmate->>Docker: Update docker-compose with ZMQ port mapping
    Docker->>Core Service: Start with ZMQ host/port env vars
    Core Service-->>DAPI: Provide ZMQ notifications via configured port
    User->>Dashmate: Run multi-node setup
    Dashmate->>Dashmate: Increment ZMQ port per node
Loading

Suggested labels

dashmate

Suggested reviewers

  • QuantumExplorer

Poem

In Dashmate’s warren, configs grow anew—
ZMQ ports now hop right through!
Docs are updated, exposure’s clear,
Ports per node, no need to fear.
With every hop, a setting’s born,
Dashmate’s core is less forlorn.
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

✅ gRPC Query Coverage Report

================================================================================
gRPC Query Coverage Report - NEW QUERIES ONLY
================================================================================

Total queries in proto: 47
Previously known queries: 47
New queries found: 0


================================================================================
Previously Missing Queries Now Implemented:
--------------------------------------------------------------------------------
✓ getTokenContractInfo

================================================================================
Summary:
--------------------------------------------------------------------------------
No new queries found
Previously missing queries now implemented: 1

Total known queries: 47
  - Implemented: 44
  - Not implemented: 2
  - Excluded: 1

Not implemented queries:
  - getConsensusParams
  - getTokenPreProgrammedDistributions

chore(dashmate): config migrations

fix(dashmate): multi-node zmq ports setup

chore: allow disabling zmq

chore: restore zmq config for dapi

chore: remove zmq.enabled
@lklimek lklimek force-pushed the feat/dashmate-zmq branch from 7f63984 to fd3476b Compare July 10, 2025 15:22
@lklimek lklimek added this to the v2.1 milestone Jul 10, 2025
@lklimek lklimek marked this pull request as ready for review July 10, 2025 15:26
@lklimek lklimek requested a review from QuantumExplorer as a code owner July 10, 2025 15:26
@lklimek lklimek requested a review from Copilot July 10, 2025 15:26
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

This PR adds support for configuring Dash Core’s ZeroMQ (ZMQ) interface via a new core.zmq configuration section. It updates templates, defaults, migrations, schema, tasks, Docker mappings, and documentation to expose host and port settings for ZMQ.

  • Introduce core.zmq in base defaults and JSON schema
  • Propagate ZMQ port offset in local cluster setup and config migrations
  • Update dash.conf template, Docker Compose, and docs to use configurable ZMQ host/port

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/dashmate/templates/core/dash.conf.dot Use it.core.zmq.port instead of hard-coded port
packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js Offset core.zmq.port per node
packages/dashmate/src/config/configJsonSchema.js Add JSON schema for core.zmq and make it required
packages/dashmate/configs/defaults/getBaseConfigFactory.js Set default core.zmq.host and core.zmq.port
packages/dashmate/configs/getConfigFileMigrationsFactory.js Add migration to inject core.zmq into existing configs
packages/dashmate/docker-compose.yml Map ${CORE_ZMQ_HOST}:${CORE_ZMQ_PORT} for Core
packages/dashmate/docs/services/index.md Document configurable ZMQ exposure
packages/dashmate/docs/services/core.md Add ZMQ row to Core service table
packages/dashmate/docs/config/core.md Document core.zmq options
Comments suppressed due to low confidence (1)

packages/dashmate/templates/core/dash.conf.dot:73

  • The ZMQ notification lines are missing their leading '-' prefix, so they won't be recognized as command-line flags in dash.conf. Add a '-' before each zmqpub* entry, for example -zmqpubrawtx=....
zmqpubrawtx=tcp://0.0.0.0:{{=it.core.zmq.port}}

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/dashmate/docs/config/core.md (1)

70-90: Comprehensive ZMQ documentation with minor style fix needed.

The documentation thoroughly covers the ZMQ configuration, including security considerations and usage examples.

Apply this diff to fix the markdown list style as flagged by the linter:

-- ZMQ provides low-latency notifications for blocks, transactions, and other blockchain events
-- **host**: Controls Docker port exposure:
-  - `127.0.0.1`: ZMQ port exposed only on localhost (local machine access)
-  - `0.0.0.0`: ZMQ port exposed on all interfaces (public internet access - use with caution)
-- **port**: The port number for ZMQ notifications
-- DAPI uses ZMQ to receive real-time blockchain data for streaming to clients
-- ZMQ notifications include raw transactions, blocks, instantlocks, and chainlocks
-- ZMQ is always enabled in Dash Core as it's used by internal components
+* ZMQ provides low-latency notifications for blocks, transactions, and other blockchain events
+* **host**: Controls Docker port exposure:
+  * `127.0.0.1`: ZMQ port exposed only on localhost (local machine access)
+  * `0.0.0.0`: ZMQ port exposed on all interfaces (public internet access - use with caution)
+* **port**: The port number for ZMQ notifications
+* DAPI uses ZMQ to receive real-time blockchain data for streaming to clients
+* ZMQ notifications include raw transactions, blocks, instantlocks, and chainlocks
+* ZMQ is always enabled in Dash Core as it's used by internal components

-**Security Note**: Be cautious when setting `host` to `0.0.0.0` as it makes ZMQ publicly accessible.
+**Security Note**: Be cautious when setting `host` to `0.0.0.0` as it makes ZMQ publicly accessible.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8b54b5d and 4994b6e.

⛔ Files ignored due to path filters (1)
  • packages/dashmate/templates/core/dash.conf.dot is excluded by !**/*.dot
📒 Files selected for processing (8)
  • packages/dashmate/configs/defaults/getBaseConfigFactory.js (1 hunks)
  • packages/dashmate/configs/getConfigFileMigrationsFactory.js (1 hunks)
  • packages/dashmate/docker-compose.yml (3 hunks)
  • packages/dashmate/docs/config/core.md (1 hunks)
  • packages/dashmate/docs/services/core.md (1 hunks)
  • packages/dashmate/docs/services/index.md (1 hunks)
  • packages/dashmate/src/config/configJsonSchema.js (2 hunks)
  • packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{js,ts,tsx}`: Lint JavaScript/TypeScript code using `yarn lint`

**/*.{js,ts,tsx}: Lint JavaScript/TypeScript code using yarn lint

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/dashmate/configs/defaults/getBaseConfigFactory.js
  • packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js
  • packages/dashmate/src/config/configJsonSchema.js
  • packages/dashmate/configs/getConfigFileMigrationsFactory.js
🧠 Learnings (9)
📓 Common learnings
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-01T13:35:47.879Z
Learning: Manage the local development environment using Docker Compose and dashmate
packages/dashmate/configs/defaults/getBaseConfigFactory.js (3)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2107
File: packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js:116-124
Timestamp: 2024-11-22T10:28:33.588Z
Learning: In `configureCoreTaskFactory` in `packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js`, the `local_seed` configuration is already established earlier in the code, so adding error handling for its absence in the 'Generating funds to use as a collateral for masternodes' task is unnecessary.
packages/dashmate/docker-compose.yml (7)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-01T13:35:47.879Z
Learning: Manage the local development environment using Docker Compose and dashmate
Learnt from: shumkov
PR: dashpay/platform#2255
File: packages/dashmate/src/status/scopes/platform.js:112-116
Timestamp: 2024-10-19T06:10:00.808Z
Learning: In the Dashmate project, when fetching from Tenderdash RPC endpoints like `/status`, `/net_info`, and `/abci_info`, if one request fails, it's likely that the others will fail as well, so individual error handling for each fetch may not be necessary.
Learnt from: lklimek
PR: dashpay/platform#2318
File: .github/workflows/tests-build-image.yml:45-45
Timestamp: 2024-11-13T10:31:30.891Z
Learning: In the dashpay/platform repository, changes to `.github/workflows/tests-build-image.yml` that switch the Docker image platform from `linux/arm64` to `linux/amd64` for testing purposes are acceptable when required to run on GitHub-hosted runners. ARM64 testing is covered on the testnet.
Learnt from: QuantumExplorer
PR: dashpay/platform#2690
File: packages/wasm-sdk/src/queries/document.rs:383-384
Timestamp: 2025-07-10T00:37:09.565Z
Learning: In the Dash platform, DPNS (Dash Platform Name Service) contracts have the same ID across all networks (mainnet, testnet, etc.), so hardcoding the DPNS contract ID is appropriate and doesn't need to be configurable.
Learnt from: shumkov
PR: dashpay/platform#2270
File: packages/dapi/lib/externalApis/tenderdash/requestTenderRpc.js:33-37
Timestamp: 2024-10-24T04:57:23.753Z
Learning: JSON-RPC errors from Tenderdash can have the same error code even when the error messages are different.
packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js (10)
Learnt from: shumkov
PR: dashpay/platform#2107
File: packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js:116-124
Timestamp: 2024-11-22T10:28:33.588Z
Learning: In `configureCoreTaskFactory` in `packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js`, the `local_seed` configuration is already established earlier in the code, so adding error handling for its absence in the 'Generating funds to use as a collateral for masternodes' task is unnecessary.
Learnt from: shumkov
PR: dashpay/platform#2298
File: packages/dashmate/src/commands/ssl/cleanup.js:33-50
Timestamp: 2024-10-31T15:37:28.986Z
Learning: In `packages/dashmate/src/commands/ssl/cleanup.js`, the `cleanupZeroSSLCertificatesTask` function already includes progress reporting within its nested `Listr` tasks, so additional progress reporting in the `CleanupCommand` is unnecessary.
Learnt from: shumkov
PR: dashpay/platform#2297
File: packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js:148-150
Timestamp: 2024-10-31T14:41:42.158Z
Learning: In the `obtainZeroSSLCertificateTaskFactory` function in `packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js`, the application already fails appropriately if `configFileRepository.write(configFile)` fails, so additional error handling around this operation is unnecessary.
Learnt from: shumkov
PR: dashpay/platform#2298
File: packages/dashmate/src/listr/tasks/ssl/zerossl/cleanupZeroSSLCertificatesTaskFactory.js:74-74
Timestamp: 2024-10-31T15:54:57.897Z
Learning: In the `cleanupZeroSSLCertificatesTask` function located in `packages/dashmate/src/listr/tasks/ssl/zerossl/cleanupZeroSSLCertificatesTaskFactory.js`, the team prefers to include a small fixed delay between all requests to avoid overloading ZeroSSL, rather than implementing exponential backoff.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2270
File: packages/dapi/lib/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.js:19-19
Timestamp: 2024-10-24T04:58:02.843Z
Learning: For operations involving Tenderdash where no client library exists yet, it's acceptable to use the Node.js built-in `crypto` module.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/dashmate/configs/defaults/getTestnetConfigFactory.js:113-117
Timestamp: 2024-10-04T09:09:05.090Z
Learning: In the Tenderdash genesis file, the `app_version` must be static because it's immutable.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/dashmate/configs/defaults/getTestnetConfigFactory.js:113-117
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the Tenderdash genesis file, the `app_version` must be static because it's immutable.
Learnt from: shumkov
PR: dashpay/platform#2270
File: packages/dapi/lib/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.js:75-77
Timestamp: 2024-10-24T04:59:20.436Z
Learning: Tenderdash's `tx` RPC method accepts transaction hashes in base64 encoding, or in hex encoding if prefixed with `0x`. Therefore, in `packages/dapi/lib/grpcServer/handlers/platform/broadcastStateTransitionHandlerFactory.js`, it's acceptable to use `stHash.toString('base64')` when calling `requestTenderRpc('tx', { hash: stHash.toString('base64') })`.
packages/dashmate/docs/services/index.md (3)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: QuantumExplorer
PR: dashpay/platform#2690
File: packages/wasm-sdk/src/queries/document.rs:383-384
Timestamp: 2025-07-10T00:37:09.565Z
Learning: In the Dash platform, DPNS (Dash Platform Name Service) contracts have the same ID across all networks (mainnet, testnet, etc.), so hardcoding the DPNS contract ID is appropriate and doesn't need to be configurable.
packages/dashmate/docs/services/core.md (4)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-01T13:35:47.879Z
Learning: Manage the local development environment using Docker Compose and dashmate
Learnt from: QuantumExplorer
PR: dashpay/platform#2690
File: packages/wasm-sdk/src/queries/document.rs:383-384
Timestamp: 2025-07-10T00:37:09.565Z
Learning: In the Dash platform, DPNS (Dash Platform Name Service) contracts have the same ID across all networks (mainnet, testnet, etc.), so hardcoding the DPNS contract ID is appropriate and doesn't need to be configurable.
packages/dashmate/src/config/configJsonSchema.js (3)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2345
File: packages/wallet-utils-contract/schema/v1/wallet-utils-contract-documents.json:49-55
Timestamp: 2024-11-25T07:49:05.419Z
Learning: In the schema definitions for the `wallet-utils-contract` (file `packages/wallet-utils-contract/schema/v1/wallet-utils-contract-documents.json`), the `$createdAt` field is a system field augmented by DPP and does not need to be defined explicitly in the schema's properties.
packages/dashmate/configs/getConfigFileMigrationsFactory.js (4)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2107
File: packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js:116-124
Timestamp: 2024-11-22T10:28:33.588Z
Learning: In `configureCoreTaskFactory` in `packages/dashmate/src/listr/tasks/setup/local/configureCoreTaskFactory.js`, the `local_seed` configuration is already established earlier in the code, so adding error handling for its absence in the 'Generating funds to use as a collateral for masternodes' task is unnecessary.
Learnt from: shumkov
PR: dashpay/platform#2297
File: packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js:148-150
Timestamp: 2024-10-31T14:41:42.158Z
Learning: In the `obtainZeroSSLCertificateTaskFactory` function in `packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js`, the application already fails appropriately if `configFileRepository.write(configFile)` fails, so additional error handling around this operation is unnecessary.
packages/dashmate/docs/config/core.md (2)
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
🪛 markdownlint-cli2 (0.17.2)
packages/dashmate/docs/config/core.md

83-83: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


84-84: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


90-90: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
  • GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
  • GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
  • GitHub Check: Build JS packages / Build JS
🔇 Additional comments (10)
packages/dashmate/configs/defaults/getBaseConfigFactory.js (1)

108-111: LGTM! Well-integrated ZMQ configuration.

The ZMQ configuration follows the established pattern for core service configurations and uses appropriate default values (localhost binding with non-conflicting port 29998).

packages/dashmate/src/listr/tasks/setup/setupLocalPresetTaskFactory.js (2)

6-6: Import reordering looks good.

The reordering of imports doesn't affect functionality and maintains alphabetical organization.


127-127: Excellent port increment implementation.

The ZMQ port increment follows the same pattern as other ports (P2P and RPC), ensuring no port conflicts in multi-node local environments.

packages/dashmate/docs/services/core.md (1)

36-36: Accurate documentation update.

The ZMQ port documentation correctly reflects the configuration values and follows the established table format. The config paths and default values match the implementation.

packages/dashmate/src/config/configJsonSchema.js (2)

310-322: Well-structured schema definition.

The ZMQ schema correctly references the host and port definitions, enforces required fields, and follows the same pattern as other core configurations.


491-491: Proper schema requirement integration.

Adding 'zmq' to the required array ensures the configuration is validated consistently with other core components.

packages/dashmate/configs/getConfigFileMigrationsFactory.js (1)

1099-1108: LGTM! Migration logic is correct and consistent.

The migration properly adds the new core.zmq configuration to existing configs that lack it, following the established pattern of other migrations in this file.

packages/dashmate/docker-compose.yml (2)

39-39: Excellent! ZMQ port exposure is now configurable.

The addition of the ZMQ port mapping using environment variables maintains consistency with other configurable ports in the docker-compose setup.


150-150: Good consistency improvement.

Replacing the hardcoded ZMQ port with the environment variable ensures all services use the same configurable port value.

Also applies to: 182-182

packages/dashmate/docs/services/index.md (1)

76-86: Excellent clarification of ZMQ port configuration.

The updated documentation correctly classifies the ZMQ port as configurable and provides clear guidance on the available configuration options, resolving the previous inconsistency.

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.

1 participant