Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat(prover_producer): update SGXRequestProofBodyParam
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Apr 7, 2024
1 parent 651f188 commit 1bbb0ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "Push docker image to GCR"

on:
push:
branches: [main]
branches: [main,SGXRequestProofBodyParam]
tags:
- "v*"

Expand Down
29 changes: 21 additions & 8 deletions prover/proof_producer/sgx_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,21 @@ type SGXRequestProofBody struct {

// SGXRequestProofBodyParam represents the JSON body of RequestProofBody's `param` field.
type SGXRequestProofBodyParam struct {
Type string `json:"type"`
Block *big.Int `json:"block"`
L2RPC string `json:"l2Rpc"`
L1RPC string `json:"l1Rpc"`
L1BeaconRPC string `json:"l1BeaconRpc"`
Prover string `json:"prover"`
Graffiti string `json:"graffiti"`
Type string `json:"proofType"`
Block *big.Int `json:"blockNumber"`
L2RPC string `json:"rpc"`
L1RPC string `json:"l1Rpc"`
L1BeaconRPC string `json:"beaconRpc"`
Prover string `json:"prover"`
Graffiti string `json:"graffiti"`
ProofParam *ProofParam `json:"proofParam"`
}

// ProofParam represents the JSON body of SGXRequestProofBodyParam's `proofParam` field.
type ProofParam struct {
Setup bool `json:"setup"`
Bootstrap bool `json:"bootstrap"`
Prove bool `json:"prove"`
}

// SGXRequestProofBodyResponse represents the JSON body of the response of the proof requests.
Expand Down Expand Up @@ -154,13 +162,18 @@ func (s *SGXProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoHostOu
ID: common.Big1,
Method: "proof",
Params: []*SGXRequestProofBodyParam{{
Type: "Sgx",
Type: "sgx",
Block: opts.BlockID,
L2RPC: s.L2Endpoint,
L1RPC: s.L1Endpoint,
L1BeaconRPC: s.L1BeaconEndpoint,
Prover: opts.ProverAddress.Hex()[2:],
Graffiti: opts.Graffiti,
ProofParam: &ProofParam{
Setup: false,
Bootstrap: true,
Prove: true,
},
}},
}

Expand Down

0 comments on commit 1bbb0ce

Please sign in to comment.