commands

package
v1.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2025 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2025, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Copyright (C) 2022, Lux Industries Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

View Source
const (
	CLIBinary           = "./bin/lux"
	SubnetCmd           = "subnet"
	NetworkCmd          = "network"
	KeyCmd              = "key"
	UpgradeCmd          = "upgrade"
	ElasticTransformCmd = "elastic"
	JoinCmd             = "join"
	RemoveValidatorCmd  = "removeValidator"
)
View Source
const (
	PoSString = "proof-of-stake"
	PoAString = "proof-of-authority"
)
View Source
const (
	ExpectFail    = false
	ExpectSuccess = true
)
View Source
const (
	ContractCMD = "contract"
)
View Source
const (
	InterchainCMD = "interchain"
)
View Source
const (
	WarpCmd = "warp"
)

Variables

This section is empty.

Functions

func AddEtnaSubnetValidatorToCluster

func AddEtnaSubnetValidatorToCluster(
	clusterName string,
	subnetName string,
	nodeEndpoint string,
	ewoqPChainAddress string,
	balance int,
	createLocalValidator bool,
) (string, error)

func AddPermissionlessValidator

func AddPermissionlessValidator(subnetName string, nodeID string, stakeAmount string, stakingPeriod string) (string, error)

func ApplyUpgradeLocal

func ApplyUpgradeLocal(subnetName string) (string, error)

#nosec G204

func ApplyUpgradeToPublicNode

func ApplyUpgradeToPublicNode(subnetName, luxChainConfDir string) (string, error)

#nosec G204

func CleanNetwork

func CleanNetwork()

#nosec G204

func CleanNetworkHard

func CleanNetworkHard()

#nosec G204

func ConfigMetrics

func ConfigMetrics()

func ConfigureChainConfig

func ConfigureChainConfig(subnetName string, genesisPath string)

#nosec G204

func ConfigurePerNodeChainConfig

func ConfigurePerNodeChainConfig(subnetName string, perNodeChainConfigPath string)

#nosec G204

func CreateCustomVMConfig

func CreateCustomVMConfig(subnetName string, genesisPath string, vmPath string)

#nosec G204

func CreateEtnaSubnetEvmConfig

func CreateEtnaSubnetEvmConfig(
	subnetName string,
	ewoqEVMAddress string,
	subnetManagementType SubnetManagementType,
) (string, string)

func CreateKey

func CreateKey(keyName string) (string, error)

#nosec G204

func CreateKeyForce

func CreateKeyForce(keyName string) (string, error)

#nosec G204

func CreateKeyFromPath

func CreateKeyFromPath(keyName string, keyPath string) (string, error)

#nosec G204

func CreateLocalEtnaNode

func CreateLocalEtnaNode(
	luxdVersion string,
	clusterName string,
	numNodes int,
) (string, error)

func CreateSubnetEvmConfig

func CreateSubnetEvmConfig(subnetName string, genesisPath string) (string, string)

#nosec G204

func CreateSubnetEvmConfigWithVersion

func CreateSubnetEvmConfigWithVersion(subnetName string, genesisPath string, version string)

#nosec G204

func DeleteElasticSubnetConfig

func DeleteElasticSubnetConfig(subnetName string)

func DeleteKey

func DeleteKey(keyName string) (string, error)

#nosec G204

func DeleteSubnetConfig

func DeleteSubnetConfig(subnetName string)

#nosec G204

func DeployERC20Contract

func DeployERC20Contract(network, key, symbol, supply, receiver, blockchain string) string

#nosec G204

func DeployEtnaBlockchain

func DeployEtnaBlockchain(
	subnetName string,
	clusterName string,
	bootstrapEndpoints []string,
	ewoqPChainAddress string,
	convertOnly bool,
) (string, error)

func DeployInterchainTokenTransferrer

func DeployInterchainTokenTransferrer(args []string) string

#nosec G204

func DeployRelayer

func DeployRelayer(args []string, testFlags utils.TestFlags) (string, error)

#nosec G204

func DeploySubnetLocally

func DeploySubnetLocally(subnetName string) string

Returns the deploy output

#nosec G204

func DeploySubnetLocallyExpectError

func DeploySubnetLocallyExpectError(subnetName string)

#nosec G204

func DeploySubnetLocallyWithArgs

func DeploySubnetLocallyWithArgs(subnetName string, version string, confPath string) string

Returns the deploy output

#nosec G204

func DeploySubnetLocallyWithArgsAndOutput

func DeploySubnetLocallyWithArgsAndOutput(subnetName string, version string, confPath string) ([]byte, error)

func DeploySubnetLocallyWithArgsExpectError

func DeploySubnetLocallyWithArgsExpectError(subnetName string, version string, confPath string)

#nosec G204

func DeploySubnetLocallyWithVersion

func DeploySubnetLocallyWithVersion(subnetName string, version string) string

Returns the deploy output

#nosec G204

func DeploySubnetLocallyWithViperConf

func DeploySubnetLocallyWithViperConf(subnetName string, confPath string) string

Returns the deploy output

#nosec G204

func DeployWarpContracts

func DeployWarpContracts(args []string, testFlags utils.TestFlags) (string, error)

#nosec G204

func DescribeSubnet

func DescribeSubnet(subnetName string) (string, error)

#nosec G204

func DestroyLocalNode

func DestroyLocalNode(
	clusterName string,
) (string, error)

func ExportKey

func ExportKey(keyName string) (string, error)

#nosec G204

func ExportKeyToFile

func ExportKeyToFile(keyName string, outputPath string) (string, error)

#nosec G204

func GetLatestLuxdVersionFromGithub

func GetLatestLuxdVersionFromGithub() string

func GetLocalClusterStatus

func GetLocalClusterStatus(
	clusterName string,
	blockchainName string,
) (string, error)

