ethproofs

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSInstance

type AWSInstance struct {
	ID              int64   `json:"id"`
	InstanceType    string  `json:"instance_type"`
	Region          string  `json:"region"`
	HourlyPrice     float64 `json:"hourly_price"`
	InstanceMemory  float64 `json:"instance_memory"`
	VCPU            int64   `json:"vcpu"`
	InstanceStorage string  `json:"instance_storage"`
	CreatedAt       string  `json:"created_at"`
}

type Client

type Client interface {
	// Clusters
	CreateCluster(ctx context.Context, req *CreateClusterRequest) (*CreateClusterResponse, error)
	ListClusters(ctx context.Context) ([]Cluster, error)

	// Single Machine
	CreateMachine(ctx context.Context, req *CreateMachineRequest) (*CreateMachineResponse, error)

	// Proofs
	QueueProof(ctx context.Context, req *QueueProofRequest) (*ProofResponse, error)
	StartProving(ctx context.Context, req *StartProvingRequest) (*ProofResponse, error)
	SubmitProof(ctx context.Context, req *SubmitProofRequest) (*ProofResponse, error)

	// AWS Pricing
	ListAWSPricing(ctx context.Context) ([]AWSInstance, error)
}

Client defines the interface for interacting with the EthProofs API

type Cluster

type Cluster struct {
	ID                   int64           `json:"id"`
	Nickname             string          `json:"nickname"`
	Description          string          `json:"description"`
	Hardware             string          `json:"hardware"`
	CycleType            string          `json:"cycle_type"`
	ProofType            string          `json:"proof_type"`
	ClusterConfiguration []ClusterConfig `json:"cluster_configuration"`
}

type ClusterConfig

type ClusterConfig struct {
	InstanceType  string `json:"instance_type"`
	InstanceCount int64  `json:"instance_count"`
}

type CreateClusterRequest

type CreateClusterRequest struct {
	Nickname      string          `json:"nickname"`
	Description   string          `json:"description,omitempty"`
	Hardware      string          `json:"hardware,omitempty"`
	CycleType     string          `json:"cycle_type,omitempty"`
	ProofType     string          `json:"proof_type,omitempty"`
	Configuration []ClusterConfig `json:"configuration"`
}

Request/Response types for Clusters

type CreateClusterResponse

type CreateClusterResponse struct {
	ID int64 `json:"id"`
}

type CreateMachineRequest

type CreateMachineRequest struct {
	Nickname     string `json:"nickname"`
	Description  string `json:"description,omitempty"`
	Hardware     string `json:"hardware,omitempty"`
	CycleType    string `json:"cycle_type,omitempty"`
	ProofType    string `json:"proof_type,omitempty"`
	InstanceType string `json:"instance_type"`
}

Request/Response types for Single Machine

type CreateMachineResponse

type CreateMachineResponse struct {
	ID int64 `json:"id"`
}

type ListAWSPricingResponse

type ListAWSPricingResponse = []AWSInstance

Request/Response types for AWS Pricing

type ListClustersResponse

type ListClustersResponse []Cluster

type ProofResponse

type ProofResponse struct {
	ProofID int64 `json:"proof_id"`
}

type QueueProofRequest

type QueueProofRequest struct {
	BlockNumber int64 `json:"block_number"`
	ClusterID   int64 `json:"cluster_id"`
}

Request/Response types for Proofs

type StartProvingRequest

type StartProvingRequest struct {
	BlockNumber int64 `json:"block_number"`
	ClusterID   int64 `json:"cluster_id"`
}

type SubmitProofRequest

type SubmitProofRequest struct {
	BlockNumber   int64  `json:"block_number"`
	ClusterID     int64  `json:"cluster_id"`
	ProvingTime   int64  `json:"proving_time"`
	ProvingCycles *int64 `json:"proving_cycles,omitempty"`
	Proof         string `json:"proof"`
	VerifierID    string `json:"verifier_id,omitempty"`
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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