blockchaincmd

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: BSD-3-Clause Imports: 89 Imported by: 0

Documentation

Overview

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMutuallyExlusiveKeyLedger = errors.New("key source flags --key, --ledger/--ledger-addrs are mutually exclusive")
	ErrStoredKeyOnMainnet        = errors.New("key --key is not available for mainnet operations")
)
View Source
var (
	ErrNotPermissionedSubnet = errors.New("subnet is not permissioned")
)

Functions

func CallAddValidator

func CallAddValidator(
	deployer *subnet.PublicDeployer,
	network models.Network,
	kc *keychain.Keychain,
	blockchainName string,
	subnetID ids.ID,
	nodeIDStr string,
	publicKey string,
	pop string,
	weight uint64,
	balanceLUX float64,
	remainingBalanceOwnerAddr string,
	disableOwnerAddr string,
	sc models.Sidecar,
	rpcURL string,
) error

func CallAddValidatorNonSOV

func CallAddValidatorNonSOV(
	deployer *subnet.PublicDeployer,
	network models.Network,
	kc *keychain.Keychain,
	useLedgerSetting bool,
	blockchainName string,
	nodeIDStr string,
	defaultValidatorParamsSetting bool,
	waitForTxAcceptanceSetting bool,
) error

func CallConfigure

func CallConfigure(
	cmd *cobra.Command,
	blockchainName string,
	chainConfParam string,
	subnetConfParam string,
	nodeConfParam string,
) error

func CallCreate

func CallCreate(
	cmd *cobra.Command,
	blockchainName string,
	forceCreateParam bool,
	genesisPathParam string,
	useSubnetEvmParam bool,
	useCustomParam bool,
	vmVersionParam string,
	evmChainIDParam uint64,
	tokenSymbolParam string,
	useProductionDefaultsParam bool,
	useTestDefaultsParam bool,
	useLatestReleasedVMVersionParam bool,
	useLatestPreReleasedVMVersionParam bool,
	customVMRepoURLParam string,
	customVMBranchParam string,
	customVMBuildScriptParam string,
) error

func CallDeleteBlockchain

func CallDeleteBlockchain(blockchainName string) error

func CallDeploy

func CallDeploy(
	cmd *cobra.Command,
	subnetOnlyParam bool,
	blockchainName string,
	networkFlags networkoptions.NetworkFlags,
	keyNameParam string,
	useLedgerParam bool,
	useEwoqParam bool,
	sameControlKeyParam bool,
) error

func CallExportSubnet

func CallExportSubnet(blockchainName, exportPath string) error

func ConvertToLuxdSubnetValidator

func ConvertToLuxdSubnetValidator(subnetValidators []models.SubnetValidator) ([]*txs.ConvertNetToL1Validator, error)

ConvertToLuxdSubnetValidator converts subnet validators to L1 validator format Deactivation owner is handled through the validator management contract

func ConvertURIToPeers

func ConvertURIToPeers(uris []string) ([]info.Peer, error)

func CreateBlockchainFirst

func CreateBlockchainFirst(cmd *cobra.Command, blockchainName string, skipPrompt bool) error

func DeployBlockchainFirst

func DeployBlockchainFirst(cmd *cobra.Command, blockchainName string, skipPrompt bool) error

func GetProxyOwnerPrivateKey

func GetProxyOwnerPrivateKey(
	app *application.Lux,
	network models.Network,
	proxyContractOwner string,
	printFunc func(msg string, args ...interface{}),
) (string, error)

func InitializeValidatorManager

func InitializeValidatorManager(
	blockchainName,
	validatorManagerOwner string,
	subnetID ids.ID,
	blockchainID ids.ID,
	network models.Network,
	luxdBootstrapValidators []*txs.ConvertNetToL1Validator,
	pos bool,
	managerAddress string,
	proxyContractOwner string,
	useACP99 bool,
	useLocalMachine bool,
	signatureAggregatorFlags flags.SignatureAggregatorFlags,
	proofOfStakeFlags flags.POSFlags,
) (bool, error)

func LoadBootstrapValidator

func LoadBootstrapValidator(bootstrapValidatorFlags flags.BootstrapValidatorFlags) ([]models.SubnetValidator, error)

