producer

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyProofProducer

type DummyProofProducer struct {
	RandomDummyProofDelayLowerBound *time.Duration
	RandomDummyProofDelayUpperBound *time.Duration
}

DummyProofProducer always returns a dummy proof.

func (*DummyProofProducer) RequestProof

func (d *DummyProofProducer) RequestProof(
	opts *ProofRequestOptions,
	blockID *big.Int,
	meta *bindings.LibDataBlockMetadata,
	header *types.Header,
	resultCh chan *ProofWithHeader,
) error

RequestProof implements the ProofProducer interface.

type ProofProducer

type ProofProducer interface {
	RequestProof(
		opts *ProofRequestOptions,
		blockID *big.Int,
		meta *bindings.LibDataBlockMetadata,
		header *types.Header,
		resultCh chan *ProofWithHeader,
	) error
}

type ProofRequestOptions

type ProofRequestOptions struct {
	Height     *big.Int                       // the block number
	Meta       *bindings.LibDataBlockMetadata // block meta data
	L2Endpoint string                         // a L2 execution engine's RPC endpoint
	Retry      bool                           // retry proof computation if error
	Param      string                         // parameter file to use
}

ProofRequestOptions contains all options that need to be passed to zkEVM rpcd service.

type ProofWithHeader

type ProofWithHeader struct {
	BlockID *big.Int
	Meta    *bindings.LibDataBlockMetadata
	Header  *types.Header
	ZkProof []byte
}

type ZkevmRpcdProducer

type ZkevmRpcdProducer struct {
	RpcdEndpoint string
}

func NewZkevmRpcdProducer

func NewZkevmRpcdProducer(rpcdEndpoint string) (*ZkevmRpcdProducer, error)

func (*ZkevmRpcdProducer) RequestProof

func (d *ZkevmRpcdProducer) RequestProof(
	opts *ProofRequestOptions,
	blockID *big.Int,
	meta *bindings.LibDataBlockMetadata,
	header *types.Header,
	resultCh chan *ProofWithHeader,
) error

RequestProof implements the ProofProducer interface.

Jump to

Keyboard shortcuts

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