Documentation ¶
Index ¶
- Variables
- type Contester
- type ProofContester
- type ProofSubmitter
- func (s *ProofSubmitter) Producer() proofProducer.ProofProducer
- func (s *ProofSubmitter) RequestProof(ctx context.Context, meta metadata.TaikoBlockMetaData) error
- func (s *ProofSubmitter) SubmitProof(ctx context.Context, proofWithHeader *proofProducer.ProofWithHeader) (err error)
- func (s *ProofSubmitter) Tier() uint16
- type Submitter
Constants ¶
This section is empty.
Variables ¶
var (
ProofTimeout = 3 * time.Hour
)
Functions ¶
This section is empty.
Types ¶
type Contester ¶
type Contester interface { SubmitContest( ctx context.Context, blockID *big.Int, proposedIn *big.Int, parentHash common.Hash, meta metadata.TaikoBlockMetaData, tier uint16, ) error }
Contester is the interface for contesting proofs of the L2 blocks.
type ProofContester ¶
type ProofContester struct {
// contains filtered or unexported fields
}
ProofContester is responsible for contesting wrong L2 transitions.
func NewProofContester ¶
func NewProofContester( rpcClient *rpc.Client, gasLimit uint64, txmgr *txmgr.SimpleTxManager, privateTxmgr *txmgr.SimpleTxManager, proverSetAddress common.Address, graffiti string, builder *transaction.ProveBlockTxBuilder, ) *ProofContester
NewProofContester creates a new ProofContester instance.
func (*ProofContester) SubmitContest ¶
func (c *ProofContester) SubmitContest( ctx context.Context, blockID *big.Int, proposedIn *big.Int, parentHash common.Hash, meta metadata.TaikoBlockMetaData, 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 ¶
func NewProofSubmitter( rpcClient *rpc.Client, proofProducer proofProducer.ProofProducer, resultCh chan *proofProducer.ProofWithHeader, proverSetAddress common.Address, taikoL2Address common.Address, graffiti string, gasLimit uint64, txmgr *txmgr.SimpleTxManager, privateTxmgr *txmgr.SimpleTxManager, builder *transaction.ProveBlockTxBuilder, tiers []*rpc.TierProviderTierWithID, isGuardian bool, submissionDelay time.Duration, ) (*ProofSubmitter, error)
NewProofSubmitter creates a new ProofSubmitter instance.
func (*ProofSubmitter) Producer ¶
func (s *ProofSubmitter) Producer() proofProducer.ProofProducer
Producer returns the inner proof producer.
func (*ProofSubmitter) RequestProof ¶
func (s *ProofSubmitter) RequestProof(ctx context.Context, meta metadata.TaikoBlockMetaData) error
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 ¶
func (s *ProofSubmitter) Tier() uint16
Tier returns the proof tier of the current proof submitter.
type Submitter ¶
type Submitter interface { RequestProof(ctx context.Context, meta metadata.TaikoBlockMetaData) 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.