forkhash

package
v0.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2022 License: Unlicense Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Len = 32

Variables

View Source
var F, E, W, I, D, T log.LevelPrinter = log.GetLogPrinterSet(subsystem)

Functions

func Blake3

func Blake3(bytes []byte) []byte

Blake3 takes bytes and returns a Blake3 256 bit hash

func DivHash

func DivHash(blockBytes []byte, repetitions int) []byte

DivHash is a hash function that combines the use of very large integer multiplication and division in addition to Blake3 hashes to create extremely large integers that cannot be produced without performing these very time expensive iterative long division steps.

This hash function has an operation time proportional to the size of the input. As such, applications using this function must use a repetition parameter fit for the duration delay sought in the application.

This hash function will have a relatively flat difference in performance proportional to the integer long division unit in the processor. Because this unit is the most complex, and the operation is the most non-optimisable integer mathematics function this forms the basis of the fairest possible proof of work function that places miners on the flattest playing field possible and pits their use of this hardware against almost all computer systems applications in market competition, keeping the growth of hashrate constrained. Long division performance is almost linearly proportional to transistor count, which is almost linearly proportional to relative cost.

func DivHash4 added in v0.0.23

func DivHash4(input []byte) []byte

func Hash

func Hash(bytes []byte, name string, height int32) (out chainhash.Hash)

Hash computes the hash of bytes using the named hash

func ScryptHash

func ScryptHash(bytes []byte) []byte

ScryptHash takes bytes and returns a scrypt 256 bit hash

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL