fix(drive-abci): use testnet Core RPC port in env#3965
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe testnet environment file updates two DashCore JSON-RPC port values from ChangesDrive-abci testnet environment
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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 | 🟠 MajorResolve incorrect default config lookup for quorum size backfill.
The logic at
packages/dashmate/configs/getConfigFileMigrationsFactory.jsLine 1549 usesgetDefaultConfigByNameOrGroup(name, options.group). When a custom config hasgroup: null, this helper falls back tobase. Thebaseconfig lacks specific quorum size values (25/50/60for 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
📒 Files selected for processing (11)
Dockerfilepackages/dashmate/configs/defaults/getBaseConfigFactory.jspackages/dashmate/configs/defaults/getLocalConfigFactory.jspackages/dashmate/configs/defaults/getTestnetConfigFactory.jspackages/dashmate/configs/getConfigFileMigrationsFactory.jspackages/dashmate/docker-compose.ymlpackages/dashmate/docs/config/drive-abci.mdpackages/dashmate/src/config/configJsonSchema.jspackages/rs-drive-abci/.env.docker.fallbackpackages/rs-drive-abci/.env.testnetpackages/rs-drive-abci/src/config.rs
83fdd36 to
71433d3
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
✅ Review complete (commit 6e34609) |
There was a problem hiding this comment.
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
📒 Files selected for processing (1)
packages/rs-drive-abci/.env.testnet
Codecov Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
thepastaclaw
left a comment
There was a problem hiding this comment.
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.
Issue being fixed or feature implemented
The standalone
rs-drive-abcitestnet env file points both Core JSON-RPC clients at9998, which is the mainnet RPC port. Testnet Core RPC should use19998.Note: dashmate's testnet defaults already set
core.rpc.portto19998; this PR does not change dashmate's layered config.What was done?
packages/rs-drive-abci/.env.testnetso bothCORE_CONSENSUS_JSON_RPC_PORTandCORE_CHECK_TX_JSON_RPC_PORTuse19998.How Has This Been Tested?
git diff --check origin/v3.1-dev..HEAD— clean.packages/dashmate/configs/defaults/getTestnetConfigFactory.jsalready usescore.rpc.port: 19998at both48f0cc34789702fa8e0cc8016189a696902ea76dand currentorigin/v3.1-dev.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit