storj-archived / bridge

Deprecated. Access the Storj network via simple REST API.
https://storj.io
GNU Affero General Public License v3.0
77 stars 44 forks source link

Duplicate mirror traffic #564

Closed littleskunk closed 6 years ago

littleskunk commented 6 years ago

Package Versions

Replace the values below using the output from npm list storj-bridge.

title | "Storj Bridge"
version | "7.4.0"
description | "Access the Storj network using a simple REST API."
x-protocol-version | "1.2.0"
x-core-version | "8.5.0"

Expected Behavior

Please describe the program's expected behavior. Include an example of your usage code in the back ticks below if applicable.

Shard upload or mirror success is followed by one mirror download.

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces or log output in the back ticks below.

Duplicate mirror traffic in both directions. Could be a reopen of #348.

:"info","message":"Sending alloc response hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:21.248Z"}
{"level":"info","message":"handling mirror request from d86cca4494242fb0410ad223084e4dd25abb4369 hash d0f6cbb658d841f00b69638993a5d35045ea06be","timestamp":"2018-02-07T05:34:28.341Z"}
{"level":"info","message":"handling mirror request from c7c8cdfc61ed109b04ca80bcca9bd3a950617b46 hash d0f6cbb658d841f00b69638993a5d35045ea06be","timestamp":"2018-02-07T05:34:28.661Z"}
{"level":"info","message":"opening data transfer with {\"userAgent\":\"8.6.0\",\"protocol\":\"1.2.0\",\"address\":\"136.243.16.135\",\"port\":4000,\"nodeID\":\"a845c914f3b0a5c5dfa2dadca5c214de6b65f1a6\",\"lastSeen\":\"2018-02-07T05:34:25.384Z\"} to mirror d0f6cbb658d841f00b69638993a5d35045ea06be","timestamp":"2018-02-07T05:34:28.737Z"}
{"level":"info","message":"opening data transfer with {\"userAgent\":\"8.6.0\",\"protocol\":\"1.2.0\",\"address\":\"136.243.16.135\",\"port\":4000,\"nodeID\":\"a845c914f3b0a5c5dfa2dadca5c214de6b65f1a6\",\"lastSeen\":\"2018-02-07T05:34:25.384Z\"} to mirror d0f6cbb658d841f00b69638993a5d35045ea06be","timestamp":"2018-02-07T05:34:28.796Z"}
{"level":"info","message":"successfully mirrored shard hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:28.898Z"}
{"level":"info","message":"successfully mirrored shard hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:28.920Z"}
[...]
{"level":"info","message":"handling storage retrieve request from aac348af3ed8e1901212b68df4eac52dd3c3c52a hash d0f6cbb658d841f00b69638993a5d35045ea06be","timestamp":"2018-02-07T05:34:29.903Z"}
{"level":"info","message":"handling storage retrieve request from a90d7e307ba59d4ed17fa6d16c94ac605409311e hash d0f6cbb658d841f00b69638993a5d35045ea06be","timestamp":"2018-02-07T05:34:29.939Z"}
{"level":"info","message":"Mirror download started hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:32.593Z"}
{"level":"info","message":"Mirror download completed hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:32.594Z"}
{"level":"info","message":"Mirror download started hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:33.245Z"}
{"level":"info","message":"Mirror download completed hash d0f6cbb658d841f00b69638993a5d35045ea06be size 101","timestamp":"2018-02-07T05:34:33.246Z"}

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as much detail as possible.

  1. Run farmer and wait for mirror transfers
  2. Grep shard hashes on the logfile
littleskunk commented 6 years ago

The problem is the SHARD_UPLOADED report. Renter and farmer will send one report. Both reports will trigger the mirror creation. On success both mirrors will send a MIRROR_SUCCESS. That will trigger the next round and keep the duplicate traffic allive.

If I disable the report on my farmer I get only one mirror download request from the bridge.

braydonf commented 6 years ago

Okay thanks for finding out the reason.

braydonf commented 6 years ago

This is likely something we can fix after/in https://github.com/Storj/bridge/pull/521

RichardLitt commented 6 years ago

👋 Hey! Thanks for this contribution. Apologies for the delay in responding!

We've decided to rearchitect Storj, so that we can scale better. You can read more about this decision here. This means that we are entirely focused on v3 at the moment, in the storj/storj repository. Our white paper for v3 is coming very, very soon - follow along on the blog and in our Rocketchat.

As this repository is part of the v2 network, we're no longer maintaining this repository. I am going to close this for now. If you have any questions, I encourage you to jump on Rocketchat and ask them there. Thanks!