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

Commit

Permalink
feat: change proof type
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed May 6, 2024
1 parent 6137bcf commit 13e80f6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions driver/txlist_decompressor/txlist_decompressor.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"

"github.com/taikoxyz/taiko-client/internal/utils"
)

Expand Down
1 change: 1 addition & 0 deletions driver/txlist_decompressor/txlist_decompressor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/stretchr/testify/require"

"github.com/taikoxyz/taiko-client/internal/utils"
)

Expand Down
2 changes: 2 additions & 0 deletions prover/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func (p *Prover) initProofSubmitters(
L1Endpoint: p.cfg.RaikoL1Endpoint,
L1BeaconEndpoint: p.cfg.RaikoL1BeaconEndpoint,
L2Endpoint: p.cfg.RaikoL2Endpoint,
ProofType: proofProducer.ProofTypeSgx,
Dummy: p.cfg.Dummy,
}
case encoding.TierGuardianID:
Expand All @@ -118,6 +119,7 @@ func (p *Prover) initProofSubmitters(
L1Endpoint: p.cfg.RaikoL1Endpoint,
L1BeaconEndpoint: p.cfg.RaikoL1BeaconEndpoint,
L2Endpoint: p.cfg.RaikoL2Endpoint,
ProofType: proofProducer.ProofTypeCpu,
Dummy: p.cfg.Dummy,
}, p.cfg.EnableLivenessBondProof)
default:
Expand Down
8 changes: 7 additions & 1 deletion prover/proof_producer/sgx_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@ import (
"github.com/taikoxyz/taiko-client/internal/metrics"
)

const (
ProofTypeSgx = "sgx"
ProofTypeCpu = "native"

Check failure on line 26 in prover/proof_producer/sgx_producer.go

View workflow job for this annotation

GitHub Actions / Lint

var-naming: const ProofTypeCpu should be ProofTypeCPU (revive)
)

// SGXProofProducer generates a SGX proof for the given block.
type SGXProofProducer struct {
RaikoHostEndpoint string // a proverd RPC endpoint
L1Endpoint string // a L1 node RPC endpoint
L1BeaconEndpoint string // a L1 beacon node RPC endpoint
L2Endpoint string // a L2 execution engine's RPC endpoint
ProofType string // Proof type
Dummy bool
DummyProofProducer
}
Expand Down Expand Up @@ -161,7 +167,7 @@ func (s *SGXProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoHostOu
ID: common.Big1,
Method: "proof",
Params: []*SGXRequestProofBodyParam{{
Type: "sgx",
Type: s.ProofType,
Block: opts.BlockID,
L2RPC: s.L2Endpoint,
L1RPC: s.L1Endpoint,
Expand Down

0 comments on commit 13e80f6

Please sign in to comment.