config

package
v0.1.1-RC3 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 29 Imported by: 1

README

List ENV variables:

ZKEVM_NODE_LOG_LEVEL
ZKEVM_NODE_LOG_OUTPUTS
ZKEVM_NODE_DATABASE_NAME
ZKEVM_NODE_DATABASE_USER
ZKEVM_NODE_DATABASE_PASSWORD
ZKEVM_NODE_DATABASE_HOST
ZKEVM_NODE_DATABASE_PORT
ZKEVM_NODE_ETHERMAN_URL
ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH
ZKEVM_NODE_ETHERMAN_PRIVATEKEYPASSWORD
ZKEVM_NODE_SYNCHRONIZER_SYNCINTERVAL
ZKEVM_NODE_SEQUENCER_INTERVALTOPROPOSEBATCH
ZKEVM_NODE_SEQUENCER_SYNCEDBLOCKDIF
ZKEVM_NODE_SEQUENCER_STRATEGY_TX_SELECTOR_TYPE
ZKEVM_NODE_SEQUENCER_STRATEGY_TX_SELECTOR_TX_SORTER_TYPE
ZKEVM_NODE_SEQUENCER_STRATEGY_TX_PROFITABILITY_CHECKER_TYPE
ZKEVM_NODE_SEQUENCER_STRATEGY_TX_PROFITABILITY_CHECKER_MIN_REWARD
ZKEVM_NODE_SEQUENCER_STRATEGY_POSSIBLE_TIME_TO_SEND_TX
ZKEVM_NODE_AGGREGATOR_INTERVALTOCONSOLIDATESTATE
ZKEVM_NODE_AGGREGATOR_TX_PROFITABILITY_CHECKER_TYPE
ZKEVM_NODE_AGGREGATOR_TX_PROFITABILITY_MIN_REWARD
ZKEVM_NODE_PROVER_PROVERURI

Documentation

Index

Constants

View Source
const (
	// FlagYes is the flag for yes.
	FlagYes = "yes"
	// FlagCfg is the flag for cfg.
	FlagCfg = "cfg"
	// FlagNetwork is the flag for the network name. Valid values: ["testnet", "mainnet", "custom"].
	FlagNetwork = "network"
	// FlagCustomNetwork is the flag for the custom network file. This is required if --network=custom
	FlagCustomNetwork = "custom-network-file"
	// FlagAmount is the flag for amount.
	FlagAmount = "amount"
	// FlagRemoteMT is the flag for remote-merkletree.
	FlagRemoteMT = "remote-merkletree"
	// FlagComponents is the flag for components.
	FlagComponents = "components"
	// FlagHTTPAPI is the flag for http.api.
	FlagHTTPAPI = "http.api"
	// FlagKeyStorePath is the path of the key store file containing the private key of the account going to sing and approve the tokens
	FlagKeyStorePath = "key-store-path"
	// FlagPassword is the password needed to decrypt the key store
	FlagPassword = "password"
	// FlagMigrations is the flag for migrations.
	FlagMigrations = "migrations"
	// FlagMaxAmount is the flag to avoid to use the flag FlagAmount
	FlagMaxAmount = "max-amount"
)
View Source
const DefaultValues = `` /* 3231-byte string literal not displayed */

DefaultValues is the default configuration

View Source
const MainnetNetworkConfigJSON = `` /* 93117-byte string literal not displayed */

MainnetNetworkConfigJSON is the hardcoded network configuration to be used for the official mainnet setup

View Source
const TestnetNetworkConfigJSON = `` /* 92710-byte string literal not displayed */

TestnetNetworkConfigJSON is the hardcoded network configuration to be used for the official mainnet setup

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IsTrustedSequencer  bool `mapstructure:"IsTrustedSequencer"`
	Log                 log.Config
	Etherman            etherman.Config
	EthTxManager        ethtxmanager.Config
	Pool                pool.Config
	RPC                 jsonrpc.Config
	Synchronizer        synchronizer.Config
	Sequencer           sequencer.Config
	SequenceSender      sequencesender.Config
	PriceGetter         pricegetter.Config
	Aggregator          aggregator.Config
	NetworkConfig       NetworkConfig
	L2GasPriceSuggester gasprice.Config
	Executor            executor.Config
	MTClient            merkletree.Config
	StateDB             db.Config
	Metrics             metrics.Config
	EventLog            event.Config
}

Config represents the configuration of the entire Hermez Node

func Default

func Default() (*Config, error)

Default parses the default configuration values.

func Load

func Load(ctx *cli.Context) (*Config, error)

Load loads the configuration

type NetworkConfig

type NetworkConfig struct {
	L1Config                    etherman.L1Config `json:"l1Config"`
	L2GlobalExitRootManagerAddr common.Address
	L2BridgeAddr                common.Address
	Genesis                     state.Genesis
	MaxCumulativeGasUsed        uint64
}

NetworkConfig is the configuration struct for the different environments

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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