Skip to content

Fix/toncore get pool data empty dicts#151

Merged
mrnkslv merged 8 commits into
release/nodectl/v0.5.0from
fix/toncore-get-pool-data-empty-dicts
May 18, 2026
Merged

Fix/toncore get pool data empty dicts#151
mrnkslv merged 8 commits into
release/nodectl/v0.5.0from
fix/toncore-get-pool-data-empty-dicts

Conversation

@mrnkslv
Copy link
Copy Markdown
Contributor

@mrnkslv mrnkslv commented May 18, 2026

Summary

Fixes TONCore validator participation on singlehost after regressions from #139:
empty pool dict fields no longer break get_pool_data, and elections recover pool
addresses after transient RPC/parse failures. Extends wallet top-up timeouts so
phase 10/11 bootstrap does not fail on slow localnets.

Changes

nodectl

  • dict_cell_opt for optional dict stack entries; wired into TONCore get_pool_data.
  • Elections runner: repopulate pool_addr_cache when pool is set but cache is empty.

singlehost E2E

  • topup.ts: balance wait 300s → 600s.
  • run_singlehost_nodectl.py: BUN_TOPUP_TIMEOUT_SECONDS default 400 → 720.

Copilot AI review requested due to automatic review settings May 18, 2026 14:36
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

Fixes TONCore pool-data parsing and validator participation recovery after empty dict / transient pool address failures, plus extends singlehost top-up waits for slower localnets.

Changes:

  • Adds optional TONCore dict parsing for get_pool_data nominators and withdraw requests.
  • Retries pool address caching when a previous election tick failed to resolve it.
  • Increases top-up polling and subprocess timeouts for singlehost E2E bootstrap.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/node-control/common/src/tvm_stack_parser.rs Adds dict_cell_opt helper and tests for empty/non-empty dict encodings.
src/node-control/contracts/src/nominator/ton_core_nominator.rs Uses dict_cell_opt for TONCore get_pool_data dict fields.
src/node-control/service/src/elections/runner.rs Retries unresolved pool address caching on subsequent ticks.
src/node/tests/test_load_net/scripts/topup.ts Extends balance wait timeout to 600 seconds.
src/node/tests/test_run_net_py/run_singlehost_nodectl.py Raises default Bun top-up subprocess timeout to match the longer poll.

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

Comment on lines +91 to +92
if entry.number().is_some() {
return Ok(None);
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.

fixed

Comment on lines +557 to +560
match p.address().await {
Ok(addr) => {
tracing::info!("node [{}] pool address cached: {}", node_id, addr);
node.pool_addr_cache = Some(addr);
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.

We will test it manually. The test will be added later.

@Keshoid Keshoid self-requested a review May 18, 2026 14:45
Comment on lines +557 to +560
match p.address().await {
Ok(addr) => {
tracing::info!("node [{}] pool address cached: {}", node_id, addr);
node.pool_addr_cache = Some(addr);
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.

We will test it manually. The test will be added later.

@mrnkslv mrnkslv merged commit 0d6e91f into release/nodectl/v0.5.0 May 18, 2026
5 checks passed
@mrnkslv mrnkslv deleted the fix/toncore-get-pool-data-empty-dicts branch May 18, 2026 17:58
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