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

DKG Example failing "dial backoff" #243

Closed
mvanmeerbeck opened this issue Mar 6, 2023 · 7 comments
Closed

DKG Example failing "dial backoff" #243

mvanmeerbeck opened this issue Mar 6, 2023 · 7 comments
Assignees

Comments

@mvanmeerbeck
Copy link

mvanmeerbeck commented Mar 6, 2023

Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT (but probably just miss configuration)

What happened:
I can't get the dkg example to work, except few "Received request" and "Sent message ", the nodes keeps failing to connect to others nodes with the error
"dial backoff"

What you expected to happen:
I didn't do much except following the DKG demo, launched the 3 commands locally. No file is created in ./example/dkg
Here the logs

Node 1

$ ./example dkg --config dkg/id-10001-input.yaml
WARN [03-06|18:53:53.874|peer/node.go:153] Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10002] dial tcp4 127.0.0.1:10002: connect: connection refused"
WARN [03-06|18:53:53.874|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10002/p2p/QmPnm21c34FKtr3bu4UBQtiWwr8L4Q5vYmyqkoPCkaKs9d err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10002] dial tcp4 127.0.0.1:10002: connect: connection refused"
WARN [03-06|18:53:53.874|peer/node.go:153] Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10003] dial tcp4 127.0.0.1:10003: connect: connection refused"
WARN [03-06|18:53:53.874|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10003/p2p/QmSnhb7m6mWJ6MUvXyuYgEnAuhDcojqtiavUK4Fj4kDZJk err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10003] dial tcp4 127.0.0.1:10003: connect: connection refused"
DEBUG[03-06|18:53:56.875|peer/pm.go:102]   Successfully connect to peer             to=/ip4/127.0.0.1/tcp/10002/p2p/QmPnm21c34FKtr3bu4UBQtiWwr8L4Q5vYmyqkoPCkaKs9d
WARN [03-06|18:53:56.875|peer/node.go:153] Failed to connect to peer                err="dial backoff"
WARN [03-06|18:53:56.875|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10003/p2p/QmSnhb7m6mWJ6MUvXyuYgEnAuhDcojqtiavUK4Fj4kDZJk err="dial backoff"
WARN [03-06|18:53:59.877|peer/node.go:153] Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10003] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:53:59.877|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10003/p2p/QmSnhb7m6mWJ6MUvXyuYgEnAuhDcojqtiavUK4Fj4kDZJk err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10003] failed to negotiate security protocol: connected to wrong peer"
INFO [03-06|18:54:00.407|dkg/service.go:68] Received request                         from=QmPnm21c34FKtr3bu4UBQtiWwr8L4Q5vYmyqkoPCkaKs9d
WARN [03-06|18:54:02.878|peer/node.go:153]  Failed to connect to peer                err="dial backoff"
WARN [03-06|18:54:02.878|peer/pm.go:98]     Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10003/p2p/QmSnhb7m6mWJ6MUvXyuYgEnAuhDcojqtiavUK4Fj4kDZJk err="dial backoff"

Node 2

