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

mdns: Refactor encoding/decoding #2162

Closed
wants to merge 4 commits into from

Conversation

dvc94ch
Copy link
Contributor

@dvc94ch dvc94ch commented Jul 27, 2021

cc @rkuhn

@rklaehn
Copy link
Contributor

rklaehn commented Jul 27, 2021

I reviewed the part where it randomizes the delay. Looks OK. The IPV6 stuff I am not sufficiently familiar with.

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Jul 27, 2021

The ipv6 stuff is handled in a different PR #2161

@rkuhn
Copy link
Contributor

rkuhn commented Jul 27, 2021

Is this related to the “devices not syncing” issue Oli showed you recently? (Will review tomorrow)

@dvc94ch
Copy link
Contributor Author

dvc94ch commented Jul 27, 2021

No, this is related to https://github.com/Actyx/Cosmos/issues/6645 .

I don't know why discovery is failing for oli. His problem was connecting mac and windows which was resolved after a restart. I told him how to debug it and posted it again in the banyan channel incase someone else has a similar issue. But as far as I know we don't support mac anyway?

I have not been able to reproduce an issue with mdns on linux so far and I have tested it on windows in the past, but I did discover a major problem with our discovery protocol which I haven't yet decided how to fix. Not sure if it is related to oli's issue, probably not.

@rklaehn
Copy link
Contributor

rklaehn commented Jul 28, 2021

The ipv6 stuff is handled in a different PR #2161

For the benefit of the reviewers, it would be then preferable to take it out of this PR, or make this a PR against the other branch.

Copy link
Contributor

@rkuhn rkuhn left a comment

Choose a reason for hiding this comment

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

What is the intended scope of this change, how much is it intended to fix?

protocols/mdns/src/behaviour.rs Outdated Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Outdated Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Outdated Show resolved Hide resolved
@dvc94ch dvc94ch force-pushed the mdns-improvements branch 3 times, most recently from 6d235ed to 7f13b2f Compare August 3, 2021 10:55
@dvc94ch
Copy link
Contributor Author

dvc94ch commented Aug 4, 2021

@mxinden what do you think about this one? I think the first commit is uncontroversial, the second one removes the dependency dns-parser that has not been updated in 4y. I think the new implementation is easier to read, supports utf8 (dns-parser erroneously errors if strings are not ascii) and at least for me easier to maintain/bugfix. I tested it with the previous rust-libp2p, so it should be compatible and if that one was compatible with go/js then it should still be compatible too.

Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Just a couple of small comments. I will need a bit more time for an in-depth review.

protocols/mdns/src/behaviour.rs Outdated Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Show resolved Hide resolved
protocols/mdns/src/behaviour.rs Show resolved Hide resolved
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

I think the first commit is uncontroversial, the second one removes the dependency dns-parser that has not been updated in 4y.

I am in favor of the first change. I am at least hesitant about the second. I would need to do more research on whether a self-written DNS parser is the right way forward for rust-libp2p.

Would you mind splitting the second change out into its own pull request?

protocols/mdns/src/behaviour.rs Show resolved Hide resolved
@dvc94ch dvc94ch changed the title mdns: Prevent all timers from expiring at the same time. mdns: Refactor encoding/decoding Aug 31, 2021
@dvc94ch
Copy link
Contributor Author

dvc94ch commented Sep 10, 2021

@mxinden I'll close this PR for now

@dvc94ch dvc94ch closed this Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants