Skip to content

feat(dashmate): add Tenderdash 1.6 allowlistOnly option#3067

Open
lklimek wants to merge 2 commits intov3.1-devfrom
feat/dashmate-td-allowlistOnly
Open

feat(dashmate): add Tenderdash 1.6 allowlistOnly option#3067
lklimek wants to merge 2 commits intov3.1-devfrom
feat/dashmate-td-allowlistOnly

Conversation

@lklimek
Copy link
Contributor

@lklimek lklimek commented Feb 6, 2026

Issue being fixed or feature implemented

Add dashmate support for Tenderdash PR #1248 (P2P allowlist-only mode) and update default Tenderdash image to 1.6-dev so configs can use the new feature.

What was done?

  • Added platform.drive.tenderdash.p2p.allowlistOnly to base defaults and schema.
  • Rendered allowlist-only in Tenderdash config.toml template.
  • Documented the new option in Tenderdash config docs.
  • Added migration to backfill allowlistOnly and update platform.drive.tenderdash.docker.image to the new default.
  • Updated base default Tenderdash image tag to dashpay/tenderdash:1.6-dev.

How Has This Been Tested?

Not run locally.

Breaking Changes

None.

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

If you want, I can tailor the “Issue” section to a specific ticket or add test details if you run any.

Summary by CodeRabbit

  • New Features

    • Updated Tenderdash Docker image to dashpay/tenderdash:1.6-dev.1
    • Added P2P allowlistOnly toggle (default: false) and new P2P tuning params: recvRate, maxConnections, maxOutgoingConnections
  • Chores

    • Added an automated migration for v3.1.0 to align existing configs with the new image and allowlist setting
  • Documentation

    • Documented the new P2P allowlist option and examples

@github-actions github-actions bot added this to the v3.1.0 milestone Feb 6, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Added a tenderdash p2p allowlistOnly option and related p2p parameters, updated the tenderdash docker image to dashpay/tenderdash:1.6-dev.1, and added a config migration that applies the new docker image and allowlistOnly default to existing configs.

Changes

Cohort / File(s) Summary
Tenderdash defaults & p2p params
packages/dashmate/configs/defaults/getBaseConfigFactory.js
Updated docker image to dashpay/tenderdash:1.6-dev.1; added p2p.allowlistOnly: false, recvRate: 5120000, maxConnections: 64, maxOutgoingConnections: 30 (kept existing sendRate, flushThrottleTimeout, etc.).
JSON schema
packages/dashmate/src/config/configJsonSchema.js
Added optional boolean allowlistOnly to tenderdash.p2p schema.
Documentation
packages/dashmate/docs/config/tenderdash.md
Documented new platform.drive.tenderdash.p2p.allowlistOnly option with description, default, and example.
Config migrations
packages/dashmate/configs/getConfigFileMigrationsFactory.js
Added 3.1.0 migration to set default platform.drive.tenderdash.docker.image and populate platform.drive.tenderdash.p2p.allowlistOnly when absent.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped through configs, tidy and spry,
A flag for peers, now "allowlist" nearby,
Image updated, migrations on cue,
Schema and docs joined the debut,
Hooray — small steps for a rabbit and crew! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the changeset, which is to add support for Tenderdash 1.6's allowlistOnly option.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/dashmate-td-allowlistOnly

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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: 1

🤖 Fix all issues with AI agents
In `@packages/dashmate/src/config/configJsonSchema.js`:
- Around line 1076-1078: The schema defines tenderdash.p2p.allowlistOnly but it
is missing from the tenderdash.p2p.required array; update the JSON Schema by
adding "allowlistOnly" to the required array for tenderdash.p2p so the property
is treated consistently with other p2p fields (locate the tenderdash.p2p object
and its required array near the existing properties and include the string
"allowlistOnly" there).
🧹 Nitpick comments (2)
packages/dashmate/configs/defaults/getBaseConfigFactory.js (1)

344-348: Indentation: image should be nested inside docker.

Line 347's image property is at the same indentation level as docker on Line 346, rather than being indented 2 spaces inside the docker: { } block. While JavaScript doesn't enforce indentation in object literals, this inconsistency hurts readability and violates the 2-space indent guideline.

🔧 Fix indentation
-            tenderdash: {
-              mode: 'full',
-              docker: {
-              image: 'dashpay/tenderdash:1.6-dev',
-              },
+            tenderdash: {
+              mode: 'full',
+              docker: {
+                image: 'dashpay/tenderdash:1.6-dev',
+              },

As per coding guidelines, **/*.{js,jsx,ts,tsx}: Use 2-space indent for JS/TS files.

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

1401-1420: Migration logic follows established patterns — LGTM.

The optional chaining guards, typeof === 'undefined' check, and getDefaultConfigByNameOrGroup usage are all consistent with existing migrations in this file.

One note: the migration key is '3.1.0' (a release version), but the PR targets v3.1-dev and the Tenderdash image is 1.6-dev. Other in-development migrations use a -dev.N suffix (e.g., '2.1.0-dev.1'). If more migrations are expected before the 3.1.0 release, consider renaming this to '3.1.0-dev.1' to leave room for additional ordered migrations.

Comment on lines +1076 to +1078
allowlistOnly: {
type: 'boolean',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

allowlistOnly is not in the required array for p2p.

Every other property in tenderdash.p2p is listed in required (Line 1103), but allowlistOnly is missing. Since the 3.1.0 migration backfills this field and the base default config always includes it, all configs will have this property after migration. Consider adding it to required for consistency.

🔧 Proposed fix
-                  required: ['host', 'port', 'persistentPeers', 'seeds', 'flushThrottleTimeout', 'maxPacketMsgPayloadSize', 'sendRate', 'recvRate', 'maxConnections', 'maxOutgoingConnections'],
+                  required: ['host', 'port', 'persistentPeers', 'seeds', 'allowlistOnly', 'flushThrottleTimeout', 'maxPacketMsgPayloadSize', 'sendRate', 'recvRate', 'maxConnections', 'maxOutgoingConnections'],

Also applies to: 1103-1104

🤖 Prompt for AI Agents
In `@packages/dashmate/src/config/configJsonSchema.js` around lines 1076 - 1078,
The schema defines tenderdash.p2p.allowlistOnly but it is missing from the
tenderdash.p2p.required array; update the JSON Schema by adding "allowlistOnly"
to the required array for tenderdash.p2p so the property is treated consistently
with other p2p fields (locate the tenderdash.p2p object and its required array
near the existing properties and include the string "allowlistOnly" there).

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