Skip to content

Commit

Permalink
feat(taiko-client): add proof type to batch proof acceptance log mess…
Browse files Browse the repository at this point in the history
…ages (#18885)
  • Loading branch information
StoneMac65 authored Feb 7, 2025
1 parent d8fa41f commit cad42a7
Showing 1 changed file with 22 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@ func NewSender(
}
}

func getProofTypeString(tier uint16) string {
switch tier {
case encoding.TierOptimisticID:
return "Optimistic"
case encoding.TierSgxID:
return "SGX"
case encoding.TierZkVMRisc0ID:
return "ZK-RISC0"
case encoding.TierZkVMSp1ID:
return "ZK-SP1"
case encoding.TierSgxAndZkVMID:
return "SGX+ZK"
case encoding.TierGuardianMinorityID:
return "Guardian-Minority"
case encoding.TierGuardianMajorityID:
return "Guardian-Majority"
default:
return "Unknown"
}
}

// Send sends the given proof to the TaikoL1 smart contract with a backoff policy.
func (s *Sender) Send(
ctx context.Context,
Expand Down Expand Up @@ -166,7 +187,7 @@ func (s *Sender) SendBatchProof(
}

log.Info(
"🚚 Your batch proofs were accepted",
fmt.Sprintf("🚚 Your %s batch proofs were accepted", getProofTypeString(batchProof.Tier)),
"txHash", receipt.TxHash,
"tier", batchProof.Tier,
"blockIDs", batchProof.BlockIDs,
Expand Down

0 comments on commit cad42a7

Please sign in to comment.