poh

package
v0.0.0-...-7621e06 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package poh implements the "Proof-of-History" delay function.

Similarly to how Bitcoin Proof-of-Work proves computing power, Solana Proof-of-History exploits single-thread latency to prove that time has passed.

At its core, PoH is a SHA256 hash chain that grows as fast as possible.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State [32]byte

State is the internal state of the PoH delay function.

func (*State) Hash

func (s *State) Hash(n uint)

Hash executes a number of PoH iterations.

func (*State) Record

func (s *State) Record(mixin *[32]byte)

Record "mixes in" a 32-byte value using a new PoH iteration.

func (*State) String

func (s *State) String() string

Jump to

Keyboard shortcuts

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