Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proof ¶
type Proof struct { // Lemma is made up of 3 parts to keep consistent with 0g-storage-rust: // 1. Target content hash (leaf node). // 2. Hashes from bottom to top of sibing nodes. // 3. Root hash. Lemma []common.Hash `json:"lemma"` // Path contains flags to indicate that whether the corresponding node is on the left side. // All true for the left most leaf node, and all false for the right most leaf node. Path []bool `json:"path"` }
Proof represents a merkle tree proof of target content, e.g. chunk or segment of file.
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree represents a binary merkle tree, e.g. bitcoin-like merkle tree or complete BMT.
type TreeBuilder ¶
type TreeBuilder struct {
// contains filtered or unexported fields
}
TreeBuilder is used to build complete binary merkle tree.
func (*TreeBuilder) Append ¶
func (builder *TreeBuilder) Append(content []byte)
func (*TreeBuilder) AppendHash ¶
func (builder *TreeBuilder) AppendHash(hash common.Hash)
func (*TreeBuilder) Build ¶
func (builder *TreeBuilder) Build() *Tree
Click to show internal directories.
Click to hide internal directories.