Documentation ¶
Index ¶
Constants ¶
View Source
const ( WalkLeft = false WalkRight = true )
Variables ¶
This section is empty.
Functions ¶
func GetCommitment ¶
func GetCommitment(cacher *EDSSubTreeRootCacher, dah da.DataAvailabilityHeader, start, blobShareLen, subtreeRootThreshold int) ([]byte, error)
GetCommitment gets the share commitment for a blob in the original data square.
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 blob inclusion. NOTE: Currently this 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 ¶
Constructor fulfills 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
Click to show internal directories.
Click to hide internal directories.