Documentation ¶
Index ¶
- Constants
- Variables
- func BitsOnCount(b []byte) int
- func Bytes4ToUint32(bytes4 [4]byte) uint32
- func BytesToBytes4(b []byte) (ret [4]byte)
- func CompressSnappy(data []byte) []byte
- func DecodeSSZSnappy(dst ssz.Unmarshaler, src []byte, version int) error
- func DecompressSnappy(data []byte) ([]byte, error)
- func EncodeSSZSnappy(data ssz.Marshaler) ([]byte, error)
- func ExtractSlotFromSerializedBeaconState(beaconState []byte) (uint64, error)
- func FlipBitOn(b []byte, i int)
- func GetBitlistLength(b []byte) int
- func IntegerSquareRoot(n uint64) uint64
- func IntersectionOfSortedSets(v1, v2 []uint64) []uint64
- func IsBitOn(b []byte, idx int) bool
- func IsNonStrictSupersetBitlist(a, b []byte) bool
- func IsOverlappingBitlist(a, b []byte) bool
- func IsPowerOf2(n uint64) bool
- func IsValidMerkleBranch(leaf libcommon.Hash, branch []libcommon.Hash, depth uint64, index uint64, ...) bool
- func KzgCommitmentToVersionedHash(kzgCommitment libcommon.Bytes48) (libcommon.Hash, error)
- func MergeBitlists(a, b []byte)
- func PowerOf2(n uint64) uint64
- func PreparateRootsForHashing(roots []libcommon.Hash) [][32]byte
- func ReverseOfByteSlice(b []byte) (out []byte)
- func Sha256(data []byte, extras ...[]byte) [32]byte
- func Uint32ToBytes4(n uint32) (ret [4]byte)
- func Uint64ToLE(i uint64) []byte
- type HashFunc
Constants ¶
View Source
const VERSIONED_HASH_VERSION_KZG byte = byte(1)
Variables ¶
View Source
var IsSysLittleEndian bool
Functions ¶
func BitsOnCount ¶
func Bytes4ToUint32 ¶
func BytesToBytes4 ¶
func CompressSnappy ¶
func DecodeSSZSnappy ¶
func DecodeSSZSnappy(dst ssz.Unmarshaler, src []byte, version int) error
func DecompressSnappy ¶
func GetBitlistLength ¶
getBitlistLength return the amount of bits in given bitlist.
func IntegerSquareRoot ¶
func IsNonStrictSupersetBitlist ¶
IsNonStrictSupersetBitlist checks if bitlist 'a' is a non-strict superset of bitlist 'b'
func IsOverlappingBitlist ¶
func IsPowerOf2 ¶
func IsValidMerkleBranch ¶
func IsValidMerkleBranch(leaf libcommon.Hash, branch []libcommon.Hash, depth uint64, index uint64, root [32]byte) bool
Check if leaf at index verifies against the Merkle root and branch
func MergeBitlists ¶
func MergeBitlists(a, b []byte)
func ReverseOfByteSlice ¶
func Uint32ToBytes4 ¶
func Uint64ToLE ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.