testtree

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FillSessionTree

func FillSessionTree(
	ctx context.Context, t *testing.T,
	sessionTree relayer.SessionTree,
	numRelays, computeUnitsPerRelay uint64,
	supplierOperatorKeyUid, supplierOperatorAddr string,
	reqHeader, resHeader *sessiontypes.SessionHeader,
	keyRing keyring.Keyring,
	ringClient crypto.RingClient,
)

FillSessionTree fills the session tree with valid signed relays. A total of numRelays relays are added to the session tree with increasing weights (relay 1 has weight 1, relay 2 has weight 2, etc.).

func NewClaim

func NewClaim(
	t *testing.T,
	supplierOperatorAddr string,
	sessionHeader *sessiontypes.SessionHeader,
	rootHash []byte,
) *prooftypes.Claim

func NewEmptySessionTree

func NewEmptySessionTree(
	t *testing.T,
	sessionTreeHeader *sessiontypes.SessionHeader,
	supplierOperatorAddr string,
) relayer.SessionTree

NewEmptySessionTree creates a new empty session tree with for given session.

func NewFilledSessionTree

func NewFilledSessionTree(
	ctx context.Context, t *testing.T,
	numRelays, computeUnitsPerRelay uint64,
	supplierKeyUid, supplierOperatorAddr string,
	sessionTreeHeader, reqHeader, resHeader *sessiontypes.SessionHeader,
	keyRing keyring.Keyring,
	ringClient crypto.RingClient,
) relayer.SessionTree

NewFilledSessionTree creates a new session tree with numRelays of relays filled out using the request and response headers provided where every relay is signed by the supplier and application respectively.

func NewProof

func NewProof(
	t *testing.T,
	supplierOperatorAddr string,
	sessionHeader *sessiontypes.SessionHeader,
	sessionTree relayer.SessionTree,
	closestProofPath []byte,
) *prooftypes.Proof

NewProof creates a new proof structure.

Types

This section is empty.

Jump to

Keyboard shortcuts

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