Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogSkipper ¶
func LogSkipper(c echo.Context) bool
LogSkipper implements the `middleware.Skipper` interface.
Types ¶
type CreateAssignmentRequestBody ¶ added in v0.17.0
type CreateAssignmentRequestBody struct { Proposer common.Address FeeToken common.Address TierFees []encoding.TierFee Expiry uint64 BlobHash common.Hash }
CreateAssignmentRequestBody represents a request body when handling assignment creation request.
type NewProverServerOpts ¶
type NewProverServerOpts struct { ProverPrivateKey *ecdsa.PrivateKey MinOptimisticTierFee *big.Int MinSgxTierFee *big.Int MinSgxAndZkVMTierFee *big.Int MinEthBalance *big.Int MinTaikoTokenBalance *big.Int MaxExpiry time.Duration MaxBlockSlippage uint64 MaxProposedIn uint64 TaikoL1Address common.Address AssignmentHookAddress common.Address ProofSubmissionCh chan<- proofProducer.ProofRequestBody RPC *rpc.Client ProtocolConfigs *bindings.TaikoDataConfig LivenessBond *big.Int }
NewProverServerOpts contains all configurations for creating a prover server instance.
type ProposeBlockResponse ¶
type ProposeBlockResponse struct { SignedPayload []byte `json:"signedPayload"` Prover common.Address `json:"prover"` MaxBlockID uint64 `json:"maxBlockID"` MaxProposedIn uint64 `json:"maxProposedIn"` }
ProposeBlockResponse represents the JSON response which will be returned by the ProposeBlock request handler.
type ProverServer ¶
type ProverServer struct {
// contains filtered or unexported fields
}
ProverServer represents a prover server instance.
func New ¶
func New(opts *NewProverServerOpts) (*ProverServer, error)
New creates a new prover server instance.
func (*ProverServer) CreateAssignment ¶
func (s *ProverServer) CreateAssignment(c echo.Context) error
CreateAssignment handles a block proof assignment request, decides if this prover wants to handle this block, and if so, returns a signed payload the proposer can submit onchain.
@Summary Try to accept a block proof assignment @Param body body CreateAssignmentRequestBody true "assignment request body" @Accept json @Produce json @Success 200 {object} ProposeBlockResponse @Failure 422 {string} string "empty blob hash" @Failure 422 {string} string "only receive ETH" @Failure 422 {string} string "insufficient prover balance" @Failure 422 {string} string "proof fee too low" @Failure 422 {string} string "expiry too long" @Failure 422 {string} string "prover does not have capacity" @Router /assignment [post]
func (*ProverServer) GetStatus ¶
func (s *ProverServer) GetStatus(c echo.Context) error
GetStatus handles a query to the current prover server status.
@Summary Get current prover server status @ID get-status @Accept json @Produce json @Success 200 {object} Status @Router /status [get]
func (*ProverServer) Health ¶
func (s *ProverServer) Health(c echo.Context) error
Health endpoints for probes.
func (*ProverServer) Shutdown ¶
func (s *ProverServer) Shutdown(ctx context.Context) error
Shutdown shuts down the HTTP server.
func (*ProverServer) Start ¶
func (s *ProverServer) Start(address string) error
Start starts the HTTP server.
type Status ¶
type Status struct { MinOptimisticTierFee uint64 `json:"minOptimisticTierFee"` MinSgxTierFee uint64 `json:"minSgxTierFee"` MinSgxAndZkVMTierFee uint64 `json:"minSgxAndZkVMTierFee"` MaxExpiry uint64 `json:"maxExpiry"` Prover string `json:"prover"` }
Status represents the current prover server status.