core: dynamic fee algorithm from ArticMine

The fee will vary based on the base reward and the current
block size limit:

fee = (R/R0) * (M0/M) * F0

R: base reward
R0: reference base reward (10 monero)
M: block size limit
M0: minimum block size limit (60000)
F0: 0.002 monero

Starts applying at v4
This commit is contained in:
moneromooo-monero 2016-10-27 23:43:44 +01:00
parent 83b0511731
commit 82dbba10d4
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
6 changed files with 206 additions and 5 deletions

View file

@ -64,6 +64,8 @@
#define FEE_PER_KB_OLD ((uint64_t)10000000000) // pow(10, 10)
#define FEE_PER_KB ((uint64_t)2000000000) // 2 * pow(10, 9)
#define DYNAMIC_FEE_PER_KB_BASE_FEE ((uint64_t)2000000000) // 2 * pow(10,9)
#define DYNAMIC_FEE_PER_KB_BASE_BLOCK_REWARD ((uint64_t)10000000000000) // 10 * pow(10,12)
#define ORPHANED_BLOCKS_MAX_COUNT 100
@ -122,6 +124,8 @@
#define THREAD_STACK_SIZE 5 * 1024 * 1024
#define HF_VERSION_DYNAMIC_FEE 4
// New constants are intended to go here
namespace config
{