Documentation ¶
Index ¶
- Variables
- type Prover
- func (p *Prover) Addr() string
- func (p *Prover) AggregatedProof(inputProof1, inputProof2 string) (*string, error)
- func (p *Prover) BatchProof(input *pb.InputProver) (*string, error)
- func (p *Prover) CancelProofRequest(proofID string) error
- func (p *Prover) FinalProof(inputProof string, aggregatorAddr string) (*string, error)
- func (p *Prover) ID() string
- func (p *Prover) IsIdle() (bool, error)
- func (p *Prover) Name() string
- func (p *Prover) Status() (*pb.GetStatusResponse, error)
- func (p *Prover) SupportsForkID(forkID uint64) bool
- func (p *Prover) WaitFinalProof(ctx context.Context, proofID string) (*pb.FinalProof, error)
- func (p *Prover) WaitRecursiveProof(ctx context.Context, proofID string) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrBadProverResponse = errors.New("Prover returned wrong type for response") //nolint:revive ErrProverInternalError = errors.New("Prover returned INTERNAL_ERROR response") //nolint:revive ErrProverCompletedError = errors.New("Prover returned COMPLETED_ERROR response") //nolint:revive ErrBadRequest = errors.New("Prover returned ERROR for a bad request") //nolint:revive ErrUnspecified = errors.New("Prover returned an UNSPECIFIED response") //nolint:revive ErrUnknown = errors.New("Prover returned an unknown response") //nolint:revive ErrProofCanceled = errors.New("Proof has been canceled") //nolint:revive )
Functions ¶
This section is empty.
Types ¶
type Prover ¶
type Prover struct {
// contains filtered or unexported fields
}
Prover abstraction of the grpc prover client.
func New ¶
func New(stream pb.AggregatorService_ChannelServer, addr net.Addr, proofStatePollingInterval types.Duration) (*Prover, error)
New returns a new Prover instance.
func (*Prover) AggregatedProof ¶
AggregatedProof instructs the prover to generate an aggregated proof from the two inputs provided. It returns the ID of the proof being computed.
func (*Prover) BatchProof ¶
func (p *Prover) BatchProof(input *pb.InputProver) (*string, error)
BatchProof instructs the prover to generate a batch proof for the provided input. It returns the ID of the proof being computed.
func (*Prover) CancelProofRequest ¶
CancelProofRequest asks the prover to stop the generation of the proof matching the provided proofID.
func (*Prover) FinalProof ¶
FinalProof instructs the prover to generate a final proof for the given input. It returns the ID of the proof being computed.
func (*Prover) Status ¶
func (p *Prover) Status() (*pb.GetStatusResponse, error)
Status gets the prover status.
func (*Prover) SupportsForkID ¶
SupportsForkID returns true if the prover supports the given fork id.
func (*Prover) WaitFinalProof ¶
WaitFinalProof waits for the final proof to be generated by the prover and returns it.