Documentation ¶
Index ¶
- Constants
- Variables
- func DetectionIndex(msg *types.MsgDetection, epochStart uint64) string
- func FindVote(votes *[]types.Vote, address string) (int, bool)
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AllocateNewConflictVote(ctx sdk.Context, key string) bool
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) CheckAndHandleAllVotes(ctx sdk.Context)
- func (k Keeper) CleanUpVote(ctx sdk.Context, index string)
- func (k Keeper) ConflictVote(c context.Context, req *types.QueryGetConflictVoteRequest) (*types.QueryGetConflictVoteResponse, error)
- func (k Keeper) ConflictVoteAll(c context.Context, req *types.QueryAllConflictVoteRequest) (*types.QueryAllConflictVoteResponse, error)
- func (k Keeper) ConsumerConflicts(c context.Context, req *types.QueryConsumerConflictsRequest) (*types.QueryConsumerConflictsResponse, error)
- func (k Keeper) GetAllConflictVote(ctx sdk.Context) (list []types.ConflictVote)
- func (k Keeper) GetConflictVote(ctx sdk.Context, index string) (val types.ConflictVote, found bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) HandleAndCloseVote(ctx sdk.Context, conflictVote types.ConflictVote)
- func (k Keeper) IsEpochStart(ctx sdk.Context) (res bool)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) LotteryVoters(goCtx context.Context, epoch uint64, chainID string, exemptions []string) []string
- func (k Keeper) MajorityPercent(ctx sdk.Context) (res sdk.Dec)
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) ProviderConflicts(c context.Context, req *types.QueryProviderConflictsRequest) (*types.QueryProviderConflictsResponse, error)
- func (k Keeper) PushFixations(ctx sdk.Context)
- func (k Keeper) RemoveConflictVote(ctx sdk.Context, index string)
- func (k Keeper) Rewards(ctx sdk.Context) (res types.Rewards)
- func (k Keeper) SetConflictVote(ctx sdk.Context, conflictVote types.ConflictVote)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) TransitionVoteToReveal(ctx sdk.Context, conflictVote types.ConflictVote)
- func (k Keeper) ValidateFinalizationConflict(ctx sdk.Context, conflictData *types.FinalizationConflict, ...) error
- func (k Keeper) ValidateResponseConflict(ctx sdk.Context, conflictData *types.ResponseConflict, ...) error
- func (k Keeper) ValidateSameProviderConflict(ctx sdk.Context, conflictData *types.FinalizationConflict, ...) error
- func (k Keeper) VotePeriod(ctx sdk.Context) (res uint64)
- func (k Keeper) VoteStartSpan(ctx sdk.Context) (res uint64)
- type Migrator
Constants ¶
View Source
const ( BailStakeDiv = 5 // 20% - Can't be 0! MajorityDiv = 2 // 50% - Can't be 0! )
Variables ¶
View Source
var SlashStakePercent = sdk.NewDecWithPrec(5, 2) // 0.05
Functions ¶
func DetectionIndex ¶
func DetectionIndex(msg *types.MsgDetection, epochStart uint64) string
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey storetypes.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, pairingKeeper types.PairingKeeper, epochstorageKeeper types.EpochstorageKeeper, specKeeper types.SpecKeeper, stakingKeeper types.StakingKeeper, ) *Keeper
func (Keeper) AllocateNewConflictVote ¶
func (Keeper) BeginBlock ¶
func (Keeper) CheckAndHandleAllVotes ¶
func (Keeper) ConflictVote ¶
func (k Keeper) ConflictVote(c context.Context, req *types.QueryGetConflictVoteRequest) (*types.QueryGetConflictVoteResponse, error)
func (Keeper) ConflictVoteAll ¶
func (k Keeper) ConflictVoteAll(c context.Context, req *types.QueryAllConflictVoteRequest) (*types.QueryAllConflictVoteResponse, error)
func (Keeper) ConsumerConflicts ¶
func (k Keeper) ConsumerConflicts(c context.Context, req *types.QueryConsumerConflictsRequest) (*types.QueryConsumerConflictsResponse, error)
func (Keeper) GetAllConflictVote ¶
func (k Keeper) GetAllConflictVote(ctx sdk.Context) (list []types.ConflictVote)
GetAllConflictVote returns all conflictVote
func (Keeper) GetConflictVote ¶
func (k Keeper) GetConflictVote( ctx sdk.Context, index string, ) (val types.ConflictVote, found bool)
GetConflictVote returns a conflictVote from its index
func (Keeper) HandleAndCloseVote ¶
func (k Keeper) HandleAndCloseVote(ctx sdk.Context, conflictVote types.ConflictVote)
func (Keeper) IsEpochStart ¶
we dont want to do the calculation here too, epochStorage keeper did it
func (Keeper) LotteryVoters ¶
func (Keeper) MajorityPercent ¶
MajorityPercent returns the MajorityPercent param
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) ProviderConflicts ¶
func (k Keeper) ProviderConflicts(c context.Context, req *types.QueryProviderConflictsRequest) (*types.QueryProviderConflictsResponse, error)
func (Keeper) PushFixations ¶
func (Keeper) RemoveConflictVote ¶
RemoveConflictVote removes a conflictVote from the store
func (Keeper) SetConflictVote ¶
func (k Keeper) SetConflictVote(ctx sdk.Context, conflictVote types.ConflictVote)
SetConflictVote set a specific conflictVote in the store from its index
func (Keeper) TransitionVoteToReveal ¶
func (k Keeper) TransitionVoteToReveal(ctx sdk.Context, conflictVote types.ConflictVote)
func (Keeper) ValidateFinalizationConflict ¶
func (k Keeper) ValidateFinalizationConflict(ctx sdk.Context, conflictData *types.FinalizationConflict, clientAddr sdk.AccAddress) error
func (Keeper) ValidateResponseConflict ¶
func (k Keeper) ValidateResponseConflict(ctx sdk.Context, conflictData *types.ResponseConflict, clientAddr sdk.AccAddress) error
func (Keeper) ValidateSameProviderConflict ¶
func (k Keeper) ValidateSameProviderConflict(ctx sdk.Context, conflictData *types.FinalizationConflict, clientAddr sdk.AccAddress) error
Source Files ¶
- conflict.go
- conflict_vote.go
- grpc_query.go
- grpc_query_conflict_vote.go
- grpc_query_consumer_conflicts.go
- grpc_query_params.go
- grpc_query_provider_conflicts.go
- keeper.go
- migrations.go
- msg_server.go
- msg_server_conflict_vote_commit.go
- msg_server_conflict_vote_reveal.go
- msg_server_detection.go
- params.go
- vote.go
Click to show internal directories.
Click to hide internal directories.