Documentation ¶
Index ¶
Constants ¶
View Source
const ( // FlagYes is the flag for yes. FlagYes = "yes" // FlagCfg is the flag for cfg. FlagCfg = "cfg" // FlagCustomNetwork is the flag for the custom network file. 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" // FlagOutputFile is the flag for the output file FlagOutputFile = "output" // FlagMaxAmount is the flag to avoid to use the flag FlagAmount FlagMaxAmount = "max-amount" )
View Source
const ( // LeafTypeBalance specifies that leaf stores Balance LeafTypeBalance leafType = 0 // LeafTypeNonce specifies that leaf stores Nonce LeafTypeNonce leafType = 1 // LeafTypeCode specifies that leaf stores Code LeafTypeCode leafType = 2 // LeafTypeStorage specifies that leaf stores Storage Value LeafTypeStorage leafType = 3 // LeafTypeSCLength specifies that leaf stores Storage Value LeafTypeSCLength leafType = 4 )
View Source
const DefaultValues = `` /* 7544-byte string literal not displayed */
DefaultValues is the default configuration
Variables ¶
This section is empty.
Functions ¶
func LoadGenesisFileAsString ¶
LoadGenesisFileAsString loads the genesis file as a string
Types ¶
type Config ¶
type Config struct { // Configuration of the etherman (client for access L1) Etherman ethermanconfig.Config // Configuration for ethereum transaction manager EthTxManager ethtxmanager.Config // Configuration of the aggregator Aggregator aggregator.Config // Configure Log level for all the services, allow also to store the logs in a file Log log.Config // Configuration of the genesis of the network. This is used to known the initial state of the network NetworkConfig NetworkConfig // Configuration of the sequence sender service SequenceSender sequencesender.Config // Common Config that affects all the services Common common.Config // Configuration of the reorg detector service to be used for the L1 ReorgDetectorL1 reorgdetector.Config // Configuration of the reorg detector service to be used for the L2 ReorgDetectorL2 reorgdetector.Config // Configuration of the aggOracle service AggOracle aggoracle.Config // Configuration of the L1 Info Treee Sync service L1InfoTreeSync l1infotreesync.Config // RPC is the config for the RPC server RPC jRPC.Config // ClaimSponsor is the config for the claim sponsor ClaimSponsor claimsponsor.EVMClaimSponsorConfig // BridgeL1Sync is the configuration for the synchronizer of the bridge of the L1 BridgeL1Sync bridgesync.Config // BridgeL2Sync is the configuration for the synchronizer of the bridge of the L2 BridgeL2Sync bridgesync.Config // LastGERSync is the config for the synchronizer in charge of syncing the last GER injected on L2. // Needed for the bridge service (RPC) LastGERSync lastgersync.Config }
Config represents the configuration of the entire Hermez Node The file is TOML format You could find some examples:
- `config/environments/local/local.node.config.toml`: running a permisionless node
- `config/environments/mainnet/node.config.toml`
- `config/environments/public/node.config.toml`
- `test/config/test.node.config.toml`: configuration for a trusted node used in CI
type ForbiddenField ¶
type GenesisFromJSON ¶
type GenesisFromJSON struct { // L1: root hash of the genesis block Root string `json:"root"` // L1: block number of the genesis block GenesisBlockNum uint64 `json:"genesisBlockNumber"` // L2: List of states contracts used to populate merkle tree at initial state Genesis []genesisAccountFromJSON `json:"genesis"` // L1: configuration of the network L1Config ethermanconfig.L1Config }
GenesisFromJSON is the config file for network_custom
type NetworkConfig ¶
type NetworkConfig struct { // L1: Configuration related to L1 L1Config ethermanconfig.L1Config `mapstructure:"L1"` // L1: Genesis of the rollup, first block number and root Genesis state.Genesis }
NetworkConfig is the configuration struct for the different environments
func LoadGenesisFromJSONString ¶
func LoadGenesisFromJSONString(jsonStr string) (NetworkConfig, error)
LoadGenesisFromJSONString loads the genesis file from JSON string
Click to show internal directories.
Click to hide internal directories.