Documentation ¶
Overview ¶
setup package generates config files following the given deployment options. It creates the given number of genesis.json and nodekeys
Source Files ¶
Each file contains the following contents
- cmd.go : Provides functions to generate config files with given deployment configuration
- flags.go : Defines command line flags which can be used in `setup` command
- kaia_config.go : Defines `KaiaConfig` and provides a template to build it
- prometheus_config.go : Defines `PrometheusConfig` and provides a template to build it
Index ¶
Constants ¶
View Source
const ( DefaultTcpPort uint16 = 32323 TypeNotDefined = -1 TypeDocker = 0 TypeLocal = 1 TypeRemote = 2 TypeDeploy = 3 DirScript = "scripts" DirKeys = "keys" DirPnScript = "scripts_pn" DirPnKeys = "keys_pn" DirTestKeys = "keys_test" CNIpNetwork = "10.11.2" PNIpNetwork1 = "10.11.10" PNIpNetwork2 = "10.11.11" )
Variables ¶
View Source
var GrafanaFiles = [...]GrafanaFile{ { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, }
View Source
var HomiFlags = []cli.Flag{ homiYamlFlag, altsrc.NewStringFlag(genTypeFlag), altsrc.NewBoolFlag(mainnetTestFlag), altsrc.NewBoolFlag(mainnetFlag), altsrc.NewBoolFlag(kairosTestFlag), altsrc.NewBoolFlag(kairosFlag), altsrc.NewBoolFlag(serviceChainFlag), altsrc.NewBoolFlag(serviceChainTestFlag), altsrc.NewBoolFlag(cliqueFlag), altsrc.NewIntFlag(numOfCNsFlag), altsrc.NewIntFlag(numOfValidatorsFlag), altsrc.NewIntFlag(numOfPNsFlag), altsrc.NewIntFlag(numOfENsFlag), altsrc.NewIntFlag(numOfSCNsFlag), altsrc.NewIntFlag(numOfSPNsFlag), altsrc.NewIntFlag(numOfSENsFlag), altsrc.NewIntFlag(numOfTestKeyFlag), altsrc.NewStringFlag(mnemonicFlag), altsrc.NewStringFlag(mnemonicPathFlag), altsrc.NewStringFlag(cnNodeKeyDirFlag), altsrc.NewStringFlag(pnNodeKeyDirFlag), altsrc.NewStringFlag(enNodeKeyDirFlag), altsrc.NewUint64Flag(chainIDFlag), altsrc.NewUint64Flag(serviceChainIDFlag), altsrc.NewUint64Flag(unitPriceFlag), altsrc.NewIntFlag(deriveShaImplFlag), altsrc.NewStringFlag(fundingAddrFlag), altsrc.NewBoolFlag(patchAddressBookFlag), altsrc.NewStringFlag(patchAddressBookAddrFlag), altsrc.NewStringFlag(outputPathFlag), altsrc.NewBoolFlag(addressBookMockFlag), altsrc.NewStringFlag(dockerImageIdFlag), altsrc.NewBoolFlag(fasthttpFlag), altsrc.NewIntFlag(networkIdFlag), altsrc.NewBoolFlag(nografanaFlag), altsrc.NewBoolFlag(useTxGenFlag), altsrc.NewIntFlag(txGenRateFlag), altsrc.NewIntFlag(txGenThFlag), altsrc.NewIntFlag(txGenConnFlag), altsrc.NewStringFlag(txGenDurFlag), altsrc.NewIntFlag(rpcPortFlag), altsrc.NewIntFlag(wsPortFlag), altsrc.NewIntFlag(p2pPortFlag), altsrc.NewStringFlag(dataDirFlag), altsrc.NewStringFlag(logDirFlag), altsrc.NewBoolFlag(governanceFlag), altsrc.NewStringFlag(govModeFlag), altsrc.NewStringFlag(governingNodeFlag), altsrc.NewStringFlag(govParamContractFlag), altsrc.NewStringFlag(rewardMintAmountFlag), altsrc.NewStringFlag(rewardRatioFlag), altsrc.NewStringFlag(rewardKip82RatioFlag), altsrc.NewBoolFlag(rewardGiniCoeffFlag), altsrc.NewUint64Flag(rewardStakingFlag), altsrc.NewUint64Flag(rewardProposerFlag), altsrc.NewStringFlag(rewardMinimumStakeFlag), altsrc.NewBoolFlag(rewardDeferredTxFeeFlag), altsrc.NewUint64Flag(istEpochFlag), altsrc.NewUint64Flag(istProposerPolicyFlag), altsrc.NewUint64Flag(istSubGroupFlag), altsrc.NewUint64Flag(cliqueEpochFlag), altsrc.NewUint64Flag(cliquePeriodFlag), altsrc.NewInt64Flag(istanbulCompatibleBlockNumberFlag), altsrc.NewInt64Flag(londonCompatibleBlockNumberFlag), altsrc.NewInt64Flag(ethTxTypeCompatibleBlockNumberFlag), altsrc.NewInt64Flag(magmaCompatibleBlockNumberFlag), altsrc.NewInt64Flag(koreCompatibleBlockNumberFlag), altsrc.NewInt64Flag(shanghaiCompatibleBlockNumberFlag), altsrc.NewInt64Flag(cancunCompatibleBlockNumberFlag), altsrc.NewInt64Flag(kaiaCompatibleBlockNumberFlag), altsrc.NewInt64Flag(kip103CompatibleBlockNumberFlag), altsrc.NewStringFlag(kip103ContractAddressFlag), altsrc.NewInt64Flag(kip160CompatibleBlockNumberFlag), altsrc.NewStringFlag(kip160ContractAddressFlag), altsrc.NewInt64Flag(randaoCompatibleBlockNumberFlag), altsrc.NewStringFlag(kip113ProxyAddressFlag), altsrc.NewStringFlag(kip113LogicAddressFlag), altsrc.NewBoolFlag(kip113MockFlag), altsrc.NewBoolFlag(registryMockFlag), }
View Source
var SetupCommand = &cli.Command{ Name: "setup", Usage: "Generate Kaia CN's init files", Description: `This tool helps generate: * Genesis Block (genesis.json) * Static nodes for all CNs(Consensus Node) * CN details * Docker-compose for Kaia Consensus Node. Args : type : [local | remote | deploy | docker (default)] `, Action: Gen, Flags: HomiFlags, ArgsUsage: "type", }
View Source
var Types = [4]string{"docker", "local", "remote", "deploy"}
Functions ¶
func BeforeRunHomi ¶
func BeforeRunHomi(ctx *cli.Context) error
func RandStringRunes ¶
Types ¶
type GrafanaFile ¶
type GrafanaFile struct {
// contains filtered or unexported fields
}
type KaiaConfig ¶
type KaiaConfig struct { NetworkId int RPCPort int WSPort int P2PPort int DataDir string LogDir string RunDir string NodeType string }
func NewKaiaConfig ¶
func (KaiaConfig) String ¶
func (k KaiaConfig) String() string
type PrometheusConfig ¶
func NewPrometheusConfig ¶
func (PrometheusConfig) String ¶
func (pConfig PrometheusConfig) String() string
Click to show internal directories.
Click to hide internal directories.