submitter

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidProofSubmitter

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

InvalidProofSubmitter is responsible requesting zk proofs for the given invalid L2 blocks, and submitting the generated proofs to the TaikoL1 smart contract.

func NewInvalidProofSubmitter

func NewInvalidProofSubmitter(
	rpc *rpc.Client,
	proofProducer proofProducer.ProofProducer,
	reusltCh chan *proofProducer.ProofWithHeader,
	proverPrivKey *ecdsa.PrivateKey,
	zkProofsPerBlock uint64,
	anchorTxGasLimit uint64,
	mutex *sync.Mutex,
) *InvalidProofSubmitter

NewInvalidProofSubmitter creates a new InvalidProofSubmitter instance.

func (*InvalidProofSubmitter) RequestProof

RequestProof implements the ProofSubmitter interface.

func (*InvalidProofSubmitter) SubmitProof

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

SubmitProof implements the ProofSubmitter interface.

type ProofSubmitter

type ProofSubmitter interface {
	RequestProof(ctx context.Context, event *bindings.TaikoL1ClientBlockProposed) error
	SubmitProof(ctx context.Context, proofWithHeader *proofProducer.ProofWithHeader) 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 TaikoL1 smart contract.

func NewValidProofSubmitter

func NewValidProofSubmitter(
	rpc *rpc.Client,
	proofProducer proofProducer.ProofProducer,
	reusltCh chan *proofProducer.ProofWithHeader,
	taikoL2Address common.Address,
	proverPrivKey *ecdsa.PrivateKey,
	zkProofsPerBlock uint64,
	mutex *sync.Mutex,
) *ValidProofSubmitter

NewValidProofSubmitter creates a new ValidProofSubmitter instance.

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