dsl

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertVerified

func CertVerified(m dsl.Module, dest t.ModuleID, err error, origin *apb.VerifyCertOrigin)

CertVerified is a response to a VerifyCert event.

func NewCert

func NewCert(m dsl.Module, dest t.ModuleID, cert *apb.Cert, origin *apb.RequestCertOrigin)

NewCert is a response to a RequestCert event.

func ProvideTransactions

func ProvideTransactions(m dsl.Module, dest t.ModuleID, txs []*requestpb.Request, origin *apb.RequestTransactionsOrigin)

ProvideTransactions is a response to a RequestTransactions event.

func RequestCert

func RequestCert[C any](m dsl.Module, dest t.ModuleID, context *C)

RequestCert is used by the consensus layer to request an availability certificate for a batch of transactions from the availability layer.

func RequestTransactions

func RequestTransactions[C any](m dsl.Module, dest t.ModuleID, cert *apb.Cert, context *C)

RequestTransactions allows reconstructing a batch of transactions by a corresponding availability certificate. It is possible that some of the transactions are not stored locally on the node. In this case, the availability layer will pull these transactions from other nodes.

func UponCertVerified

func UponCertVerified[C any](m dsl.Module, handler func(err error, context *C) error)

UponCertVerified registers a handler for the CertVerified events.

func UponEvent

func UponEvent[EvWrapper apb.Event_TypeWrapper[Ev], Ev any](m dsl.Module, handler func(ev *Ev) error)

UponEvent registers a handler for the given availability layer event type.

func UponNewCert

func UponNewCert[C any](m dsl.Module, handler func(context *C) error)

UponNewCert registers a handler for the NewCert events.

func UponProvideTransactions

func UponProvideTransactions[C any](m dsl.Module, handler func(txs []*requestpb.Request, context *C) error)

UponProvideTransactions registers a handler for the ProvideTransactions events.

func UponRequestCert

func UponRequestCert(m dsl.Module, handler func(origin *apb.RequestCertOrigin) error)

UponRequestCert registers a handler for the RequestCert events.

func UponRequestTransactions

func UponRequestTransactions(m dsl.Module, handler func(cert *apb.Cert, origin *apb.RequestTransactionsOrigin) error)

UponRequestTransactions registers a handler for the RequestTransactions events.

func UponVerifyCert

func UponVerifyCert(m dsl.Module, handler func(cert *apb.Cert, origin *apb.VerifyCertOrigin) error)

UponVerifyCert registers a handler for the VerifyCert events.

func VerifyCert

func VerifyCert[C any](m dsl.Module, dest t.ModuleID, cert *apb.Cert, context *C)

VerifyCert can be used to verify validity of an availability certificate.

Types

This section is empty.

Jump to

Keyboard shortcuts

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