prover

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0, MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggchainProofFlow

type AggchainProofFlow interface {
	// GenerateAggchainProof generates an Aggchain proof
	GenerateAggchainProof(
		ctx context.Context,
		lastProvenBlock, toBlock uint64,
		claims []bridgesync.Claim) (*types.AggchainProof, *treetypes.Root, error)
}

AggchainProofFlow is the interface for the Aggchain proof flow

type AggchainProofGeneration

type AggchainProofGeneration interface {
	GenerateAggchainProof(ctx context.Context, fromBlock, toBlock uint64) (*types.SP1StarkProof, error)
}

ProofGeneration is the interface for generating Aggchain proofs

type AggchainProofGenerationTool

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

AggchainProofGenerationTool is a tool to generate Aggchain proofs

func NewAggchainProofGenerationTool

func NewAggchainProofGenerationTool(
	ctx context.Context,
	logger *log.Logger,
	cfg Config,
	l2Syncer types.L2BridgeSyncer,
	l1InfoTreeSyncer types.L1InfoTreeSyncer,
	l1Client types.EthClient,
	l2Client types.EthClient) (*AggchainProofGenerationTool, error)

NewAggchainProofGenerationTool creates a new AggchainProofGenerationTool

func (*AggchainProofGenerationTool) GenerateAggchainProof

func (a *AggchainProofGenerationTool) GenerateAggchainProof(
	ctx context.Context,
	lastProvenBlock, maxEndBlock uint64) (*types.SP1StarkProof, error)

GenerateAggchainProof generates an Aggchain proof

func (*AggchainProofGenerationTool) GetRPCServices

func (a *AggchainProofGenerationTool) GetRPCServices() []rpc.Service

GetRPCServices returns the list of services that the RPC provider exposes

type AggchainProofGenerationToolRPC

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

AggsenderRPC is the RPC interface for the aggsender

func NewAggchainProofGenerationToolRPC

func NewAggchainProofGenerationToolRPC(
	tool AggchainProofGeneration) *AggchainProofGenerationToolRPC

NewAggchainProofGenerationToolRPC creates a new AggchainProofGenerationToolRPC

func (*AggchainProofGenerationToolRPC) GenerateAggchainProof

func (a *AggchainProofGenerationToolRPC) GenerateAggchainProof(
	lastProvenBlock, requestedEndBlock uint64) (interface{}, rpc.Error)

GenerateAggchainProof generates an Aggchain proof curl -X POST http://localhost:5576/ -H "Content-Type: application/json" \ -d '{"method":"aggkit_generateAggchainProof", "params":[lastProvenBlock, requestedEndBlock], "id":1}'

type Config

type Config struct {
	// AggchainProofURL is the URL of the AggkitProver
	AggchainProofURL string `mapstructure:"AggchainProofURL"`

	// GlobalExitRootL2Addr is the address of the GlobalExitRootManager contract on l2 sovereign chain
	// this address is needed for the AggchainProof mode of the AggSender
	GlobalExitRootL2Addr common.Address `mapstructure:"GlobalExitRootL2"`

	// GenerateAggchainProofTimeout is the timeout to wait for the aggkit-prover to generate the AggchainProof
	GenerateAggchainProofTimeout configtypes.Duration `mapstructure:"GenerateAggchainProofTimeout"`

	// SovereignRollupAddr is the address of the sovereign rollup contract on L1
	SovereignRollupAddr common.Address `mapstructure:"SovereignRollupAddr"`

	// UseAggkitProverTLS is a flag to enable the AggkitProver TLS handshake in the AggSender-AggkitProver gRPC connection
	UseAggkitProverTLS bool `mapstructure:"UseAggkitProverTLS"`
}

Config is the configuration for the AggchainProofGenerationTool

Jump to

Keyboard shortcuts

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