nodegeometry

package
v0.0.7-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package nodegeometry defines the backend-sized physical node geometry shared by semantic producers and storage-free verifiers.

Index

Constants

View Source
const (
	// IPANodeWidth is the physical node width of the current IPA suite.
	IPANodeWidth = 256
	// KZGNodeWidth is the physical node width of the current KZG suite.
	KZGNodeWidth = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Geometry

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

Geometry describes the physical node width and map radix associated with one commitment backend suite.

func ForBackend

func ForBackend(kind maltcid.BackendKind) (Geometry, error)

ForBackend returns the semantic geometry locked to a typed-root commitment backend suite.

func ForCapacity

func ForCapacity(capacity int) (Geometry, error)

ForCapacity returns the semantic geometry locked to a registered commitment suite's maximum vector capacity.

func (Geometry) ListBranchingFactor

func (g Geometry) ListBranchingFactor() int

ListBranchingFactor returns the number of data-bearing slots in a list node. Slot zero is reserved for authenticated metadata.

func (Geometry) ListIndexDigits

func (g Geometry) ListIndexDigits(index uint64, height int) ([]int, error)

ListIndexDigits decomposes an index into base-branching-factor digits for the target list height.

func (Geometry) ListSubtreeCapacity

func (g Geometry) ListSubtreeCapacity(height int) (uint64, error)

ListSubtreeCapacity returns how many values fit under a list node of height.

func (Geometry) MapDepth

func (g Geometry) MapDepth(byteLength int) int

MapDepth returns the number of radix digits needed to consume byteLength bytes. The final digit is right-padded with zero bits when necessary.

func (Geometry) MapDigit

func (g Geometry) MapDigit(digest []byte, depth int) (uint64, bool)

MapDigit reads one radix digit from a big-endian bit stream. If the final digit is partial, its remaining low bits are zero-filled.

func (Geometry) MapRadixBits

func (g Geometry) MapRadixBits() int

MapRadixBits returns the number of digest bits consumed by one map level.

func (Geometry) NodeWidth

func (g Geometry) NodeWidth() int

NodeWidth returns the number of physical commitment slots in every semantic map or list node.

func (Geometry) RequiredListHeight

func (g Geometry) RequiredListHeight(length uint64) int

RequiredListHeight returns the minimal non-root height required for length values.

Jump to

Keyboard shortcuts

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