Skip to content

fix(nodectl): send process_withdraw_requests with 1 TON and limit 10#161

Merged
mrnkslv merged 1 commit into
release/nodectl/v0.5.0from
fix/nodectl-toncore-op2-withdraw-gas-limit
May 20, 2026
Merged

fix(nodectl): send process_withdraw_requests with 1 TON and limit 10#161
mrnkslv merged 1 commit into
release/nodectl/v0.5.0from
fix/nodectl-toncore-op2-withdraw-gas-limit

Conversation

@mrnkslv
Copy link
Copy Markdown
Contributor

@mrnkslv mrnkslv commented May 20, 2026

fix(nodectl): send process_withdraw_requests with 1 TON and limit 10

Summary

Tune TONCore op=2 withdraw drain in the elections runner: attach 1 TON from
the validator wallet and process up to 10 requests per tick. The previous
0.5 TON + limit=100 combination aborted with exit -14 (out of gas) on
singlehost, leaving the withdraw queue stuck and blocking stake.

Changes

  • runner.rs: WITHDRAW_PROCESS_GAS 0.5 → 1 TON; WITHDRAW_PROCESS_LIMIT
    100 → 10; refresh inline docs for both constants.
  • README.md: document op=2 as limit=10 and message value=1 TON in the
    TONCore withdraw-before-stake section.

Copy link
Copy Markdown
Contributor

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

Tunes TONCore nominator withdraw-drain behavior in the elections runner to avoid process_withdraw_requests running out of gas and blocking subsequent stake submission.

Changes:

  • Increase the attached value for process_withdraw_requests from 0.5 TON to 1 TON.
  • Reduce the per-call withdraw processing limit from 100 to 10 to keep execution within gas constraints.
  • Update nodectl documentation to reflect the new op=2 parameters (limit=10, message value=1 TON).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/node-control/service/src/elections/runner.rs Adjusts withdraw processing constants and updates inline docs to match the new gas/limit tuning.
src/node-control/README.md Updates operator-facing docs to reflect the new TONCore withdraw-drain parameters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const WITHDRAW_PROCESS_LIMIT: u8 = 100;
/// Gas attached to `process_withdraw_requests` (TONCore op = 2). Must cover compute for
/// `load_data` + dict iteration + payouts + `save_data`; 0.5 TON was too low (exit -14 on
/// masterchain). Empirically ~0.9 TON gasFees for limit=10 on singlehost; 1 TON leaves margin.
@mrnkslv mrnkslv merged commit e3a7562 into release/nodectl/v0.5.0 May 20, 2026
10 checks passed
@mrnkslv mrnkslv deleted the fix/nodectl-toncore-op2-withdraw-gas-limit branch May 20, 2026 10:16
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.

3 participants