aggregator

package
v0.0.0-...-967d326 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aggregator

type Aggregator interface {
	MakeExample() []byte
	AggregateTrees(left, right []byte) []byte
	Verify(buff []byte) bool
}

Aggregator is a generic interface for aggregation services

type Boojum

type Boojum struct {
	// contains filtered or unexported fields
}

Boojum is struct wrapper for boojum aggregator

func NewBoojum

func NewBoojum() *Boojum

NewBoojum is a boojum constructor

func (*Boojum) AggregateTrees

func (boo *Boojum) AggregateTrees(left, right []byte) []byte

AggregateTrees returns the aggregated tree

func (*Boojum) MakeExample

func (boo *Boojum) MakeExample() []byte

MakeExample returns an example proof

func (*Boojum) RunGenerators

func (boo *Boojum) RunGenerators() *Boojum

RunGenerators fetches the proving and verifications keys

func (*Boojum) Verify

func (boo *Boojum) Verify(buff []byte) bool

Verify returns a boolean indicating that a tree is valid

func (*Boojum) WithDir

func (boo *Boojum) WithDir(dir string) *Boojum

WithDir attaches a directory to a boojum

type MockAggregator

type MockAggregator struct{}

MockAggregator ..

func (*MockAggregator) AggregateTrees

func (mock *MockAggregator) AggregateTrees(left, right []byte) []byte

AggregateTrees ..

func (*MockAggregator) MakeExample

func (mock *MockAggregator) MakeExample() []byte

MakeExample ..

func (*MockAggregator) Verify

func (mock *MockAggregator) Verify(buff []byte) bool

Verify ..

type Tree

type Tree struct {
	// contains filtered or unexported fields
}

Tree is a container for an aggregated snark

func (*Tree) Rm

func (tree *Tree) Rm()

Rm unallocate the memory associated with the Tree object

func (*Tree) SetDataFromBytes

func (tree *Tree) SetDataFromBytes(data []byte) *Tree

SetDataFromBytes sets the data from a slice

func (*Tree) ToByte

func (tree *Tree) ToByte() []byte

ToByte return a go slice of the datas

func (*Tree) Verify

func (tree *Tree) Verify() bool

Verify returns true if the tree is valid

Jump to

Keyboard shortcuts

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