Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddExternalChainInfo(ctx context.Context, valAddr sdk.ValAddress, ...) error
- func (k Keeper) CanAcceptKeepAlive(ctx context.Context, valAddr sdk.ValAddress, pigeonVersion string) error
- func (k Keeper) CanAcceptValidator(ctx context.Context, valAddr sdk.ValAddress) error
- func (k Keeper) FindSnapshotByID(ctx context.Context, id uint64) (*types.Snapshot, error)
- func (k Keeper) GetAlivePigeons(goCtx context.Context, req *types.QueryGetAlivePigeonsRequest) (*types.QueryGetAlivePigeonsResponse, error)
- func (k Keeper) GetAllChainInfos(ctx context.Context) ([]*types.ValidatorExternalAccounts, error)
- func (k Keeper) GetCurrentSnapshot(ctx context.Context) (*types.Snapshot, error)
- func (k Keeper) GetLatestPublishedSnapshot(goCtx context.Context, req *types.QueryGetLatestPublishedSnapshotRequest) (*types.QueryGetLatestPublishedSnapshotResponse, error)
- func (k Keeper) GetLatestSnapshotOnChain(ctx context.Context, chainReferenceID string) (*types.Snapshot, error)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPigeonRequirements(goCtx context.Context, req *types.QueryGetPigeonRequirementsRequest) (*types.QueryGetPigeonRequirementsResponse, error)
- func (k Keeper) GetSigningKey(ctx context.Context, valAddr sdk.ValAddress, ...) ([]byte, error)
- func (k Keeper) GetSnapshotByID(goCtx context.Context, req *types.QueryGetSnapshotByIDRequest) (*types.QueryGetSnapshotByIDResponse, error)
- func (k Keeper) GetUnjailedValidators(ctx context.Context) []stakingtypes.ValidatorI
- func (k Keeper) GetValidatorAliveUntil(goCtx context.Context, req *types.QueryGetValidatorAliveUntilRequest) (*types.QueryGetValidatorAliveUntilResponse, error)
- func (k Keeper) GetValidatorChainInfos(ctx context.Context, valAddr sdk.ValAddress) ([]*types.ExternalChainInfo, error)
- func (k Keeper) GetValidatorJailReason(goCtx context.Context, req *types.QueryGetValidatorJailReasonRequest) (*types.QueryGetValidatorJailReasonResponse, error)
- func (k Keeper) IsJailed(ctx context.Context, val sdk.ValAddress) (bool, error)
- func (k Keeper) IsValidatorAlive(ctx context.Context, valAddr sdk.ValAddress) (bool, error)
- func (k Keeper) Jail(_ctx context.Context, valAddr sdk.ValAddress, reason string) error
- func (k Keeper) JailInactiveValidators(ctx context.Context) error
- func (k Keeper) KeepValidatorAlive(ctx context.Context, valAddr sdk.ValAddress, pigeonVersion string) error
- func (k Keeper) Logger(ctx context.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) PigeonRequirements(ctx context.Context) (*types.PigeonRequirements, error)
- func (k Keeper) SaveModifiedSnapshot(ctx context.Context, snapshot *types.Snapshot) error
- func (k Keeper) ScheduledPigeonRequirements(ctx context.Context) (*types.ScheduledPigeonRequirements, error)
- func (k Keeper) SetExternalChainInfoState(ctx context.Context, valAddr sdk.ValAddress, ...) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetPigeonRequirements(ctx context.Context, req *types.PigeonRequirements) error
- func (k Keeper) SetScheduledPigeonRequirements(ctx context.Context, req *types.ScheduledPigeonRequirements) error
- func (k Keeper) SetSnapshotOnChain(ctx context.Context, snapshotID uint64, chainReferenceID string) error
- func (k Keeper) SetValidatorBalance(ctx context.Context, valAddr sdk.ValAddress, chainType string, ...) error
- func (k Keeper) TriggerSnapshotBuild(ctx context.Context) (*types.Snapshot, error)
- func (k Keeper) UpdateGracePeriod(ctx context.Context) error
- func (k Keeper) ValidatorInfo(goCtx context.Context, req *types.QueryValidatorInfoRequest) (*types.QueryValidatorInfoResponse, error)
- func (k Keeper) ValidatorKeepAliveData(ctx context.Context, valAddr sdk.ValAddress) (types.KeepAliveData, error)
- func (k Keeper) ValidatorSupportsAllChains(ctx context.Context, validatorAddress sdk.ValAddress) bool
Constants ¶
const ( ErrValidatorWithAddrNotFound = whoops.Errorf("validator does not exist") ErrValidatorNotInKeepAlive = whoops.Errorf("validator is not in keep alive store %s") ErrMaxNumberOfExternalAccounts = whoops.Errorf("trying to submit %d accounts while the limit is %d") ErrValidatorCannotBePigeon = whoops.Errorf("validator %s cannot be a pigeon") ErrSigningKeyNotFound = whoops.Errorf("signing key for valAddr %s, chainType %s and chainReferenceID %s not found") ErrExternalChainAlreadyRegistered = whoops.Errorf("external account already registered: %s, %s, %s. Existing owner: %s, New owner: %s") ErrExternalAddressNotFound = whoops.Errorf("external address (%s, %s, %s) for validator %s was not founds") ErrCannotJailValidator = whoops.Errorf("cannot jail validator: %s") ErrValidatorAlreadyJailed = whoops.Errorf("validator already jailed: %s") ErrValidatorPigeonOutOfDate = whoops.Errorf("validator %s pigeon is out of date. Version %s less than required %s") )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct { EvmKeeper types.EvmKeeper SnapshotListeners []types.OnSnapshotBuiltListener AddressCodec address.Codec // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey cosmosstore.KVStoreService, ps paramtypes.Subspace, staking types.StakingKeeper, slashing types.SlashingKeeper, powerReduction sdkmath.Int, addressCodec address.Codec, ) *Keeper
func (Keeper) AddExternalChainInfo ¶
func (k Keeper) AddExternalChainInfo(ctx context.Context, valAddr sdk.ValAddress, newChainInfo []*types.ExternalChainInfo) error
addExternalChainInfo adds external chain info, such as this conductor's address on outside chains so that we can attribute rewards for running the jobs.
func (Keeper) CanAcceptKeepAlive ¶
func (Keeper) CanAcceptValidator ¶
func (Keeper) FindSnapshotByID ¶
func (Keeper) GetAlivePigeons ¶
func (k Keeper) GetAlivePigeons(goCtx context.Context, req *types.QueryGetAlivePigeonsRequest) (*types.QueryGetAlivePigeonsResponse, error)
func (Keeper) GetAllChainInfos ¶
func (Keeper) GetCurrentSnapshot ¶
GetCurrentSnapshot returns the currently active snapshot.
func (Keeper) GetLatestPublishedSnapshot ¶
func (k Keeper) GetLatestPublishedSnapshot(goCtx context.Context, req *types.QueryGetLatestPublishedSnapshotRequest) (*types.QueryGetLatestPublishedSnapshotResponse, error)
func (Keeper) GetLatestSnapshotOnChain ¶
func (Keeper) GetPigeonRequirements ¶
func (k Keeper) GetPigeonRequirements(goCtx context.Context, req *types.QueryGetPigeonRequirementsRequest) (*types.QueryGetPigeonRequirementsResponse, error)
func (Keeper) GetSigningKey ¶
func (k Keeper) GetSigningKey(ctx context.Context, valAddr sdk.ValAddress, chainType, chainReferenceID, signedByAddress string) ([]byte, error)
GetSigningKey returns a signing key used by the conductor to sign arbitrary messages.
func (Keeper) GetSnapshotByID ¶
func (k Keeper) GetSnapshotByID(goCtx context.Context, req *types.QueryGetSnapshotByIDRequest) (*types.QueryGetSnapshotByIDResponse, error)
func (Keeper) GetUnjailedValidators ¶
func (k Keeper) GetUnjailedValidators(ctx context.Context) []stakingtypes.ValidatorI
func (Keeper) GetValidatorAliveUntil ¶
func (k Keeper) GetValidatorAliveUntil(goCtx context.Context, req *types.QueryGetValidatorAliveUntilRequest) (*types.QueryGetValidatorAliveUntilResponse, error)
func (Keeper) GetValidatorChainInfos ¶
func (k Keeper) GetValidatorChainInfos(ctx context.Context, valAddr sdk.ValAddress) ([]*types.ExternalChainInfo, error)
func (Keeper) GetValidatorJailReason ¶
func (k Keeper) GetValidatorJailReason(goCtx context.Context, req *types.QueryGetValidatorJailReasonRequest) (*types.QueryGetValidatorJailReasonResponse, error)
func (Keeper) IsValidatorAlive ¶
func (Keeper) JailInactiveValidators ¶
func (Keeper) KeepValidatorAlive ¶
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) PigeonRequirements ¶
Get the current requirements for pigeon
func (Keeper) SaveModifiedSnapshot ¶
SaveModifiedSnapshot is needed for integration tests
func (Keeper) ScheduledPigeonRequirements ¶
func (k Keeper) ScheduledPigeonRequirements(ctx context.Context) (*types.ScheduledPigeonRequirements, error)
Get the scheduled requirements for pigeon. These will be applied at a higher block height.
func (Keeper) SetExternalChainInfoState ¶
func (k Keeper) SetExternalChainInfoState(ctx context.Context, valAddr sdk.ValAddress, chainInfos []*types.ExternalChainInfo) error
func (Keeper) SetPigeonRequirements ¶
Set the current requirements for pigeon. This will also clear any scheduled requirements.
func (Keeper) SetScheduledPigeonRequirements ¶
func (k Keeper) SetScheduledPigeonRequirements(ctx context.Context, req *types.ScheduledPigeonRequirements) error
Schedule new requirements for pigeon, on a specific block height
func (Keeper) SetSnapshotOnChain ¶
func (Keeper) SetValidatorBalance ¶
func (Keeper) TriggerSnapshotBuild ¶
TriggerSnapshotBuild creates the snapshot of currently active validators that are active and registered as conductors.
func (Keeper) UpdateGracePeriod ¶
UpdateGracePeriod will compare the list of active validators against the snapshot taken during the last block. Any new members will receive a grace period of n blocks. Active validators are stored as one flattened entry to relief pressure on reads every block. Call this during the EndBlock logic.
func (Keeper) ValidatorInfo ¶
func (k Keeper) ValidatorInfo(goCtx context.Context, req *types.QueryValidatorInfoRequest) (*types.QueryValidatorInfoResponse, error)
ValidatorInfo returns validator info. It's not related to a snapshot.
func (Keeper) ValidatorKeepAliveData ¶
func (k Keeper) ValidatorKeepAliveData( ctx context.Context, valAddr sdk.ValAddress, ) (types.KeepAliveData, error)
func (Keeper) ValidatorSupportsAllChains ¶
func (k Keeper) ValidatorSupportsAllChains(ctx context.Context, validatorAddress sdk.ValAddress) bool
ValidatorSupportsAllChains returns true if the validator supports all chains in the keeper
Source Files ¶
- errors.go
- grpc_query.go
- grpc_query_get_alive_pigeons.go
- grpc_query_get_latest_published_snapshot.go
- grpc_query_get_pigeon_requirements.go
- grpc_query_get_snapshot_by_id.go
- grpc_query_get_validator_alive_until.go
- grpc_query_get_validator_jail_reason.go
- grpc_query_params.go
- grpc_query_validator_info.go
- keep_alive.go
- keeper.go
- msg_server.go
- msg_server_add_external_chain_info_for_validator.go
- msg_server_keep_alive.go
- params.go