Skip to content
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

fix: pushsync disabled for bootnode #3616

Merged
merged 7 commits into from Dec 8, 2022

Conversation

vladopajic
Copy link
Contributor

@vladopajic vladopajic commented Dec 2, 2022

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Closes: #3610


This change is Reviewable

@vladopajic vladopajic requested review from a team, aloknerurkar, notanatol and istae and removed request for a team December 2, 2022 14:20
pkg/node/node.go Outdated
@@ -921,7 +921,8 @@ func NewBee(interrupt chan struct{}, sysInterrupt chan os.Signal, addr string, p

pinningService := pinning.NewService(storer, stateStore, traversalService)

pushSyncProtocol := pushsync.New(swarmAddress, nonce, p2ps, storer, kad, tagService, o.FullNodeMode, pssService.TryUnwrap, validStamp, logger, acc, pricer, signer, tracer, warmupTime)
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we can get away with not even registering the protocol for bootnodes 🤔

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@aloknerurkar @mrekucci @notanatol wdyt?

we could do that but I feel that having a switch in place is a more "fine grained" solution

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for not getting back!

So @istae is right. This will only disable storing on pushsync. However we will still see pushsync protocol traffic. I think the intention of this issue is to not have that as well. I think it would be better to disable the protocol itself, similar to how we do for pullsync i.e. not register the protocol on the libp2p host.

@janos Could there be any issues if we dont register this protocol? We might start seeing more errors for pushsync? Or would the nodes understand that this peer doesnt have the protocol and not send messages?

Copy link
Member

Choose a reason for hiding this comment

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

While @notanatol worked on the lightnode mode implementation, p2p.WithBlocklistStreams function is implemented exactly for this purpose for more control on libp2p stream disabling, where a lot of new (unregstered) stream attempts could be performed by the peer and to be able to protect against that situation.

Copy link
Member

Choose a reason for hiding this comment

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

@vladopajic let's go with p2p.WithBlocklistStreams

@vladopajic
Copy link
Contributor Author

Since pushsync is now disabled for bootnodes, integration tests in beekeeper should be updated not to include bootnodes.

PR ethersphere/beekeeper#297

pkg/node/node.go Show resolved Hide resolved
@vladopajic vladopajic requested a review from istae December 7, 2022 15:19
pkg/pushsync/pushsync.go Show resolved Hide resolved
@vladopajic vladopajic merged commit 152d209 into master Dec 8, 2022
@vladopajic vladopajic deleted the push-sync-disabled-for-bootnodes branch December 8, 2022 16:14
@aloknerurkar aloknerurkar added this to the 1.10.0 milestone Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bootnodes should have pushync disabled
5 participants