Documentation ¶
Index ¶
- Constants
- func BlobShareRange(tx types.Tx) (beginShare uint64, endShare uint64, err error)
- func NewShareInclusionProof(allRawShares []shares.Share, squareSize uint64, namespaceID namespace.ID, ...) (types.ShareProof, error)
- func NewTxInclusionProof(codec rsmt2d.Codec, data types.Data, txIndex uint64) (types.ShareProof, error)
- func ParseNamespaceID(rawShares []shares.Share, startShare int64, endShare int64) (namespace.ID, error)
- func QueryShareInclusionProof(_ sdk.Context, path []string, req abci.RequestQuery) ([]byte, error)
- func QueryTxInclusionProof(_ sdk.Context, path []string, req abci.RequestQuery) ([]byte, error)
- func TxSharePosition(data types.Data, txIndex uint64) (startShare uint64, endShare uint64, err error)
Constants ¶
const TxInclusionQueryPath = "txInclusionProof"
Variables ¶
This section is empty.
Functions ¶
func BlobShareRange ¶
BlobShareRange returns the start and end positions for the shares where a given blob, referenced by its wrapped PFB transaction, was published at. Note: only supports transactions containing a single blob.
func NewShareInclusionProof ¶
func NewShareInclusionProof( allRawShares []shares.Share, squareSize uint64, namespaceID namespace.ID, startShare uint64, endShare uint64, ) (types.ShareProof, error)
NewShareInclusionProof returns an NMT inclusion proof for a set of shares to the data root. Expects the share range to be pre-validated. Note: only supports inclusion proofs for shares belonging to the same namespace.
func NewTxInclusionProof ¶
func NewTxInclusionProof(codec rsmt2d.Codec, data types.Data, txIndex uint64) (types.ShareProof, error)
NewTxInclusionProof returns a new share inclusion proof for the given transaction index.
func ParseNamespaceID ¶
func ParseNamespaceID(rawShares []shares.Share, startShare int64, endShare int64) (namespace.ID, error)
ParseNamespaceID validates the share range, checks if it only contains one namespace and returns that namespace ID.
func QueryShareInclusionProof ¶
QueryShareInclusionProof defines the logic performed when querying for the inclusion proofs of a set of shares to the data root. The share range should be appended to the path. Example path for proving the set of shares [3, 5]: custom/shareInclusionProof/3/5
func QueryTxInclusionProof ¶
Querier defines the logic performed when the ABCI client using the Query method with the custom prove.QueryPath. The index of the transaction being proved must be appended to the path. The marshalled bytes of the transaction proof (tmproto.ShareProof) are returned.
example path for proving the third transaction in that block: custom/txInclusionProof/3
Types ¶
This section is empty.