Documentation
¶
Index ¶
- Constants
- func CollectStdTxs(cdc *codec.Codec, moniker string, genTxsDir string, genDoc tmtypes.GenesisDoc) (appGenTxs []auth.StdTx, persistentPeers string, err error)
- func IrisAppGenStateJSON(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []json.RawMessage) (appState json.RawMessage, err error)
- func IrisValidateGenesisState(genesisState GenesisState) (err error)
- func MakeCodec() *codec.Codec
- type GenesisAccount
- type GenesisFileAccount
- type GenesisFileState
- type GenesisState
- type Hooks
- func (h Hooks) OnDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) OnDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) OnDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
- func (h Hooks) OnValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) OnValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) OnValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) OnValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)
- func (h Hooks) OnValidatorPowerDidChange(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- func (h Hooks) OnValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
- type Metrics
- type ProtocolV2
- func (p *ProtocolV2) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (p *ProtocolV2) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (p *ProtocolV2) ExportAppStateAndValidators(ctx sdk.Context, forZeroHeight bool) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
- func (p *ProtocolV2) GetAnteHandlers() []sdk.AnteHandler
- func (p *ProtocolV2) GetBeginBlocker() sdk.BeginBlocker
- func (p *ProtocolV2) GetCodec() *codec.Codec
- func (p *ProtocolV2) GetEndBlocker() sdk.EndBlocker
- func (p *ProtocolV2) GetFeePreprocessHandler() sdk.FeePreprocessHandler
- func (p *ProtocolV2) GetFeeRefundHandler() sdk.FeeRefundHandler
- func (p *ProtocolV2) GetInitChainer() sdk.InitChainer1
- func (p *ProtocolV2) GetKVStoreKeyList() []*sdk.KVStoreKey
- func (p *ProtocolV2) GetQueryRouter() protocol.QueryRouter
- func (p *ProtocolV2) GetRouter() protocol.Router
- func (p *ProtocolV2) GetVersion() uint64
- func (p *ProtocolV2) Init(ctx sdk.Context)
- func (p *ProtocolV2) InitChainer(ctx sdk.Context, DeliverTx sdk.DeliverTx, req abci.RequestInitChain) abci.ResponseInitChain
- func (p *ProtocolV2) InitMetrics(store sdk.MultiStore)
- func (p *ProtocolV2) Load()
- func (p *ProtocolV2) ValidateTx(ctx sdk.Context, txBytes []byte, msgs []sdk.Msg) sdk.Error
Constants ¶
const MetricsSubsystem = "v2"
Variables ¶
This section is empty.
Functions ¶
func CollectStdTxs ¶
func CollectStdTxs(cdc *codec.Codec, moniker string, genTxsDir string, genDoc tmtypes.GenesisDoc) ( appGenTxs []auth.StdTx, persistentPeers string, err error)
CollectStdTxs processes and validates application's genesis StdTxs and returns the list of appGenTxs, and persistent peers required to generate genesis.json.
func IrisAppGenStateJSON ¶
func IrisAppGenStateJSON(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []json.RawMessage) ( appState json.RawMessage, err error)
IrisAppGenStateJSON but with JSON
func IrisValidateGenesisState ¶
func IrisValidateGenesisState(genesisState GenesisState) (err error)
IrisValidateGenesisState ensures that the genesis state obeys the expected invariants TODO: No validators are both bonded and jailed (#2088) TODO: Error if there is a duplicate validator (#1708) TODO: Ensure all state machine parameters are in genesis (#1704)
Types ¶
type GenesisAccount ¶
type GenesisAccount struct { Address sdk.AccAddress `json:"address"` Coins sdk.Coins `json:"coins"` Sequence uint64 `json:"sequence_number"` AccountNumber uint64 `json:"account_number"` }
GenesisAccount doesn't need pubkey or sequence
func NewGenesisAccount ¶
func NewGenesisAccount(acc *auth.BaseAccount) GenesisAccount
NewGenesisAccount genesis account constructor
func NewGenesisAccountI ¶
func NewGenesisAccountI(acc auth.Account) GenesisAccount
NewGenesisAccountI genesis account constructor
func (*GenesisAccount) ToAccount ¶
func (ga *GenesisAccount) ToAccount() (acc *auth.BaseAccount)
ToAccount convert GenesisAccount to auth.BaseAccount
type GenesisFileAccount ¶
type GenesisFileAccount struct { Address sdk.AccAddress `json:"address"` Coins []string `json:"coins"` Sequence uint64 `json:"sequence_number"` AccountNumber uint64 `json:"account_number"` }
func NewDefaultGenesisFileAccount ¶
func NewDefaultGenesisFileAccount(addr sdk.AccAddress) GenesisFileAccount
func NewGenesisFileAccount ¶
func NewGenesisFileAccount(acc *auth.BaseAccount) GenesisFileAccount
type GenesisFileState ¶
type GenesisFileState struct { Accounts []GenesisFileAccount `json:"accounts"` AuthData auth.GenesisState `json:"auth"` StakeData stake.GenesisState `json:"stake"` MintData mint.GenesisState `json:"mint"` DistrData distr.GenesisState `json:"distr"` GovData gov.GenesisState `json:"gov"` UpgradeData upgrade.GenesisState `json:"upgrade"` SlashingData slashing.GenesisState `json:"slashing"` ServiceData service.GenesisState `json:"service"` GuardianData guardian.GenesisState `json:"guardian"` AssetData asset.GenesisState `json:"asset"` RandData rand.GenesisState `json:"rand"` SwapData coinswap.GenesisState `json:"swap"` HtlcData htlc.GenesisState `json:"htlc"` GenTxs []json.RawMessage `json:"gentxs"` }
GenesisFileState genesis file state
func IrisAppGenState ¶
func IrisAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []json.RawMessage) ( genesisState GenesisFileState, err error)
IrisAppGenState create the core parameters for genesis initialization for iris; note that the pubkey input is this machines pubkey
func NewDefaultGenesisFileState ¶
func NewDefaultGenesisFileState() GenesisFileState
NewDefaultGenesisState generates the default state for iris.
func NewGenesisFileState ¶
func NewGenesisFileState(accounts []GenesisFileAccount, authData auth.GenesisState, stakeData stake.GenesisState, mintData mint.GenesisState, distrData distr.GenesisState, govData gov.GenesisState, upgradeData upgrade.GenesisState, serviceData service.GenesisState, guardianData guardian.GenesisState, slashingData slashing.GenesisState, assetData asset.GenesisState, randData rand.GenesisState, swapData coinswap.GenesisState, htlcData htlc.GenesisState) GenesisFileState
type GenesisState ¶
type GenesisState struct { Accounts []GenesisAccount `json:"accounts"` AuthData auth.GenesisState `json:"auth"` StakeData stake.GenesisState `json:"stake"` MintData mint.GenesisState `json:"mint"` DistrData distr.GenesisState `json:"distr"` GovData gov.GenesisState `json:"gov"` UpgradeData upgrade.GenesisState `json:"upgrade"` SlashingData slashing.GenesisState `json:"slashing"` ServiceData service.GenesisState `json:"service"` GuardianData guardian.GenesisState `json:"guardian"` AssetData asset.GenesisState `json:"asset"` RandData rand.GenesisState `json:"rand"` SwapData coinswap.GenesisState `json:"swap"` HtlcData htlc.GenesisState `json:"htlc"` GenTxs []json.RawMessage `json:"gentxs"` }
GenesisState state to unmarshal
func NewGenesisState ¶
func NewGenesisState(accounts []GenesisAccount, authData auth.GenesisState, stakeData stake.GenesisState, mintData mint.GenesisState, distrData distr.GenesisState, govData gov.GenesisState, upgradeData upgrade.GenesisState, serviceData service.GenesisState, guardianData guardian.GenesisState, slashingData slashing.GenesisState, assetData asset.GenesisState, randData rand.GenesisState, swapData coinswap.GenesisState, htlcData htlc.GenesisState) GenesisState
NewGenesisState genesis state constructor
type Hooks ¶
type Hooks struct {
// contains filtered or unexported fields
}
Combined Staking Hooks
func (Hooks) OnDelegationCreated ¶
func (h Hooks) OnDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) OnDelegationRemoved ¶
func (h Hooks) OnDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) OnDelegationSharesModified ¶
func (h Hooks) OnDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress)
func (Hooks) OnValidatorBeginUnbonding ¶
func (h Hooks) OnValidatorBeginUnbonding(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) OnValidatorBonded ¶
func (h Hooks) OnValidatorBonded(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) OnValidatorCreated ¶
func (h Hooks) OnValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress)
func (Hooks) OnValidatorModified ¶
func (h Hooks) OnValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress)
func (Hooks) OnValidatorPowerDidChange ¶
func (h Hooks) OnValidatorPowerDidChange(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
func (Hooks) OnValidatorRemoved ¶
func (h Hooks) OnValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress)
type Metrics ¶
func NopMetrics ¶
func NopMetrics() *Metrics
func PrometheusMetrics ¶
func PrometheusMetrics(config *cfg.InstrumentationConfig) *Metrics
PrometheusMetrics returns Metrics build using Prometheus client library.
type ProtocolV2 ¶
ProtocolV2 define the protocol
func NewProtocolV2 ¶
func NewProtocolV2(version uint64, log log.Logger, pk sdk.ProtocolKeeper, checkInvariant bool, trackCoinFlow bool, config *cfg.InstrumentationConfig) *ProtocolV2
NewProtocolV2 protocol v2 constructor
func (*ProtocolV2) BeginBlocker ¶
func (p *ProtocolV2) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*ProtocolV2) EndBlocker ¶
func (p *ProtocolV2) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*ProtocolV2) ExportAppStateAndValidators ¶
func (p *ProtocolV2) ExportAppStateAndValidators(ctx sdk.Context, forZeroHeight bool) ( appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)
export the state of iris for a genesis file
func (*ProtocolV2) GetAnteHandlers ¶
func (p *ProtocolV2) GetAnteHandlers() []sdk.AnteHandler
func (*ProtocolV2) GetBeginBlocker ¶
func (p *ProtocolV2) GetBeginBlocker() sdk.BeginBlocker
func (*ProtocolV2) GetEndBlocker ¶
func (p *ProtocolV2) GetEndBlocker() sdk.EndBlocker
func (*ProtocolV2) GetFeePreprocessHandler ¶
func (p *ProtocolV2) GetFeePreprocessHandler() sdk.FeePreprocessHandler
func (*ProtocolV2) GetFeeRefundHandler ¶
func (p *ProtocolV2) GetFeeRefundHandler() sdk.FeeRefundHandler
func (*ProtocolV2) GetInitChainer ¶
func (p *ProtocolV2) GetInitChainer() sdk.InitChainer1
func (*ProtocolV2) GetKVStoreKeyList ¶
func (p *ProtocolV2) GetKVStoreKeyList() []*sdk.KVStoreKey
GetKVStoreKeyList get KVStore Key List
func (*ProtocolV2) GetQueryRouter ¶
func (p *ProtocolV2) GetQueryRouter() protocol.QueryRouter
func (*ProtocolV2) GetRouter ¶
func (p *ProtocolV2) GetRouter() protocol.Router
func (*ProtocolV2) GetVersion ¶
func (p *ProtocolV2) GetVersion() uint64
GetVersion get protocol version
func (*ProtocolV2) Init ¶
func (p *ProtocolV2) Init(ctx sdk.Context)
Init initializes the configuration of this Protocol
func (*ProtocolV2) InitChainer ¶
func (p *ProtocolV2) InitChainer(ctx sdk.Context, DeliverTx sdk.DeliverTx, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer Custom logic for iris initialization Only v0 needs InitChainer
func (*ProtocolV2) InitMetrics ¶
func (p *ProtocolV2) InitMetrics(store sdk.MultiStore)
InitMetrics init prometheus metrics
func (*ProtocolV2) ValidateTx ¶
ValidateTx validate txs
Directories
¶
Path | Synopsis |
---|---|
internal/types
Package types nolint nolint
|
Package types nolint nolint |
internal/types
nolint nolint
|
nolint nolint |