NebulousLabs/Sia — pull request #112 by lukechampine (2014-05-14 03:20:56+00:00)
Title: Changes to Ring

This PR significantly modifies the role of the `Ring` data type. Formerly, a `Ring` contained a slice of `Segment`s, which were used to reconstruct a `Sector`. That field has now been replaced with a `Quorum`, a slice of `QuorumSize` `Address`es.

(Since `Ring` no longer stores any data, it might be more accurate to rename it to `RingMetaData` or something similar.)

`EncodeRing()` now returns both a `Ring` and a slice of `Segments`, which `RebuildSector()` now takes.

I also added some functionality to the client. It's now capable of connecting to a manually-inputted quorum, uploading a (randomly generated) segment, and downloading the segment. A "SectorDB" was added to allow for storing and looking up `Sector`s. This reduces the number of arguments required for `uploadSector()` and `downloadSector()`.