You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Low: do_collate() moves the error out of result and then moves status again, so perf logging loses the real error status.
At validator/impl/collator.cpp:2386result.move_as_error() is consumed by fatal_error, then validator/impl/collator.cpp:2388 calls result.move_as_status() again on already-moved state. This likely records a synthetic/internal status instead of the original failure reason.
High: first-block error path can get stuck in an infinite retry loop without ever starting a new collation. In validator/consensus/block-producer.cpp:137, any r_candidate.is_error() for is_first_block does continue before clearing block_generation_active. For non-timeout errors, the shared future is already resolved with error, so next iteration immediately hits the same branch again forever.
Suggested fix: in that branch, only continue on timeout, or set block_generation_active = false before continue for non-timeout errors so a fresh collate_block request is started.
High: potential busy-loop on first-slot collation failures in new retry path.
In validator/consensus/block-producer.cpp:144, on is_first_block error you do --slot, reset start_time, and continue without any backoff. If collate_block returns a deterministic non-timeout error quickly, this can spin retries very fast (log spam + manager pressure) until the leader window changes. Consider adding a minimal retry delay / capped retry rate for this branch.
Medium: callback-based external-message waiting is silently disabled in disk/hardfork managers. validator/manager-disk.cpp:545 and validator/manager-hardfork.cpp:380 accept std::unique_ptr<ExtMsgCallback> callback but never store/use it. That means wait_externals_until behavior differs from main manager implementation and won’t receive post-fetch external messages in these modes. If this divergence is intentional, it should be explicit; otherwise wire callback delivery similarly to manager.cpp.
High: await_with_timeout has two detached tasks racing to complete the same Promise without coordination. SharedFuture.h:63, SharedFuture.h:65, SharedFuture.h:72, PromiseFuture.h:190
The timeout worker and task worker both call set_* on the same Promise object. There is no winner arbitration or synchronization, so behavior near the deadline is nondeterministic (timeout can win even if result is ready), and on a multi-threaded executor this is a data race on Promise::promise_.
Medium: callback path added to get_external_messages is ignored in manager-disk and manager-hardfork, so collator waiting for new externals cannot be woken in these modes. manager-disk.cpp:545, manager-hardfork.cpp:380, collator.cpp:4300
When wait_externals_until is enabled, these manager implementations return initial messages but drop the live callback, so wait_for_external_message(...) only exits on timeout. This can add avoidable per-slot delay in those environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.