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) 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.
Index ¶
- func AddPoAValidatorManagerV1_0_0ContractToAllocations(allocs core.GenesisAlloc)
- func AddRewardCalculatorV2_0_0ToAllocations(allocs core.GenesisAlloc, rewardBasisPoints uint64)
- func AddSpecializationTransparentProxyContractToAllocations(allocs core.GenesisAlloc, proxyManager string)
- func AddValidatorManagerV2_0_0ContractToAllocations(allocs core.GenesisAlloc)
- func AddValidatorMessagesV2_0_0ContractToAllocations(allocs core.GenesisAlloc)
- func AddValidatorTransparentProxyContractToAllocations(allocs core.GenesisAlloc, proxyManager string)
- func CompleteValidatorRegistration(rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ...) (*types.Transaction, *types.Receipt, error)
- func CompleteValidatorRemoval(rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ...) (*types.Transaction, *types.Receipt, error)
- func CompleteValidatorWeightChange(rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ...) (*types.Transaction, *types.Receipt, error)
- func DeployAndRegisterPoSValidatorManagerV1_0_0Contract(rpcURL string, privateKey string, proxyOwnerPrivateKey string) (common.Address, error)
- func DeployAndRegisterPoSValidatorManagerV2_0_0Contract(rpcURL string, privateKey string, proxyOwnerPrivateKey string) (common.Address, error)
- func DeployAndRegisterValidatorManagerV2_0_0Contract(rpcURL string, privateKey string, proxyOwnerPrivateKey string) (common.Address, error)
- func DeployPoSValidatorManagerV1_0_0Contract(rpcURL string, privateKey string) (common.Address, error)
- func DeployPoSValidatorManagerV2_0_0Contract(rpcURL string, privateKey string) (common.Address, error)
- func DeployValidatorManagerV2_0_0Contract(rpcURL string, privateKey string) (common.Address, error)
- func FinishValidatorRegistration(ctx context.Context, app *application.Lux, network models.Network, ...) (*types.Transaction, error)
- func FinishValidatorRemoval(ctx context.Context, app *application.Lux, network models.Network, ...) (*types.Transaction, error)
- func FinishValidatorWeightChange(ctx context.Context, app *application.Lux, network models.Network, ...) (*types.Transaction, error)
- func GetL1ValidatorWeightMessage(network models.Network, aggregatorLogger logging.Logger, ...) (*warp.Message, error)
- func GetL1ValidatorWeightMessageFromTx(rpcURL string, validationID ids.ID, weight uint64, txHash string) (*warp.UnsignedMessage, error)
- func GetPChainL1ValidatorRegistrationMessage(ctx context.Context, network models.Network, rpcURL string, ...) (*warp.Message, error)
- func GetPChainL1ValidatorWeightMessage(network models.Network, aggregatorLogger logging.Logger, ...) (*warp.Message, error)
- func GetRegisterL1ValidatorMessage(ctx context.Context, rpcURL string, network models.Network, ...) (*warp.Message, ids.ID, error)
- func GetRegisterL1ValidatorMessageFromTx(rpcURL string, validationID ids.ID, txHash string) (*warp.UnsignedMessage, error)
- func GetRegistrationJustification(ctx context.Context, rpcURL string, validationID ids.ID, subnetID ids.ID) ([]byte, error)
- func GetSpecializedValidatorProxyImplementation(rpcURL string) (common.Address, error)
- func GetUptimeProofMessage(network models.Network, aggregatorLogger logging.Logger, ...) (*warp.Message, error)
- func GetValidatorNonce(ctx context.Context, rpcURL string, validationID ids.ID) (uint64, error)
- func GetValidatorProxyImplementation(rpcURL string) (common.Address, error)
- func InitValidatorRegistration(ctx context.Context, app *application.Lux, network models.Network, ...) (*warp.Message, ids.ID, *types.Transaction, error)
- func InitValidatorRemoval(ctx context.Context, app *application.Lux, network models.Network, ...) (*warp.Message, ids.ID, *types.Transaction, error)
- func InitValidatorWeightChange(ctx context.Context, printFunc func(msg string, args ...interface{}), ...) (*warp.Message, ids.ID, *types.Transaction, error)
- func InitializeValidatorRegistrationPoA(rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ...) (*types.Transaction, *types.Receipt, error)
- func InitializeValidatorRegistrationPoSNative(rpcURL string, managerAddress common.Address, managerOwnerPrivateKey string, ...) (*types.Transaction, *types.Receipt, error)
- func InitializeValidatorRemoval(rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ...) (*types.Transaction, *types.Receipt, error)
- func InitializeValidatorWeightChange(rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ...) (*types.Transaction, *types.Receipt, error)
- func PoSWeightToValue(rpcURL string, managerAddress common.Address, weight uint64) (*big.Int, error)
- func SearchForL1ValidatorWeightMessage(ctx context.Context, rpcURL string, validationID ids.ID, weight uint64) (*warp.UnsignedMessage, error)
- func SearchForRegisterL1ValidatorMessage(ctx context.Context, rpcURL string, validationID ids.ID) (*warp.UnsignedMessage, error)
- func SetupPoA(log logging.Logger, subnet blockchainSDK.Subnet, network models.Network, ...) error
- func SetupPoS(log logging.Logger, subnet blockchainSDK.Subnet, network models.Network, ...) error
- func SetupSpecializationProxyImplementation(rpcURL string, proxyManagerPrivateKey string, validatorManager common.Address) (*types.Transaction, *types.Receipt, error)
- func SetupValidatorProxyImplementation(rpcURL string, proxyManagerPrivateKey string, validatorManager common.Address) (*types.Transaction, *types.Receipt, error)
- func ValidatorProxyHasImplementationSet(rpcURL string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPoAValidatorManagerV1_0_0ContractToAllocations ¶
func AddPoAValidatorManagerV1_0_0ContractToAllocations( allocs core.GenesisAlloc, )
func AddRewardCalculatorV2_0_0ToAllocations ¶
func AddRewardCalculatorV2_0_0ToAllocations( allocs core.GenesisAlloc, rewardBasisPoints uint64, )
func AddSpecializationTransparentProxyContractToAllocations ¶
func AddSpecializationTransparentProxyContractToAllocations( allocs core.GenesisAlloc, proxyManager string, )
func AddValidatorManagerV2_0_0ContractToAllocations ¶
func AddValidatorManagerV2_0_0ContractToAllocations( allocs core.GenesisAlloc, )
func AddValidatorMessagesV2_0_0ContractToAllocations ¶
func AddValidatorMessagesV2_0_0ContractToAllocations( allocs core.GenesisAlloc, )
func AddValidatorTransparentProxyContractToAllocations ¶
func AddValidatorTransparentProxyContractToAllocations( allocs core.GenesisAlloc, proxyManager string, )
func CompleteValidatorRegistration ¶
func CompleteValidatorRegistration( rpcURL string, managerAddress common.Address, generateRawTxOnly bool, ownerAddress common.Address, privateKey string, l1ValidatorRegistrationSignedMessage *warp.Message, ) (*types.Transaction, *types.Receipt, error)
last step of flow for adding a new validator
func FinishValidatorRegistration ¶
func FinishValidatorRegistration( ctx context.Context, app *application.Lux, network models.Network, rpcURL string, chainSpec contract.ChainSpec, generateRawTxOnly bool, ownerAddressStr string, privateKey string, validationID ids.ID, aggregatorLogger logging.Logger, validatorManagerAddressStr string, signatureAggregatorEndpoint string, ) (*types.Transaction, error)
func FinishValidatorRemoval ¶
func FinishValidatorRemoval( ctx context.Context, app *application.Lux, network models.Network, rpcURL string, chainSpec contract.ChainSpec, generateRawTxOnly bool, ownerAddressStr string, privateKey string, validationID ids.ID, aggregatorLogger logging.Logger, validatorManagerAddressStr string, useACP99 bool, signatureAggregatorEndpoint string, ) (*types.Transaction, error)
func FinishValidatorWeightChange ¶
func FinishValidatorWeightChange( ctx context.Context, app *application.Lux, network models.Network, rpcURL string, chainSpec contract.ChainSpec, generateRawTxOnly bool, ownerAddressStr string, privateKey string, validationID ids.ID, aggregatorLogger logging.Logger, validatorManagerAddressStr string, l1ValidatorRegistrationSignedMessage *warp.Message, weight uint64, signatureAggregatorEndpoint string, ) (*types.Transaction, error)
func GetL1ValidatorWeightMessage ¶
func GetL1ValidatorWeightMessage( network models.Network, aggregatorLogger logging.Logger, unsignedMessage *warp.UnsignedMessage, subnetID ids.ID, blockchainID ids.ID, managerAddress common.Address, validationID ids.ID, nonce uint64, weight uint64, signatureAggregatorEndpoint string, ) (*warp.Message, error)
func GetRegisterL1ValidatorMessage ¶
func GetRegisterL1ValidatorMessage( ctx context.Context, rpcURL string, network models.Network, aggregatorLogger logging.Logger, aggregatorQuorumPercentage uint64, subnetID ids.ID, blockchainID ids.ID, managerAddress common.Address, nodeID ids.NodeID, blsPublicKey [48]byte, expiry uint64, balanceOwners warpMessage.PChainOwner, disableOwners warpMessage.PChainOwner, weight uint64, alreadyInitialized bool, initiateTxHash string, registerSubnetValidatorUnsignedMessage *warp.UnsignedMessage, signatureAggregatorEndpoint string, ) (*warp.Message, ids.ID, error)
func GetUptimeProofMessage ¶
func GetValidatorNonce ¶
func InitValidatorRegistration ¶
func InitValidatorRegistration( ctx context.Context, app *application.Lux, network models.Network, rpcURL string, chainSpec contract.ChainSpec, generateRawTxOnly bool, ownerAddressStr string, ownerPrivateKey string, nodeID ids.NodeID, blsPublicKey []byte, expiry uint64, balanceOwners warpMessage.PChainOwner, disableOwners warpMessage.PChainOwner, weight uint64, aggregatorLogger logging.Logger, isPos bool, delegationFee uint16, stakeDuration time.Duration, rewardRecipient common.Address, validatorManagerAddressStr string, useACP99 bool, initiateTxHash string, signatureAggregatorEndpoint string, ) (*warp.Message, ids.ID, *types.Transaction, error)
func InitValidatorRemoval ¶
func InitValidatorRemoval( ctx context.Context, app *application.Lux, network models.Network, rpcURL string, chainSpec contract.ChainSpec, generateRawTxOnly bool, ownerAddressStr string, ownerPrivateKey string, nodeID ids.NodeID, aggregatorLogger logging.Logger, isPoS bool, uptimeSec uint64, force bool, validatorManagerAddressStr string, useACP99 bool, initiateTxHash string, signatureAggregatorEndpoint string, ) (*warp.Message, ids.ID, *types.Transaction, error)
func InitValidatorWeightChange ¶
func InitValidatorWeightChange( ctx context.Context, printFunc func(msg string, args ...interface{}), app *application.Lux, network models.Network, rpcURL string, chainSpec contract.ChainSpec, generateRawTxOnly bool, ownerAddressStr string, ownerPrivateKey string, nodeID ids.NodeID, aggregatorLogger logging.Logger, validatorManagerAddressStr string, weight uint64, initiateTxHash string, signatureAggregatorEndpoint string, ) (*warp.Message, ids.ID, *types.Transaction, error)
func InitializeValidatorRegistrationPoA ¶
func InitializeValidatorRegistrationPoA( rpcURL string, managerAddress common.Address, generateRawTxOnly bool, managerOwnerAddress common.Address, managerOwnerPrivateKey string, nodeID ids.NodeID, blsPublicKey []byte, expiry uint64, balanceOwners warpMessage.PChainOwner, disableOwners warpMessage.PChainOwner, weight uint64, useACP99 bool, ) (*types.Transaction, *types.Receipt, error)
step 1 of flow for adding a new validator
func InitializeValidatorRegistrationPoSNative ¶
func InitializeValidatorRegistrationPoSNative( rpcURL string, managerAddress common.Address, managerOwnerPrivateKey string, nodeID ids.NodeID, blsPublicKey []byte, expiry uint64, balanceOwners warpMessage.PChainOwner, disableOwners warpMessage.PChainOwner, delegationFeeBips uint16, minStakeDuration time.Duration, stakeAmount *big.Int, rewardRecipient common.Address, useACP99 bool, ) (*types.Transaction, *types.Receipt, error)
func InitializeValidatorRemoval ¶
func InitializeValidatorRemoval( rpcURL string, managerAddress common.Address, generateRawTxOnly bool, managerOwnerAddress common.Address, privateKey string, validationID ids.ID, isPoS bool, uptimeProofSignedMessage *warp.Message, force bool, useACP99 bool, ) (*types.Transaction, *types.Receipt, error)
func PoSWeightToValue ¶
func SetupPoA ¶
func SetupPoA( log logging.Logger, subnet blockchainSDK.Subnet, network models.Network, privateKey string, aggregatorLogger logging.Logger, validatorManagerAddressStr string, v2_0_0 bool, signatureAggregatorEndpoint string, ) error
setups PoA manager after a successful execution of ConvertSubnetToL1Tx on P-Chain needs the list of validators for that tx, [convertSubnetValidators], together with an evm [ownerAddress] to set as the owner of the PoA manager
func SetupPoS ¶
func SetupPoS( log logging.Logger, subnet blockchainSDK.Subnet, network models.Network, privateKey string, aggregatorLogger logging.Logger, posParams validatormanagerSDK.PoSParams, managerAddress string, specializedManagerAddress string, managerOwnerPrivateKey string, v2_0_0 bool, signatureAggregatorEndpoint string, ) error
setups PoA manager after a successful execution of ConvertSubnetToL1Tx on P-Chain needs the list of validators for that tx, [convertSubnetValidators], together with an evm [ownerAddress] to set as the owner of the PoA manager
Types ¶
This section is empty.