Documentation ¶
Index ¶
- Constants
- func AddrBookPath(chainRootDir string) string
- func ExtractConsensusParams(cp *chain.BaseConsensusParams) *cmtTypes.ConsensusParams
- func NodeIDAddressString(pubkey ed25519.PubKey, hostPort string) string
- func ParamUpdatesToComet(up *consensus.ParamUpdates) *cmtproto.ConsensusParams
- func ResetState(chainRootDir string) error
- type CometBftNode
- type LogWrapper
Constants ¶
const ( DataDir = "data" GenesisJSONName = "genesis.json" ConfigTOMLName = "config.toml" AddrBookFileName = "addrbook.json" )
CometBFT file and folder names. These will be under the chain root directory. e.g. With "abci" a the chain root directory set in cometbft's config, this give the paths "abci/config/genesis.json" and "abci/data".
Variables ¶
This section is empty.
Functions ¶
func AddrBookPath ¶
func ExtractConsensusParams ¶ added in v0.8.1
func ExtractConsensusParams(cp *chain.BaseConsensusParams) *cmtTypes.ConsensusParams
ExtractConsensusParams creates cometbft's ConsensusParams from kwild's, which includes a subset of cometbft's and other parameters that pertain to the ABCI application (kwild) rather than the consensus engine (cometbft).
func NodeIDAddressString ¶
NodeIDAddressString makes a full CometBFT node ID address string in the format <nodeID>@hostPort where nodeID is derived from the provided public key.
func ParamUpdatesToComet ¶ added in v0.8.1
func ParamUpdatesToComet(up *consensus.ParamUpdates) *cmtproto.ConsensusParams
ParamUpdatesToComet converts the parameter updates to cometBFT's
func ResetState ¶
ResetState removes address book files plus all blockchain databases. It always returns nil error, only printing errors. (?)
Types ¶
type CometBftNode ¶
type CometBftNode struct {
Node *cometNodes.Node
}
func NewCometBftNode ¶
func NewCometBftNode(ctx context.Context, app abciTypes.Application, conf *cometConfig.Config, genDoc *types.GenesisDoc, privateKey cometEd25519.PrivKey, atomicStore privval.AtomicReadWriter, logger *log.Logger) (*CometBftNode, error)
NewCometBftNode creates a new CometBFT node.
func (*CometBftNode) IsCatchup ¶
func (n *CometBftNode) IsCatchup() bool
IsCatchup returns true if the node is operating in catchup / blocksync mode. If the node is caught up with the network, it returns false.
type LogWrapper ¶
type LogWrapper struct {
// contains filtered or unexported fields
}
LogWrapper that implements cometbft's Logger interface.
func NewLogWrapper ¶
func NewLogWrapper(log *log.Logger) *LogWrapper
NewLogWrapper creates a new LogWrapper using the provided Kwil Logger.
func (*LogWrapper) Debug ¶
func (lw *LogWrapper) Debug(msg string, kvs ...any)
func (*LogWrapper) Error ¶
func (lw *LogWrapper) Error(msg string, kvs ...any)
func (*LogWrapper) Info ¶
func (lw *LogWrapper) Info(msg string, kvs ...any)