This repository has been archived by the owner on Jul 30, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move some parts of the README to the colossus sub-package for better
context.
- Loading branch information
1 parent
a8cc884
commit f18b3d1
Showing
89 changed files
with
876 additions
and
7,578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,8 @@ yarn-error.log* | |
.vscode | ||
.*.sw* | ||
|
||
# Node modules | ||
node_modules/ | ||
|
||
# Ignore nvm config file | ||
.nvmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.eslintrc.js |
1 change: 1 addition & 0 deletions
1
packages/colossus/5CpGKFTCdub9TWVD8bpR1kZbwvBrWXJ53idqYNUSuk8hS5hJ.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"address":"5CpGKFTCdub9TWVD8bpR1kZbwvBrWXJ53idqYNUSuk8hS5hJ","encoded":"0x3053020101300506032b65700422042058cc8db354ab43e4c318d641c3a8d78b451ff01bf15cf6beea53fa88ec0b40fd2138d116e4cb9e41b9c2012b3d0db4158c06e182cec68f4c5245c8b0f36b5558a1230321002138d116e4cb9e41b9c2012b3d0db4158c06e182cec68f4c5245c8b0f36b5558","encoding":{"content":["pkcs8","ed25519"],"type":"none","version":"2"},"meta":{"name":"storage role account for 5HfS9kwKMUxVpW5JoKnqvHE7tTz32wDN59p3BWRmYykygMK7"}} |
1 change: 1 addition & 0 deletions
1
packages/colossus/5HfS9kwKMUxVpW5JoKnqvHE7tTz32wDN59p3BWRmYykygMK7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"address":"5HfS9kwKMUxVpW5JoKnqvHE7tTz32wDN59p3BWRmYykygMK7","encoded":"0xbe1f340fe41a972670979ca26c1819558d70454bd3b3ebd19b0a06d30d6d90e0d8dd51e25cd8ee5c8dbd1fa551c3832adb37394e4a3850e3ce2b8a3e6e2c76c84086f86b34349c2e093db334057398b05d1b14c81e2c5e51fb0da7ec0e304211070f8c6ac748e5a287cf06e4ad948469bff075133cf62fc816b7df6dbcf4090e01f72b6bb7cb63781fb8e004b9bead9de46e084abeb38b60b9d97c9ed4","encoding":{"content":["pkcs8","ed25519"],"type":"xsalsa20-poly1305","version":"2"},"meta":{"name":"test","whenCreated":1557912803459}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
![Storage Nodes for Joystream](../../banner.svg) | ||
|
||
Development | ||
----------- | ||
|
||
Run a development server: | ||
|
||
```bash | ||
$ yarn run dev --config myconfig.json | ||
``` | ||
|
||
Command-Line | ||
------------ | ||
|
||
Running a storage server is (almost) as easy as running the bundled `colossus` | ||
executable: | ||
|
||
```bash | ||
$ colossus --storage=/path/to/storage/directory | ||
``` | ||
|
||
Run with `--help` to see a list of available CLI options. | ||
|
||
You need to stake as a storage provider to run a storage node. | ||
|
||
Configuration | ||
------------- | ||
|
||
Most common configuration options are available as command-line options | ||
for the CLI. | ||
|
||
However, some advanced configuration options are only possible to set | ||
via the configuration file. | ||
|
||
* `filter` is a hash of upload filtering options. | ||
* `max_size` sets the maximum permissible file upload size. If unset, | ||
this defaults to 100 MiB. | ||
* `mime` is a hash of... | ||
* `accept` is an Array of mime types that are acceptable for uploads, | ||
such as `text/plain`, etc. Mime types can also be specified for | ||
wildcard matching, such as `video/*`. | ||
* `reject` is an Array of mime types that are unacceptable for uploads. | ||
|
||
Upload Filtering | ||
---------------- | ||
|
||
The upload filtering logic first tests whether any of the `accept` mime types | ||
are matched. If none are matched, the upload is rejected. If any is matched, | ||
then the upload is still rejected if any of the `reject` mime types are | ||
matched. | ||
|
||
This allows inclusive and exclusive filtering. | ||
|
||
* `{ accept: ['text/plain', 'text/html'] }` accepts *only* the two given mime types. | ||
* `{ accept: ['text/*'], reject: ['text/plain'] }` accepts any `text/*` that is not | ||
`text/plain`. | ||
|
||
More advanced filtering is currently not available. | ||
|
||
API Packages | ||
------------ | ||
|
||
Since it's not entirely clear yet how APIs will develop in future, the approach | ||
taken here is to package individual APIs up individually. That is, instead of | ||
providing an overall API version in `api-base.yml`, it should be part of each | ||
API package's path. | ||
|
||
For example, for a `foo` API in its version `v1`, its definitions should live | ||
in `./paths/foo/v1.js` and `./paths/foo/v1/*.js` respectively. | ||
|
||
*Note:* until a reasonably stable API is reached, this project uses a `v0` | ||
version prefix. | ||
|
||
Interface/implementation | ||
------------------------ | ||
|
||
For reusability across API versions, it's best to keep files in the `paths` | ||
subfolder very thin, and instead inject implementations via the `dependencies` | ||
configuration value of `express-openapi`. | ||
|
||
These implementations line to the `./lib` subfolder. Adjust `server.js` as | ||
needed to make them available to API packages. | ||
|
||
Streaming Notes | ||
--------------- | ||
|
||
For streaming content, it is required that stream metadata is located at the | ||
start of the stream. Most software writes metadata at the end of the stream, | ||
because it is when the stream is committed to disk that the entirety of the | ||
metadata is known. | ||
|
||
To move metadata to the start of the stream, a CLI tool such as | ||
[qtfaststart](https://github.com/danielgtaylor/qtfaststart) for MP4 files might | ||
be used. |
Oops, something went wrong.