$ ./example dkg --config dkg/id-10002-input.yaml
WARN [03-06|18:53:54.400|peer/node.go:153] Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10003] dial tcp4 127.0.0.1:10003: connect: connection refused"
WARN [03-06|18:53:54.400|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10003/p2p/QmSai4FAZZWLA1HjSe5zWf4E4iFwZyaTqkEDpLEiPWHsii err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10003] dial tcp4 127.0.0.1:10003: connect: connection refused"
DEBUG[03-06|18:53:54.403|peer/pm.go:102]   Successfully connect to peer             to=/ip4/127.0.0.1/tcp/10001/p2p/QmSM2Btop4jgaUvZ9ZEHQ1D2A4QzasHZbidqdheopeD2RH
WARN [03-06|18:53:57.402|peer/node.go:153] Failed to connect to peer                err="dial backoff"
WARN [03-06|18:53:57.402|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10003/p2p/QmSai4FAZZWLA1HjSe5zWf4E4iFwZyaTqkEDpLEiPWHsii err="dial backoff"
DEBUG[03-06|18:54:00.407|peer/pm.go:102]   Successfully connect to peer             to=/ip4/127.0.0.1/tcp/10003/p2p/QmSai4FAZZWLA1HjSe5zWf4E4iFwZyaTqkEDpLEiPWHsii
INFO [03-06|18:54:00.407|peer/node.go:130] Sent message                             peer=/ip4/127.0.0.1/tcp/10001/p2p/QmSM2Btop4jgaUvZ9ZEHQ1D2A4QzasHZbidqdheopeD2RH
INFO [03-06|18:54:00.408|peer/node.go:130] Sent message                             peer=/ip4/127.0.0.1/tcp/10003/p2p/QmSai4FAZZWLA1HjSe5zWf4E4iFwZyaTqkEDpLEiPWHsii

Node 3

$ ./example dkg --config dkg/id-10003-input.yaml
WARN [03-06|18:53:55.010|peer/node.go:153] Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10001] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:53:55.010|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10001/p2p/QmQG2VKRudyEtttx99EXfTATggqVew86awdA7HJdQt2LAX err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10001] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:53:55.010|peer/node.go:153] Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10002] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:53:55.010|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10002/p2p/QmYfvLFHd69zZVTTzjfSX49hqgUnmoMomeGNUhMXa5h3iu err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10002] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:53:58.010|peer/node.go:153] Failed to connect to peer                err="dial backoff"
WARN [03-06|18:53:58.010|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10002/p2p/QmYfvLFHd69zZVTTzjfSX49hqgUnmoMomeGNUhMXa5h3iu err="dial backoff"
WARN [03-06|18:53:58.010|peer/node.go:153] Failed to connect to peer                err="dial backoff"
WARN [03-06|18:53:58.010|peer/pm.go:98]    Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10001/p2p/QmQG2VKRudyEtttx99EXfTATggqVew86awdA7HJdQt2LAX err="dial backoff"
INFO [03-06|18:54:00.408|dkg/service.go:68] Received request                         from=QmPnm21c34FKtr3bu4UBQtiWwr8L4Q5vYmyqkoPCkaKs9d
WARN [03-06|18:54:01.012|peer/node.go:153]  Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10002] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:54:01.012|peer/pm.go:98]     Failed to connect to peer                to=/ip4/127.0.0.1/tcp/10002/p2p/QmYfvLFHd69zZVTTzjfSX49hqgUnmoMomeGNUhMXa5h3iu err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10002] failed to negotiate security protocol: connected to wrong peer"
WARN [03-06|18:54:01.012|peer/node.go:153]  Failed to connect to peer                err="failed to dial : all dials failed\n  * [/ip4/127.0.0.1/tcp/10001] failed to negotiate security protocol: connected to wrong peer"

How to reproduce it (as minimally and precisely as possible):
make tss-example

and on the same machine, in 3 terminals:
./example dkg --config dkg/id-10001-input.yaml

./example dkg --config dkg/id-10002-input.yaml

./example dkg --config dkg/id-10003-input.yaml

Anything else we need to know?:
Thanks for this work & your help!

@mvanmeerbeck mvanmeerbeck changed the title Issue brief description DKG Example failing "dial backoff" Mar 6, 2023
@cychuang0924
Copy link
Contributor

Hi mvanmeerbeck,

We will check it and fix it. Thanks for your information.

@mvanmeerbeck
Copy link
Author

Hi,
I also tried all the releases 1.0.0, 1.0.1 and 1.0.2, same problem.
FYI, i'm on ubuntu 18, go1.20.1

@cychuang0924
Copy link
Contributor

cychuang0924 commented Mar 8, 2023 via email

@mvanmeerbeck
Copy link
Author

mvanmeerbeck commented Mar 8, 2023

I didn't change any configuration so t=3 already

port: 10001
rank: 0
threshold: 3
peers:
  - 10002
  - 10003
port: 10002
rank: 0
threshold: 3
peers:
  - 10001
  - 10003
port: 10003
rank: 0
threshold: 3
peers:
  - 10001
  - 10002

@mvanmeerbeck
Copy link
Author

If i use only 2 parties, it works

port: 10001
rank: 0
threshold: 2
peers:
  - 10002
port: 10002
rank: 0
threshold: 2
peers:
  - 10001

@cychuang0924
Copy link
Contributor

Hi mvanmeerbeck,
The codes of example should be updated, so we will fix it as soon as possible.
Apologize for any inconvenience.

@mvanmeerbeck
Copy link
Author

Thank you,
FYI, the example works fine with go 1.18

10gic added a commit to 10gic/alice that referenced this issue May 6, 2023
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

No branches or pull requests

3 participants