Skip to content

fix logging: include requested height in cert2 not found error#4303

Open
imabdulbasit wants to merge 1 commit into
mainfrom
ab/height-in-cert2-log
Open

fix logging: include requested height in cert2 not found error#4303
imabdulbasit wants to merge 1 commit into
mainfrom
ab/height-in-cert2-log

Conversation

@imabdulbasit
Copy link
Copy Markdown
Contributor

Closes #<ISSUE_NUMBER>

This PR:

This PR does not:

Key places to review:

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 14, 2026

Claude finished @imabdulbasit's task in 54s —— View job


Review of PR #4303

  • Gather context and read changed files
  • Check existing review comments
  • Review code changes
  • Post review feedback

LGTM — this is a clean, well-scoped improvement.

The change adds the requested_height to the not-found error message in get_leaf_proof_with_cert2, which will make debugging cert2 lookup failures much easier. A few observations:

  • Consistent with existing patterns: Other error messages in this file already include dynamic context (e.g., "unknown header {requested}" on line 207, "missing epoch root header {epoch_root_height}" on line 434). This change follows the same convention.
  • No performance concern: The format!() only runs in the error (None) path, so there's no cost on the happy path.
  • No information leak risk: The block height is not sensitive — it's a public chain property already known to the caller.

No issues found. Ship it.

@imabdulbasit imabdulbasit enabled auto-merge (squash) May 14, 2026 12:14
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the error message in the light client API to include the requested height when a cert2 finality proof is not found, providing more context for the error. I have no feedback to provide as there were no review comments to evaluate.

@imabdulbasit imabdulbasit requested a review from twittner May 14, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants