oa::FnHash::merkleRoot

Merkle root by GPU SHAKE-256 pair reduction. input [N, 32] leaf hashes, N a power of two; output [1, 32] root. Bit-identical to oa::merkleRoot for power-of-two leaf counts. Use oa::merkleRoot (CPU) for arbitrary counts, and oa::verifyMerkleProof (CPU) for inclusion proofs.

Function Documentation

Matrix oa::FnHash::merkleRoot( const Matrix & inA )
Merkle root by GPU SHAKE-256 pair reduction. input [N, 32] leaf hashes, N a power of two; output [1, 32] root. Bit-identical to oa::merkleRoot for power-of-two leaf counts. Use oa::merkleRoot (CPU) for arbitrary counts, and oa::verifyMerkleProof (CPU) for inclusion proofs.

Parameters

inA
const Matrix &

Returns

Matrix

The declared return value.