Skip to content

Conversation

@adshastri
Copy link

Differential Revision: D36870515

RuiyuZhu and others added 2 commits June 6, 2022 12:08
Summary:
Pull Request resolved: facebookresearch#218

Our existing arrangement of party info (ip address and port number) is buggy as there will be a conflict with more than 2 parties. This diff is to address this issue.

Our current code works fine with 2 party setting. But it will break with more than 2 parties.

Example scenario:
when party 0 connects with party 1, with current code, he will pull out the partyinfo of party 0, and add one to the port number. Party 1 will add 1 to a port number on his side.
When party 1 connects with party 2, with current code, he will pull out the same partyinfo of party 0, and add on to the port number. Party 2 will add 1 to a port number on his side.

Since multiple connections will be established between each pair of parties, this will definitely create a conflict. For example, party 0 will add 1 to the same port number twice while others only do that once.

Our solution:

1. Each party keep a map of partyinfo, served as "info needed to connected to party i".
2. during each connection attemption, each party will use the peer's id to look up the partyinfo map. If this party is going to play the role of server, the ip address is useless. The corresponding ip address and port number can be used to establish connection.

Differential Revision: D36908724

fbshipit-source-id: 60c96c97f2cc1c77710ad55ebda63c179abd14ca
Differential Revision: D36870515

fbshipit-source-id: bf26401c5d26a870ff736aade6d6346127ffe92d
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jun 6, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D36870515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants