Skip to content

fix(platform): start on Dash Core v24, which no longer reports softforks in getblockchaininfo - #5422

Merged
shumkov merged 4 commits into
v5.0-devfrom
Core-v24-getdeploymentinfo-softforks
Oct 14, 2026
Merged

shumkov merged 4 commits into
v5.0-devfrom
Core-v24-getdeploymentinfo-softforks

Conversation

@shumkov

@shumkov shumkov commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

On a devnet running Dash Core v24.0.0-rc.3, Platform v5.0.0-rc.1 could not start a fresh chain. drive-abci failed at InitChain with:

core rpc error: JSON-RPC error: JSON decode error: missing field softforks at line 1 column 524

Tenderdash then restart-looped.

InitChain reads the Platform activation deployment mn_rr from Core, and the call fails at two levels:

  • Platform: DefaultCoreRPC::get_fork_info read it from getblockchaininfo().softforks.
  • Core v24: getblockchaininfo only includes softforks when Core runs with -deprecatedrpc=softforks (dash#6888). The replacement is the new getdeploymentinfo RPC, whose deployments come from the same DeploymentInfo() function.
  • rust-dashcore: GetBlockchainInfoResult.softforks was a required field, so the whole answer failed to decode.

The impact:

  • On Core v24, no new Platform node could start or join. Nodes that were already running are unaffected, because only InitChain reads the fork.
  • The same decode error breaks rs-sdk's LowLevelDashCoreClient::get_platform_activation_height.
  • It also breaks rs-dapi's getBlockchainStatus: the Core chain section comes back empty and the status is ERROR.

This is not a consensus change. Core v23 and v24 build a buried deployment's active/height identically, so InitChain reads the same value either way.

What was done?

  • rust-dashcore pin moved from 7302d0a6 to 379f0574 on integration/v5.0-core-v24. That is the previous pin plus one cherry-pick -x of fix(rpc): decode Core v24 getblockchaininfo and add getdeploymentinfo rust-dashcore#1165:

    • GetBlockchainInfoResult.softforks defaults to an empty map, and its type is unchanged.
    • New RpcApi::get_deployment_info(Option<&BlockHash>) / GetDeploymentInfoResult.
    • This is the only difference between the two pins, and it touches only rpc-json and rpc-client. rs-dapi's status decodes again with no rs-dapi change.
  • drive-abci get_fork_info asks getdeploymentinfo first. It falls back to getblockchaininfo().softforks in two cases:

    • Core answers method not found (-32601). Core v23 answers this way because it has no getdeploymentinfo.
    • Core refuses the call with HTTP 403 and no body. Core does this when the method is missing from the RPC user's rpcwhitelist. On Core v23 the fallback finds the deployment. Core v24 started without -deprecatedrpc=softforks reports no softforks, so when the fallback has no entry for the fork, the original 403 is returned rather than "fork not known yet". Core v24 behind such a whitelist still fails loudly.

    Any other error is returned unchanged. drive-abci logs a warning on the 403 that names the rpcwhitelist, because the error text alone is only unexpected HTTP code: 403.

  • drive-abci Core RPC retry no longer retries an HTTP 403, for any call. Core answers 403 only to requests it will never allow, through rpcwhitelist or rpcallowip. The four retries only delayed the error by about 11 s, and with the fallback they would have delayed the Core v23 answer too.

  • rs-sdk get_platform_activation_height uses the same rules, through platform_activation_fork.

  • dashmate: drive-abci talks to Core as the drive_consensus RPC user, which has an rpcwhitelist. Core answers a method that is not on the list with HTTP 403, which is not method not found. So:

    • getdeploymentinfo is added to the default whitelist.
    • A 5.0.0-rc.2 config migration adds it to existing configs. It appends to the operator's list rather than replacing it, and leaves an unrestricted (null) whitelist alone.
    • Core v23 accepts the unknown name in its whitelist and then answers -32601 (verified on v23.1.8).
    • dash.conf is unchanged: Platform v5.0 activates before nodes move to Core v24, so dashmate status platform keeps reading softforks from Core v23. Moving the status to getdeploymentinfo belongs to the dashmate release that brings Core v24.
  • Operator note: Core loads rpcwhitelist only when it starts. After upgrading dashmate, restart Core itself with a full dashmate restart, before any reset --platform / start --platform / restart --platform, because those keep Core running. Until then, a Core v23 node still works through the 403 fallback, and a Core v24 node fails InitChain with the 403.

How Has This Been Tested?

All fixtures are real answers from the official Dash Core v24.0.0-rc.3 and v23.1.8 arm64 macOS release binaries, running regtest at height 440 (sha256 matches the release SHA256SUMS).

Red → green:

  • drive-abci (rpc::core::tests::fork_info): an in-process HTTP JSON-RPC mock Core goes through DefaultCoreRPC::open, so the jsonrpc transport's mappings are exercised too: 404 → -32601, and 403 with an empty body → Transport(HttpErrorCode(403)).
    • Before the fix, on the old pin: the v24 test failed with JsonRpc(Json(Error("missing field `softforks`", …))), the devnet error, and the v23, no-fallback and absent-fork tests failed.
    • 403 tests: Core v23 refusing getdeploymentinfo failed with JsonRpc(Transport(HttpErrorCode(403))). Core v24 refusing it with no softforks failed because getblockchaininfo was never asked. A fallback that answers Ok(None) there also fails it. Both tests assert the exact methods asked; with the old retry they fail, showing getdeploymentinfo asked four times.
    • After: 7/7 pass, including one where Core is still warming up (-28) and the call is retried.
  • rs-sdk (core::dash_core_client::tests):
    • Before: the v24 test failed with Json(Error("missing field `softforks`")) and the other two failed on the methods asked. The two 403 tests failed the same way as in drive-abci.
    • A 401 test checks that other HTTP errors do not fall back. Treating every transport error as the 403 fails it.
    • After: 7/7 pass.
  • dashmate:
    • The migration test fails without the 5.0.0-rc.2 migration and passes with it.
  • rust-dashcore fix: double process proposal from Tenderdash restart #1165: the v24 getblockchaininfo decode test fails before the fix and passes after it.

Live run of DefaultCoreRPC::get_fork_info("mn_rr") against the real nodes:

Core RPC user Result
v24 unrestricted {buried, active, height 432} from getdeploymentinfo
v23 unrestricted the same, via the fallback
v23 or v24 whitelist without getdeploymentinfo HTTP 403 after the retry loop (~11 s), measured before the 403 fallback was added; hence the whitelist migration

The 403 fallback was not re-run live; the HTTP mock covers it, using the empty-body 403 that real Core sends.

cargo test -p drive-abci --lib rpc::core (13 pass), cargo test -p dash-sdk --lib core::dash_core_client (7 pass), the dashmate template and config unit specs (migrateConfigFileFactory.spec.js needs a wasm-dpp build and was not re-run after the first commit; this change does not touch migrations), clippy -D warnings --all-targets on drive-abci and dash-sdk, and cargo fmt --check all pass.

Breaking Changes

None. get_fork_info's signature is unchanged.

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
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 65d6e8e

  • Bots — coderabbitai not yet · thepastaclaw ✓ — /skip-bots proceeds without the ones not yet reported
  • Self-review — post /self-reviewed
  • Build running
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

…rks in getblockchaininfo

On a devnet running Dash Core v24.0.0-rc.3, InitChain failed with
"JSON decode error: missing field softforks" and Tenderdash restart
looped: no new node could start or join. drive-abci read the platform
activation fork mn_rr from getblockchaininfo's softforks, which Core v24
reports only with -deprecatedrpc=softforks (dash#6888); deployments
moved to the new getdeploymentinfo RPC, built by the same Core function.

- Pin rust-dashcore integration/v5.0-core-v24 at 379f0574: the previous
  pin plus a cherry-pick of dashpay/rust-dashcore#1165, which lets
  getblockchaininfo decode without softforks and adds
  get_deployment_info. rs-dapi's getBlockchainStatus decodes again.
- drive-abci get_fork_info and rs-sdk get_platform_activation_height ask
  getdeploymentinfo first and read softforks only when Core answers
  method not found (-32601), as Core v23 does. Other errors are
  returned as before.
- dashmate allows getdeploymentinfo to the drive_consensus Core RPC user:
  Core answers a method missing from a user's rpcwhitelist with HTTP 403,
  not method not found. A 5.0.0-rc.2 migration appends it to existing
  whitelists and leaves an unrestricted one alone. Core loads the
  whitelist only when it starts.

Not a consensus change: Core v23 and v24 report a buried deployment's
active/height identically, so InitChain reads the same values.

Tests would have caught this in CI, with answers recorded from Core
v24.0.0-rc.3 and v23.1.8 regtest:
- drive-abci rpc::core::tests::fork_info (HTTP mock Core through
  DefaultCoreRPC): before the fix, on the old pin, the v24 test failed
  with JsonRpc(Json(Error("missing field `softforks`"))) and the v23,
  no-fallback and absent-fork tests failed; after it, all pass.
- rs-sdk core::dash_core_client::tests: the v24 test failed with
  Json(Error("missing field `softforks`")), the others on the methods
  asked; all pass after.
- dashmate migration test: fails without the 5.0.0-rc.2 migration,
  passes with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: dashpay/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5d8f8911-fdaa-4001-89da-b95725dc9010
📥 Commits

Reviewing files that changed from the base of the PR and between 9917fef and 65d6e8e.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 6
  • Cargo.toml
  • packages/dashmate/configs/defaults/getBaseConfigFactory.js
  • packages/dashmate/configs/getConfigFileMigrationsFactory.js
  • packages/dashmate/test/unit/config/configFile/migrateConfigFileFactory.spec.js
  • packages/rs-drive-abci/src/rpc/core.rs
  • packages/rs-sdk/src/core/dash_core_client.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

thepastaclaw commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 65d6e8e) · triage: normal

@github-actions github-actions Bot added this to the v5.0.0 milestone Oct 14, 2026
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 14, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

The PR correctly prefers getdeploymentinfo and retains the Core v23 fallback, but it regresses deployments for nodes whose running Core still has a stale rpcwhitelist. Such nodes return HTTP 403 rather than JSON-RPC -32601, so the fallback is skipped and InitChain fails; this affects the stated v23 compatibility goal even though dashmate-managed fresh configurations are migrated.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a cross-cutting RPC compatibility fix spanning Rust clients, drive startup behavior, dependency updates, and dashmate configuration migration, but it does not change consensus rules, funds, cryptography, storage migrations, or other critical-surface behavior.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/rs-drive-abci/src/rpc/core.rs`:
- [SUGGESTION] packages/rs-drive-abci/src/rpc/core.rs:316-323: Fall back when getdeploymentinfo is denied by a stale Core whitelist
  The legacy fallback is selected only for JSON-RPC error code -32601. When the authenticated Core user is not allowed to call getdeploymentinfo, Core returns HTTP 403, which the RPC client surfaces as a transport/HTTP error, so execution reaches `Err(e)` after the retry loop and never tries getblockchaininfo. This regresses Core v23 nodes whose old whitelist is still loaded, including nodes where dashmate was upgraded but Core was not restarted, and also affects externally managed whitelists. Recognize the authorization failure as a compatibility case and try getblockchaininfo; if that response has no usable softfork entry, preserve the original authorization error so a Core v24 node does not turn the denied new endpoint into a misleading missing-fork result.

Comment on lines +316 to +323
Err(Error::JsonRpc(JsonRpcError::Rpc(RpcError {
code: CORE_RPC_METHOD_NOT_FOUND,
..
}))) => retry!(self
.inner
.get_blockchain_info()
.map(|blockchain_info| blockchain_info.softforks.get(name).cloned())),
Err(e) => Err(e),

@thepastaclaw thepastaclaw Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

✅ Resolved at 65d6e8e6; see the replies below.

🟡 Suggestion: Fall back when getdeploymentinfo is denied by a stale Core whitelist

The legacy fallback is selected only for JSON-RPC error code -32601. When the authenticated Core user is not allowed to call getdeploymentinfo, Core returns HTTP 403, which the RPC client surfaces as a transport/HTTP error, so execution reaches Err(e) after the retry loop and never tries getblockchaininfo. This regresses Core v23 nodes whose old whitelist is still loaded, including nodes where dashmate was upgraded but Core was not restarted, and also affects externally managed whitelists. Recognize the authorization failure as a compatibility case and try getblockchaininfo; if that response has no usable softfork entry, preserve the original authorization error so a Core v24 node does not turn the denied new endpoint into a misleading missing-fork result.

source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality); gpt-6.1-sol (phase2-reviewer: general, architecture-layering, rust-quality)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Resolved (re-reviewed at 65d6e8e6): Your updated get_fork_info now falls back to getblockchaininfo after HTTP 403 without retrying the denied request, allowing Core v23 to initialize with its existing whitelist. It preserves the original refusal when legacy data lacks the deployment, and the new transport-level regression tests assert both outcomes and the exact request sequence.

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Oct 14, 2026
shumkov and others added 2 commits October 14, 2026 12:52
…h HTTP 403

Core refuses a method missing from the RPC user's rpcwhitelist with HTTP
403 and no body, not method not found. dashmate's drive_consensus user
gets getdeploymentinfo only once Core restarts with the 5.0.0-rc.2
whitelist, and a whitelist managed outside dashmate may never list it. On
Core v23, where rc.1 read softforks and worked, InitChain then failed
with "unexpected HTTP code: 403".

- drive-abci get_fork_info and rs-sdk get_platform_activation_height
  also fall back to getblockchaininfo's softforks on that 403. Core v24
  started without -deprecatedrpc=softforks reports no softforks, so when
  the fallback has no entry for the fork the getdeploymentinfo refusal
  is returned instead of None: Core v24 behind such a whitelist still
  fails loudly. The method-not-found fallback (Core v23) is unchanged.
- drive-abci warns on the 403 and names the rpcwhitelist, since the
  error text alone says only "unexpected HTTP code: 403".
- drive-abci's Core RPC retry no longer retries an HTTP 403, for any
  call. Core answers 403 only to requests it will never allow
  (rpcwhitelist, rpcallowip), so the four retries only delayed the error
  by about 11 s, and with the fallback they delayed the Core v23 answer.

Tests would have caught this in CI: x before the fix, v after.
- drive-abci rpc::core::tests::fork_info, through the HTTP mock Core,
  which now answers 403 with an empty body like Core does:
  - Core v23 refuses getdeploymentinfo: failed with
    JsonRpc(Transport(HttpErrorCode(403))); passes.
  - Core v24 refuses it and reports no softforks: failed, getblockchaininfo
    was never asked; passes, returning the 403. A fallback that answers
    Ok(None) there also fails it.
  - Both assert the exact methods asked. Without the retry change they
    fail with getdeploymentinfo asked four times.
- rs-sdk core::dash_core_client::tests: the same two cases, same
  before/after. A new 401 test keeps other HTTP errors from falling back;
  treating any transport error as the 403 fails it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`dashmate status platform` reads mn_rr from getblockchaininfo's
softforks, which Core v24 reports only with -deprecatedrpc=softforks. On
Core v24 the destructuring threw and the Drive and Tenderdash status
showed n/a. @dashevo/dashd-rpc 19.0.0 has no getDeploymentInfo.

Render deprecatedrpc=softforks into dash.conf next to
deprecatedrpc=service, before any network section so that it applies on
every network. Core v23 accepts the option and changes nothing. Existing
configs get it when the 5.0.0-rc.2 migration re-renders them, and Core
reads it when it restarts. The template comment asks to move the status
to getdeploymentinfo before Core drops the option.

Test would have caught this in CI: x before the fix, v after.
- test/unit/templates/dashConfTemplate.spec.js: on mainnet, testnet,
  devnet and local, the global part of the rendered dash.conf had only
  deprecatedrpc=service; it now has service and softforks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added waiting-bots Waiting for the review bots to report on this head and removed waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Oct 14, 2026
This reverts commit bcbc515.

Platform v5.0 activates before nodes move to Core v24, so dashmate's
status command still reads softforks from Core v23 there, and Drive no
longer depends on softforks at all (it asks getdeploymentinfo). Keeping a
deprecated Core option in every node's dash.conf only for a status
display is not worth it; the status command can move to getdeploymentinfo
with the dashmate release that brings Core v24.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 1 + Phase 2

Verified the complete PR diff at head 65d6e8e, including the pinned Core RPC dependency changes. The stale-whitelist finding is fixed, and no production correctness or consensus blockers were found; one non-blocking resource-lifecycle issue remains in the new HTTP test fixture. This was static verification only: Rust workspace tests, JS builds, and Docker builds remained queued in the supplied CI snapshot from 2026-10-14T07:20:23Z.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — The cross-package RPC compatibility fix, retry changes, dependency update, and configuration migration are substantial but do not themselves change consensus rules or another qualifying critical surface.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort xhigh); agent phase1-reviewer, muse-spark-1.3-contributor — rust-quality (completed, effort xhigh); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 14% left, 5h 100% left), glm-5.3-flash (not used above high effort; tier asks max)
  • Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — rust-quality (completed, effort high); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/rs-drive-abci/src/rpc/core.rs`:
- [SUGGESTION] packages/rs-drive-abci/src/rpc/core.rs:762-770: Give the mock server an explicit shutdown lifecycle
  Each MockCore::start detaches a thread that owns the listener and runs an unbounded accept loop. MockCore retains only the URL and request recorder, so dropping the fixture cannot stop that thread or release its bound socket and captured allocations. All seven tests leave a listener running until the test process exits, even though their client connections close. Retain a shutdown signal and the listener worker's JoinHandle in MockCore, then wake the blocked accept loop and join the worker during teardown so fixture resources are released when each test finishes.

Comment on lines +762 to +770
thread::spawn(move || {
for stream in listener.incoming() {
let Ok(stream) = stream else { return };
let answers = Arc::clone(&answers);
let recorder = Arc::clone(&recorder);
thread::spawn(move || serve(stream, &answers, &recorder));
}
});
MockCore { url, asked }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🟡 Suggestion: Give the mock server an explicit shutdown lifecycle

Each MockCore::start detaches a thread that owns the listener and runs an unbounded accept loop. MockCore retains only the URL and request recorder, so dropping the fixture cannot stop that thread or release its bound socket and captured allocations. All seven tests leave a listener running until the test process exits, even though their client connections close. Retain a shutdown signal and the listener worker's JoinHandle in MockCore, then wake the blocked accept loop and join the worker during teardown so fixture resources are released when each test finishes.

source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, rust-quality)

@shumkov
shumkov merged commit d3951d4 into v5.0-dev Oct 14, 2026
37 of 38 checks passed
@shumkov
shumkov deleted the Core-v24-getdeploymentinfo-softforks branch October 14, 2026 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants