configs

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

README

/configs

Configuration file templates or default configs.

Put your confd or consul-template template files here.

Documentation

Overview

Copyright 2022 Nethermind

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	InstallingDependenciesError       = "something went wrong while installing dependencies. %s"
	ShowingInstructionsError          = "something went wrong while showing the instructions for installing %s"
	ScriptPathError                   = "failed to get path for instructions file. Error: %v"
	ReadingInstructionError           = "failed to read instructions from file %s"
	OSNotSupportedError               = "installation not supported for %s"
	ProvideClientsError               = "please provide both execution client and consensus client"
	IncorrectClientError              = "" /* 127-byte string literal not displayed */
	NoClientsFoundError               = "no %s clients found. Please check your configuration file"
	CreatingFileError                 = "failed to create file %s. Error: %v"
	OpeningFileError                  = "failed to open file %s. Error: %v"
	ClosingFileError                  = "failed to close file %s"
	GeneratingScriptsError            = "generating docker-compose files for execution client %s, consensus client %s and validator client %s failed. Error: %s"
	ClientNotSupportedError           = "client %s is not supported. Please use 'clients' command to see the list of supported clients"
	GetRawTemplatesError              = "failed to get raw templates for %s"
	LoadingTemplatesError             = "error loading templates: %s"
	PrintingFileError                 = "something went wrong printing file %s. Error: %v"
	RunningCMDError                   = "failed to execute '%s' command. Error: %v"
	DependencyNotInstalledError       = "dependency %s is not installed on host machine"
	DependenciesMissingError          = "required dependencies are missing. Please install them and try again. Dependencies can be installed using 'sedge cli' command"
	DockerEngineOffError              = "it seems docker engine is not running. Please start it and try again. Error: %v"
	DockerComposeOffError             = "it seems docker compose plugin is not installed. Please install it and try again. Error: %v"
	DockerComposeScriptNotFoundError  = "" /* 149-byte string literal not displayed */
	ScriptIsNotRunningError           = "services of docker-compose script provided are not running. Error: %v"
	GettingLogsError                  = "failed to get logs for services %s. Error: %v"
	DockerComposePsReturnedEmptyError = "'docker compose ps --services' returned empty string"
	PromptFailedError                 = "prompt failed %v"
	GeneratingKeystoreError           = "failed to generate keystore folder. Error: %v"
	ResizingPtyError                  = "error resizing pty: %v"
	InvalidVolumePathError            = "invalid path provided: %s. If you intended to pass a host directory, use absolute path"
	ZipError                          = "all lists must have the same size"
	CommandError                      = "command '%s' throws error: %v"
	RunClientsFlagAmbiguousError      = "" /* 128-byte string literal not displayed */
	InstallNotSupported               = "install support for %s is not available for %s. Please install it and try again"
	DistroInfoError                   = "failed to get linux distribution info. Error: %v"
	MonitoringToolInitError           = "monitoring tool initialization failed. Error: %v"
	TrackSyncError                    = "endpoint %s returned an error. Error: %v"
	RunClientsError                   = "provided values %v for run-clients are incorrect. Possible correct values are %v"
	EmptyClientMapError               = "is not possible to select a random element from an empty collection"
	NoSupportedClientsError           = "" /* 210-byte string literal not displayed */
	NetworkValidationFailedError      = "'network' flag validation failed. Error: %v"
	UnknownNetworkError               = "unknown network \"%s\". Please provide correct network name. Use 'networks' command to see the list of supported networks"
	GenerateJWTSecretError            = "JWT secret generation failed. Error: %v"
	GetPWDError                       = "something failed trying to get current working directory. Error: %v"
	InvalidFeeRecipientError          = "provided Fee Recipient is not a valid Ethereum address"
	KeystorePasswordError             = "keystore password must have more than 8 characters"
	KeystorePasswordRetryError        = "the two entered keystore passwords do not match"
	CreatingKeystorePasswordError     = "failed to create keystore password file. Error: %v"
	GetContainerIPError               = "failed to get docker internal IP address of docker-compose service %s. Error: %v"
	TekuDatadirError                  = "failed to create teku %s datadir with 777 permissions. Error :%v"
	UnableToTrackSyncError            = "" /* 218-byte string literal not displayed */
	NoOutputDockerInspectError        = "no output from docker inspect"
	IPNotFoundError                   = "could not find IP address"
	PortOccupationError               = "port occupation check failed. Error: %v"
	DefaultPortEmptyError             = "default %s can not be empty"
	PrintFileError                    = "error printing file content: %v"
	CleaningEnvFileError              = "error cleaning env file: %v"
	CleaningDCFileError               = "error cleaning docker compose file: %v"
	PassphraseReadFileError           = "error reading passphrase file: %v"
	MnemonicReadFileError             = "error reading passphrase file: %v"
	MnemonicGenerationError           = "error creating mnemonic: %v"
	KeyEntryGenerationError           = "error generating keystore: could not read sufficient secure random bytes"
	AESParamsCreationError            = "failed to create AES128CTR params: %w"
	SecretEncryptionError             = "failed to encrypt secret: %w"
	KeystoreOutputExistingError       = "output folder for keystores already exists"
	KeystoreGenerationError           = "error generating keystores: %v"
	KeystoreDerivationError           = "keystore %s cannot be derived, continuing to next keystore"
	KeystoreExistingInWalletError     = "keystore with name \"%s\" already exists"
	KeystoreImportingError            = "failed to import keystore with pubkey %s into output wallet: %v"
	InvalidMnemonicError              = "mnemonic is not valid"
	BadMnemonicError                  = "bad mnemonic: %v"
	ForkVersionDecodeError            = "cannot decode fork version: %v"
	DepositFileWriteError             = "cannot write deposit file: %v"
	KeystoreSecretKeyCreationError    = "failed to create validator private key for path %q: %v"
	WithdrawalSecretKeyCreationError  = "failed to create withdrawal private key for path %q: %v"
	KeystoreSecretKeyConvertionError  = "cannot convert validator priv key: %v"
	DepositDataEncodingError          = "could not encode deposit data to json: %v"
	InvalidNumberOfValidatorsError    = "invalid number of validators: %v"
	NumberOfValidatorsRetryError      = "provided numbers do not match"
)

All the strings that are needed for error logging.

View Source
const (
	CheckingDependencies            = "Checking dependencies: %s"
	DependenciesPending             = "pending dependencies: %s"
	DependenciesOK                  = "All dependencies are installed on host machine"
	GeneratingDockerComposeScript   = "Generating docker-compose script for current selection of clients"
	GeneratingEnvFile               = "Generating environment file for current selection of clients"
	Exiting                         = "Exiting..."
	InstructionsFor                 = "Instructions for %s"
	OSNotSupported                  = "installation not supported for %s"
	ProvideClients                  = "Please provide both execution client and consensus client"
	CreatedFile                     = "Created file %s"
	DefaultDockerComposeScriptsPath = "./docker-compose-scripts"
	OnPremiseExecutionURL           = "http://execution"
	OnPremiseConsensusURL           = "http://consensus"
	ClientNotSupported              = "client %s is not supported. Please use 'clients' command to see the list of supported clients"
	PrintingFile                    = "File %s:"
	SupportedClients                = "Supported clients of type %s: %v"
	ConfigClientsMsg                = "Provided clients of type %s in configuration file: %v"
	RunningDockerCompose            = "Running docker-compose script"
	Component                       = "component"
	RunningCommand                  = "Running command: %s"
	ConfigFileName                  = ".sedge"
	UnableToProceed                 = "Unable to proceed. Please check the logs for more details"
	DefaultDockerComposeScriptName  = "docker-compose.yml"
	CheckingDockerEngine            = "Checking if docker engine is on"
	DepositCLIDockerImageUrl        = "nethermindeth/staking-deposit-cli" //"github.com/ethereum/staking-deposit-cli"
	DepositCLIDockerImageName       = "nethermindeth/staking-deposit-cli" //"deposit-cli:local"
	GeneratingKeystores             = "Generating keystores..."
	GeneratingKeystoresLegacy       = "Generating keystore folder"
	KeystoresGenerated              = "Keystores generated."
	GeneratingDepositData           = "Generating deposit data..."
	DepositDataGenerated            = "Deposit data generated."
	KeysFoundAt                     = "If everything went well, your keys can be found at: %s"
	ImageNotFoundBuilding           = "Image %s not found, building it"
	ImageNotFoundPulling            = "Image %s not found, pulling it"
	ExecutionDefaultDataDir         = "./execution-data"
	ConsensusDefaultDataDir         = "./consensus-data"
	ValidatorDefaultDataDir         = "./validator-data"
	KeystoreDefaultDataDir          = "./keystore"
	ReviewKeystorePath              = "" /* 269-byte string literal not displayed */
	NodesSynced                     = "Execution and Consensus clients are synced, proceeding to start validator node"
	RemoteNodeNeeded                = `` /* 412-byte string literal not displayed */

	ValidatorTips = `` /* 1040-byte string literal not displayed */

	HappyStaking = `` /* 473-byte string literal not displayed */

	HappyStaking2 = `` /* 601-byte string literal not displayed */

	ExecutionClientNotSpecifiedWarn = "Execution client not provided. A random client will be selected. Random client: %s"
	ConsensusClientNotSpecifiedWarn = "Consensus client not provided. Selecting same pair of clients for consensus and validator clients"
	ValidatorClientNotSpecifiedWarn = "Validator client not provided. Selecting same pair of clients for consensus and validator clients"
	CLNotSpecifiedWarn              = "" /* 153-byte string literal not displayed */
	GeneratingJWTSecret             = "Generating JWT secret for client authentication"
	JWTSecretGenerated              = "JWT secret generated"
	CreatingKeystorePassword        = "Creating keystore_password.txt on keystore folder"
	KeystorePasswordCreated         = "keystore_password.txt on keystore folder created with provided password"
	MnemonicTips                    = "" /* 241-byte string literal not displayed */
	GeneratingMnemonic              = "Existing mnemonic not provided. Generating mnemonic for validator keystore:"
	StoreMnemonic                   = "Make sure to store your mnemonic somewhere safe. Losing it could end in the lost of your validators. Press enter to continue" // TODO: improve warning message
	PreparingTekuDatadir            = "Preparing teku datadirs (must have full read/write/execute permissions to work)"
	GettingContainersIP             = "Proceeding to get execution and consensus containers IP address for the monitoring tool"
	WaitingForNodesToStart          = "Waiting a minute for nodes to start"
	CustomImagesWarning             = "" /* 237-byte string literal not displayed */
	DefaultDiscoveryPortEL          = "30303"
	DefaultMetricsPortEL            = "8008"
	DefaultApiPortEL                = "8545"
	DefaultAuthPortEL               = "8551"
	DefaultWSPortEL                 = "8546"
	DefaultDiscoveryPortCL          = "9000"
	DefaultMetricsPortCL            = "5054"
	DefaultApiPortCL                = "4000"
	DefaultAdditionalApiPortCL      = "4001"
	DefaultMetricsPortVL            = "5056"
	DefaultMevPort                  = "18550"
	MapAllPortsWarning              = "" /* 152-byte string literal not displayed */
	CheckpointUrlUsedWarning        = "A Checkpoint Sync Url will be used for the consensus node. Using %s ."
	NoBootnodesFound                = "No bootnodes found for %s/%s/%s"
	UnableToCheckVersion            = "Unable to check for new Version. Please check manually at " +
		"https://github.com/NethermindEth/sedge/releases, with error:"
	NeedVersionUpdate = "A new Version of sedge is available. Please update to the latest Version. See " +
		"https://github.com/NethermindEth/sedge/releases for more information. Latest detected tag:"
	VersionUpdated = "You are running the latest version of sedge. Version: "
)

All the strings that are needed for debugging and info logging, and constant strings.

Variables

View Source
var NetworksConfigs map[string]NetworkConfig

Functions

func ConfigClients

func ConfigClients(clientType string) ([]string, error)

ConfigClients : Get the client names of type <clientType> from configuration file

params :- a. clientType string Type of client to be returned

returns :- a. []string List of clients names of type <clientType>

func GetDependencies

func GetDependencies() []string

GetDependencies : This function is responsible for giving the dependencies needed for sedge setup

params :- None

returns :- a. []string List of dependencies needed for sedge setup

Types

type LogConfig

type LogConfig struct {
	Level string `mapstructure:"logLevel"`
}

LogConfig : Struct Represent configuration data for logging

type NetworkConfig added in v0.4.0

type NetworkConfig struct {
	Name               string
	RequireJWT         bool
	NetworkService     string
	GenesisForkVersion string
}

Jump to

Keyboard shortcuts

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