downtime

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

x/downtime

Abstract

This document specifies the downtime module of Lava Protocol.

The downtime module is responsible handling provider rewards in case of a chain halt. Lava protocol lets consumers send relays and providers to accept them even if blocks are not advancing because of consensus failure. When the blockchain is back to normal the providers should be able to receive rewards on the relays they served. The downtime is also used to determine the validators' block rewards.

Contents

Parameters

The downtime module contains the following parameters:

Key Type Default Value
DowntimeDuration time.Duration 5min
EpochDuration time.Duration 30min
DowntimeDuration

DowntimeDuration defines the minimum time elapsed between blocks that we consider the chain to be down.

EpochDuration

EpochDuration defines an estimation of the time elapsed between epochs.

Queries

The downtime module supports the following queries:

Query Arguments What it does
downtime block (uint64) shows downtime at the given epoch (the epoch of the block)
params none shows the module's parameters

Transactions

The downtime module does not support any transactions.

Proposals

The downtime module does not support any proposals.

Documentation

Index

Constants

View Source
const (
	ConsensusVersion = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

func NewAppModule

func NewAppModule(k keeper.Keeper) AppModule

func (AppModule) BeginBlock

func (a AppModule) BeginBlock(context sdk.Context, _ abci.RequestBeginBlock)

func (AppModule) ConsensusVersion

func (a AppModule) ConsensusVersion() uint64

func (AppModule) ExportGenesis

func (a AppModule) ExportGenesis(context sdk.Context, jsonCodec codec.JSONCodec) json.RawMessage

func (AppModule) InitGenesis

func (a AppModule) InitGenesis(context sdk.Context, jsonCodec codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate

func (AppModule) RegisterInvariants

func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry)

func (AppModule) RegisterServices

func (a AppModule) RegisterServices(configurator module.Configurator)

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic implements the module.AppModuleBasic interface for the downtime module.

func (AppModuleBasic) DefaultGenesis

func (a AppModuleBasic) DefaultGenesis(codec codec.JSONCodec) json.RawMessage

func (AppModuleBasic) GetQueryCmd

func (a AppModuleBasic) GetQueryCmd() *cobra.Command

func (AppModuleBasic) GetTxCmd

func (a AppModuleBasic) GetTxCmd() *cobra.Command

func (AppModuleBasic) Name

func (a AppModuleBasic) Name() string

func (AppModuleBasic) RegisterGRPCGatewayRoutes

func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux)

func (AppModuleBasic) RegisterInterfaces

func (a AppModuleBasic) RegisterInterfaces(ir cdctypes.InterfaceRegistry)

func (AppModuleBasic) RegisterLegacyAminoCodec

func (a AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func (AppModuleBasic) ValidateGenesis

func (a AppModuleBasic) ValidateGenesis(codec codec.JSONCodec, config client.TxEncodingConfig, message json.RawMessage) error

Directories

Path Synopsis
client
cli
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL