models

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Overview

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

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

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

Copyright (C) 2023, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

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

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

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

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

Index

Constants

View Source
const (
	SubnetEvm   = "Subnet-EVM"
	BlobVM      = "Blob VM"
	TimestampVM = "Timestamp VM"
	CustomVM    = "Custom"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AvagoCompatiblity added in v1.0.1

type AvagoCompatiblity map[string][]string

type ClusterConfig added in v1.2.7

type ClusterConfig struct {
	KeyPair   map[string]string   // maps key pair name to cert path
	Clusters  map[string][]string // maps clusterName to nodeID list
	GCPConfig GCPConfig           // stores GCP project name and filepath to service account JSON key
}

type Config added in v1.2.2

type Config struct {
	MetricsEnabled bool
}

type ElasticSubnet added in v1.2.0

type ElasticSubnet struct {
	SubnetID    ids.ID
	AssetID     ids.ID
	PChainTXID  ids.ID
	TokenName   string
	TokenSymbol string
	Validators  map[string]PermissionlessValidators
	Txs         map[string]ids.ID
}

type ElasticSubnetConfig added in v1.2.0

type ElasticSubnetConfig struct {
	SubnetID                 ids.ID
	AssetID                  ids.ID
	InitialSupply            uint64
	MaxSupply                uint64
	MinConsumptionRate       uint64
	MaxConsumptionRate       uint64
	MinValidatorStake        uint64
	MaxValidatorStake        uint64
	MinStakeDuration         time.Duration
	MaxStakeDuration         time.Duration
	MinDelegationFee         uint32
	MinDelegatorStake        uint64
	MaxValidatorWeightFactor byte
	UptimeRequirement        uint32
}

type Exportable added in v0.2.0

type Exportable struct {
	Sidecar         Sidecar
	Genesis         []byte
	ChainConfig     []byte
	SubnetConfig    []byte
	NetworkUpgrades []byte
	NodeConfig      []byte
}

type GCPConfig added in v1.3.3

type GCPConfig struct {
	ProjectName        string // name of GCP Project
	ServiceAccFilePath string // location of GCP service account key file path
}

type Host added in v1.3.3

type Host struct {
	NodeID            string
	IP                string
	SSHUser           string
	SSHPrivateKeyPath string
	SSHCommonArgs     string
}

func (Host) GetAnsibleInventoryRecord added in v1.3.3

func (h Host) GetAnsibleInventoryRecord() string

type Network

type Network int64
const (
	Undefined Network = iota
	Mainnet
	Fuji
	Local
)

func NetworkFromNetworkID added in v1.0.0

func NetworkFromNetworkID(networkID uint32) Network

func NetworkFromString

func NetworkFromString(s string) Network

func (Network) NetworkID added in v0.2.3

func (s Network) NetworkID() (uint32, error)

func (Network) String

func (s Network) String() string

type NetworkData added in v0.2.0

type NetworkData struct {
	SubnetID     ids.ID
	BlockchainID ids.ID
	RPCVersion   int
}

type NodeConfig added in v1.2.7

type NodeConfig struct {
	NodeID        string // instance id on cloud server
	Region        string // region where cloud server instance is deployed
	AMI           string // image id for cloud server dependent on its os (e.g. ubuntu )and region deployed (e.g. us-east-1)
	KeyPair       string // key pair name used on cloud server
	CertPath      string // where the cert is stored in user's local machine ssh directory
	SecurityGroup string // security group used on cloud server
	ElasticIP     string // public IP address of the cloud server
	CloudService  string // which cloud service node is hosted on (AWS / GCP)
}

type PermissionlessValidators added in v1.2.1

type PermissionlessValidators struct {
	TxID ids.ID
}

type Sidecar

type Sidecar struct {
	Name                string
	VM                  VMType
	VMVersion           string
	RPCVersion          int
	Subnet              string
	TokenName           string
	ChainID             string
	Version             string
	Networks            map[string]NetworkData
	ElasticSubnet       map[string]ElasticSubnet
	ImportedFromAPM     bool
	ImportedVMID        string
	CustomVMRepoURL     string
	CustomVMBranch      string
	CustomVMBuildScript string
}

func (Sidecar) GetVMID added in v1.1.0

func (sc Sidecar) GetVMID() (string, error)

type VMCompatibility added in v1.0.1

type VMCompatibility struct {
	RPCChainVMProtocolVersion map[string]int `json:"rpcChainVMProtocolVersion"`
}

type VMType added in v0.1.3

type VMType string

func VMTypeFromString added in v0.1.3

func VMTypeFromString(s string) VMType

func (VMType) RepoName added in v1.1.0

func (v VMType) RepoName() string

Jump to

Keyboard shortcuts

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