Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(taiko-client): add proof type to batch proof acceptance log messages #18885

Merged
merged 3 commits into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading