bmtpool

package
v2.9.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Overview

Package bmtpool provides easy access to binary merkle tree hashers managed in as a resource pool.

Index

Constants

View Source
const Capacity = 32

Variables

This section is empty.

Functions

func Get

func Get() bmt.Hasher

Get a bmt Hasher instance. Instances are reset before being returned to the caller.

func GetProver

func GetProver() *bmt.Prover

GetProver returns a goroutine-backed Prover from the global prover pool.

func Put

func Put(h bmt.Hasher)

Put a bmt Hasher back into the pool.

func PutProver

func PutProver(p *bmt.Prover)

PutProver returns a Prover to the global prover pool for reuse.

func Rebuild

func Rebuild()

Rebuild discards the current pool and constructs a new one reading the latest bmt.SIMDOptIn() value. Must be called exactly once during startup after CLI flag parsing and before the first external Get, so that --use-simd-hashing takes effect and no in-flight hashers are referencing the old pool's tree. The Prover pool is intentionally not rebuilt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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