One Minute-Motivation | Talk is cheap. Action is what will lead to you transcending where you are at today. Too many people year after year talk about change but fail to take action.
How VideoCoin Network Selects a worker to get work assigned.
VideoCoin Network is expected to have a lot of workers, both big and small. This means that workers need to be chosen from a pool to make sure that they are qualified and have the capacity to finish the work sent to them.
Here is how this process works (in a simplified explanation).
Capacity Benchmarks provide an insight into how much performance a worker node has available. Covered in our previous posts like this one.
Capacity Benchmarks are run on the worker node in the following cases
Capacity Benchmark will have different values provided as a result based on node capacity. For example, there can be encodeCapacityBenchmark, analyticsCapacityBenchmark, storageCapacityBenchmark etc.
The selection algorithm is based on a weighted random selection algorithm, where a set of qualified nodes are weighted on their totalStake before selecting.
Step 2: Select a random worker weighted by totalStake
Example:
Assume the following constants
minEncodeCapacity = 20
maxCurrentCPU = 20
Assume ALL available present worker pool is as follows.
Step 1:
Find qualified workers where minEncodeCapacity > 20 and currentCPU < 20 and sort by stake
Pool of qualified workers will be:
Step 2:
Calculate weights:
worker.weight = worker.totalStake / currentQualifiedStake
Step 3: Selection
Generate a random number between [0, 1] select a worker based on the weighted select algorithm above
For the following random numbers, the worker selected will be as follows
If you are interested to learn more about this topic, you can check the following links
I hope everyone is having a lovely Saturday. I just wanted to take a moment to remind every one of you how vital it is to live in the present moment. We spend so much time with our faces buried in…
It is always necessary to understand the things that we see or watch in our everyday life. Looking at something without having any clue about the real meaning is illogical. Zero knowledge and zero…
Ti mando in Patagonia, mi diceva mio padre quando combinavo qualche guaio, e io pensavo che la Patagonia fosse alla fine del Campovolo, oltre il passaggio a livello incustodito, luogo proibito a noi…