sync

package
v1.23.4 Latest Latest
Warning

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

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

Documentation

Overview

Package sync provides sync types for merkledb. This is the ZAP-based implementation (zero protobuf).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeProof

type ChangeProof struct {
	StartProof        []*ProofNode
	EndProof          []*ProofNode
	KeyChanges        []*KeyChange
	HadRootsInHistory bool
}

ChangeProof represents a change proof

func (*ChangeProof) GetEndProof

func (cp *ChangeProof) GetEndProof() []*ProofNode

func (*ChangeProof) GetHadRootsInHistory

func (cp *ChangeProof) GetHadRootsInHistory() bool

func (*ChangeProof) GetKeyChanges

func (cp *ChangeProof) GetKeyChanges() []*KeyChange

func (*ChangeProof) GetStartProof

func (cp *ChangeProof) GetStartProof() []*ProofNode

type Key

type Key struct {
	Length uint64
	Value  []byte
}

Key represents a merkle tree key

func (*Key) GetLength

func (k *Key) GetLength() uint64

func (*Key) GetValue

func (k *Key) GetValue() []byte

type KeyChange

type KeyChange struct {
	Key   []byte
	Value *MaybeBytes
}

KeyChange represents a change to a key

func (*KeyChange) GetKey

func (kc *KeyChange) GetKey() []byte

func (*KeyChange) GetValue

func (kc *KeyChange) GetValue() *MaybeBytes

type KeyValue

type KeyValue struct {
	Key   []byte
	Value []byte
}

KeyValue represents a key-value pair

func (*KeyValue) GetKey

func (kv *KeyValue) GetKey() []byte

func (*KeyValue) GetValue

func (kv *KeyValue) GetValue() []byte

type MaybeBytes

type MaybeBytes struct {
	Value     []byte
	IsNothing bool
}

MaybeBytes represents an optional byte slice

func (*MaybeBytes) GetIsNothing

func (m *MaybeBytes) GetIsNothing() bool

func (*MaybeBytes) GetValue

func (m *MaybeBytes) GetValue() []byte

type Proof

type Proof struct {
	Key   []byte
	Value *MaybeBytes
	Proof []*ProofNode
}

Proof represents a merkle proof

func (*Proof) GetKey

func (p *Proof) GetKey() []byte

func (*Proof) GetProof

func (p *Proof) GetProof() []*ProofNode

func (*Proof) GetValue

func (p *Proof) GetValue() *MaybeBytes

type ProofNode

type ProofNode struct {
	Key         *Key
	ValueOrHash *MaybeBytes
	Children    map[uint32][]byte
}

ProofNode represents a node in a merkle proof

func (*ProofNode) GetChildren

func (p *ProofNode) GetChildren() map[uint32][]byte

func (*ProofNode) GetKey

func (p *ProofNode) GetKey() *Key

func (*ProofNode) GetValueOrHash

func (p *ProofNode) GetValueOrHash() *MaybeBytes

type RangeProof

type RangeProof struct {
	StartProof []*ProofNode
	EndProof   []*ProofNode
	KeyValues  []*KeyValue
}

RangeProof represents a range proof

func (*RangeProof) GetEndProof

func (rp *RangeProof) GetEndProof() []*ProofNode

func (*RangeProof) GetKeyValues

func (rp *RangeProof) GetKeyValues() []*KeyValue

func (*RangeProof) GetStartProof

func (rp *RangeProof) GetStartProof() []*ProofNode

Jump to

Keyboard shortcuts

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