-
Notifications
You must be signed in to change notification settings - Fork 31
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
Try out go-libp2p-noise@begin-noise #30
base: master
Are you sure you want to change the base?
Conversation
For example, we can run the benchmark successfully using $ labctl node update --security-transports secio same-region
+----------------------+-----------+--------------+---------------------------------------------------+----------------+-----------+
| ID | ADDRESS | GITREFERENCE | LABELS | CREATEDAT | UPDATEDAT |
+----------------------+-----------+--------------+---------------------------------------------------+----------------+-----------+
| blpvpv7ic6vf7a3g5in0 | 127.0.0.1 | libp2p-noise | blpvpv7ic6vf7a3g5in0,t2.micro,us-west-2 | 15 minutes ago | now |
| blpvpvfic6vf7a3g5ing | 127.0.0.1 | libp2p-noise | blpvpvfic6vf7a3g5ing,neighbors,t2.micro,us-west-2 | 15 minutes ago | now |
| blpvpvnic6vf7a3g5io0 | 127.0.0.1 | libp2p-noise | blpvpvnic6vf7a3g5io0,neighbors,t2.micro,us-west-2 | 15 minutes ago | now |
+----------------------+-----------+--------------+---------------------------------------------------+----------------+-----------+
$ labctl benchmark create same-region neighbors
7:10PM INF Retrieving nodes in cluster bid=same-region-neighbors-1567883439546208960
7:10PM INF Resolving git references bid=same-region-neighbors-1567883439546208960
7:10PM INF Building p2p app(s) bid=same-region-neighbors-1567883439546208960 commits=["e13af9d394498f55acdb7951b122ca99ac9816f1"]
7:10PM INF Updating cluster bid=same-region-neighbors-1567883439546208960
7:10PM INF Retrieving peer infos bid=same-region-neighbors-1567883439546208960
7:10PM INF Connecting cluster bid=same-region-neighbors-1567883439546208960
7:10PM INF Creating scenario plan bid=same-region-neighbors-1567883439546208960
7:10PM INF Transforming objects into IPLD DAGs bid=same-region-neighbors-1567883439546208960
7:10PM INF Resolving OCI reference bid=same-region-neighbors-1567883439546208960 source=docker.io/library/golang:latest
7:10PM INF Resolved reference to digest bid=same-region-neighbors-1567883439546208960 digest=sha256:30101c5d45c7b68c2233962251da3d599417055e5ad73b84b7c4323b11caf57e source=docker.io/library/golang:latest
7:10PM INF Constructing Unixfs directory over manifest blobs bid=same-region-neighbors-1567883439546208960 target=sha256:e7c6d1d3c099cc16fbee65106b15abd03ad54645702e3204054d4a27e986b31a
7:10PM INF Planning scenario seed bid=same-region-neighbors-1567883439546208960
7:10PM INF Planning scenario benchmark bid=same-region-neighbors-1567883439546208960
7:10PM INF Creating benchmark metadata bid=same-region-neighbors-1567883439546208960
7:10PM INF Executing scenario plan bid=same-region-neighbors-1567883439546208960
7:10PM INF Seeding cluster bid=same-region-neighbors-1567883439546208960
7:10PM INF Seeding completed bid=same-region-neighbors-1567883439546208960
7:10PM INF Benchmarking cluster bid=same-region-neighbors-1567883439546208960
7:10PM INF Benchmark completed bid=same-region-neighbors-1567883439546208960
7:10PM INF Retrieving reports bid=same-region-neighbors-1567883439546208960
7:10PM INF Updating benchmark metadata bid=same-region-neighbors-1567883439546208960
7:10PM INF Completed benchmark "same-region-neighbors-1567883439546208960"
# Summary
Total time: 2 seconds 621 milliseconds
Trace: http://localhost:16686/trace/39fe431082ff12f2?uiFind=39fe431082ff12f2
# Bandwidth
+-------------------+----------------------+---------+----------+----------+----------+
| QUERY | NODE | TOTALIN | TOTALOUT | RATEIN | RATEOUT |
+-------------------+----------------------+---------+----------+----------+----------+
| (not 'neighbors') | blpvpv7ic6vf7a3g5in0 | 292 MB | 152 kB | 126 MB/s | 64 kB/s |
+-------------------+----------------------+---------+----------+----------+----------+
| - | blpvpvfic6vf7a3g5ing | 326 MB | 86 MB | 20 MB/s | 43 MB/s |
+ +----------------------+---------+----------+----------+----------+
| | blpvpvnic6vf7a3g5io0 | 329 MB | 255 MB | 19 MB/s | 91 MB/s |
+-------------------+----------------------+---------+----------+----------+----------+
| TOTAL | 947 MB | 342 MB | 165 MB/s | 133 MB/s |
+-------------------+----------------------+---------+----------+----------+----------+
# Bitswap
+-------------------+----------------------+------------+------------+-----------+----------+----------+---------+
| QUERY | NODE | BLOCKSRECV | BLOCKSSENT | DUPBLOCKS | DATARECV | DATASENT | DUPDATA |
+-------------------+----------------------+------------+------------+-----------+----------+----------+---------+
| (not 'neighbors') | blpvpv7ic6vf7a3g5in0 | 1,573 | 0 | 14 | 407 MB | 0 B | 3.7 MB |
+-------------------+----------------------+------------+------------+-----------+----------+----------+---------+
| - | blpvpvfic6vf7a3g5ing | 1,267 | 554 | 67 | 326 MB | 140 MB | 17 MB |
+ +----------------------+------------+------------+-----------+----------+----------+---------+
| | blpvpvnic6vf7a3g5io0 | 1,290 | 1,184 | 87 | 329 MB | 305 MB | 20 MB |
+-------------------+----------------------+------------+------------+-----------+----------+----------+---------+
| TOTAL | 4,130 | 1,738 | 168 | 1.1 GB | 445 MB | 41 MB |
+-------------------+----------------------+------------+------------+-----------+----------+----------+---------+ |
Hey, could you re-run the output with any extra debug logs turned on? Trying to understand what's happening in this code: Line 61 in 72fbd93
Wondering if there are any particular errors, or if it just hangs. Also, what is this function actually doing in terms of the libp2p nodes? |
Sure, let me try to get the noise debug logs to you. The benchmark consists of two stages, For example, in the p2plab/examples/scenario/neighbors.json Lines 8 to 13 in 72fbd93
We are seeding the nodes with the label We are using Lines 26 to 39 in 72fbd93
|
Notable logs: 11:03:49.397 ERROR noise: write length err write tcp4 172.17.0.1:45249->192.168.87.35:34533: write: connection reset by peer protocol.go:302 11:03:49.398 DEBUG noise: verifyPayload msg=6e6f6973652d6c69627032702d7374617469632d6b65793acffae7a02ee780905ac1158534fd26adc54cca2f0740eb96c4d63912a60f2c6c protocol.go:139
11:03:49.398 DEBUG noise: runHandshake_xx stage=2 initiator=false remote key=cffae7a02ee780905ac1158534fd26adc54cca2f0740eb96c4d63912a60f2c6c xx_handshake.go:240
11:03:49.398 DEBUG noise: runHandshake_xx done initiator=false xx_handshake.go:275
11:03:49.399 DEBUG noise: verifyPayload msg=6e6f6973652d6c69627032702d7374617469632d6b65793acffae7a02ee780905ac1158534fd26adc54cca2f0740eb96c4d63912a60f2c6c protocol.go:139
11:03:49.399 ERROR noise: write length err write tcp4 172.17.0.1:45249->192.168.87.35:45725: write: connection reset by peer protocol.go:302 11:03:49.399 DEBUG noise: runHandshake_xx done initiator=false xx_handshake.go:275
11:03:49.399 DEBUG noise: runHandshake_xx done initiator=false xx_handshake.go:275
11:03:49.399 ERROR noise: write length err write tcp4 127.0.0.1:45249->127.0.0.1:45725: write: connection reset by peer protocol.go:302
11:03:49.399 DEBUG noise: runHandshake_xx stage=2 initiator=false remote key=e5c306c88cee9cfa927b777d005092f439713c1f8ced8024d05fbffe7287fb0d xx_handshake.go:240
11:03:49.399 ERROR noise: write length err write tcp4 192.168.122.1:45249->192.168.122.1:34533: write: connection reset by peer protocol.go:302
11:03:49.399 DEBUG noise: verifyPayload msg=6e6f6973652d6c69627032702d7374617469632d6b65793ae5c306c88cee9cfa927b777d005092f439713c1f8ced8024d05fbffe7287fb0d protocol.go:139
11:03:49.399 DEBUG noise: runHandshake_xx done initiator=false xx_handshake.go:275
11:03:49.399 ERROR noise: write length err write tcp4 192.168.87.35:45249->192.168.87.35:45725: write: connection reset by peer protocol.go:302 You can reproduce this on your machine by running $ export GO111MODULE=on
$ export IPFS_LOGGING=DEBUG
$ export GOLOG_FILE=noise.log
$ go run ./cmd/labd |
Hey, I'm having some issues running the code:
|
Hi @noot, sorry for the trouble on the |
No worries, on the
It seems to hang after that, how long am I supposed to run it for? But based on the logs you showed, it looks like the connection is being reset by the initiator of the connection, it doesn't look like the initiator is completing the handshake. There is probably some bug. |
@noot Did you run the benchmark? Those logs indicate you only ran the labd daemon. I’ve included the full reproduction steps in the PR description. |
@hinshun Hey, sorry for the late reply. Could you run it again after |
Trying out a new secure transport from ChainSafe: https://github.com/ChainSafe/go-libp2p-noise/blob/master/go-libp2p-noise-ethberlin-1a.pdf
Test transferring OCI image over
tcp
+mplex
+noise
:Test transferring
docker.io/library/golang:latest
from twoneighbors
peers usinginmemory
driver:$ export GO111MODULE=on $ go run ./cmd/labd
Unfortunately, it doesn't seem to successfully complete atm.