Documentation
¶
Overview ¶
Package nodegeometry defines the backend-sized physical node geometry shared by semantic producers and storage-free verifiers.
Index ¶
- Constants
- type Geometry
- func (g Geometry) ListBranchingFactor() int
- func (g Geometry) ListIndexDigits(index uint64, height int) ([]int, error)
- func (g Geometry) ListSubtreeCapacity(height int) (uint64, error)
- func (g Geometry) MapDepth(byteLength int) int
- func (g Geometry) MapDigit(digest []byte, depth int) (uint64, bool)
- func (g Geometry) MapRadixBits() int
- func (g Geometry) NodeWidth() int
- func (g Geometry) RequiredListHeight(length uint64) int
Constants ¶
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 ¶
ForCapacity returns the semantic geometry locked to a registered commitment suite's maximum vector capacity.
func (Geometry) ListBranchingFactor ¶
ListBranchingFactor returns the number of data-bearing slots in a list node. Slot zero is reserved for authenticated metadata.
func (Geometry) ListIndexDigits ¶
ListIndexDigits decomposes an index into base-branching-factor digits for the target list height.
func (Geometry) ListSubtreeCapacity ¶
ListSubtreeCapacity returns how many values fit under a list node of height.
func (Geometry) MapDepth ¶
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 ¶
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 ¶
MapRadixBits returns the number of digest bits consumed by one map level.
func (Geometry) NodeWidth ¶
NodeWidth returns the number of physical commitment slots in every semantic map or list node.
func (Geometry) RequiredListHeight ¶
RequiredListHeight returns the minimal non-root height required for length values.