From 6c30f9351d215748903a517fff59138d3ccf3f39 Mon Sep 17 00:00:00 2001 From: Gavin Yu Date: Sat, 25 May 2024 02:05:13 +0800 Subject: [PATCH] fix(taiko-client): fix a JWT parsing issue (#17325) --- packages/taiko-client/prover/config.go | 2 +- packages/taiko-client/prover/proof_producer/sgx_producer.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/taiko-client/prover/config.go b/packages/taiko-client/prover/config.go index b57a7a6f07..182a15089c 100644 --- a/packages/taiko-client/prover/config.go +++ b/packages/taiko-client/prover/config.go @@ -170,7 +170,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) { ProverSetAddress: common.HexToAddress(c.String(flags.ProverSetAddress.Name)), L1ProverPrivKey: l1ProverPrivKey, RaikoHostEndpoint: c.String(flags.RaikoHostEndpoint.Name), - RaikoJWT: string(jwtSecret), + RaikoJWT: common.Bytes2Hex(jwtSecret), StartingBlockID: startingBlockID, Dummy: c.Bool(flags.Dummy.Name), GuardianProverMinorityAddress: common.HexToAddress(c.String(flags.GuardianProverMinority.Name)), diff --git a/packages/taiko-client/prover/proof_producer/sgx_producer.go b/packages/taiko-client/prover/proof_producer/sgx_producer.go index a2e913b5fa..96cf6572d7 100644 --- a/packages/taiko-client/prover/proof_producer/sgx_producer.go +++ b/packages/taiko-client/prover/proof_producer/sgx_producer.go @@ -184,8 +184,6 @@ func (s *SGXProofProducer) requestProof(opts *ProofRequestOptions) (*RaikoReques } req.Header.Set("Content-Type", "application/json") if len(s.JWT) > 0 { - log.Info("base string", s.JWT) - log.Info("encode value", base64.StdEncoding.EncodeToString([]byte(s.JWT))) req.Header.Set("Authorization", "Bearer "+base64.StdEncoding.EncodeToString([]byte(s.JWT))) }