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

Commit 13e80f6

Browse files
committed
feat: change proof type
1 parent 6137bcf commit 13e80f6

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

driver/txlist_decompressor/txlist_decompressor.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/ethereum/go-ethereum/core/types"
77
"github.com/ethereum/go-ethereum/log"
88
"github.com/ethereum/go-ethereum/rlp"
9+
910
"github.com/taikoxyz/taiko-client/internal/utils"
1011
)
1112

driver/txlist_decompressor/txlist_decompressor_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/ethereum/go-ethereum/params"
1414
"github.com/ethereum/go-ethereum/rlp"
1515
"github.com/stretchr/testify/require"
16+
1617
"github.com/taikoxyz/taiko-client/internal/utils"
1718
)
1819

prover/init.go

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ func (p *Prover) initProofSubmitters(
110110
L1Endpoint: p.cfg.RaikoL1Endpoint,
111111
L1BeaconEndpoint: p.cfg.RaikoL1BeaconEndpoint,
112112
L2Endpoint: p.cfg.RaikoL2Endpoint,
113+
ProofType: proofProducer.ProofTypeSgx,
113114
Dummy: p.cfg.Dummy,
114115
}
115116
case encoding.TierGuardianID:
@@ -118,6 +119,7 @@ func (p *Prover) initProofSubmitters(
118119
L1Endpoint: p.cfg.RaikoL1Endpoint,
119120
L1BeaconEndpoint: p.cfg.RaikoL1BeaconEndpoint,
120121
L2Endpoint: p.cfg.RaikoL2Endpoint,
122+
ProofType: proofProducer.ProofTypeCpu,
121123
Dummy: p.cfg.Dummy,
122124
}, p.cfg.EnableLivenessBondProof)
123125
default:

prover/proof_producer/sgx_producer.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,18 @@ import (
2121
"github.com/taikoxyz/taiko-client/internal/metrics"
2222
)
2323

24+
const (
25+
ProofTypeSgx = "sgx"
26+
ProofTypeCpu = "native"
27+
)
28+
2429
// SGXProofProducer generates a SGX proof for the given block.
2530
type SGXProofProducer struct {
2631
RaikoHostEndpoint string // a proverd RPC endpoint
2732
L1Endpoint string // a L1 node RPC endpoint
2833
L1BeaconEndpoint string // a L1 beacon node RPC endpoint
2934
L2Endpoint string // a L2 execution engine's RPC endpoint
35+
ProofType string // Proof type
3036
Dummy bool
3137
DummyProofProducer
3238
}
@@ -161,7 +167,7 @@ func (s *SGXProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoHostOu
161167
ID: common.Big1,
162168
Method: "proof",
163169
Params: []*SGXRequestProofBodyParam{{
164-
Type: "sgx",
170+
Type: s.ProofType,
165171
Block: opts.BlockID,
166172
L2RPC: s.L2Endpoint,
167173
L1RPC: s.L1Endpoint,

0 commit comments

Comments
 (0)