Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogSkipper ¶
LogSkipper implements the `middleware.Skipper` interface.
Types ¶
type NewProverServerOpts ¶
type NewProverServerOpts struct { ProverPrivateKey *ecdsa.PrivateKey MinProofFee *big.Int MaxExpiry time.Duration CapacityManager *capacity.CapacityManager TaikoL1Address common.Address Rpc *rpc.Client Bond *big.Int IsOracle bool }
NewProverServerOpts contains all configurations for creating a prover server instance.
type ProposeBlockResponse ¶
type ProposeBlockResponse struct { SignedPayload []byte `json:"signedPayload"` Prover common.Address `json:"prover"` }
ProposeBlockResponse represents the JSON response which will be returned by the ProposeBlock request handler.
type ProverServer ¶
type ProverServer struct {
// contains filtered or unexported fields
}
@host prover-api.test.taiko.xyz 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 (srv *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 @ID create-assignment @Accept json @Produce json @Success 200 {object} ProposeBlockResponse @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 (srv *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 (srv *ProverServer) Health(c echo.Context) error
Health endpoints for probes.
func (*ProverServer) Shutdown ¶
func (srv *ProverServer) Shutdown(ctx context.Context) error
Shutdown shuts down the HTTP server.
func (*ProverServer) Start ¶
func (srv *ProverServer) Start(address string) error
Start starts the HTTP server.