Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(taiko-client): zk any for ontake fork #18922

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions packages/taiko-client/prover/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,15 @@ func (p *Prover) initProofSubmitters(
RaikoRequestTimeout: p.cfg.RaikoRequestTimeout,
}
case encoding.TierZkVMRisc0ID:
producer = &proofProducer.ZKvmProofProducer{
ZKProofType: proofProducer.ZKProofTypeR0,
RaikoHostEndpoint: p.cfg.RaikoZKVMHostEndpoint,
JWT: p.cfg.RaikoJWT,
Dummy: p.cfg.Dummy,
RaikoRequestTimeout: p.cfg.RaikoRequestTimeout,
}
bufferSize = p.cfg.ZKVMProofBufferSize
continue
case encoding.TierZkVMSp1ID:
producer = &proofProducer.ZKvmProofProducer{
ZKProofType: proofProducer.ZKProofTypeSP1,
RaikoHostEndpoint: p.cfg.RaikoZKVMHostEndpoint,
JWT: p.cfg.RaikoJWT,
Dummy: p.cfg.Dummy,
RaikoRequestTimeout: p.cfg.RaikoRequestTimeout,
}
bufferSize = p.cfg.ZKVMProofBufferSize
bufferSize = 0
case encoding.TierGuardianMinorityID:
producer = proofProducer.NewGuardianProofProducer(encoding.TierGuardianMinorityID, p.cfg.EnableLivenessBondProof)
bufferSize = 0
Expand Down
12 changes: 7 additions & 5 deletions packages/taiko-client/prover/proof_producer/proof_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ type ContestRequestBody struct {
}

type ProofResponse struct {
BlockID *big.Int
Meta metadata.TaikoProposalMetaData
Proof []byte
Opts ProofRequestOptions
Tier uint16
BlockID *big.Int
Meta metadata.TaikoProposalMetaData
Proof []byte
Opts ProofRequestOptions
Tier uint16
ProofType string
}

type BatchProofs struct {
ProofResponses []*ProofResponse
BatchProof []byte
Tier uint16
BlockIDs []*big.Int
ProofType string
}

type ProofProducer interface {
Expand Down
6 changes: 6 additions & 0 deletions packages/taiko-client/prover/proof_producer/sgx_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ type RaikoRequestProofBody struct {
SGX *SGXRequestProofBodyParam `json:"sgx"`
RISC0 *RISC0RequestProofBodyParam `json:"risc0"`
SP1 *SP1RequestProofBodyParam `json:"sp1"`
ZkAny *ZkAnyRequestProofBodyParam `json:"zk_any"`
}

// RaikoRequestProofBodyV3 represents the JSON body for requesting the proof.
Expand Down Expand Up @@ -79,6 +80,11 @@ type SP1RequestProofBodyParam struct {
Verify bool `json:"verify"`
}

// ZkAnyRequestProofBodyParam represents the JSON body of RaikoRequestProofBody's `zk_any` field.
type ZkAnyRequestProofBodyParam struct {
Aggregation bool `json:"aggregation"`
}

// RaikoRequestProofBodyResponse represents the JSON body of the response of the proof requests.
type RaikoRequestProofBodyResponse struct {
Data *RaikoProofData `json:"data"`
Expand Down
Loading
Loading