Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Revert "network: Detect early that NotificationOutSubstream was closed by the remote" #13409

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

dmitry-markin
Copy link
Contributor

@dmitry-markin dmitry-markin commented Feb 17, 2023

Reverts #13396

After the PR the reported peer count dropped to ~0 peers, and sync doesn't really work (best block reported stays the same). I was not able to find a quick fix for this, so let's revert the PR for now.

@dmitry-markin dmitry-markin added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Feb 17, 2023
@dmitry-markin dmitry-markin requested review from bkchr, altonen and a team February 17, 2023 14:42
Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next time we should ad some zombienet test for syncing to ensure we don't break it again :D

@dmitry-markin
Copy link
Contributor Author

I wonder why present tests didn't detect it though 🤔

@altonen
Copy link
Contributor

altonen commented Feb 17, 2023

I don't think this change really broke syncing though. The problem is that the peer count is just reported incorrectly to be 40 because the local node previously didn't know the substream was closed BUT because block request handler in either end is not informed of connected/disconnected sync peers and keeps on serving block requests as long as any connection is open, syncing works. So in other words the syncing works because there's a bug in the block request handler.

@dmitry-markin dmitry-markin merged commit 30cb4d1 into master Feb 17, 2023
@dmitry-markin dmitry-markin deleted the revert-13396-dm-peering-mismatch branch February 17, 2023 16:58
rossbulat pushed a commit that referenced this pull request Feb 19, 2023
rossbulat pushed a commit that referenced this pull request Feb 19, 2023
… was closed by the remote (#13396)" (#13409)"

This reverts commit 2075262.
@tomaka
Copy link
Contributor

tomaka commented Feb 20, 2023

I don't think this change really broke syncing though. The problem is that the peer count is just reported incorrectly to be 40 because the local node previously didn't know the substream was closed BUT because block request handler in either end is not informed of connected/disconnected sync peers and keeps on serving block requests as long as any connection is open, syncing works. So in other words the syncing works because there's a bug in the block request handler.

I think the same thing. See also my explanation here: #12434. The "bug" that I mention is the one that #13396 fixes.

One node with this bug fixed will indeed have trouble syncing, just like smoldot has trouble syncing today. But if every node on the network had this bug fixed, then all nodes would (normally) sync fine.

ltfschoen pushed a commit to ltfschoen/substrate that referenced this pull request Feb 22, 2023
@ghost ghost mentioned this pull request Feb 25, 2023
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
Ank4n pushed a commit that referenced this pull request Feb 28, 2023
ukint-vs pushed a commit to gear-tech/substrate that referenced this pull request Apr 10, 2023
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants