profiles
Package profiles provides embedded network tuning profiles for the Lux SDK.
import "github.com/luxfi/sdk/profiles"Package profiles provides embedded network tuning profiles for the Lux SDK. These profiles configure consensus, health, and network parameters for different deployment scenarios (mainnet, testnet, devnet, dev mode).
Available profiles:
- standard: Conservative mainnet settings for production-safe operation
- fast: Balanced testnet settings for development
- turbo: Aggressive 3-node local network with 2/3 quorum
- ultra: Maximum aggression for single-node dev mode with K=1 consensus
Functions
DefaultProfileForNetwork
func DefaultProfileForNetwork(networkName string) stringDefaultProfileForNetwork returns the default profile name for a network type. For local development, all networks use turbo for ultra-fast consensus.
GetProfileMap
func GetProfileMap(name string) (map[string]interface{}, error)GetProfileMap loads a profile and returns it as map[string]interface{}. Useful for direct JSON manipulation.
ListProfiles
func ListProfiles() []stringListProfiles returns names of all available profiles, sorted alphabetically.
ValidateProfile
func ValidateProfile(data map[string]interface{}) errorValidateProfile checks that a profile has required fields.
Types
ConsensusConfig
ConsensusConfig holds consensus tuning parameters.
HealthConfig
HealthConfig holds health check tuning parameters.
NetworkConfig
NetworkConfig holds network tuning parameters.
Profile
Profile represents a network tuning profile.
func GetProfile(name string) (*Profile, error)func MustGetProfile(name string) *Profilefunc (p *Profile) ToNodeConfig() map[string]interface{}