Skip to content

Optimize validator sync and other minor changes#2455

Merged
SpyCheese merged 12 commits into
testnetfrom
node-patch
Jul 8, 2026
Merged

Optimize validator sync and other minor changes#2455
SpyCheese merged 12 commits into
testnetfrom
node-patch

Conversation

@SpyCheese

Copy link
Copy Markdown
Member

No description provided.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

validator/manager.cpp:604: This early return also skips the validating_masterchain() block below. When the shard client is absent or more than 60s stale, a masterchain validator will no longer run preload_msg_queue_to_masterchain(), wait_verify_shard_blocks(), or mark ready_desc, so collators can miss valid shard block descriptions via get_shard_blocks_for_collator(). If the intent is only to avoid wait_block_state_short() while out of sync, gate just the need_monitor(...)/nonfinal-state path and still allow the masterchain validation preparation to run.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
  • validator/manager.cpp:663: latest_desc is stored before the out-of-sync early return, but the only path that can populate ready_desc is below that return. If a masterchain validator receives a shard block description while shard_client_handle_ is stale, that description remains in shard_blocks_ as latest but never gets verified/preloaded later; duplicate/newer-or-equal descriptions are then dropped at lines 658-661, and collators only consume ready_desc. Move the sync guard before updating latest_desc, or schedule/retry readiness processing after shard-client catch-up.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
  • validator/manager.cpp:665 This early return skips the validating_masterchain() path below, so a masterchain validator that is temporarily shard-client-lagged records latest_desc but never preloads/verifies the shard block description or calls set_shard_block_description_ready. Since update_shard_blocks() does not retry that work when the shard client catches up, valid shard descriptions received during lag can remain unusable for collation until a newer broadcast arrives. Move the out-of-sync guard so it only skips the nonfinal lite-server wait_block_state_short work, not the masterchain-validator readiness path.

@SpyCheese SpyCheese merged commit 467bea0 into testnet Jul 8, 2026
8 of 25 checks passed
@SpyCheese SpyCheese deleted the node-patch branch July 8, 2026 19:44
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.

2 participants