func DefaultBaseConfig() BaseConfig {
	return BaseConfig{
		Genesis:            defaultGenesisJSONPath,
		PrivValidatorKey:   defaultPrivValKeyPath,
		PrivValidatorState: defaultPrivValStatePath,
		BLSKey:             defaultBLSKeyPath,
		NodeKey:            defaultNodeKeyPath,
		Moniker:            defaultMoniker,
		ProxyApp:           "tcp://127.0.0.1:26658",
		ABCI:               "socket",
		LogLevel:           DefaultPackageLogLevels(),
		LogFormat:          LogFormatPlain,
		ProfListenAddress:  "",
		FastSyncMode:       true,
		FilterPeers:        false,
		DBBackend:          "goleveldb",
		DBPath:             "data",
	}
}
DefaultBaseConfig returns a default base configuration for a Tendermint node
package config
import (
	"fmt"
	"net/http"
	"os"
	"path/filepath"
	"time"
	"github.com/pkg/errors"
)
const (
	FuzzModeDrop = iota
	FuzzModeDelay
	LogFormatPlain = "plain"
	LogFormatJSON = "json"
)
var (
	DefaultTendermintDir = ".tendermint"
	defaultConfigDir     = "config"
	defaultDataDir       = "data"
	defaultConfigFileName  = "config.toml"
	defaultGenesisJSONName = "genesis.json"
	defaultPrivValKeyName   = "priv_validator_key.json"
	defaultPrivValStateName = "priv_validator_state.json"
	defaultBLSKeyName       = "bls_key.json"
	defaultNodeKeyName  = "node_key.json"
	defaultAddrBookName = "addrbook.json"
	defaultConfigFilePath   = filepath.Join(defaultConfigDir, defaultConfigFileName)
	defaultGenesisJSONPath  = filepath.Join(defaultConfigDir, defaultGenesisJSONName)
	defaultPrivValKeyPath   = filepath.Join(defaultConfigDir, defaultPrivValKeyName)
	defaultPrivValStatePath = filepath.Join(defaultDataDir, defaultPrivValStateName)
	defaultBLSKeyPath       = filepath.Join(defaultConfigDir, defaultBLSKeyName)
	defaultNodeKeyPath  = filepath.Join(defaultConfigDir, defaultNodeKeyName)
	defaultAddrBookPath = filepath.Join(defaultConfigDir, defaultAddrBookName)
)
var (
	oldPrivVal     = "priv_validator.json"
	oldPrivValPath = filepath.Join(defaultConfigDir, oldPrivVal)
)
type Config struct {
	BaseConfig `mapstructure:",squash"`
	RPC              *RPCConfig             `mapstructure:"rpc"`
	P2P              *P2PConfig             `mapstructure:"p2p"`
	Mempool          *MempoolConfig         `mapstructure:"mempool"`
	FastSync         *FastSyncConfig        `mapstructure:"fastsync"`
	Consensus        *ConsensusConfig       `mapstructure:"consensus"`
	TxIndex          *TxIndexConfig         `mapstructure:"tx_index"`
	Instrumentation  *InstrumentationConfig `mapstructure:"instrumentation"`
	DKGOnChainConfig *DKGOnChainConfig      `mapstructure:"dkg_onchain"`
}
func DefaultConfig() *Config {
	return &Config{
		BaseConfig:       DefaultBaseConfig(),
		RPC:              DefaultRPCConfig(),
		P2P:              DefaultP2PConfig(),
		Mempool:          DefaultMempoolConfig(),
		FastSync:         DefaultFastSyncConfig(),
		Consensus:        DefaultConsensusConfig(),
		TxIndex:          DefaultTxIndexConfig(),
		Instrumentation:  DefaultInstrumentationConfig(),
		DKGOnChainConfig: DefaultDKGOnChainConfig(),
	}
}
func TestConfig() *Config {
	return &Config{
		BaseConfig:      TestBaseConfig(),
		RPC:             TestRPCConfig(),
		P2P:             TestP2PConfig(),
		Mempool:         TestMempoolConfig(),
		FastSync:        TestFastSyncConfig(),
		Consensus:       TestConsensusConfig(),
		TxIndex:         TestTxIndexConfig(),
		Instrumentation: TestInstrumentationConfig(),
	}
}
func (cfg *Config) SetRoot(root string) *Config {
	cfg.BaseConfig.RootDir = root
	cfg.RPC.RootDir = root
	cfg.P2P.RootDir = root
	cfg.Mempool.RootDir = root
	cfg.Consensus.RootDir = root
	return cfg
}
func (cfg *Config) ValidateBasic() error {
	if err := cfg.BaseConfig.ValidateBasic(); err != nil {
		return err
	}
	if err := cfg.RPC.ValidateBasic(); err != nil {
		return errors.Wrap(err, "Error in [rpc] section")
	}
	if err := cfg.P2P.ValidateBasic(); err != nil {
		return errors.Wrap(err, "Error in [p2p] section")
	}
	if err := cfg.Mempool.ValidateBasic(); err != nil {
		return errors.Wrap(err, "Error in [mempool] section")
	}
	if err := cfg.FastSync.ValidateBasic(); err != nil {
		return errors.Wrap(err, "Error in [fastsync] section")
	}
	if err := cfg.Consensus.ValidateBasic(); err != nil {
		return errors.Wrap(err, "Error in [consensus] section")
	}
	return errors.Wrap(
		cfg.Instrumentation.ValidateBasic(),
		"Error in [instrumentation] section",
	)
}
type BaseConfig struct {  
	chainID string
	RootDir string `mapstructure:"home"`
	ProxyApp string `mapstructure:"proxy_app"`
	Moniker string `mapstructure:"moniker"`
	FastSyncMode bool `mapstructure:"fast_sync"`
	DBBackend string `mapstructure:"db_backend"`
	DBPath string `mapstructure:"db_dir"`
	LogLevel string `mapstructure:"log_level"`
	LogFormat string `mapstructure:"log_format"`
	Genesis string `mapstructure:"genesis_file"`
	PrivValidatorKey string `mapstructure:"priv_validator_key_file"`
	PrivValidatorState string `mapstructure:"priv_validator_state_file"`
	PrivValidatorListenAddr string `mapstructure:"priv_validator_laddr"`
	NodeKey string `mapstructure:"node_key_file"`
	BLSKey string `mapstructure:"bls_key_file"`
	ABCI string `mapstructure:"abci"`
	ProfListenAddress string `mapstructure:"prof_laddr"`
	FilterPeers bool `mapstructure:"filter_peers"`  
	NodeID int `mapstructure:"node_id"`
}