Files
node/vms/platformvm/txs/visitor.go
T
zeekay 4610978bcc Decomplect network creation: one CreateNetworkTx folds Convert+CreateSovereign
CreateNetworkTx{parent, owner, security, validators, chains, manager} creates a
network at ANY level in one tx — parent is the level axis (Primary⇒L1, L1⇒L2,
recurse; level=depth, never stored). security is a coproduct: SecuritySovereign
(own validators+manager) | SecurityInherited (restaked from parent). manager
lives on the Network so an inherited L2 holds local admin. NetworkValidator +
NetworkChain are shared value components (reused by CreateChainTx). Deleted
ConvertNetworkToL1Tx + CreateSovereignL1Tx (folded / migration artifacts).

Round-trip green: sovereign L1 (own validators+chains+manager) AND inherited L2
(parent recorded, no own validators, local manager) both survive. One and one
way to make a network at any depth.
2026-07-10 11:39:12 -07:00

31 lines
1.1 KiB
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package txs
// Allow vm to execute custom logic against the underlying transaction types.
type Visitor interface {
AddValidatorTx(*AddValidatorTx) error
AddChainValidatorTx(*AddChainValidatorTx) error
AddDelegatorTx(*AddDelegatorTx) error
CreateNetworkTx(*CreateNetworkTx) error
CreateChainTx(*CreateChainTx) error
ImportTx(*ImportTx) error
ExportTx(*ExportTx) error
AdvanceTimeTx(*AdvanceTimeTx) error
RewardValidatorTx(*RewardValidatorTx) error
RemoveChainValidatorTx(*RemoveChainValidatorTx) error
TransformChainTx(*TransformChainTx) error
AddPermissionlessValidatorTx(*AddPermissionlessValidatorTx) error
AddPermissionlessDelegatorTx(*AddPermissionlessDelegatorTx) error
TransferChainOwnershipTx(*TransferChainOwnershipTx) error
BaseTx(*BaseTx) error
RegisterL1ValidatorTx(*RegisterL1ValidatorTx) error
SetL1ValidatorWeightTx(*SetL1ValidatorWeightTx) error
IncreaseL1ValidatorBalanceTx(*IncreaseL1ValidatorBalanceTx) error
DisableL1ValidatorTx(*DisableL1ValidatorTx) error
}