submitter

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Contester added in v0.17.0

type Contester interface {
	SubmitContest(
		ctx context.Context,
		blockID *big.Int,
		proposedIn *big.Int,
		parentHash common.Hash,
		meta *bindings.TaikoDataBlockMetadata,
		tier uint16,
	) error
}

Contester is the interface for contesting proofs of the L2 blocks.

type ProofContester added in v0.17.0

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

ProofContester is responsible for contesting wrong L2 transitions.

func NewProofContester added in v0.17.0

func NewProofContester(
	rpcClient *rpc.Client,
	gasLimit uint64,
	txmgr *txmgr.SimpleTxManager,
	graffiti string,
	builder *transaction.ProveBlockTxBuilder,
) *ProofContester

NewProofContester creates a new ProofContester instance.

func (*ProofContester) SubmitContest added in v0.17.0

func (c *ProofContester) SubmitContest(
	ctx context.Context,
	blockID *big.Int,
	proposedIn *big.Int,
	parentHash common.Hash,
	meta *bindings.TaikoDataBlockMetadata,
	tier uint16,
) error

SubmitContest submits a TaikoL1.proveBlock transaction to contest a L2 block transition.

type ProofSubmitter

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

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

func NewProofSubmitter added in v0.20.0

func NewProofSubmitter(
	rpcClient *rpc.Client,
	proofProducer proofProducer.ProofProducer,
	resultCh chan *proofProducer.ProofWithHeader,
	taikoL2Address common.Address,
	graffiti string,
	gasLimit uint64,
	txmgr *txmgr.SimpleTxManager,
	builder *transaction.ProveBlockTxBuilder,
) (*ProofSubmitter, error)

NewProofSubmitter creates a new ProofSubmitter instance.

func (*ProofSubmitter) Producer added in v0.17.0

Producer returns the inner proof producer.

func (*ProofSubmitter) RequestProof

RequestProof implements the Submitter interface.

func (*ProofSubmitter) SubmitProof

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

SubmitProof implements the Submitter interface.

func (*ProofSubmitter) Tier added in v0.17.0

func (s *ProofSubmitter) Tier() uint16

Tier returns the proof tier of the current proof submitter.

type Submitter added in v0.17.0

type Submitter interface {
	RequestProof(ctx context.Context, event *bindings.TaikoL1ClientBlockProposed) error
	SubmitProof(ctx context.Context, proofWithHeader *proofProducer.ProofWithHeader) error
	Producer() proofProducer.ProofProducer
	Tier() uint16
}

Submitter is the interface for submitting proofs of the L2 blocks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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