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

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
YoGhurt111 committed Apr 22, 2024
1 parent 95d4887 commit c63f401
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion prover/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (p *Prover) initProofSubmitters(
Dummy: p.cfg.Dummy,
}
case encoding.TierSgxAndZkVMID:
producer = &proofProducer.SGXAndZKProofProducer{
producer = &proofProducer.SGXAndZkVMProofProducer{
RaikoHostEndpoint: p.cfg.RaikoHostEndpoint,
L1Endpoint: p.cfg.RaikoL1Endpoint,
L1BeaconEndpoint: p.cfg.RaikoL1BeaconEndpoint,
Expand Down
16 changes: 8 additions & 8 deletions prover/proof_producer/sgx_and_zk_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type R0ProofParam struct {
ExecutionPo2 *big.Int `json:"execution_po2"`
}

// SGXAndZKProofProducer generates an SGX + ZK proof for the given block.
// SGXAndZkVMProofProducer generates an SGX + ZK proof for the given block.
type SGXAndZkVMProofProducer struct {
RaikoHostEndpoint string // a proverd RPC endpoint
L1Endpoint string // a L1 node RPC endpoint
Expand All @@ -42,7 +42,7 @@ type SGXAndZkVMProofProducer struct {
}

// RequestProof implements the ProofProducer interface.
func (o *SGXAndZKProofProducer) RequestProof(
func (o *SGXAndZkVMProofProducer) RequestProof(
ctx context.Context,
opts *ProofRequestOptions,
blockID *big.Int,
Expand Down Expand Up @@ -87,7 +87,7 @@ func (o *SGXAndZKProofProducer) RequestProof(
}, nil
}

func (o *SGXAndZKProofProducer) requestZKProof(
func (o *SGXAndZkVMProofProducer) requestZKProof(
ctx context.Context,
opts *ProofRequestOptions,
blockID *big.Int,
Expand Down Expand Up @@ -124,7 +124,7 @@ func (o *SGXAndZKProofProducer) requestZKProof(
}

// callProverDaemon keeps polling the proverd service to get the requested proof.
func (o *SGXAndZKProofProducer) callProverDaemon(ctx context.Context, opts *ProofRequestOptions) ([]byte, error) {
func (o *SGXAndZkVMProofProducer) callProverDaemon(ctx context.Context, opts *ProofRequestOptions) ([]byte, error) {
var (
proof []byte
start = time.Now()
Expand All @@ -144,7 +144,7 @@ func (o *SGXAndZKProofProducer) callProverDaemon(ctx context.Context, opts *Proo
"ZK proof generating",
"height", opts.BlockID,
"time", time.Since(start),
"producer", "SGXAndZKProofProducer",
"producer", "SGXAndZkVMProofProducer",
)
return errProofGenerating
}
Expand All @@ -156,7 +156,7 @@ func (o *SGXAndZKProofProducer) callProverDaemon(ctx context.Context, opts *Proo
"ZK proof generated",
"height", opts.BlockID,
"time", time.Since(start),
"producer", "SGXAndZKProofProducer",
"producer", "SGXAndZkVMProofProducer",
)
return nil
}, backoff.WithContext(backoff.NewConstantBackOff(proofPollingInterval), ctx)); err != nil {
Expand All @@ -167,7 +167,7 @@ func (o *SGXAndZKProofProducer) callProverDaemon(ctx context.Context, opts *Proo
}

// requestProof sends an RPC request to proverd to try to get the requested proof.
func (o *SGXAndZKProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoHostOutput, error) {
func (o *SGXAndZkVMProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoHostOutput, error) {
reqBody := RaikoRequestProofBody{
JsonRPC: "2.0",
ID: common.Big1,
Expand Down Expand Up @@ -222,6 +222,6 @@ func (o *SGXAndZKProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoH
}

// Tier implements the ProofProducer interface.
func (o *SGXAndZKProofProducer) Tier() uint16 {
func (o *SGXAndZkVMProofProducer) Tier() uint16 {
return encoding.TierSgxAndZkVMID
}
2 changes: 1 addition & 1 deletion prover/proof_producer/sgx_and_zk_producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestSGXAndZKProducerRequestProof(t *testing.T) {
}

var (
producer = &SGXAndZKProofProducer{Dummy: true, SGXProducer: &SGXProofProducer{
producer = &SGXAndZkVMProofProducer{Dummy: true, SGXProducer: &SGXProofProducer{
Dummy: true,
}}
blockID = common.Big32
Expand Down

0 comments on commit c63f401

Please sign in to comment.