From f837d85be80088de9e62d9fc430b6801454da8ee Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Fri, 28 Aug 2020 00:44:08 +0200 Subject: [PATCH] update prices --- res/include/md/hosting.md | 25 ++++++++++++++---------- res/include/script/file_viewer/Viewer.js | 5 +++++ webcontroller/templates.go | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/res/include/md/hosting.md b/res/include/md/hosting.md index bde6823..566bc82 100644 --- a/res/include/md/hosting.md +++ b/res/include/md/hosting.md @@ -13,21 +13,26 @@ requirements on storage and bandwidth pricing for Sia hosts. We will only make contracts with hosts that fullfill all these requirements. Keep in mind that these are maximums, you are allowed to go lower. -| Requirement | Max rate | -|--------------------------|----------------| -| Contract formation price | €0.001 | -| Storage price per month | €2.00 / TB | -| Download price | €1.00 / TB | -| Upload price | €0.50 / TB | -| RPC price | €0.0001 | -| Sector access price | €0.0001 | -| Collateral per month | €6.00 / TB | +| Requirement | Max rate | +|--------------------------|------------------| +| Storage price per month | €1.50 / TB | +| Download price | €1.00 / TB | +| Upload price | €0.50 / TB | +| Contract formation price | €0.01 | +| RPC price | €0.000 000 000 1 | +| Sector access price | €0.000 000 000 1 | +| Collateral per month | €3.00 / TB | This may seem low, but keep in mind that these prices are before redundancy. We have to upload all our data three times to the Sia network in order to reach high availability. If you multiply everything by three it becomes much more reasonable. +The RPC price and sector access price are paid every time a single chunk of data +is read from the host. These costs ramp up quickly when frequently downloading +files. Sia only includes these settings as a way to mitigate denial of service +attacks. There is normally no need to increase these settings. + We also can't guarantee that your host will be picked when it fulfills these requirements. If there is enough supply we will only pick the most reliable hosts available. @@ -36,7 +41,7 @@ Other settings we pay attention to: | Setting | Recommended value | |-----------------------|-------------------| -| Max contract duration | At least 3 months | +| Max contract duration | At least 4 months | | Proof window duration | 1 day | | Download batch size | At least 16 MiB | | Revision batch size | At least 16 MiB | diff --git a/res/include/script/file_viewer/Viewer.js b/res/include/script/file_viewer/Viewer.js index d1fbe20..2bb8da8 100644 --- a/res/include/script/file_viewer/Viewer.js +++ b/res/include/script/file_viewer/Viewer.js @@ -139,6 +139,11 @@ Viewer.prototype.setFile = function(file) { } this.viewerScript.render(this.divFilepreview) + + // let ws = new WebSocket("ws://127.0.0.1:8080/api/file/"+file.id+"/stats") + // ws.onmessage = (msg) => { + // console.log(msg) + // } } Viewer.prototype.renderSponsors = function() { diff --git a/webcontroller/templates.go b/webcontroller/templates.go index 04be04c..5944756 100644 --- a/webcontroller/templates.go +++ b/webcontroller/templates.go @@ -201,7 +201,7 @@ func (tm *TemplateManager) Get() *template.Template { return tm.tpl } -// Templace functions. These can be called from within the template to execute +// Template functions. These can be called from within the template to execute // more specialized actions func (tm *TemplateManager) bgPattern() template.URL {