Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Hash ¶
Hash defines a function that returns the Keccak-256/SHA3 hash of the data passed in. https://github.com/ethereum/eth2.0-specs/blob/master/specs/core/0_beacon-chain.md#appendix
func HashBeaconBlock ¶
func HashBeaconBlock(bb *pb.BeaconBlock) ([32]byte, error)
HashBeaconBlock hashes the full block without the proposer signature. The proposer signature is ignored in order obtain the same block hash used as the "block_root" property in the proposer signature data.
func MerkleRoot ¶
MerkleRoot derives the merkle root from a 2d byte array with each element in the outer array signifying the data that is to be represented in the merkle tree. Spec:
def merkle_root(values): o = [0] * len(values) + values for i in range(len(values)-1, 0, -1): o[i] = hash(o[i*2] + o[i*2+1]) return o[1]
func RepeatHash ¶
RepeatHash applies the Keccak-256/SHA3 hash function repeatedly numTimes on a [32]byte array.
Types ¶
This section is empty.