submitter

package
v0.0.0-...-1d04f91 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProofSubmitter

type ProofSubmitter interface {
	RequestProof(ctx context.Context, event *bindings.MxcL1ClientBlockProposed) error
	SubmitProof(ctx context.Context, proofWithHeader *proofProducer.ProofWithHeader) error
	CancelProof(ctx context.Context, blockID *big.Int) error
}

type ValidProofSubmitter

type ValidProofSubmitter struct {
	// contains filtered or unexported fields
}

ValidProofSubmitter is responsible requesting zk proofs for the given valid L2 blocks, and submitting the generated proofs to the MxcL1 smart contract.

func NewValidProofSubmitter

func NewValidProofSubmitter(
	rpcClient *rpc.Client,
	proofProducer proofProducer.ProofProducer,
	resultCh chan *proofProducer.ProofWithHeader,
	mxcL2Address common.Address,
	proverPrivKey *ecdsa.PrivateKey,
	mutex *sync.Mutex,
	isOracleProver bool,
	isSystemProver bool,
	graffiti string,
	expectedReward uint64,
) (*ValidProofSubmitter, error)

NewValidProofSubmitter creates a new ValidProofSubmitter instance.

func (*ValidProofSubmitter) CancelProof

func (s *ValidProofSubmitter) CancelProof(ctx context.Context, blockID *big.Int) error

CancelProof cancels an existing proof generation. Right now, it is just a stub that does nothing, because it is not possible to cnacel the proof with the current zkevm software.

func (*ValidProofSubmitter) RequestProof

RequestProof implements the ProofSubmitter interface.

func (*ValidProofSubmitter) SubmitProof

func (s *ValidProofSubmitter) SubmitProof(
	ctx context.Context,
	proofWithHeader *proofProducer.ProofWithHeader,
) (err error)

SubmitProof implements the ProofSubmitter interface.

Jump to

Keyboard shortcuts

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