func GetVersion

func GetVersion() string

func ImportSubnetConfig

func ImportSubnetConfig(repoAlias string, subnetName string)

#nosec G204

func ImportSubnetConfigFromURL

func ImportSubnetConfigFromURL(repoURL string, branch string, subnetName string)

#nosec G204

func ImportUpgradeBytes

func ImportUpgradeBytes(subnetName, filepath string) (string, error)

#nosec G204

func InitValidatorManager

func InitValidatorManager(
	subnetName string,
	clusterName string,
	endpoint string,
	blockchainID string,
) (string, error)

func ListKeys

func ListKeys() (string, error)

#nosec G204

func ListValidators

func ListValidators(subnetName string, network string) (string, error)

#nosec G204

func NodeCreate

func NodeCreate(network, version string, numNodes int, separateMonitoring bool, numAPINodes int, expectSuccess bool) string

func NodeDevnet

func NodeDevnet(version string, numNodes int, numAPINodes int) string

func NodeExport

func NodeExport(filename string, withSecrets bool) string

func NodeImport

func NodeImport(filename string, clusterName string) string

func NodeList

func NodeList() string

func NodeSSH

func NodeSSH(name, command string) string

func NodeStatus

func NodeStatus() string

func NodeUpgrade

func NodeUpgrade() string

func NodeWhitelistSSH

func NodeWhitelistSSH(sshPubKey string) string

func RemoveEtnaSubnetValidatorFromCluster

func RemoveEtnaSubnetValidatorFromCluster(
	clusterName string,
	subnetName string,
	nodeEndpoint string,
	keyName string,
	uptimeSec uint64,
) (string, error)

func RemoveValidator

func RemoveValidator(subnetName string, nodeID string) (string, error)

func SendWarpMessage

func SendWarpMessage(args []string, testFlags utils.TestFlags) (string, error)

#nosec G204

func SimulateGetSubnetStatsTestnet

func SimulateGetSubnetStatsTestnet(subnetName, subnetID string) string

#nosec G204

func SimulateMainnetAddValidator

func SimulateMainnetAddValidator(
	subnetName string,
	nodeID string,
	start string,
	period string,
	weight string,
) string

simulates mainnet add validator execution path on a local network

#nosec G204

func SimulateMainnetDeploy

func SimulateMainnetDeploy(
	subnetName string,
) string

simulates mainnet deploy execution path on a local network

#nosec G204

func SimulateMainnetJoin

func SimulateMainnetJoin(
	subnetName string,
	nodeConfig string,
	pluginDir string,
	nodeID string,
) string

simulates mainnet join execution path on a local network

#nosec G204

func SimulateTestnetAddValidator

func SimulateTestnetAddValidator(
	subnetName string,
	key string,
	nodeID string,
	start string,
	period string,
	weight string,
) string

simulates testnet add validator execution path on a local network

#nosec G204

func SimulateTestnetDeploy

func SimulateTestnetDeploy(
	subnetName string,
	key string,
	controlKeys string,
) string

simulates testnet deploy execution path on a local network

#nosec G204

func SimulateTestnetJoin

func SimulateTestnetJoin(
	subnetName string,
	nodeConfig string,
	pluginDir string,
	nodeID string,
) string

simulates testnet join execution path on a local network

#nosec G204

func SimulateTestnetRemoveValidator

func SimulateTestnetRemoveValidator(
	subnetName string,
	key string,
	nodeID string,
) string

simulates testnet add validator execution path on a local network

func SimulateTestnetTransformSubnet

func SimulateTestnetTransformSubnet(
	subnetName string,
	key string,
) (string, error)

func StartNetwork

func StartNetwork() string

#nosec G204

func StartNetworkWithVersion

func StartNetworkWithVersion(version string) string

#nosec G204

func StopNetwork

func StopNetwork()

#nosec G204

func StopRelayer

func StopRelayer() (string, error)

#nosec G204

func TrackLocalEtnaSubnet

func TrackLocalEtnaSubnet(
	clusterName string,
	subnetName string,
) (string, error)

func TransformElasticSubnetLocally

func TransformElasticSubnetLocally(subnetName string) (string, error)

func TransformElasticSubnetLocallyandTransformValidators

func TransformElasticSubnetLocallyandTransformValidators(subnetName string, stakeAmount string) (string, error)

func UpgradeCustomVM

func UpgradeCustomVM(subnetName string, binaryPath string) (string, error)

#nosec G204

func UpgradeCustomVMLocal

func UpgradeCustomVMLocal(subnetName string, binaryPath string) string

#nosec G204

func UpgradeVMConfig

func UpgradeVMConfig(subnetName string, targetVersion string) (string, error)

#nosec G204

func UpgradeVMLocal

func UpgradeVMLocal(subnetName string, targetVersion string) string

#nosec G204

func UpgradeVMPublic

func UpgradeVMPublic(subnetName string, targetVersion string, pluginDir string) (string, error)

#nosec G204

Types

type PrometheusConfig

type PrometheusConfig struct {
	ScrapeConfigs []ScrapeConfig `yaml:"scrape_configs"`
}

func ParsePrometheusYamlConfig

func ParsePrometheusYamlConfig(filePath string) PrometheusConfig

ParsePrometheusYamlConfig parses prometheus config YAML file installed in separate monitoring host in /etc/prometheus/prometheus.yml

type ScrapeConfig

type ScrapeConfig struct {
	JobName       string         `yaml:"job_name"`
	StaticConfigs []StaticConfig `yaml:"static_configs"`
}

type StaticConfig

type StaticConfig struct {
	Targets []string `yaml:"targets"`
}

type SubnetManagementType

type SubnetManagementType uint
const (
	Unknown SubnetManagementType = iota
	PoA
	PoS
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL