Skip to content

Commit

Permalink
ACP-103: Finalize parameterization (#3549)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph authored Nov 15, 2024
1 parent 5a188b8 commit 480add4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
17 changes: 8 additions & 9 deletions genesis/genesis_fuji.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,22 @@ var (
AddSubnetValidatorFee: units.MilliAvax,
AddSubnetDelegatorFee: units.MilliAvax,
},
// TODO: Set these values to something more reasonable
DynamicFeeConfig: gas.Config{
Weights: gas.Dimensions{
gas.Bandwidth: 1,
gas.DBRead: 1,
gas.DBWrite: 1,
gas.Compute: 1,
gas.Bandwidth: 1, // Max block size ~1MB
gas.DBRead: 1_000, // Max reads per block 1,000
gas.DBWrite: 1_000, // Max writes per block 1,000
gas.Compute: 4, // Max compute time per block ~250ms
},
MaxCapacity: 1_000_000, // Max block size ~1MB
MaxPerSecond: 250_000,
TargetPerSecond: 125_000, // Target block size ~125KB
MaxCapacity: 1_000_000,
MaxPerSecond: 100_000, // Refill time 10s
TargetPerSecond: 50_000, // Target is half of max
MinPrice: 1,
// ExcessConversionConstant = (MaxPerSecond - TargetPerSecond) * 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
ExcessConversionConstant: 2_164_043, // Double every 30s
},
ValidatorFeeConfig: validatorfee.Config{
Capacity: 20_000,
Expand Down
17 changes: 8 additions & 9 deletions genesis/genesis_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,22 @@ var (
AddSubnetValidatorFee: units.MilliAvax,
AddSubnetDelegatorFee: units.MilliAvax,
},
// TODO: Set these values to something more reasonable
DynamicFeeConfig: gas.Config{
Weights: gas.Dimensions{
gas.Bandwidth: 1,
gas.DBRead: 1,
gas.DBWrite: 1,
gas.Compute: 1,
gas.Bandwidth: 1, // Max block size ~1MB
gas.DBRead: 1_000, // Max reads per block 1,000
gas.DBWrite: 1_000, // Max writes per block 1,000
gas.Compute: 4, // Max compute time per block ~250ms
},
MaxCapacity: 1_000_000, // Max block size ~1MB
MaxPerSecond: 250_000,
TargetPerSecond: 125_000, // Target block size ~125KB
MaxCapacity: 1_000_000,
MaxPerSecond: 100_000, // Refill time 10s
TargetPerSecond: 50_000, // Target is half of max
MinPrice: 1,
// ExcessConversionConstant = (MaxPerSecond - TargetPerSecond) * 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
ExcessConversionConstant: 2_164_043, // Double every 30s
},
ValidatorFeeConfig: validatorfee.Config{
Capacity: 20_000,
Expand Down
17 changes: 8 additions & 9 deletions genesis/genesis_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,22 @@ var (
AddSubnetValidatorFee: units.MilliAvax,
AddSubnetDelegatorFee: units.MilliAvax,
},
// TODO: Set these values to something more reasonable
DynamicFeeConfig: gas.Config{
Weights: gas.Dimensions{
gas.Bandwidth: 1,
gas.DBRead: 1,
gas.DBWrite: 1,
gas.Compute: 1,
gas.Bandwidth: 1, // Max block size ~1MB
gas.DBRead: 1_000, // Max reads per block 1,000
gas.DBWrite: 1_000, // Max writes per block 1,000
gas.Compute: 4, // Max compute time per block ~250ms
},
MaxCapacity: 1_000_000, // Max block size ~1MB
MaxPerSecond: 250_000,
TargetPerSecond: 125_000, // Target block size ~125KB
MaxCapacity: 1_000_000,
MaxPerSecond: 100_000, // Refill time 10s
TargetPerSecond: 50_000, // Target is half of max
MinPrice: 1,
// ExcessConversionConstant = (MaxPerSecond - TargetPerSecond) * 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
ExcessConversionConstant: 2_164_043, // Double every 30s
},
ValidatorFeeConfig: validatorfee.Config{
Capacity: 20_000,
Expand Down

0 comments on commit 480add4

Please sign in to comment.