From 393985d305d415888f0199b50221b23efe67c128 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Jul 2024 10:27:54 +0200 Subject: [PATCH] ... --- .../tfgridsimulation_farming/.collection | 0 collections/tfgridsimulation_farming/intro.md | 3 ++ .../nodes/node_example.md | 4 ++ .../tfgridsimulation_farming/specs/params.md | 12 ++++++ .../specs/params_cultivation.md | 15 +++++++ .../specs/params_farming.md | 21 ++++++++++ .../specs/params_growth.md | 17 ++++++++ .../specs/params_node_template.md | 42 +++++++++++++++++++ .../specs/params_tokens_params.md | 16 +++++++ heroscript/tfgridsimulation/SUMMARY.md | 16 +++---- heroscript/tfgridsimulation/run.md | 4 +- heroscript/tfgridsimulation/run.sh | 2 +- .../tfgridsimulation/sync_production.sh | 2 +- .../tfgridsimulation_farming/SUMMARY.md | 1 + heroscript/tfgridsimulation_farming/run.md | 14 +++++++ heroscript/tfgridsimulation_farming/run.sh | 12 ++++++ .../sync_production.sh | 3 ++ 17 files changed, 172 insertions(+), 12 deletions(-) create mode 100644 collections/tfgridsimulation_farming/.collection create mode 100644 collections/tfgridsimulation_farming/intro.md create mode 100644 collections/tfgridsimulation_farming/nodes/node_example.md create mode 100644 collections/tfgridsimulation_farming/specs/params.md create mode 100644 collections/tfgridsimulation_farming/specs/params_cultivation.md create mode 100644 collections/tfgridsimulation_farming/specs/params_farming.md create mode 100644 collections/tfgridsimulation_farming/specs/params_growth.md create mode 100644 collections/tfgridsimulation_farming/specs/params_node_template.md create mode 100644 collections/tfgridsimulation_farming/specs/params_tokens_params.md create mode 100644 heroscript/tfgridsimulation_farming/SUMMARY.md create mode 100644 heroscript/tfgridsimulation_farming/run.md create mode 100755 heroscript/tfgridsimulation_farming/run.sh create mode 100755 heroscript/tfgridsimulation_farming/sync_production.sh diff --git a/collections/tfgridsimulation_farming/.collection b/collections/tfgridsimulation_farming/.collection new file mode 100644 index 0000000..e69de29 diff --git a/collections/tfgridsimulation_farming/intro.md b/collections/tfgridsimulation_farming/intro.md new file mode 100644 index 0000000..804070e --- /dev/null +++ b/collections/tfgridsimulation_farming/intro.md @@ -0,0 +1,3 @@ +![](img/cloud.png) + +## Simulator for TFGrid 4.x diff --git a/collections/tfgridsimulation_farming/nodes/node_example.md b/collections/tfgridsimulation_farming/nodes/node_example.md new file mode 100644 index 0000000..8c8d4bf --- /dev/null +++ b/collections/tfgridsimulation_farming/nodes/node_example.md @@ -0,0 +1,4 @@ + +!!tfgridsimulation_farming.node_wiki name:... + + diff --git a/collections/tfgridsimulation_farming/specs/params.md b/collections/tfgridsimulation_farming/specs/params.md new file mode 100644 index 0000000..f64ecbd --- /dev/null +++ b/collections/tfgridsimulation_farming/specs/params.md @@ -0,0 +1,12 @@ + +## parameters for the simulation + +```js + +!!tfgridsimulation_farming.simulator_params_define + wiki_path: '/tmp/simulatorwiki' + + +``` + + diff --git a/collections/tfgridsimulation_farming/specs/params_cultivation.md b/collections/tfgridsimulation_farming/specs/params_cultivation.md new file mode 100644 index 0000000..8149a47 --- /dev/null +++ b/collections/tfgridsimulation_farming/specs/params_cultivation.md @@ -0,0 +1,15 @@ + +## cultivation parameters for the simulation + +```js +!!tfgridsimulation_farming.cultivation_params_define + //how much in percentage are nodes used (0-100) + utilization_nodes: '1:0,24:70' + revenue_per_cu_usd: '1:5,60:4' + revenue_per_su_usd: '1:5,60:3' + revenue_per_nu_usd: '1:0.01,60:0.005' + cost_per_cu_usd: '1:0' + cost_per_su_usd: '1:0' + cost_per_nu_usd: '1:0.005,60:0.0025' + +``` \ No newline at end of file diff --git a/collections/tfgridsimulation_farming/specs/params_farming.md b/collections/tfgridsimulation_farming/specs/params_farming.md new file mode 100644 index 0000000..2ac60f8 --- /dev/null +++ b/collections/tfgridsimulation_farming/specs/params_farming.md @@ -0,0 +1,21 @@ + +## parameters for the simulation + + +```js +!!tfgridsimulation_farming.environment_params_define + //power cost per khw + power_cost: '1:0.06,60:0.15' + //rackspace cost per U in USD + rackspace_cost: '1:10,60:5' + +!!tfgridsimulation_farming.farming_params_define + //nr of months lockup after adding node + farming_lockup: 24 + farming_min_utilizaton: 30 + //how much will node hardware cost more (here less) over time, 2 means double, 0.5 means half + price_increase_nodecost: '1:1,60:0.3' + //price in USD for support cost per node per month + support_cost_node: '1:10' + +``` diff --git a/collections/tfgridsimulation_farming/specs/params_growth.md b/collections/tfgridsimulation_farming/specs/params_growth.md new file mode 100644 index 0000000..d7775d9 --- /dev/null +++ b/collections/tfgridsimulation_farming/specs/params_growth.md @@ -0,0 +1,17 @@ + +## Growth + +### Regional internet ZNZ + +```js +!!tfgridsimulation_farming.regional_internet_add name:znz + +Add the nodes following our template 1U to our regional internet. + +!!tfgridsimulation_farming.regional_internet_nodes_add + name:znz + template:1U + //nodes added per month from the template + growth:'3:0,4:50,12:200,24:1000,60:3000' +``` + diff --git a/collections/tfgridsimulation_farming/specs/params_node_template.md b/collections/tfgridsimulation_farming/specs/params_node_template.md new file mode 100644 index 0000000..7d05a7e --- /dev/null +++ b/collections/tfgridsimulation_farming/specs/params_node_template.md @@ -0,0 +1,42 @@ + + +## generic node, name 1U + +This is a normalized node for our simulator + +Following defines the Bill of Material and composition of such a noce + +```js +!!tfgridsimulation_farming.component_define name:AMD32 + description: 'powerful amd cpu' + cost:250.0 + //in watt + power:70 + cru:32 + +!!tfgridsimulation_farming.component_define name:CASE1U + description: '1U rack mountable case' + cost:150.0 + rackspace:1 + power:20 + +!!tfgridsimulation_farming.component_define name:MEM32 + description: 'memory 32 GB' + cost:90.0 + power:20 + mru:32 + +!!tfgridsimulation_farming.component_define name:SSD1TB + description: 'SSD of 2 GT' + cost:120.0 + power:5 + sru:1000 + +!!tfgridsimulation_farming.node_template_define name:'1U' + +!!tfgridsimulation_farming.node_template_component_add name:'1U' nr:1 component:AMD32 +!!tfgridsimulation_farming.node_template_component_add name:'1U' nr:1 component:CASE1U +!!tfgridsimulation_farming.node_template_component_add name:'1U' nr:4 component:MEM32 +!!tfgridsimulation_farming.node_template_component_add name:'1U' nr:2 component:SSD1TB + +``` \ No newline at end of file diff --git a/collections/tfgridsimulation_farming/specs/params_tokens_params.md b/collections/tfgridsimulation_farming/specs/params_tokens_params.md new file mode 100644 index 0000000..981f8c7 --- /dev/null +++ b/collections/tfgridsimulation_farming/specs/params_tokens_params.md @@ -0,0 +1,16 @@ + +## token params + +```js + +!!tfgridsimulation_farming.token_params_define + // in usd per chi token + chi_price_usd: '1:0.1,12:0.2,24:0.5,36:3,60:2' + // chi_price_usd: '1:0.1' + chi_total_tokens_million: 1000 + + + +``` + + diff --git a/heroscript/tfgridsimulation/SUMMARY.md b/heroscript/tfgridsimulation/SUMMARY.md index b277554..cd37231 100644 --- a/heroscript/tfgridsimulation/SUMMARY.md +++ b/heroscript/tfgridsimulation/SUMMARY.md @@ -1,8 +1,8 @@ -- [Introduction](simulation/intro.md) -- [Specifications](simulation/specs_simulator.md) - - [Nodes](simulation/specs_nodes.md) - - [Rewards](simulation/specs_rewards.md) -- [Node Stats](simulation/node_stats.md) - - [Silver Nodes](simulation/silver_stats.md) - - [Platinum Nodes](simulation/platinum_stats.md) - - [AI Nodes](simulation/platinum_stats.md) +- [Introduction](tfgridsimulation/intro.md) +- [Specifications](tfgridsimulation/specs_simulator.md) + - [Nodes](tfgridsimulation/specs_nodes.md) + - [Rewards](tfgridsimulation/specs_rewards.md) +- [Node Stats](tfgridsimulation/node_stats.md) + - [Silver Nodes](tfgridsimulation/silver_stats.md) + - [Platinum Nodes](tfgridsimulation/platinum_stats.md) + - [AI Nodes](tfgridsimulation/platinum_stats.md) diff --git a/heroscript/tfgridsimulation/run.md b/heroscript/tfgridsimulation/run.md index 654349f..9655e2f 100644 --- a/heroscript/tfgridsimulation/run.md +++ b/heroscript/tfgridsimulation/run.md @@ -3,11 +3,11 @@ ```js !!book.generate name:'tfgrid4simulator' title:'TFGrid Simulator 4.0' - url:'https://git.ourworld.tf/tfgrid/incacockpit/src/branch/main/simulator/simulations/tfgrid4_1/book' + url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/heroscript/tfgridsimulation' !!doctree.add - url:'https://git.ourworld.tf/tfgrid/incacockpit/src/branch/main/simulator/simulations/tfgrid4_1/collections' + url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/collections/tfgridsimulation' ``` diff --git a/heroscript/tfgridsimulation/run.sh b/heroscript/tfgridsimulation/run.sh index fa80d94..8b25ab6 100755 --- a/heroscript/tfgridsimulation/run.sh +++ b/heroscript/tfgridsimulation/run.sh @@ -3,7 +3,7 @@ set -ex ~/code/github/freeflowuniverse/crystallib/cli/hero/compile_debug.sh -hero mdbook -u https://git.ourworld.tf/tfgrid/incacockpit/src/branch/main/simulator/simulations/tfgrid4_1/book -o +hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/heroscript/tfgridsimulation -o #result will be in /root/hero/var/mdbuild/tfgrid4simulator diff --git a/heroscript/tfgridsimulation/sync_production.sh b/heroscript/tfgridsimulation/sync_production.sh index d84332e..881579d 100755 --- a/heroscript/tfgridsimulation/sync_production.sh +++ b/heroscript/tfgridsimulation/sync_production.sh @@ -1,3 +1,3 @@ #!/bin/bash #hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript/tech -rsync -rv ~/hero/www/info/tfgrid4simulator/ root@info.ourworld.tf:/root/hero/www/info/tfgrid4simulator/ +rsync -rv ~/hero/www/info/tfgrid4simulator/ root@info.ourworld.tf:/root/hero/www/info/tfgrid4simulation/ diff --git a/heroscript/tfgridsimulation_farming/SUMMARY.md b/heroscript/tfgridsimulation_farming/SUMMARY.md new file mode 100644 index 0000000..f6eafb8 --- /dev/null +++ b/heroscript/tfgridsimulation_farming/SUMMARY.md @@ -0,0 +1 @@ +- [Introduction](tfgridsimulation_farming/intro.md) diff --git a/heroscript/tfgridsimulation_farming/run.md b/heroscript/tfgridsimulation_farming/run.md new file mode 100644 index 0000000..d8d48f9 --- /dev/null +++ b/heroscript/tfgridsimulation_farming/run.md @@ -0,0 +1,14 @@ + + +```js + +!!book.generate name:'tfgrid4simulator' title:'TFGrid Simulator 4.0' + url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/heroscript/tfgridsimulation_farming' + + +!!doctree.add + url:'https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/collections/tfgridsimulation_farming' + + +``` + diff --git a/heroscript/tfgridsimulation_farming/run.sh b/heroscript/tfgridsimulation_farming/run.sh new file mode 100755 index 0000000..fab6b02 --- /dev/null +++ b/heroscript/tfgridsimulation_farming/run.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -ex + +~/code/github/freeflowuniverse/crystallib/cli/hero/compile_debug.sh + +hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/development/heroscript/tfgridsimulation_farming -o + + +#result will be in /root/hero/var/mdbuild/tfgrid4simulator +#~/hero/www/info/tfgrid4simulator/ + +#https://threefold.info/tfgrid4simulator/ \ No newline at end of file diff --git a/heroscript/tfgridsimulation_farming/sync_production.sh b/heroscript/tfgridsimulation_farming/sync_production.sh new file mode 100755 index 0000000..ab674e0 --- /dev/null +++ b/heroscript/tfgridsimulation_farming/sync_production.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#hero mdbook -u https://git.ourworld.tf/tfgrid/info_tfgrid/src/branch/main/heroscript/tech +rsync -rv ~/hero/www/info/tfgrid4simulator/ root@info.ourworld.tf:/root/hero/www/info/tfgrid4simulation_farming/