mirror of
https://github.com/luxfi/config.git
synced 2026-09-24 00:24:16 +00:00
chore: sync dependencies and format code
This commit is contained in:
@@ -161,7 +161,7 @@ func (c *LuxConfig) GetVMsConfigPath() string {
|
||||
return filepath.Join(c.GetConfigsPath(), "vms")
|
||||
}
|
||||
|
||||
// GetSubnetsConfigPath returns the subnets config directory path
|
||||
func (c *LuxConfig) GetSubnetsConfigPath() string {
|
||||
return filepath.Join(c.GetConfigsPath(), "subnets")
|
||||
// GetNetsConfigPath returns the nets config directory path
|
||||
func (c *LuxConfig) GetNetsConfigPath() string {
|
||||
return filepath.Join(c.GetConfigsPath(), "nets")
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module github.com/luxfi/config
|
||||
|
||||
go 1.24.9
|
||||
go 1.25.5
|
||||
|
||||
require (
|
||||
github.com/btcsuite/btcutil v1.0.2
|
||||
@@ -13,7 +13,7 @@ require (
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
||||
github.com/fsnotify/fsnotify v1.9.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
|
||||
github.com/google/go-cmp v0.7.0 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
@@ -24,7 +24,7 @@ require (
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/sys v0.39.0 // indirect
|
||||
golang.org/x/text v0.32.0 // indirect
|
||||
golang.org/x/sys v0.40.0 // indirect
|
||||
golang.org/x/text v0.33.0 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
)
|
||||
|
||||
@@ -17,8 +17,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
|
||||
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
|
||||
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0 h1:vM5IJoUAy3d7zRSVtIwQgBj7BiWtMPfmPEgAXnvj1Ro=
|
||||
github.com/go-viper/mapstructure/v2 v2.5.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
@@ -73,11 +73,11 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
|
||||
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
|
||||
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
|
||||
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
|
||||
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
|
||||
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ const (
|
||||
LogsDirKey = "log-dir"
|
||||
TrackChainsKey = "track-chains"
|
||||
ChainConfigDirKey = "chain-config-dir"
|
||||
NetConfigDirKey = "subnet-config-dir"
|
||||
NetConfigDirKey = "net-config-dir"
|
||||
GenesisFileKey = "genesis-file"
|
||||
StakingTLSKeyPathKey = "staking-tls-key-file"
|
||||
StakingCertPathKey = "staking-tls-cert-file"
|
||||
|
||||
+22
-22
@@ -45,28 +45,28 @@ const (
|
||||
type Category string
|
||||
|
||||
const (
|
||||
CategoryProcess Category = "process"
|
||||
CategoryNode Category = "node"
|
||||
CategoryDatabase Category = "database"
|
||||
CategoryNetwork Category = "network"
|
||||
CategoryConsensus Category = "consensus"
|
||||
CategoryStaking Category = "staking"
|
||||
CategoryHTTP Category = "http"
|
||||
CategoryAPI Category = "api"
|
||||
CategoryHealth Category = "health"
|
||||
CategoryLogging Category = "logging"
|
||||
CategoryThrottler Category = "throttler"
|
||||
CategorySystem Category = "system"
|
||||
CategoryBootstrap Category = "bootstrap"
|
||||
CategoryChain Category = "chain"
|
||||
CategoryProfile Category = "profile"
|
||||
CategoryMetrics Category = "metrics"
|
||||
CategoryGenesis Category = "genesis"
|
||||
CategoryFees Category = "fees"
|
||||
CategoryIndex Category = "index"
|
||||
CategoryTracing Category = "tracing"
|
||||
CategoryPOA Category = "poa"
|
||||
CategoryDev Category = "dev"
|
||||
CategoryProcess Category = "process"
|
||||
CategoryNode Category = "node"
|
||||
CategoryDatabase Category = "database"
|
||||
CategoryNetwork Category = "network"
|
||||
CategoryConsensus Category = "consensus"
|
||||
CategoryStaking Category = "staking"
|
||||
CategoryHTTP Category = "http"
|
||||
CategoryAPI Category = "api"
|
||||
CategoryHealth Category = "health"
|
||||
CategoryLogging Category = "logging"
|
||||
CategoryThrottler Category = "throttler"
|
||||
CategorySystem Category = "system"
|
||||
CategoryBootstrap Category = "bootstrap"
|
||||
CategoryChain Category = "chain"
|
||||
CategoryProfile Category = "profile"
|
||||
CategoryMetrics Category = "metrics"
|
||||
CategoryGenesis Category = "genesis"
|
||||
CategoryFees Category = "fees"
|
||||
CategoryIndex Category = "index"
|
||||
CategoryTracing Category = "tracing"
|
||||
CategoryPOA Category = "poa"
|
||||
CategoryDev Category = "dev"
|
||||
)
|
||||
|
||||
// Constraints defines validation rules for a flag.
|
||||
|
||||
+5
-5
@@ -1281,7 +1281,7 @@
|
||||
"key": "proposervm-min-block-delay",
|
||||
"type": "duration",
|
||||
"default": 1000000000,
|
||||
"description": "Minimum delay to enforce when building a chain++ block for the primary network chains and the default minimum delay for subnets",
|
||||
"description": "Minimum delay to enforce when building a chain++ block for the primary network chains and the default minimum delay for nets",
|
||||
"category": "consensus"
|
||||
},
|
||||
{
|
||||
@@ -1327,9 +1327,9 @@
|
||||
"category": "chain"
|
||||
},
|
||||
{
|
||||
"key": "subnet-config-dir",
|
||||
"key": "net-config-dir",
|
||||
"type": "string",
|
||||
"default": "$LUXD_DATA_DIR/configs/subnets",
|
||||
"default": "$LUXD_DATA_DIR/configs/nets",
|
||||
"description": "Net specific configurations parent directory. Ignored if net-config-content is specified",
|
||||
"category": "chain"
|
||||
},
|
||||
@@ -1337,7 +1337,7 @@
|
||||
"key": "net-config-content",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Specifies base64 encoded subnets configurations",
|
||||
"description": "Specifies base64 encoded nets configurations",
|
||||
"category": "chain"
|
||||
},
|
||||
{
|
||||
@@ -1561,7 +1561,7 @@
|
||||
"key": "poa-mode-enabled",
|
||||
"type": "bool",
|
||||
"default": false,
|
||||
"description": "Enable Proof of Authority mode for subnets",
|
||||
"description": "Enable Proof of Authority mode for nets",
|
||||
"category": "poa"
|
||||
},
|
||||
{
|
||||
|
||||
+23
-23
@@ -23,11 +23,11 @@ type TokenomicsConfig struct {
|
||||
|
||||
// AirdropConfig defines airdrop parameters
|
||||
type AirdropConfig struct {
|
||||
Enabled bool
|
||||
SnapshotDate string
|
||||
ConversionRatio float64 // Legacy token to LUX conversion ratio
|
||||
VestingPeriod uint64 // in seconds
|
||||
ClaimPeriod uint64 // in seconds
|
||||
Enabled bool
|
||||
SnapshotDate string
|
||||
ConversionRatio float64 // Legacy token to LUX conversion ratio
|
||||
VestingPeriod uint64 // in seconds
|
||||
ClaimPeriod uint64 // in seconds
|
||||
}
|
||||
|
||||
// StakingConfig defines staking parameters
|
||||
@@ -73,36 +73,36 @@ func DefaultTokenomicsConfig() *TokenomicsConfig {
|
||||
TotalSupply: 10_000_000_000_000_000_000, // 10B tokens with 9 decimals
|
||||
|
||||
AirdropConfig: AirdropConfig{
|
||||
Enabled: true,
|
||||
Enabled: true,
|
||||
SnapshotDate: "2025-01-01T00:00:00Z",
|
||||
ConversionRatio: 1000.0, // 1 legacy token = 1000 LUX
|
||||
VestingPeriod: 365 * 24 * 60 * 60, // 1 year
|
||||
ClaimPeriod: 90 * 24 * 60 * 60, // 90 days to claim
|
||||
ConversionRatio: 1000.0, // 1 legacy token = 1000 LUX
|
||||
VestingPeriod: 365 * 24 * 60 * 60, // 1 year
|
||||
ClaimPeriod: 90 * 24 * 60 * 60, // 90 days to claim
|
||||
},
|
||||
|
||||
StakingConfig: StakingConfig{
|
||||
// 1M LUX minimum for validators (can be combined)
|
||||
MinimumValidatorStake: 1_000_000_000_000_000, // 1M tokens with 9 decimals
|
||||
|
||||
|
||||
NFTStakingEnabled: true,
|
||||
NFTTiers: []NFTTier{
|
||||
{
|
||||
Name: "Genesis",
|
||||
RequiredLUX: 500_000_000_000_000, // 500K LUX with Genesis NFT
|
||||
StakingMultiplier: 200, // 2x rewards
|
||||
RequiredLUX: 500_000_000_000_000, // 500K LUX with Genesis NFT
|
||||
StakingMultiplier: 200, // 2x rewards
|
||||
MaxValidators: 100,
|
||||
},
|
||||
{
|
||||
Name: "Pioneer",
|
||||
RequiredLUX: 750_000_000_000_000, // 750K LUX with Pioneer NFT
|
||||
StakingMultiplier: 150, // 1.5x rewards
|
||||
RequiredLUX: 750_000_000_000_000, // 750K LUX with Pioneer NFT
|
||||
StakingMultiplier: 150, // 1.5x rewards
|
||||
MaxValidators: 500,
|
||||
},
|
||||
{
|
||||
Name: "Standard",
|
||||
RequiredLUX: 1_000_000_000_000_000, // 1M LUX standard
|
||||
StakingMultiplier: 100, // 1x rewards
|
||||
MaxValidators: 0, // Unlimited
|
||||
StakingMultiplier: 100, // 1x rewards
|
||||
MaxValidators: 0, // Unlimited
|
||||
},
|
||||
},
|
||||
|
||||
@@ -146,12 +146,12 @@ func DefaultTokenomicsConfig() *TokenomicsConfig {
|
||||
|
||||
// Chain allocations (percentage of total supply)
|
||||
ChainAllocations: map[string]uint64{
|
||||
"P-Chain": 1_500_000_000_000_000_000, // 1.5B for staking/governance (15%)
|
||||
"X-Chain": 2_000_000_000_000_000_000, // 2B for exchanges/liquidity (20%)
|
||||
"C-Chain": 3_000_000_000_000_000_000, // 3B for smart contracts/DeFi (30%)
|
||||
"A-Chain": 1_500_000_000_000_000_000, // 1.5B for attestation operations (15%)
|
||||
"B-Chain": 1_000_000_000_000_000_000, // 1B for bridge liquidity (10%)
|
||||
"Z-Chain": 1_000_000_000_000_000_000, // 1B for privacy/ZK operations (10%)
|
||||
"P-Chain": 1_500_000_000_000_000_000, // 1.5B for staking/governance (15%)
|
||||
"X-Chain": 2_000_000_000_000_000_000, // 2B for exchanges/liquidity (20%)
|
||||
"C-Chain": 3_000_000_000_000_000_000, // 3B for smart contracts/DeFi (30%)
|
||||
"A-Chain": 1_500_000_000_000_000_000, // 1.5B for attestation operations (15%)
|
||||
"B-Chain": 1_000_000_000_000_000_000, // 1B for bridge liquidity (10%)
|
||||
"Z-Chain": 1_000_000_000_000_000_000, // 1B for privacy/ZK operations (10%)
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -184,4 +184,4 @@ func (c *TokenomicsConfig) GetStakingMultiplier(nftTier string) uint32 {
|
||||
}
|
||||
|
||||
return 100 // Default 1x multiplier
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user