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

feat: rework tinder #3139

Merged
merged 21 commits into from Apr 29, 2021
Merged

feat: rework tinder #3139

merged 21 commits into from Apr 29, 2021

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Mar 8, 2021

Rework tinder driver:

  • Use event bus to advertise on listeners update
  • Rework multi-driver logic
  • use github.com/libp2p/go-libp2p-discovery backoff discovery to cache peers on discoverSigned-off-by: Guilhem Fanton guilhem.fanton@gmail.com

@auto-add-label auto-add-label bot added the WIP label Mar 8, 2021
@gfanton gfanton force-pushed the feat/tinder-rework branch 6 times, most recently from 24bf878 to b511367 Compare March 15, 2021 12:38
@gfanton gfanton self-assigned this Mar 15, 2021
@gfanton gfanton force-pushed the feat/tinder-rework branch 2 times, most recently from 144d7cd to 1292e4e Compare March 17, 2021 17:44
@gfanton gfanton force-pushed the feat/tinder-rework branch 2 times, most recently from c48a0f6 to c406d6f Compare March 26, 2021 14:52
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #3139 (ec969a7) into master (b1e6996) will increase coverage by 0.58%.
The diff coverage is 61.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3139      +/-   ##
==========================================
+ Coverage   29.15%   29.74%   +0.58%     
==========================================
  Files         352      352              
  Lines       21939    22026      +87     
  Branches     1685     1685              
==========================================
+ Hits         6396     6551     +155     
+ Misses      14389    14311      -78     
- Partials     1154     1164      +10     
Flag Coverage Δ
go.unittests 37.75% <61.20%> (+0.79%) ⬆️
js.unittests 10.99% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
go/cmd/berty/mini/view_group_incoming.go 0.00% <0.00%> (ø)
go/internal/ipfsutil/pubsub_monitor.go 0.00% <0.00%> (ø)
go/internal/ipfsutil/testing.go 0.00% <0.00%> (ø)
go/internal/lifecycle/manager.go 0.00% <0.00%> (ø)
go/internal/tinder/discovery_monitor.go 0.00% <0.00%> (ø)
go/internal/tinder/driver_localdiscovery.go 0.00% <ø> (ø)
go/internal/tinder/driver_rdv.go 0.00% <ø> (ø)
go/internal/tinder/filter.go 0.00% <0.00%> (ø)
go/pkg/bertyprotocol/api_group.go 14.84% <0.00%> (-0.99%) ⬇️
...components/chat/message/MessageMonitorMetadata.tsx 5.88% <ø> (+0.32%) ⬆️
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1e6996...ec969a7. Read the comment docs.

@gfanton gfanton force-pushed the feat/tinder-rework branch 2 times, most recently from 1c3b767 to 0a2bbfb Compare April 12, 2021 18:43
@gfanton gfanton force-pushed the feat/tinder-rework branch 4 times, most recently from 9b288ec to a7f2d67 Compare April 22, 2021 10:09
@gfanton gfanton marked this pull request as ready for review April 22, 2021 13:00
@gfanton gfanton requested review from moul and a team as code owners April 22, 2021 13:00
@gfanton gfanton changed the title wip: rework tinder feat: rework tinder Apr 23, 2021
Comment on lines +67 to +68
fs.DurationVar(&m.Node.Protocol.MinBackoff, "p2p.min-backoff", time.Minute, "minimum p2p backoff duration")
fs.DurationVar(&m.Node.Protocol.MaxBackoff, "p2p.max-backoff", time.Minute*10, "maximum p2p backoff duration")
Copy link
Member

Choose a reason for hiding this comment

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

previous setting was 1s, 1m; now we have 1m, 10m

why are you switching to these new values?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm much more confident in tinder backoff than before, so I've just increased this to a more reasonable range

Copy link
Member

@aeddi aeddi left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@@ -60,8 +61,11 @@ func (m *Manager) SetupLocalIPFSFlags(fs *flag.FlagSet) {
fs.StringVar(&m.Node.Protocol.Announce, "p2p.swarm-announce", "", "IPFS announce addrs")
fs.StringVar(&m.Node.Protocol.NoAnnounce, "p2p.swarm-no-announce", "", "IPFS exclude announce addrs")
fs.BoolVar(&m.Node.Protocol.LocalDiscovery, "p2p.local-discovery", true, "if true local discovery will be enabled")
Copy link
Member

Choose a reason for hiding this comment

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

This should be renamed p2p.mdns and a flag p2p.tinder-local-driver should be added (or tinder-local-driver should be removed if it is useless as we discussed earlier).

Copy link
Member Author

Choose a reason for hiding this comment

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

I will do this in a separate PR

gfanton and others added 21 commits April 29, 2021 10:58
Signed-off-by: Guilhem Fanton <guilhem.fanton@gmail.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <guilhem.fanton@gmail.com>
Signed-off-by: gfanton <guilhem.fanton@gmail.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton merged commit 0f0d04f into berty:master Apr 29, 2021
@gfanton gfanton deleted the feat/tinder-rework branch April 29, 2021 11:17
@github-actions
Copy link

🎉 This PR is included in version 2.277.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aeddi aeddi added 🚧 WIP and removed WIP labels Jun 21, 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.

None yet

3 participants