Documentation ¶
Index ¶
- Constants
- Variables
- func BlockBodyKey(number uint64, hash libcommon.Hash) []byte
- func BloomBitsKey(bit uint, section uint64, hash libcommon.Hash) []byte
- func CompositeKeySuffix(key []byte, timestamp uint64) (composite, encodedTS []byte)
- func CompositeKeyWithoutIncarnation(key []byte) []byte
- func DecodeBlockNumber(number []byte) (uint64, error)
- func EncodeBlockNumber(number uint64) []byte
- func GenerateCompositeStorageKey(addressHash libcommon.Hash, incarnation uint64, seckey libcommon.Hash) []byte
- func GenerateCompositeStoragePrefix(addressHash []byte, incarnation uint64, storageHashPrefix []byte) []byte
- func GenerateCompositeTrieKey(addressHash libcommon.Hash, seckey libcommon.Hash) []byte
- func GenerateStoragePrefix(addressHash []byte, incarnation uint64) []byte
- func HeaderKey(number uint64, hash libcommon.Hash) []byte
- func LogKey(blockNumber uint64, txId uint32) []byte
- func NextNibblesSubtree(in []byte, out *[]byte) bool
- func ParseCompositeStorageKey(compositeKey []byte) (libcommon.Hash, uint64, libcommon.Hash)
- func ParseStoragePrefix(prefix []byte) (libcommon.Hash, uint64)
- func PlainGenerateCompositeStorageKey(address []byte, incarnation uint64, key []byte) []byte
- func PlainGenerateStoragePrefix(address []byte, incarnation uint64) []byte
- func PlainParseCompositeStorageKey(compositeKey []byte) (libcommon.Address, uint64, libcommon.Hash)
- func PlainParseStoragePrefix(prefix []byte) (libcommon.Address, uint64)
- type Suffix
Constants ¶
View Source
const NumberLength = 8
Variables ¶
View Source
var ErrInvalidSize = errors.New("bit endian number has an invalid size")
Functions ¶
func BlockBodyKey ¶
BlockBodyKey = num (uint64 big endian) + hash
func BloomBitsKey ¶
bloomBitsKey = bloomBitsPrefix + bit (uint16 big endian) + section (uint64 big endian) + hash
func CompositeKeySuffix ¶
Key + blockNum
func DecodeBlockNumber ¶
func EncodeBlockNumber ¶
EncodeBlockNumber encodes a block number as big endian uint64
func GenerateCompositeStorageKey ¶
func GenerateCompositeStorageKey(addressHash libcommon.Hash, incarnation uint64, seckey libcommon.Hash) []byte
AddrHash + incarnation + KeyHash For contract storage
func GenerateCompositeStoragePrefix ¶
func GenerateCompositeStoragePrefix(addressHash []byte, incarnation uint64, storageHashPrefix []byte) []byte
AddrHash + incarnation + StorageHashPrefix
func GenerateCompositeTrieKey ¶
AddrHash + KeyHash Only for trie
func GenerateStoragePrefix ¶
address hash + incarnation prefix
func NextNibblesSubtree ¶
NextNibblesSubtree does []byte++. Returns false if overflow.
func PlainGenerateCompositeStorageKey ¶
AddrHash + incarnation + KeyHash For contract storage (for plain state)
func PlainGenerateStoragePrefix ¶
address hash + incarnation prefix (for plain state)
Types ¶
Click to show internal directories.
Click to hide internal directories.