From 2b407e9139786e6fb40872170fb6d4c28dfdd0f7 Mon Sep 17 00:00:00 2001 From: Stephen Buttolph Date: Tue, 8 Oct 2024 19:22:46 -0400 Subject: [PATCH] Update dynamic fee defaults --- genesis/genesis_fuji.go | 14 +++++++++----- genesis/genesis_local.go | 14 +++++++++----- genesis/genesis_mainnet.go | 14 +++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/genesis/genesis_fuji.go b/genesis/genesis_fuji.go index 82a8ffecaa3c..a6b4c4ca960a 100644 --- a/genesis/genesis_fuji.go +++ b/genesis/genesis_fuji.go @@ -42,11 +42,15 @@ var ( gas.DBWrite: 1, gas.Compute: 1, }, - MaxCapacity: 1_000_000, - MaxPerSecond: 1_000, - TargetPerSecond: 500, - MinPrice: 1, - ExcessConversionConstant: 5_000, + MaxCapacity: 1_000_000, // Max block size ~1MB + MaxPerSecond: 250_000, + TargetPerSecond: 125_000, // Target block size ~125KB + MinPrice: 1, + // ExcessConversionConstant = (Capacity - Target) * NumberOfSecondsPerDoubling / ln(2) + // + // ln(2) is a float and the result is consensus critical, so we + // hardcode the result. + ExcessConversionConstant: 5_410_106, // Double every 30s }, ValidatorFeeCapacity: 20_000, ValidatorFeeConfig: validatorfee.Config{ diff --git a/genesis/genesis_local.go b/genesis/genesis_local.go index 5834a366ed2b..166229508f10 100644 --- a/genesis/genesis_local.go +++ b/genesis/genesis_local.go @@ -60,11 +60,15 @@ var ( gas.DBWrite: 1, gas.Compute: 1, }, - MaxCapacity: 1_000_000, - MaxPerSecond: 250_000, - TargetPerSecond: 100_000, - MinPrice: 1, - ExcessConversionConstant: 1_000_000, + MaxCapacity: 1_000_000, // Max block size ~1MB + MaxPerSecond: 250_000, + TargetPerSecond: 125_000, // Target block size ~125KB + MinPrice: 1, + // ExcessConversionConstant = (Capacity - Target) * NumberOfSecondsPerDoubling / ln(2) + // + // ln(2) is a float and the result is consensus critical, so we + // hardcode the result. + ExcessConversionConstant: 5_410_106, // Double every 30s }, ValidatorFeeCapacity: 20_000, ValidatorFeeConfig: validatorfee.Config{ diff --git a/genesis/genesis_mainnet.go b/genesis/genesis_mainnet.go index 2395d88d34b4..dd5b61d481da 100644 --- a/genesis/genesis_mainnet.go +++ b/genesis/genesis_mainnet.go @@ -42,11 +42,15 @@ var ( gas.DBWrite: 1, gas.Compute: 1, }, - MaxCapacity: 1_000_000, - MaxPerSecond: 1_000, - TargetPerSecond: 500, - MinPrice: 1, - ExcessConversionConstant: 5_000, + MaxCapacity: 1_000_000, // Max block size ~1MB + MaxPerSecond: 250_000, + TargetPerSecond: 125_000, // Target block size ~125KB + MinPrice: 1, + // ExcessConversionConstant = (Capacity - Target) * NumberOfSecondsPerDoubling / ln(2) + // + // ln(2) is a float and the result is consensus critical, so we + // hardcode the result. + ExcessConversionConstant: 5_410_106, // Double every 30s }, ValidatorFeeCapacity: 20_000, ValidatorFeeConfig: validatorfee.Config{