Documentation ¶
Index ¶
Constants ¶
View Source
const NodeSize = shared.NodeSize
Variables ¶
View Source
var RootHeightFromWidth = shared.RootHeightFromWidth
Functions ¶
This section is empty.
Types ¶
type CacheReader ¶
type CacheReader = shared.CacheReader
type CacheWriter ¶
type CacheWriter = shared.CacheWriter
type CachingPolicy ¶
type CachingPolicy = shared.CachingPolicy
func Combine ¶
func Combine(first, second CachingPolicy) CachingPolicy
func MinHeightPolicy ¶
func MinHeightPolicy(minHeight uint) CachingPolicy
func SpecificLayersPolicy ¶
func SpecificLayersPolicy(layersToCache map[uint]bool) CachingPolicy
type LayerFactory ¶
type LayerFactory = shared.LayerFactory
func MakeSliceReadWriterFactory ¶
func MakeSliceReadWriterFactory() LayerFactory
func MakeSpecificLayersFactory ¶
func MakeSpecificLayersFactory(readWriters map[uint]LayerReadWriter) LayerFactory
type LayerReadWriter ¶
type LayerReadWriter = shared.LayerReadWriter
type LayerReader ¶
type LayerReader = shared.LayerReader
type LayerWriter ¶
type LayerWriter = shared.LayerWriter
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) GetCachingPolicy ¶
func (c *Reader) GetCachingPolicy() CachingPolicy
func (*Reader) GetHashFunc ¶
func (*Reader) GetLayerFactory ¶
func (c *Reader) GetLayerFactory() LayerFactory
func (*Reader) GetLayerReader ¶
func (c *Reader) GetLayerReader(layerHeight uint) LayerReader
func (*Reader) Layers ¶
func (c *Reader) Layers() map[uint]LayerReadWriter
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
func NewWriter ¶
func NewWriter(shouldCacheLayer CachingPolicy, generateLayer LayerFactory) *Writer
func (*Writer) GetLayerWriter ¶
func (c *Writer) GetLayerWriter(layerHeight uint) (LayerWriter, error)
func (*Writer) GetReader ¶
func (c *Writer) GetReader() (CacheReader, error)
GetReader returns a cache reader that can be passed into GenerateProof. It first flushes the layer writers to support layer writers that have internal buffers that may not be reflected in the reader until flushed. After flushing, this method validates the structure of the cache, including that a base layer is cached.
func (*Writer) SetLayer ¶
func (c *Writer) SetLayer(layerHeight uint, rw LayerReadWriter)
Click to show internal directories.
Click to hide internal directories.