inclusion

package
v0.10.0-fork-mamaki-tool Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WalkLeft  = false
	WalkRight = true
)

Variables

This section is empty.

Functions

func GetCommit

func GetCommit(cacher *EDSSubTreeRootCacher, dah da.DataAvailabilityHeader, start, msgShareLen int) ([]byte, error)

Types

type EDSSubTreeRootCacher

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

EDSSubTreeRootCacher caches the inner nodes for each row so that we can traverse it later to check for message inclusion. NOTE: Currently this has to use a leaky abstraction (see docs on counter field below), and is not threadsafe, but with a future refactor, we could simply read from rsmt2d and not use the tree constructor which would fix both of these issues.

func NewSubtreeCacher

func NewSubtreeCacher(squareSize uint64) *EDSSubTreeRootCacher

func (*EDSSubTreeRootCacher) Constructor

func (stc *EDSSubTreeRootCacher) Constructor(axis rsmt2d.Axis, index uint) rsmt2d.Tree

Constructor fullfills the rsmt2d.TreeCreatorFn by keeping a pointer to the cache and embedding it as a nmt.NodeVisitor into a new wrapped nmt.

type WalkInstruction

type WalkInstruction bool

WalkInstruction wraps the bool type to indicate the direction that should be used while traversing a binary tree

Jump to

Keyboard shortcuts

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