v040

package
v0.46.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: Apache-2.0 Imports: 7 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

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

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

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

func ValidatorMissedBlockBitArrayPrefixKey

func ValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte

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

func ValidatorSigningInfoAddress

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

ValidatorSigningInfoAddress - extract the address from a validator signing info key

func ValidatorSigningInfoKey

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