Scorum
|
#include <witness_objects.hpp>
Public Attributes | |
id_type | id |
int32_t | average_block_size = 0 |
int64_t | current_reserve_ratio = 1 |
uint128_t | max_virtual_bandwidth = 0 |
Definition at line 45 of file witness_objects.hpp.
int32_t scorum::witness::reserve_ratio_object::average_block_size = 0 |
Average block size is updated every block to be:
average_block_size = (99 * average_block_size + new_block_size) / 100
This property is used to update the current_reserve_ratio to maintain approximately 50% or less utilization of network capacity.
Definition at line 60 of file witness_objects.hpp.
int64_t scorum::witness::reserve_ratio_object::current_reserve_ratio = 1 |
Any time average_block_size <= 50% maximum_block_size this value grows by 1 until it reaches SCORUM_MAX_RESERVE_RATIO. Any time average_block_size is greater than 50% it falls by 1%. Upward adjustments happen once per round, downward adjustments happen every block.
Definition at line 68 of file witness_objects.hpp.
id_type scorum::witness::reserve_ratio_object::id |
Definition at line 50 of file witness_objects.hpp.
uint128_t scorum::witness::reserve_ratio_object::max_virtual_bandwidth = 0 |
The maximum bandwidth the blockchain can support is:
max_bandwidth = maximum_block_size * SCORUM_BANDWIDTH_AVERAGE_WINDOW_SECONDS / SCORUM_BLOCK_INTERVAL
The maximum virtual bandwidth is:
max_bandwidth * current_reserve_ratio
Definition at line 79 of file witness_objects.hpp.