Documentation ¶
Index ¶
- Constants
- Variables
- func IndexToKey(index, total int) []byte
- func MinReprBytes(numKeys int) (keyLen int)
- func Prove(root common.Hash, key, value []byte, proofNodes []*ProofNode) bool
- func ToIndexBytes(index, keyLen int) []byte
- type NibblePath
- func (path *NibblePath) CommonPrefix(other *NibblePath) (prefix, path1, path2 NibblePath)
- func (path *NibblePath) ComputeMerkle(nodeMerkle common.Hash) common.Hash
- func (path *NibblePath) Length() int
- func (path *NibblePath) ToChild() (childIndex byte, childPath NibblePath, ok bool)
- func (path *NibblePath) Trim() NibblePath
- type Node
- type ProofLibNibblePath
- type ProofLibProofNode
- type ProofNode
- type TypesReceiptProof
Constants ¶
View Source
const CHILDREN_COUNT = 16
Variables ¶
View Source
var ( KECCAKE_EMPTY = crypto.Keccak256Hash() LEAF_NODE_CHILDREN = [CHILDREN_COUNT]common.Hash{ KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, KECCAKE_EMPTY, } )
Functions ¶
func IndexToKey ¶
func MinReprBytes ¶
func ToIndexBytes ¶
Types ¶
type NibblePath ¶
type NibblePath struct {
// contains filtered or unexported fields
}
func NewNibblePath ¶
func NewNibblePath(key []byte) NibblePath
func (*NibblePath) CommonPrefix ¶
func (path *NibblePath) CommonPrefix(other *NibblePath) (prefix, path1, path2 NibblePath)
func (*NibblePath) ComputeMerkle ¶
func (path *NibblePath) ComputeMerkle(nodeMerkle common.Hash) common.Hash
func (*NibblePath) Length ¶
func (path *NibblePath) Length() int
func (*NibblePath) ToChild ¶
func (path *NibblePath) ToChild() (childIndex byte, childPath NibblePath, ok bool)
func (*NibblePath) Trim ¶
func (path *NibblePath) Trim() NibblePath
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
type ProofLibNibblePath ¶
type ProofLibProofNode ¶
type ProofLibProofNode struct { Path ProofLibNibblePath Children [16][32]byte Value []byte }
func ConvertProofNode ¶
func ConvertProofNode(nodes []*ProofNode) []ProofLibProofNode
type ProofNode ¶
type ProofNode struct {
// contains filtered or unexported fields
}
func (*ProofNode) ComputeMerkle ¶
type TypesReceiptProof ¶
type TypesReceiptProof struct { Headers [][]byte BlockIndex []byte BlockProof []ProofLibProofNode ReceiptsRoot [32]byte Index []byte Receipt []byte ReceiptProof []ProofLibProofNode }
Click to show internal directories.
Click to hide internal directories.