Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Implement SIP6 #704

Merged
merged 72 commits into from
Aug 31, 2017
Merged

Implement SIP6 #704

merged 72 commits into from
Aug 31, 2017

Conversation

braydonf
Copy link
Contributor

@braydonf braydonf commented Jul 10, 2017

@braydonf braydonf changed the title [WIP] Add CLAIM message [WIP] Implement SIP6 Jul 10, 2017
@braydonf braydonf force-pushed the sip6 branch 2 times, most recently from 5149412 to 340bd78 Compare July 17, 2017 15:58
As a transfer token will be sent in addition, the tokens will need to be persistent on restart of the shard server, and the TTL of the OFFER and token will need to be syncronized. As the bottleneck has been around receiving OFFERs and not during consignment, optimizing this to all be done in one step, can be handled at a later step. Making sure that OFFER works reliabily is the top priority.
This will provide the ability to receive an offer using the same TCP socket, a step forward towards load balancing the renters and following a request/response pattern. It'll also avoid an additional network consignment call for better effeciency.
@littleskunk
Copy link
Collaborator

Depricated and can be removed as well: https://github.com/braydonf/storj-lib/blob/sip6/.gitattributes

@littleskunk
Copy link
Collaborator

littleskunk commented Aug 29, 2017

Lets say a renter uploads the same file with the same encrpytion to two bridges. At the end my farmer will store one shard with two contracts.

The current implementation will only look at the first contract and will ignore the second contract. The renter is not able to download his shard from the second bridge.

const nodeID = Object.keys(item.contracts)[0];
const contract = item.getContract({ nodeID: nodeID });
const bridgeExtendedKey = contract.get('renter_hd_key');
const bridge = self.farmerInterface.bridges.get(bridgeExtendedKey);
if (!bridge) {
  return res.send(500, { result: 'Not connected to bridge'});
}

@braydonf
Copy link
Contributor Author

braydonf commented Aug 30, 2017

Used this instead:

const contract = item.getContract({ nodeID: contact.nodeID }); 

May need to use the hdKey instead, we'll see.

@braydonf
Copy link
Contributor Author

Actually, looks like we can just use this:

const contract = item.getContract(contact); 

@braydonf braydonf changed the title [WIP] Implement SIP6 Implement SIP6 Aug 30, 2017
@aleitner aleitner merged commit fe5be46 into storj-archived:master Aug 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants