proof

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: ISC Imports: 29 Imported by: 1

Documentation

Overview

Package proof - prepare blocks for prooferd

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailMinedBlocks added in v0.13.0

func FailMinedBlocks() counter.Counter

func Finalise

func Finalise() error

Finalise - stop all background tasks

func Initialise

func Initialise(configuration *Configuration) error

Initialise - start proofer background processes

func MinedBlocks added in v0.13.0

func MinedBlocks() counter.Counter

Types

type Configuration

type Configuration struct {
	Publish            []string          `gluamapper:"publish" json:"publish"`
	Submit             []string          `gluamapper:"submit" json:"submit"`
	PrivateKey         string            `gluamapper:"private_key" json:"private_key"`
	PublicKey          string            `gluamapper:"public_key" json:"public_key"`
	SigningKey         string            `gluamapper:"signing_key" json:"signing_key"`
	PaymentAddr        map[string]string `gluamapper:"payment_address" json:"payment_address"`
	InternalHashEnable bool              `gluamapper:"local_use_internal_hash" json:"local_use_internal_hash"`
}

Configuration - server identification in Z85 (ZeroMQ Base-85 Encoding) see: http://rfc.zeromq.org/spec:32 a block of configuration data this is read from the configuration file

type InternalHasher added in v0.13.0

type InternalHasher interface {
	Initialise() error
	Start()
}

InternalHasher - this dummy hasher is for test usage

func NewInternalHasherForTest added in v0.13.0

func NewInternalHasherForTest(request, reply string) (InternalHasher, error)

type PublishedItem

type PublishedItem struct {
	Job    string             `json:"job"`
	Header blockrecord.Header `json:"header"`
	TxZero []byte             `json:"txZero"`
	TxIds  []merkle.Digest    `json:"txIds"`
}

PublishedItem - to send to proofer

type SubmittedItem

type SubmittedItem struct {
	Request string `json:"request"`
	Job     string `json:"job"`
	Packed  []byte `json:"packed"`
}

SubmittedItem - received from the proofer

Jump to

Keyboard shortcuts

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