-
-
Notifications
You must be signed in to change notification settings - Fork 107
fix: Phase 1 - Allow nodes at optimal location to subscribe (#1848) #1850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…1848) Phase 1 fix for update propagation architecture issue. Changes: - Remove early return when node is at optimal location with no other peers - Properly exclude self when finding next-best peer for subscription - Allow subscription attempts even when isolated (for future peer joins) This prevents nodes from becoming isolated when they're at the optimal network position for a contract. Previously, such nodes would skip subscription entirely, breaking the delta-sync update propagation model. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
[Codex] Thank you for picking this up! Unfortunately I do not think the behaviour change in On a smaller note: Could we restructure this so that the subscribe path keeps trying additional candidates (and/or records the current peer as a seeding source) before it surfaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes , good otherwise
// Check if we are the optimal location for this contract | ||
// If we are and no other peers are suitable, skip subscription for now | ||
// TODO: In the future, still find next-best peers for redundancy (issue #1793) | ||
// Phase 1 fix for issue #1848: Allow nodes at optimal location to subscribe to next-best peers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the comment Phase 1 fix for issue #1848:
// Find a remote peer to handle the subscription | ||
const EMPTY: &[PeerId] = &[]; | ||
let target = match op_manager.ring.closest_potentially_caching(key, EMPTY) { | ||
// Phase 1 fix for issue #1848: Properly find next-best peer for subscription |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this explicit comment: "// Phase 1 fix for issue #1848: Properly find next-best peer for subscription"
Closing this PR as it's been superseded by PR #1854 which has already been merged. Why PR #1850 is no longer needed:As @codex correctly pointed out, this PR's approach had fundamental issues:
What PR #1854 implemented instead:PR #1854 properly fixed both the subscription routing issue AND the optimal location problem by:
The fix in PR #1854 is more comprehensive and addresses all the issues that PR #1850 was trying to solve, plus additional problems with subscription response routing. Thanks @codex for the insightful review - your analysis was spot on about the limitations of this approach! [AI-assisted debugging and comment] |
Summary
Phase 1 fix for the update propagation architecture issue identified in #1848.
This PR addresses the "optimal location paradox" where nodes at the optimal network position for a contract become isolated because they skip subscription attempts entirely.
Changes
Problem Fixed
Previously, when a node was at the optimal location for a contract and had no other peers available, it would skip subscription entirely:
Now it attempts subscription anyway, which allows it to connect when new peers join the network later.
Test Results
Tested with multi-machine-test River integration:
Related Issues
Next Steps
[AI-assisted debugging and comment]
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]