v040

package
v0.43.0-beta1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v040 is copy-pasted from: https://github.com/cosmos/cosmos-sdk/blob/v0.41.0/x/slashing/types/keys.go

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "slashing"

	// StoreKey is the store key string for slashing
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute is the querier route for slashing
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ValidatorSigningInfoKeyPrefix         = []byte{0x01} // Prefix for signing info
	ValidatorMissedBlockBitArrayKeyPrefix = []byte{0x02} // Prefix for missed block bit array
	AddrPubkeyRelationKeyPrefix           = []byte{0x03} // Prefix for address-pubkey relation
)

Keys for slashing store Items are stored with the following key: values

- 0x01<consAddress_Bytes>: ValidatorSigningInfo

- 0x02<consAddress_Bytes><period_Bytes>: bool

- 0x03<accAddr_Bytes>: crypto.PubKey

Functions

func AddrPubkeyRelationKey added in v0.43.0

func AddrPubkeyRelationKey(address []byte) []byte

AddrPubkeyRelationKey gets pubkey relation key used to get the pubkey from the address

func Migrate

func Migrate(oldGenState v039slashing.GenesisState) *v040slashing.GenesisState

Migrate accepts exported x/slashing genesis state from v0.39 and migrates it to v0.40 x/slashing genesis state. The migration includes:

- Chaning SigningInfos and MissedBlocks from map to array. - Convert addresses from bytes to bech32 strings. - Re-encode in v0.40 GenesisState.

func ValidatorMissedBlockBitArrayKey added in v0.43.0

func ValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte

ValidatorMissedBlockBitArrayKey - stored by *Consensus* address (not operator address)

func ValidatorMissedBlockBitArrayPrefixKey added in v0.43.0

func ValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte

ValidatorMissedBlockBitArrayPrefixKey - stored by *Consensus* address (not operator address)

func ValidatorSigningInfoAddress added in v0.43.0

func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress)

ValidatorSigningInfoAddress - extract the address from a validator signing info key

func ValidatorSigningInfoKey added in v0.43.0

func ValidatorSigningInfoKey(v sdk.ConsAddress) []byte

ValidatorSigningInfoKey - stored by *Consensus* address (not operator address)

Types

This section is empty.

Jump to

Keyboard shortcuts

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