github.com/ava-labs/avalanchego@v1.11.11/genesis/genesis_fuji.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package genesis
     5  
     6  import (
     7  	"time"
     8  
     9  	_ "embed"
    10  
    11  	"github.com/ava-labs/avalanchego/utils/units"
    12  	"github.com/ava-labs/avalanchego/vms/components/gas"
    13  	"github.com/ava-labs/avalanchego/vms/platformvm/reward"
    14  	"github.com/ava-labs/avalanchego/vms/platformvm/txs/fee"
    15  )
    16  
    17  var (
    18  	//go:embed genesis_fuji.json
    19  	fujiGenesisConfigJSON []byte
    20  
    21  	// FujiParams are the params used for the fuji testnet
    22  	FujiParams = Params{
    23  		TxFeeConfig: TxFeeConfig{
    24  			CreateAssetTxFee: 10 * units.MilliAvax,
    25  			StaticFeeConfig: fee.StaticConfig{
    26  				TxFee:                         units.MilliAvax,
    27  				CreateSubnetTxFee:             100 * units.MilliAvax,
    28  				TransformSubnetTxFee:          1 * units.Avax,
    29  				CreateBlockchainTxFee:         100 * units.MilliAvax,
    30  				AddPrimaryNetworkValidatorFee: 0,
    31  				AddPrimaryNetworkDelegatorFee: 0,
    32  				AddSubnetValidatorFee:         units.MilliAvax,
    33  				AddSubnetDelegatorFee:         units.MilliAvax,
    34  			},
    35  			// TODO: Set these values to something more reasonable
    36  			DynamicFeeConfig: gas.Config{
    37  				Weights: gas.Dimensions{
    38  					gas.Bandwidth: 1,
    39  					gas.DBRead:    1,
    40  					gas.DBWrite:   1,
    41  					gas.Compute:   1,
    42  				},
    43  				MaxCapacity:              1_000_000,
    44  				MaxPerSecond:             1_000,
    45  				TargetPerSecond:          500,
    46  				MinPrice:                 1,
    47  				ExcessConversionConstant: 5_000,
    48  			},
    49  		},
    50  		StakingConfig: StakingConfig{
    51  			UptimeRequirement: .8, // 80%
    52  			MinValidatorStake: 1 * units.Avax,
    53  			MaxValidatorStake: 3 * units.MegaAvax,
    54  			MinDelegatorStake: 1 * units.Avax,
    55  			MinDelegationFee:  20000, // 2%
    56  			MinStakeDuration:  24 * time.Hour,
    57  			MaxStakeDuration:  365 * 24 * time.Hour,
    58  			RewardConfig: reward.Config{
    59  				MaxConsumptionRate: .12 * reward.PercentDenominator,
    60  				MinConsumptionRate: .10 * reward.PercentDenominator,
    61  				MintingPeriod:      365 * 24 * time.Hour,
    62  				SupplyCap:          720 * units.MegaAvax,
    63  			},
    64  		},
    65  	}
    66  )