Skip to content

Commit

Permalink
Merge branch 'master' into remove-min-peer-error
Browse files Browse the repository at this point in the history
  • Loading branch information
sukantoraymond authored Oct 14, 2024
2 parents a7ef178 + b9e2af2 commit 67599d4
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# This workflow contains a single job called "build"
build-mac:
# The type of runner that the job will run on
runs-on: macos-12
runs-on: macos-14
permissions:
id-token: write
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, custom-arm64-jammy, custom-arm64-noble]
os: [macos-14, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2022, custom-arm64-jammy, custom-arm64-noble]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-go-for-project
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,8 @@ func getTxFeeConfig(v *viper.Viper, networkID uint32) genesis.TxFeeConfig {
MinPrice: gas.Price(v.GetUint64(DynamicFeesMinGasPriceKey)),
ExcessConversionConstant: gas.Gas(v.GetUint64(DynamicFeesExcessConversionConstantKey)),
},
ValidatorFeeCapacity: gas.Gas(v.GetUint64(ValidatorFeesCapacityKey)),
ValidatorFeeConfig: validatorfee.Config{
Capacity: gas.Gas(v.GetUint64(ValidatorFeesCapacityKey)),
Target: gas.Gas(v.GetUint64(ValidatorFeesTargetKey)),
MinPrice: gas.Price(v.GetUint64(ValidatorFeesMinPriceKey)),
ExcessConversionConstant: gas.Gas(v.GetUint64(ValidatorFeesExcessConversionConstantKey)),
Expand Down
2 changes: 1 addition & 1 deletion config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func addNodeFlags(fs *pflag.FlagSet) {

// AVAX fees:
// Validator fees:
fs.Uint64(ValidatorFeesCapacityKey, uint64(genesis.LocalParams.ValidatorFeeCapacity), "Maximum number of validators")
fs.Uint64(ValidatorFeesCapacityKey, uint64(genesis.LocalParams.ValidatorFeeConfig.Capacity), "Maximum number of validators")
fs.Uint64(ValidatorFeesTargetKey, uint64(genesis.LocalParams.ValidatorFeeConfig.Target), "Target number of validators")
fs.Uint64(ValidatorFeesMinPriceKey, uint64(genesis.LocalParams.ValidatorFeeConfig.MinPrice), "Minimum validator price in nAVAX per second")
fs.Uint64(ValidatorFeesExcessConversionConstantKey, uint64(genesis.LocalParams.ValidatorFeeConfig.ExcessConversionConstant), "Constant to convert validator excess price")
Expand Down
2 changes: 1 addition & 1 deletion genesis/genesis_fuji.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ var (
MinPrice: 1,
ExcessConversionConstant: 5_000,
},
ValidatorFeeCapacity: 20_000,
ValidatorFeeConfig: validatorfee.Config{
Capacity: 20_000,
Target: 10_000,
MinPrice: gas.Price(512 * units.NanoAvax),
// ExcessConversionConstant = (Capacity - Target) * NumberOfSecondsPerDoubling / ln(2)
Expand Down
2 changes: 1 addition & 1 deletion genesis/genesis_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ var (
MinPrice: 1,
ExcessConversionConstant: 5_000,
},
ValidatorFeeCapacity: 20_000,
ValidatorFeeConfig: validatorfee.Config{
Capacity: 20_000,
Target: 10_000,
MinPrice: gas.Price(1 * units.NanoAvax),
// ExcessConversionConstant = (Capacity - Target) * NumberOfSecondsPerDoubling / ln(2)
Expand Down
2 changes: 1 addition & 1 deletion genesis/genesis_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ var (
MinPrice: 1,
ExcessConversionConstant: 5_000,
},
ValidatorFeeCapacity: 20_000,
ValidatorFeeConfig: validatorfee.Config{
Capacity: 20_000,
Target: 10_000,
MinPrice: gas.Price(512 * units.NanoAvax),
// ExcessConversionConstant = (Capacity - Target) * NumberOfSecondsPerDoubling / ln(2)
Expand Down
9 changes: 4 additions & 5 deletions genesis/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ type StakingConfig struct {
}

type TxFeeConfig struct {
CreateAssetTxFee uint64 `json:"createAssetTxFee"`
StaticFeeConfig txfee.StaticConfig `json:"staticFeeConfig"`
DynamicFeeConfig gas.Config `json:"dynamicFeeConfig"`
ValidatorFeeCapacity gas.Gas `json:"validatorFeeCapacity"`
ValidatorFeeConfig validatorfee.Config `json:"validatorFeeConfig"`
CreateAssetTxFee uint64 `json:"createAssetTxFee"`
StaticFeeConfig txfee.StaticConfig `json:"staticFeeConfig"`
DynamicFeeConfig gas.Config `json:"dynamicFeeConfig"`
ValidatorFeeConfig validatorfee.Config `json:"validatorFeeConfig"`
}

type Params struct {
Expand Down
1 change: 0 additions & 1 deletion node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,6 @@ func (n *Node) initVMs() error {
CreateAssetTxFee: n.Config.CreateAssetTxFee,
StaticFeeConfig: n.Config.StaticFeeConfig,
DynamicFeeConfig: n.Config.DynamicFeeConfig,
ValidatorFeeCapacity: n.Config.ValidatorFeeCapacity,
ValidatorFeeConfig: n.Config.ValidatorFeeConfig,
UptimePercentage: n.Config.UptimeRequirement,
MinValidatorStake: n.Config.MinValidatorStake,
Expand Down
3 changes: 1 addition & 2 deletions vms/platformvm/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ type Config struct {
DynamicFeeConfig gas.Config

// ACP-77 validator fees are active after Etna
ValidatorFeeCapacity gas.Gas
ValidatorFeeConfig validatorfee.Config
ValidatorFeeConfig validatorfee.Config

// Provides access to the uptime manager as a thread safe data structure
UptimeLockedCalculator uptime.LockedCalculator
Expand Down
1 change: 1 addition & 0 deletions vms/platformvm/validators/fee/fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

// Config contains all the static parameters of the dynamic fee mechanism.
type Config struct {
Capacity gas.Gas `json:"capacity"`
Target gas.Gas `json:"target"`
MinPrice gas.Price `json:"minPrice"`
ExcessConversionConstant gas.Gas `json:"excessConversionConstant"`
Expand Down

0 comments on commit 67599d4

Please sign in to comment.