Documentation ¶
Index ¶
- Constants
- func DefaultDataDir() string
- func IsCompleteGenesisConfig(genesisConfig *Genesis) bool
- type Chain
- type Config
- type ConsensusGroupContractInfo
- type ConsensusGroupInfo
- type ForkPoint
- type ForkPoints
- type Genesis
- type GenesisVmLog
- type MintageContractInfo
- type Net
- type PledgeContractInfo
- type PledgeInfo
- type Producer
- type RegisterConditionParam
- type RegistrationInfo
- type Subscribe
- type TokenInfo
- type Vm
- type VoteConditionParam
Constants ¶
View Source
const ( DefaultSingle = false DefaultNodeName = "vite-node" DefaultNetID = 3 DefaultListenInterface = "0.0.0.0" DefaultPort = 8483 DefaultFilePort = 8484 DefaultDiscover = true DefaultMaxPeers = 60 DefaultMaxInboundRatio = 2 DefaultMinPeers = 5 DefaultMaxPendingPeers = 10 DefaultNetDirName = "net" PeerKeyFileName = "peerKey" DefaultForwardStrategy = "cross" DefaultAccessControl = "any" )
Variables ¶
This section is empty.
Functions ¶
func DefaultDataDir ¶ added in v1.3.0
func DefaultDataDir() string
DefaultDataDir is the default data directory to use for the databases and other persistence requirements.
func IsCompleteGenesisConfig ¶
Types ¶
type Chain ¶
type Chain struct { LedgerGcRetain uint64 // no use GenesisFile string // genesis file path LedgerGc bool // open or close ledger garbage collector OpenPlugins bool // open or close chain plugins. eg, filter account blocks by token. VmLogWhiteList []types.Address // contract address white list which save VM logs VmLogAll bool // save all VM logs, it will cost more disk space }
chain config
type Config ¶
type ConsensusGroupContractInfo ¶
type ConsensusGroupContractInfo struct { ConsensusGroupInfoMap map[string]ConsensusGroupInfo // consensus group info, gid - info RegistrationInfoMap map[string]map[string]RegistrationInfo // registration info, gid - nodeName - info HisNameMap map[string]map[string]string // used node name for node addr, gid - nodeAddr - nodeName VoteStatusMap map[string]map[string]string // vote info, gid - voteAddr - nodeName }
type ConsensusGroupInfo ¶ added in v1.2.0
type ConsensusGroupInfo struct { NodeCount uint8 Interval int64 PerCount int64 RandCount uint8 RandRank uint8 Repeat uint16 CheckLevel uint8 CountingTokenId types.TokenTypeId RegisterConditionId uint8 RegisterConditionParam RegisterConditionParam VoteConditionId uint8 VoteConditionParam VoteConditionParam Owner types.Address PledgeAmount *big.Int WithdrawHeight uint64 }
type ForkPoints ¶ added in v1.2.0
type Genesis ¶ added in v1.2.0
type Genesis struct { GenesisAccountAddress *types.Address ForkPoints *ForkPoints ConsensusGroupInfo *ConsensusGroupContractInfo MintageInfo *MintageContractInfo PledgeInfo *PledgeContractInfo AccountBalanceMap map[string]map[string]*big.Int // address - tokenId - balanceAmount }
type GenesisVmLog ¶
type MintageContractInfo ¶
type MintageContractInfo struct { TokenInfoMap map[string]TokenInfo // tokenId - info LogList []GenesisVmLog // mint events }
type Net ¶
type Net struct { Single bool // Name is our node name, NO need to be unique in the whole network, just for readability, default is `vite-node` Name string // NetID is to mark which network our node in, nodes from different network can`t connect each other NetID int ListenInterface string Port int FilePort int // PublicAddress is the network address can be access by other nodes, usually is the public Internet address PublicAddress string FilePublicAddress string // DataDir is the directory to storing p2p data, if is null-string, will use memory as database DataDir string // PeerKey is to encrypt message, the corresponding public key use for NodeID, MUST NOT be revealed PeerKey string // Discover means whether discover other nodes in the networks, default true Discover bool // BootNodes are roles as network entrance. Node can discovery more other nodes by send UDP query BootNodes, // but not create a TCP connection to BootNodes directly BootNodes []string // BootSeeds are the address where can query BootNodes, is a more flexible option than BootNodes BootSeeds []string // StaticNodes will be connect directly StaticNodes []string MaxPeers int MaxInboundRatio int // MinPeers server will keep finding nodes and try to connect until number of peers is larger than `MinPeers`, // default 5 MinPeers int // MaxPendingPeers how many inbound peers can be connect concurrently, more inbound connection will be blocked // this value is for defend DDOS attack, default 10 MaxPendingPeers int ForwardStrategy string AccessControl string AccessAllowKeys []string AccessDenyKeys []string BlackBlockHashList []string WhiteBlockList []string MineKey ed25519.PrivateKey }
type PledgeContractInfo ¶
type PledgeContractInfo struct { PledgeInfoMap map[string][]PledgeInfo PledgeBeneficialMap map[string]*big.Int }
type PledgeInfo ¶
type RegisterConditionParam ¶
type RegisterConditionParam struct { PledgeAmount *big.Int PledgeToken types.TokenTypeId PledgeHeight uint64 }
type RegistrationInfo ¶
type VoteConditionParam ¶
type VoteConditionParam struct { }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.