Documentation ¶
Overview ¶
Package evidences defines any type of proof that can be used in a chainscript segment It is needed by a store to know how to deserialize a segment containing any type of proof
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( //BatchFossilizerName is the name used as the BatchProof backend BatchFossilizerName = "batch" //BcBatchFossilizerName is the name used as the BcBatchProof backend BcBatchFossilizerName = "bcbatch" // TMPopName is the name used as the Tendermint PoP backend TMPopName = "TMPop" )
Functions ¶
This section is empty.
Types ¶
type BatchProof ¶
type BatchProof struct { Timestamp int64 `json:"timestamp"` Root *types.Bytes32 `json:"merkleRoot"` Path mktypes.Path `json:"merklePath"` }
BatchProof implements the Proof interface
func (*BatchProof) FullProof ¶
func (p *BatchProof) FullProof() []byte
FullProof returns a JSON formatted proof
func (*BatchProof) Time ¶
func (p *BatchProof) Time() uint64
Time returns the timestamp from the block header
func (*BatchProof) Verify ¶
func (p *BatchProof) Verify(linkHash interface{}) bool
Verify returns true if the proof of a given linkHash is correct
type BcBatchProof ¶
type BcBatchProof struct { Batch BatchProof `json:"batch"` TransactionID types.TransactionID `json:"txid"` }
BcBatchProof implements the Proof interface
func (*BcBatchProof) FullProof ¶
func (p *BcBatchProof) FullProof() []byte
FullProof returns a JSON formatted proof
func (*BcBatchProof) Time ¶
func (p *BcBatchProof) Time() uint64
Time returns the timestamp from the block header
func (*BcBatchProof) Verify ¶
func (p *BcBatchProof) Verify(linkHash interface{}) bool
Verify returns true if the proof of a given linkHash is correct
type TendermintProof ¶
type TendermintProof struct { BlockHeight int64 `json:"block_height"` Root *types.Bytes32 `json:"merkle_root"` Path mktypes.Path `json:"merkle_path"` ValidationsHash *types.Bytes32 `json:"validations_hash"` // The header and its votes are needed to validate // the previous app hash and metadata such as the height and time. Header *tmtypes.Header `json:"header"` HeaderVotes []*TendermintVote `json:"header_votes"` HeaderValidatorSet *tmtypes.ValidatorSet `json:"header_validator_set"` // The next header and its votes are needed to validate // the app hash representing the validations and merkle path. NextHeader *tmtypes.Header `json:"next_header"` NextHeaderVotes []*TendermintVote `json:"next_header_votes"` NextHeaderValidatorSet *tmtypes.ValidatorSet `json:"next_header_validator_set"` }
TendermintProof implements the Proof interface.
func (*TendermintProof) FullProof ¶
func (p *TendermintProof) FullProof() []byte
FullProof returns a JSON formatted proof
func (*TendermintProof) Time ¶
func (p *TendermintProof) Time() uint64
Time returns the timestamp from the block header
func (*TendermintProof) Verify ¶
func (p *TendermintProof) Verify(linkHash interface{}) bool
Verify returns true if the proof of a given linkHash is correct
type TendermintVote ¶ added in v0.3.0
type TendermintVote struct { PubKey *crypto.PubKey `json:"pub_key"` Vote *tmtypes.Vote `json:"vote"` }
TendermintVote is a signed vote by one of the Tendermint validator nodes.