proof

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderOp           = "header"
	ProofOpHeaderField = "header:f"
)

Variables

View Source
var (
	ErrInvalidLengthProof = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProof   = fmt.Errorf("proto: integer overflow")
)

Functions

func HeaderFieldOpDecoder

func HeaderFieldOpDecoder(pop merkle.ProofOp) (merkle.ProofOperator, error)

func MakeKVProofOp

func MakeKVProofOp(h *types.Header) (merkle.ProofOp, error)

Types

type HeaderFieldOp

type HeaderFieldOp struct {

	// To encode in ProofOp.Data
	Proof *merkle.SimpleProof `json:"simple_proof"`
	// contains filtered or unexported fields
}

func NewHeaderFieldOp

func NewHeaderFieldOp(key []byte, proof *merkle.SimpleProof) HeaderFieldOp

func (HeaderFieldOp) GetKey

func (op HeaderFieldOp) GetKey() []byte

func (HeaderFieldOp) ProofOp

func (op HeaderFieldOp) ProofOp() merkle.ProofOp

func (HeaderFieldOp) Run

func (op HeaderFieldOp) Run(args [][]byte) ([][]byte, error)

func (HeaderFieldOp) String

func (op HeaderFieldOp) String() string

type KVProofInfo

type KVProofInfo struct {
	Height               int64         `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Proof                *merkle.Proof `protobuf:"bytes,2,opt,name=proof" json:"proof,omitempty"`
	Contract             []byte        `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"`
	Key                  []byte        `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	Value                []byte        `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	Version              []byte        `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func MakeKVProofInfo

func MakeKVProofInfo(height int64, proof *merkle.Proof, contract common.Address, key cmn.HexBytes, value *db.ValueObject) *KVProofInfo

func NewPopulatedKVProofInfo

func NewPopulatedKVProofInfo(r randyProof, easy bool) *KVProofInfo

func (*KVProofInfo) Descriptor

func (*KVProofInfo) Descriptor() ([]byte, []int)

func (*KVProofInfo) Equal

func (this *KVProofInfo) Equal(that interface{}) bool

func (*KVProofInfo) GetContract

func (m *KVProofInfo) GetContract() []byte

func (*KVProofInfo) GetHeight

func (m *KVProofInfo) GetHeight() int64

func (*KVProofInfo) GetKey

func (m *KVProofInfo) GetKey() []byte

func (*KVProofInfo) GetProof

func (m *KVProofInfo) GetProof() *merkle.Proof

func (*KVProofInfo) GetValue

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

func (*KVProofInfo) GetVersion

func (m *KVProofInfo) GetVersion() []byte

func (*KVProofInfo) Marshal

func (m *KVProofInfo) Marshal() (dAtA []byte, err error)

func (*KVProofInfo) MarshalTo

func (m *KVProofInfo) MarshalTo(dAtA []byte) (int, error)

func (*KVProofInfo) ProtoMessage

func (*KVProofInfo) ProtoMessage()

func (*KVProofInfo) Reset

func (m *KVProofInfo) Reset()

func (*KVProofInfo) Size

func (m *KVProofInfo) Size() (n int)

func (*KVProofInfo) String

func (m *KVProofInfo) String() string

func (*KVProofInfo) Unmarshal

func (m *KVProofInfo) Unmarshal(dAtA []byte) error

func (KVProofInfo) VerifyWithHeader

func (p KVProofInfo) VerifyWithHeader(h *types.Header) error

func (*KVProofInfo) XXX_DiscardUnknown

func (m *KVProofInfo) XXX_DiscardUnknown()

func (*KVProofInfo) XXX_Marshal

func (m *KVProofInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KVProofInfo) XXX_Merge

func (dst *KVProofInfo) XXX_Merge(src proto.Message)

func (*KVProofInfo) XXX_Size

func (m *KVProofInfo) XXX_Size() int

func (*KVProofInfo) XXX_Unmarshal

func (m *KVProofInfo) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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