proof

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultTestServiceID is the default test service ID
	DefaultTestServiceID = "svc1"
)

Variables

This section is empty.

Functions

func BaseClaim

func BaseClaim(serviceId, appAddr, supplierOperatorAddr string, numRelays uint64) prooftypes.Claim

BaseClaim returns a base (default, example, etc..) claim with the given service ID, app address, supplier operator address and num relays that can be used for testing.

func ClaimWithRandomHash

func ClaimWithRandomHash(t *testing.T, appAddr, supplierOperatorAddr string, numRelays uint64) prooftypes.Claim

ClaimWithRandomHash returns a claim with a random SMST root hash with the given app address, supplier operator address, and num relays that can be used for testing. Each claim generated this way will have a random chance to require a proof via probabilistic selection.

func RandSmstRootWithSumAndCount added in v0.0.6

func RandSmstRootWithSumAndCount(t *testing.T, sum, count uint64) smt.MerkleSumRoot

RandSmstRootWithSumAndCount returns a randomized SMST root with the given sum and count that can be used for testing. Randomizing the root is a simple way to randomize test claim hashes for testing proof requirement cases.

func SmstRootWithSumAndCount added in v0.0.6

func SmstRootWithSumAndCount(sum, count uint64) smt.MerkleSumRoot

SmstRootWithSumAndCount returns a SMST root with the given sum and relay count.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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