Skip to content

fix(drive-abci): use testnet Core RPC port in env#3965

Open
thepastaclaw wants to merge 3 commits into
dashpay:v3.1-devfrom
thepastaclaw:fix-drive-abci-docker-env-fallback
Open

fix(drive-abci): use testnet Core RPC port in env#3965
thepastaclaw wants to merge 3 commits into
dashpay:v3.1-devfrom
thepastaclaw:fix-drive-abci-docker-env-fallback

Conversation

@thepastaclaw

@thepastaclaw thepastaclaw commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

The standalone rs-drive-abci testnet env file points both Core JSON-RPC clients at 9998, which is the mainnet RPC port. Testnet Core RPC should use 19998.

Note: dashmate's testnet defaults already set core.rpc.port to 19998; this PR does not change dashmate's layered config.

What was done?

  • Updated packages/rs-drive-abci/.env.testnet so both CORE_CONSENSUS_JSON_RPC_PORT and CORE_CHECK_TX_JSON_RPC_PORT use 19998.

How Has This Been Tested?

  • git diff --check origin/v3.1-dev..HEAD — clean.
  • Verified packages/dashmate/configs/defaults/getTestnetConfigFactory.js already uses core.rpc.port: 19998 at both 48f0cc34789702fa8e0cc8016189a696902ea76d and current origin/v3.1-dev.

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

Summary by CodeRabbit

  • Chores
    • Updated the testnet JSON-RPC port configuration by changing the consensus and check-tx RPC ports to their new values, to match the current DashCore testnet settings.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 62f41351-41b4-4605-aae9-981e12362df6

📥 Commits

Reviewing files that changed from the base of the PR and between e53399e and 6e34609.

📒 Files selected for processing (1)
  • packages/rs-drive-abci/.env.testnet
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/rs-drive-abci/.env.testnet

📝 Walkthrough

Walkthrough

The testnet environment file updates two DashCore JSON-RPC port values from 9998 to 19998. Host, username, and password values remain unchanged, with nearby formatting adjusted.

Changes

Drive-abci testnet environment

Layer / File(s) Summary
Testnet DashCore RPC ports
packages/rs-drive-abci/.env.testnet
CORE_CONSENSUS_JSON_RPC_PORT and CORE_CHECK_TX_JSON_RPC_PORT are changed to 19998, and the surrounding RPC entry ordering/spacing is adjusted.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hopped through the testnet dew,
And found two ports in a fresher hue.
Same host, same keys, just numbers new,
With tidy spacing all the way through.
Hop hop! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 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 change: updating rs-drive-abci testnet env to use the Core RPC port.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/dashmate/configs/getConfigFileMigrationsFactory.js (1)

1525-1559: 🗄️ Data Integrity & Integration | 🟠 Major

Resolve incorrect default config lookup for quorum size backfill.

The logic at packages/dashmate/configs/getConfigFileMigrationsFactory.js Line 1549 uses getDefaultConfigByNameOrGroup(name, options.group). When a custom config has group: null, this helper falls back to base. The base config lacks specific quorum size values (25/50/60 for testnet/local), potentially leaving backfilled sizes undefined or incorrect.

Replace the helper call with getDefaultConfigByNetwork(options.network) to reliably select the correct network-specific defaults (e.g., testnet, local).

Code fix
-            const networkDefault = getDefaultConfigByNameOrGroup(name, options.group);
+            const networkDefault = getDefaultConfigByNetwork(options.network);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/dashmate/configs/getConfigFileMigrationsFactory.js` around lines
1525 - 1559, The quorum size backfill in the migration block is using the wrong
default source when `options.group` is null, which can fall back to `base` and
miss network-specific quorum sizes. Update the
`getDefaultConfigByNameOrGroup(...)` call inside the
`options.platform?.drive?.abci` section to use
`getDefaultConfigByNetwork(options.network)` so the
`platform.drive.abci.*.quorum.size` values are copied from the correct network
defaults for `testnet`, `local`, or `mainnet`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@packages/dashmate/configs/getConfigFileMigrationsFactory.js`:
- Around line 1525-1559: The quorum size backfill in the migration block is
using the wrong default source when `options.group` is null, which can fall back
to `base` and miss network-specific quorum sizes. Update the
`getDefaultConfigByNameOrGroup(...)` call inside the
`options.platform?.drive?.abci` section to use
`getDefaultConfigByNetwork(options.network)` so the
`platform.drive.abci.*.quorum.size` values are copied from the correct network
defaults for `testnet`, `local`, or `mainnet`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: de7ca4bb-1ab2-412d-8c83-e64cd2522def