func NewCmd

func NewCmd(injectedApp *application.Lux) *cobra.Command

lux blockchain

func PrintDeployResults

func PrintDeployResults(blockchainName string, subnetID ids.ID, blockchainID ids.ID) error

func PrintReadyToSignMsg

func PrintReadyToSignMsg(
	blockchainName string,
	outputTxPath string,
)

func PrintRemainingToSignMsg

func PrintRemainingToSignMsg(
	blockchainName string,
	remainingSubnetAuthKeys []string,
	outputTxPath string,
)

func PrintSubnetInfo

func PrintSubnetInfo(blockchainName string, onlyLocalnetInfo bool) error

func PromptDuration

func PromptDuration(start time.Time, network models.Network, isPos bool) (time.Duration, error)

func PromptNodeID

func PromptNodeID(goal string) (ids.NodeID, error)

func SaveNotFullySignedTx

func SaveNotFullySignedTx(
	txName string,
	tx *txs.Tx,
	blockchainName string,
	subnetAuthKeys []string,
	remainingSubnetAuthKeys []string,
	outputTxPath string,
	forceOverwrite bool,
) error

func SetBlockchainConf

func SetBlockchainConf(
	blockchainName string,
	fileBytes []byte,
	configFilename string,
) error

func StartLocalMachine

func StartLocalMachine(
	network models.Network,
	sidecar models.Sidecar,
	blockchainName string,
	deployBalance,
	availableBalance uint64,
	localMachineFlags *flags.LocalMachineFlags,
	bootstrapValidatorFlags *flags.BootstrapValidatorFlags,
) (bool, error)

func UpdateKeychainWithSubnetControlKeys

func UpdateKeychainWithSubnetControlKeys(
	kc *keychain.Keychain,
	network models.Network,
	blockchainName string,
) error

func ValidateSubnetNameAndGetChains

func ValidateSubnetNameAndGetChains(args []string) ([]string, error)

Types

type BlockchainAddValidatorFlags

type BlockchainAddValidatorFlags struct {
	RPC         string
	SigAggFlags flags.SignatureAggregatorFlags
}

type BlockchainChangeWeightFlags

type BlockchainChangeWeightFlags struct {
	RPC         string
	SigAggFlags flags.SignatureAggregatorFlags
}

type BlockchainConvertFlags

type BlockchainConvertFlags struct {
	SigAggFlags             flags.SignatureAggregatorFlags
	LocalMachineFlags       flags.LocalMachineFlags
	ProofOfStakeFlags       flags.POSFlags
	BootstrapValidatorFlags flags.BootstrapValidatorFlags
	ConvertOnly             bool
}

type BlockchainDeployFlags

type BlockchainDeployFlags struct {
	SigAggFlags             flags.SignatureAggregatorFlags
	LocalMachineFlags       flags.LocalMachineFlags
	ProofOfStakeFlags       flags.POSFlags
	BootstrapValidatorFlags flags.BootstrapValidatorFlags
	ConvertOnly             bool
}

type BlockchainRemoveValidatorFlags

type BlockchainRemoveValidatorFlags struct {
	RPC         string
	SigAggFlags flags.SignatureAggregatorFlags
}

type CreateFlags

type CreateFlags struct {
	// contains filtered or unexported fields
}

type SubnetValidator

type SubnetValidator struct {
	// Must be Ed25519 NodeID
	NodeID ids.NodeID `json:"nodeID"`
	// Weight of this validator used when sampling
	Weight uint64 `json:"weight"`
	// When this validator will stop validating the Subnet
	EndTime uint64 `json:"endTime"`
	// Initial balance for this validator
	Balance uint64 `json:"balance"`
	// [Signer] is the BLS key for this validator.
	// Note: We do not enforce that the BLS key is unique across all validators.
	//       This means that validators can share a key if they so choose.
	//       However, a NodeID + Subnet does uniquely map to a BLS key
	Signer signer.Signer `json:"signer"`
	// Leftover $LUX from the [Balance] will be issued to this
	// owner once it is removed from the validator set.
	ChangeOwner fx.Owner `json:"changeOwner"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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