Files
scroll/roller/prover/mock.go
Lawliet-Chan ceb406b68b feat(roller): add dump proof (#289)
Co-authored-by: xinran chen <lawliet@xinran-m1x.local>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
2023-03-22 13:46:09 +08:00

29 lines
626 B
Go

//go:build mock_prover
package prover
import (
"scroll-tech/common/message"
"scroll-tech/roller/config"
)
// Prover sends block-traces to rust-prover through socket and get back the zk-proof.
type Prover struct {
cfg *config.ProverConfig
}
// NewProver inits a Prover object.
func NewProver(cfg *config.ProverConfig) (*Prover, error) {
return &Prover{cfg: cfg}, nil
}
// Prove call rust ffi to generate proof, if first failed, try again.
func (p *Prover) Prove(_ *message.TaskMsg) (*message.AggProof, error) {
return &message.AggProof{
Proof: []byte{},
Instance: []byte{},
FinalPair: []byte{},
}, nil
}