sortition

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: AGPL-3.0 Imports: 5 Imported by: 1

README

sortition

This package provides an implementation of cryptographic sortition used by go-algorand, previously located in github.com/algorand/go-algorand/data/committee/sortition.

Please visit the go-algorand README for more information on building and using this software.

License

Please see the COPYING_FAQ for details about how to apply our license.

Copyright (C) 2019-2023, Algorand Inc.

Documentation

Index

Constants

View Source
const DigestSize = sha512.Size256

DigestSize is the number of bytes in the preferred hash Digest used here.

Variables

This section is empty.

Functions

func Select

func Select(money uint64, totalMoney uint64, expectedSize float64, vrfOutput Digest) uint64

Select runs the sortition function and returns the number of time the key was selected

Types

type Digest

type Digest [DigestSize]byte

Digest represents a 32-byte value holding the 256-bit Hash digest.

Jump to

Keyboard shortcuts

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