prover

package
v0.3.14 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProveProcessorLock sync.Mutex

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(
	app sdk.AppCircuit, config ServiceConfig) (*Service, error)

NewService creates a new prover server instance that automatically manages compilation & setup, and serves as a GRPC server that interoperates with brevis sdk in other languages.

func (*Service) Serve

func (s *Service) Serve(bind string, port uint)

type ServiceConfig

type ServiceConfig struct {
	// SetupDir saves the circuit compilation outputs (proving key, verifying key,
	// verifying key hash)
	// On-chain query data will be stored in SetupDir/input/data.json. It will
	// save rpc usage for developers.
	SetupDir string

	// SrsDir saves the SRS files that will be automatically downloaded. These files
	// can be shared across different circuits. So the best practice is to have them
	// in a shared directory for all projects. Default to use the same dir as
	// SetupDir if not specified
	SrsDir string

	// RpcURL will be used to query on-chain data by sending rpc call.
	RpcURL string

	// Source chain id.
	ChainId int
}

func (ServiceConfig) GetLocalStoragePath added in v0.3.7

func (c ServiceConfig) GetLocalStoragePath() string

func (ServiceConfig) GetSetupDir

func (c ServiceConfig) GetSetupDir() string

func (ServiceConfig) GetSrsDir

func (c ServiceConfig) GetSrsDir() string

Jump to

Keyboard shortcuts

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