networks

package
v0.5.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TmP2pPortOffset         = 0
	TmRpcPortOffset         = 1
	TmRpcGrpcPortOffset     = 2
	AccRouterJsonPortOffset = 4
	// AccRouterRestPortOffset = 5
	TmPrometheusPortOffset = 6

	MaxPortOffset = TmPrometheusPortOffset
)

Variables

View Source
var DevNet = Network{
	protocol.Directory: {
		Name:        protocol.Directory,
		NetworkName: "DevNet",
		Type:        config.Directory,
		Port:        34000,
		Nodes: []Node{
			{"172.31.4.106", config.Validator},
			{"172.31.11.185", config.Follower},
			{"172.31.11.104", config.Validator},
			{"172.31.13.8", config.Follower},
		},
	},
	"Zion": {
		Name:        "Zion",
		NetworkName: "DevNet",
		Index:       0,
		Type:        config.BlockValidator,
		Port:        33000,
		Nodes: []Node{
			{"172.31.4.106", config.Validator},
			{"172.31.11.185", config.Validator},
		},
	},
	"Yellowstone": {
		Name:        "Yellowstone",
		NetworkName: "DevNet",
		Index:       1,
		Type:        config.BlockValidator,
		Port:        33000,
		Nodes: []Node{
			{"172.31.11.104", config.Validator},
			{"172.31.13.8", config.Validator},
		},
	},
}
View Source
var TestNet = Network{
	protocol.Directory: {
		Name:        protocol.Directory,
		NetworkName: "TestNet",
		Type:        config.Directory,
		Port:        34000,
		Nodes: []Node{
			{"0.bvn0.testnet.accumulatenetwork.io", config.Validator},
			{"1.bvn0.testnet.accumulatenetwork.io", config.Follower},
			{"2.bvn0.testnet.accumulatenetwork.io", config.Follower},
			{"0.bvn1.testnet.accumulatenetwork.io", config.Validator},
			{"1.bvn1.testnet.accumulatenetwork.io", config.Follower},
			{"2.bvn1.testnet.accumulatenetwork.io", config.Follower},
			{"0.bvn2.testnet.accumulatenetwork.io", config.Validator},
			{"1.bvn2.testnet.accumulatenetwork.io", config.Follower},
			{"2.bvn2.testnet.accumulatenetwork.io", config.Follower},
		},
	},
	"BVN0": {
		Name:        "BVN0",
		NetworkName: "TestNet",
		Type:        config.BlockValidator,
		Port:        33000,
		Nodes: []Node{
			{"0.bvn0.testnet.accumulatenetwork.io", config.Validator},
			{"1.bvn0.testnet.accumulatenetwork.io", config.Validator},
			{"2.bvn0.testnet.accumulatenetwork.io", config.Validator},
		},
	},
	"BVN1": {
		Name:        "BVN1",
		NetworkName: "TestNet",
		Type:        config.BlockValidator,
		Port:        33000,
		Nodes: []Node{
			{"0.bvn1.testnet.accumulatenetwork.io", config.Validator},
			{"1.bvn1.testnet.accumulatenetwork.io", config.Validator},
			{"2.bvn1.testnet.accumulatenetwork.io", config.Validator},
		},
	},
	"BVN2": {
		Name:        "BVN2",
		NetworkName: "TestNet",
		Type:        config.BlockValidator,
		Port:        33000,
		Nodes: []Node{
			{"0.bvn2.testnet.accumulatenetwork.io", config.Validator},
			{"1.bvn2.testnet.accumulatenetwork.io", config.Validator},
			{"2.bvn2.testnet.accumulatenetwork.io", config.Validator},
		},
	},
}

Functions

func ResolveAddr

func ResolveAddr(netOrIp string, allowIp bool) (string, int, error)

Types

type Network

type Network map[string]*Subnet

type Node

type Node struct {
	IP   string
	Type config.NodeType
}

type Subnet

type Subnet struct {
	Name        string
	Index       int
	Type        config.NetworkType
	Port        int
	Nodes       []Node
	NetworkName string

	Network Network
}

func Resolve

func Resolve(name string) (*Subnet, error)

func (*Subnet) FullName

func (s *Subnet) FullName() string

Jump to

Keyboard shortcuts

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