📥 Commits

Reviewing files that changed from the base of the PR and between 1653b89 and 83fdd36.

📒 Files selected for processing (11)
  • Dockerfile
  • packages/dashmate/configs/defaults/getBaseConfigFactory.js
  • packages/dashmate/configs/defaults/getLocalConfigFactory.js
  • packages/dashmate/configs/defaults/getTestnetConfigFactory.js
  • packages/dashmate/configs/getConfigFileMigrationsFactory.js
  • packages/dashmate/docker-compose.yml
  • packages/dashmate/docs/config/drive-abci.md
  • packages/dashmate/src/config/configJsonSchema.js
  • packages/rs-drive-abci/.env.docker.fallback
  • packages/rs-drive-abci/.env.testnet
  • packages/rs-drive-abci/src/config.rs

@thepastaclaw thepastaclaw changed the title fix(drive-abci): stop baking mainnet env in Docker image fix(drive-abci): use testnet Core RPC port in env Jun 25, 2026
@thepastaclaw thepastaclaw force-pushed the fix-drive-abci-docker-env-fallback branch from 83fdd36 to 71433d3 Compare June 25, 2026 15:08
@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

lklimek
lklimek previously approved these changes Jun 25, 2026
@lklimek lklimek marked this pull request as ready for review June 25, 2026 15:34
@lklimek lklimek requested a review from QuantumExplorer as a code owner June 25, 2026 15:34
@lklimek lklimek added the ready for final review Ready for the final review. If AI was involved in producing this PR, it has already had a reviewer. label Jun 25, 2026
@thepastaclaw

thepastaclaw commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Review complete (commit 6e34609)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/rs-drive-abci/.env.testnet`:
- Around line 24-29: The .env.testnet entries for CORE_CONSENSUS_JSON_RPC_* are
not in dotenv-linter alphabetical order; reorder the
CORE_CONSENSUS_JSON_RPC_PASSWORD entry ahead of CORE_CONSENSUS_JSON_RPC_PORT and
CORE_CONSENSUS_JSON_RPC_USERNAME so the variables are sorted correctly. Keep the
surrounding CORE_CHECK_TX_JSON_RPC_* block unchanged and verify the final order
in this env file matches the linter’s expected alphabetical sequence.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: decdfd2b-efa5-4252-a065-37cb90ea4a83

📥 Commits

Reviewing files that changed from the base of the PR and between 83fdd36 and e53399e.

📒 Files selected for processing (1)
  • packages/rs-drive-abci/.env.testnet

Comment thread packages/rs-drive-abci/.env.testnet
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.18%. Comparing base (48f0cc3) to head (6e34609).
⚠️ Report is 1 commits behind head on v3.1-dev.

Additional details and impacted files
@@            Coverage Diff             @@
##           v3.1-dev    #3965    +/-   ##
==========================================
  Coverage     87.17%   87.18%            
==========================================
  Files          2629     2632     +3     
  Lines        327221   327563   +342     
==========================================
+ Hits         285265   285592   +327     
- Misses        41956    41971    +15     
Components Coverage Δ
dpp 87.70% <ø> (ø)
drive 86.14% <ø> (ø)
drive-abci 89.45% <ø> (ø)
sdk ∅ <ø> (∅)
dapi-client ∅ <ø> (∅)
platform-version ∅ <ø> (∅)
platform-value 92.20% <ø> (ø)
platform-wallet ∅ <ø> (∅)
drive-proof-verifier 49.55% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review

Two-line port fix in packages/rs-drive-abci/.env.testnet correcting testnet Core JSON-RPC port from 9998 (mainnet) to 19998 (testnet). Verified against dashmate testnet defaults. No in-scope blocking or suggestion findings.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Code Review

PR correctly changes the testnet Core JSON-RPC port from mainnet's 9998 to testnet's 19998 in packages/rs-drive-abci/.env.testnet, matching dashmate's testnet default. The latest delta is a no-op alphabetical reorder of two adjacent env keys addressing the previous CodeRabbit dotenv-ordering nit. No carried-forward prior findings; no new findings in the latest delta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for final review Ready for the final review. If AI was involved in producing this PR, it has already had a reviewer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants