Documentation
¶
Index ¶
Constants ¶
View Source
const (
AppConfigFileName = "app"
)
Variables ¶
This section is empty.
Functions ¶
func WriteConfigFile ¶
func WriteConfigFile(configFilePath string, config *AximchainConfig)
WriteConfigFile renders config using the template and writes it to configFilePath.
Types ¶
type AddressConfig ¶
type AddressConfig struct {
Bech32PrefixAccAddr string `mapstructure:"bech32PrefixAccAddr"`
Bech32PrefixAccPub string `mapstructure:"bech32PrefixAccPub"`
Bech32PrefixValAddr string `mapstructure:"bech32PrefixValAddr"`
Bech32PrefixValPub string `mapstructure:"bech32PrefixValPub"`
Bech32PrefixConsAddr string `mapstructure:"bech32PrefixConsAddr"`
Bech32PrefixConsPub string `mapstructure:"bech32PrefixConsPub"`
}
type AximchainConfig ¶
type AximchainConfig struct {
*AddressConfig `mapstructure:"addr"`
*PublicationConfig `mapstructure:"publication"`
*LogConfig `mapstructure:"log"`
*BaseConfig `mapstructure:"base"`
*UpgradeConfig `mapstructure:"upgrade"`
*QueryConfig `mapstructure:"query"`
*CrossChainConfig `mapstructure:"cross_chain"`
*DexConfig `mapstructure:"dex"`
}
func DefaultAximchainConfig ¶
func DefaultAximchainConfig() *AximchainConfig
type AximchainContext ¶
type AximchainContext struct {
*server.Context
*viper.Viper
*AximchainConfig
}
func NewDefaultContext ¶
func NewDefaultContext() *AximchainContext
func (*AximchainContext) ParseAppConfigInPlace ¶
func (context *AximchainContext) ParseAppConfigInPlace() error
func (*AximchainContext) ToCosmosServerCtx ¶
func (context *AximchainContext) ToCosmosServerCtx() *server.Context
type BaseConfig ¶
type BaseConfig struct {
AccountCacheSize int `mapstructure:"accountCacheSize"`
SignatureCacheSize int `mapstructure:"signatureCacheSize"`
StartMode uint8 `mapstructure:"startMode"`
BreatheBlockInterval int `mapstructure:"breatheBlockInterval"`
OrderKeeperConcurrency uint `mapstructure:"orderKeeperConcurrency"`
BreatheBlockDaysCountBack int `mapstructure:"breatheBlockDaysCountBack"`
}
type CrossChainConfig ¶
type PublicationConfig ¶
type PublicationConfig struct {
PublishOrderUpdates bool `mapstructure:"publishOrderUpdates"`
OrderUpdatesTopic string `mapstructure:"orderUpdatesTopic"`
OrderUpdatesKafka string `mapstructure:"orderUpdatesKafka"`
PublishAccountBalance bool `mapstructure:"publishAccountBalance"`
AccountBalanceTopic string `mapstructure:"accountBalanceTopic"`
AccountBalanceKafka string `mapstructure:"accountBalanceKafka"`
PublishOrderBook bool `mapstructure:"publishOrderBook"`
OrderBookTopic string `mapstructure:"orderBookTopic"`
OrderBookKafka string `mapstructure:"orderBookKafka"`
PublishBlockFee bool `mapstructure:"publishBlockFee"`
BlockFeeTopic string `mapstructure:"blockFeeTopic"`
BlockFeeKafka string `mapstructure:"blockFeeKafka"`
PublishTransfer bool `mapstructure:"publishTransfer"`
TransferTopic string `mapstructure:"transferTopic"`
TransferKafka string `mapstructure:"transferKafka"`
PublishBlock bool `mapstructure:"publishBlock"`
BlockTopic string `mapstructure:"blockTopic"`
BlockKafka string `mapstructure:"blockKafka"`
PublishDistributeReward bool `mapstructure:"publishDistributeReward"`
DistributeRewardTopic string `mapstructure:"distributeRewardTopic"`
DistributeRewardKafka string `mapstructure:"distributeRewardKafka"`
PublishStaking bool `mapstructure:"publishStaking"`
StakingTopic string `mapstructure:"stakingTopic"`
StakingKafka string `mapstructure:"stakingKafka"`
PublishSlashing bool `mapstructure:"publishSlashing"`
SlashingTopic string `mapstructure:"slashingTopic"`
SlashingKafka string `mapstructure:"slashingKafka"`
PublishCrossTransfer bool `mapstructure:"publishCrossTransfer"`
CrossTransferTopic string `mapstructure:"crossTransferTopic"`
CrossTransferKafka string `mapstructure:"crossTransferKafka"`
PublishMirror bool `mapstructure:"publishMirror"`
MirrorTopic string `mapstructure:"mirrorTopic"`
MirrorKafka string `mapstructure:"mirrorKafka"`
PublishSideProposal bool `mapstructure:"publishSideProposal"`
SideProposalTopic string `mapstructure:"sideProposalTopic"`
SideProposalKafka string `mapstructure:"sideProposalKafka"`
PublishBreatheBlock bool `mapstructure:"publishBreatheBlock"`
BreatheBlockTopic string `mapstructure:"breatheBlockTopic"`
BreatheBlockKafka string `mapstructure:"breatheBlockKafka"`
PublicationChannelSize int `mapstructure:"publicationChannelSize"`
// DO NOT put this option in config file
// deliberately make it only a command line arguments
// https://github.com/aximchain/flash-node/issues/161#issuecomment-438600434
FromHeightInclusive int64
PublishKafka bool `mapstructure:"publishKafka"`
// Start a local publisher which publish all topics into an auto-rotation json file
// For full-node user and debugging usage
PublishLocal bool `mapstructure:"publishLocal"`
// refer: https://github.com/natefinch/lumberjack/blob/7d6a1875575e09256dc552b4c0e450dcd02bd10e/lumberjack.go#L85-L87
LocalMaxSize int `mapstructure:"localMaxSize"`
// refer: https://github.com/natefinch/lumberjack/blob/7d6a1875575e09256dc552b4c0e450dcd02bd10e/lumberjack.go#L89-L94
LocalMaxAge int `mapstructure:"localMaxAge"`
Auth bool `mapstructure:"auth"`
StopOnKafkaFail bool `mapstructure:"stopOnKafkaFail"`
KafkaUserName string `mapstructure:"kafkaUserName"`
KafkaPassword string `mapstructure:"kafkaPassword"`
KafkaVersion string `mapstructure:"kafkaVersion"`
}
func (PublicationConfig) ShouldPublishAny ¶
func (pubCfg PublicationConfig) ShouldPublishAny() bool
type QueryConfig ¶
type QueryConfig struct {
ABCIQueryBlackList []string `mapstructure:"ABCIQueryBlackList"`
}
type UpgradeConfig ¶
type UpgradeConfig struct {
// Galileo Upgrade
BEP6Height int64 `mapstructure:"BEP6Height"`
BEP9Height int64 `mapstructure:"BEP9Height"`
BEP10Height int64 `mapstructure:"BEP10Height"`
BEP19Height int64 `mapstructure:"BEP19Height"`
// Hubble Upgrade
BEP12Height int64 `mapstructure:"BEP12Height"`
// Archimedes Upgrade
BEP3Height int64 `mapstructure:"BEP3Height"`
// Heisenberg Upgrade
FixSignBytesOverflowHeight int64 `mapstructure:"FixSignBytesOverflowHeight"`
LotSizeUpgradeHeight int64 `mapstructure:"LotSizeUpgradeHeight"`
ListingRuleUpgradeHeight int64 `mapstructure:"ListingRuleUpgradeHeight"`
FixZeroBalanceHeight int64 `mapstructure:"FixZeroBalanceHeight"`
LaunchAscUpgradeHeight int64 `mapstructure:"LaunchAscUpgradeHeight"`
BEP8Height int64 `mapstructure:"BEP8Height"`
BEP67Height int64 `mapstructure:"BEP67Height"`
BEP70Height int64 `mapstructure:"BEP70Height"`
BEP82Height int64 `mapstructure:"BEP82Height"`
BEP84Height int64 `mapstructure:"BEP84Height"`
BEP87Height int64 `mapstructure:"BEP87Height"`
FixFailAckPackageHeight int64 `mapstructure:"FixFailAckPackageHeight"`
EnableAccountScriptsForCrossChainTransferHeight int64 `mapstructure:"EnableAccountScriptsForCrossChainTransferHeight"`
BEP128Height int64 `mapstructure:"BEP128Height"`
BEP151Height int64 `mapstructure:"BEP151Height"`
BEP153Height int64 `mapstructure:"BEP153Height"`
BEP159Height int64 `mapstructure:"BEP159Height"`
BEP159Phase2Height int64 `mapstructure:"BEP159Phase2Height"`
BEP173Height int64 `mapstructure:"BEP173Height"`
FixDoubleSignChainIdHeight int64 `mapstructure:"FixDoubleSignChainIdHeight"`
}
Click to show internal directories.
Click to hide internal directories.