Documentation ¶
Overview ¶
Package v040 is copy-pasted from: https://github.com/mycodeku/transtionhelper/blob/v0.41.0/x/slashing/types/keys.go
Index ¶
- Constants
- Variables
- func AddrPubkeyRelationKey(address []byte) []byte
- func Migrate(oldGenState v039slashing.GenesisState) *v040slashing.GenesisState
- func ValidatorMissedBlockBitArrayKey(v sdk.ConsAddress, i int64) []byte
- func ValidatorMissedBlockBitArrayPrefixKey(v sdk.ConsAddress) []byte
- func ValidatorSigningInfoAddress(key []byte) (v sdk.ConsAddress)
- func ValidatorSigningInfoKey(v sdk.ConsAddress) []byte
Constants ¶
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 ¶
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 ¶
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.