Documentation
¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type HandledHooks
- type Hooks
- func (h Hooks) AfterBTCHeaderInserted(ctx sdk.Context, headerInfo *ltypes.BTCHeaderInfo)
- func (h Hooks) AfterBTCRollBack(ctx sdk.Context, headerInfo *ltypes.BTCHeaderInfo)
- func (h Hooks) AfterBTCRollForward(ctx sdk.Context, headerInfo *ltypes.BTCHeaderInfo)
- func (h Hooks) AfterEpochBegins(ctx sdk.Context, epoch uint64)
- func (h Hooks) AfterEpochEnds(ctx sdk.Context, epoch uint64)
- func (h Hooks) BeforeSlashThreshold(ctx sdk.Context, valSet etypes.ValidatorSet)
- type Keeper
- func (k Keeper) BtcCheckpointInfo(c context.Context, req *types.QueryBtcCheckpointInfoRequest) (*types.QueryBtcCheckpointInfoResponse, error)
- func (k Keeper) BtcCheckpointsInfo(c context.Context, req *types.QueryBtcCheckpointsInfoRequest) (*types.QueryBtcCheckpointsInfoResponse, error)
- func (k Keeper) BtcLightClientUpdated(ctx sdk.Context) bool
- func (k Keeper) EpochSubmissions(c context.Context, req *types.QueryEpochSubmissionsRequest) (*types.QueryEpochSubmissionsResponse, error)
- func (k Keeper) GetBestSubmission(ctx sdk.Context, epochNumber uint64) (types.BtcStatus, *types.SubmissionKey, error)
- func (k Keeper) GetBlockHeight(ctx sdk.Context, b *bbn.BTCHeaderHashBytes) (uint64, error)
- func (k Keeper) GetEpochBestSubmissionBtcInfo(ctx sdk.Context, ed *types.EpochData) *types.SubmissionBtcInfo
- func (k Keeper) GetEpochData(ctx sdk.Context, e uint64) *types.EpochData
- func (k Keeper) GetExpectedTag(ctx sdk.Context) txformat.BabylonTag
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetPowLimit() *big.Int
- func (k Keeper) GetSubmissionBtcInfo(ctx sdk.Context, sk types.SubmissionKey) (*types.SubmissionBtcInfo, error)
- func (k Keeper) GetSubmissionData(ctx sdk.Context, sk types.SubmissionKey) *types.SubmissionData
- func (k Keeper) Hooks() Hooks
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) OnTipChange(ctx sdk.Context)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error
- func (k Keeper) SubmissionExists(ctx sdk.Context, sk types.SubmissionKey) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type HandledHooks ¶
type HandledHooks interface { ltypes.BTCLightClientHooks etypes.EpochingHooks }
Helper interface to be sure Hooks implement both epoching and light client hooks
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
func (Hooks) AfterBTCHeaderInserted ¶
func (h Hooks) AfterBTCHeaderInserted(ctx sdk.Context, headerInfo *ltypes.BTCHeaderInfo)
func (Hooks) AfterBTCRollBack ¶
func (h Hooks) AfterBTCRollBack(ctx sdk.Context, headerInfo *ltypes.BTCHeaderInfo)
func (Hooks) AfterBTCRollForward ¶
func (h Hooks) AfterBTCRollForward(ctx sdk.Context, headerInfo *ltypes.BTCHeaderInfo)
func (Hooks) BeforeSlashThreshold ¶
func (h Hooks) BeforeSlashThreshold(ctx sdk.Context, valSet etypes.ValidatorSet)
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, tstoreKey, memKey storetypes.StoreKey, bk types.BTCLightClientKeeper, ck types.CheckpointingKeeper, powLimit *big.Int, authority string, ) Keeper
func (Keeper) BtcCheckpointInfo ¶
func (k Keeper) BtcCheckpointInfo(c context.Context, req *types.QueryBtcCheckpointInfoRequest) (*types.QueryBtcCheckpointInfoResponse, error)
func (Keeper) BtcCheckpointsInfo ¶
func (k Keeper) BtcCheckpointsInfo(c context.Context, req *types.QueryBtcCheckpointsInfoRequest) (*types.QueryBtcCheckpointsInfoResponse, error)
func (Keeper) BtcLightClientUpdated ¶ added in v0.6.0
BtcLightClientUpdated checks if btc light client was updated during block execution
func (Keeper) EpochSubmissions ¶
func (k Keeper) EpochSubmissions(c context.Context, req *types.QueryEpochSubmissionsRequest) (*types.QueryEpochSubmissionsResponse, error)
func (Keeper) GetBestSubmission ¶
func (k Keeper) GetBestSubmission(ctx sdk.Context, epochNumber uint64) (types.BtcStatus, *types.SubmissionKey, error)
GetBestSubmission gets the status and the best submission of a given finalized epoch
func (Keeper) GetBlockHeight ¶
func (Keeper) GetEpochBestSubmissionBtcInfo ¶ added in v0.6.0
func (Keeper) GetEpochData ¶
GetEpochData returns epoch data for given epoch, if there is not epoch data yet returns nil
func (Keeper) GetExpectedTag ¶
func (k Keeper) GetExpectedTag(ctx sdk.Context) txformat.BabylonTag
GetExpectedTag retrerieves checkpoint tag from params and decodes it from hex string to bytes. NOTE: keeper could probably cache decoded tag, but it is rather improbable this function will ever be a bottleneck so it is not worth it.
func (Keeper) GetPowLimit ¶
func (Keeper) GetSubmissionBtcInfo ¶
func (k Keeper) GetSubmissionBtcInfo(ctx sdk.Context, sk types.SubmissionKey) (*types.SubmissionBtcInfo, error)
func (Keeper) GetSubmissionData ¶
func (k Keeper) GetSubmissionData(ctx sdk.Context, sk types.SubmissionKey) *types.SubmissionData
GetSubmissionData returns submission data for a given key or nil if there is no data under the given key
func (Keeper) OnTipChange ¶
Callback to be called when btc light client tip changes
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)