Skip to content

fix: add nil guards for Solana tx metadata and safe signature parsing (backport #4550)#4552

Merged
ws4charlie merged 3 commits intorelease/zetaclient/v38from
backport/4550-fix-solana-nil-meta-and-must-signature
Feb 25, 2026
Merged

fix: add nil guards for Solana tx metadata and safe signature parsing (backport #4550)#4552
ws4charlie merged 3 commits intorelease/zetaclient/v38from
backport/4550-fix-solana-nil-meta-and-must-signature

Conversation

@ws4charlie
Copy link
Contributor

@ws4charlie ws4charlie commented Feb 25, 2026

Summary

Test plan

  • CI passes

🤖 Generated with Claude Code


Note

Low Risk
Small defensive changes that reduce crash risk; behavior changes only for malformed tracker hashes or RPC responses missing Meta.

Overview
Hardens Solana transaction processing by adding Meta != nil guards before checking Meta.Err in inbound filtering, outbound confirmation (CheckFinalizedTx), and outbound tracker reporting to prevent nil-pointer crashes on RPC responses without metadata.

Makes inbound tracker handling resilient to malformed TxHash values by replacing MustSignatureFromBase58 with SignatureFromBase58, logging the parse error, and skipping the bad tracker instead of panicking.

Written by Cursor Bugbot for commit 2193592. Configure here.

ws4charlie and others added 2 commits February 25, 2026 13:56
- Add nil check for txResult.Meta before accessing Meta.Err in three
  locations (observer/outbound.go, signer/outbound_tracker_reporter.go,
  observer/inbound.go) to prevent potential nil pointer dereference
- Replace MustSignatureFromBase58 with SignatureFromBase58 in
  inbound_tracker.go to gracefully handle invalid base58 tx hashes
  instead of panicking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ws4charlie ws4charlie added the no-changelog Skip changelog CI check label Feb 25, 2026
@ws4charlie ws4charlie marked this pull request as ready for review February 25, 2026 19:57
@ws4charlie ws4charlie requested a review from a team as a code owner February 25, 2026 19:57
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 25, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport/4550-fix-solana-nil-meta-and-must-signature

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 18.18182% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...taclient/chains/solana/observer/inbound_tracker.go 0.00% 8 Missing ⚠️
.../chains/solana/signer/outbound_tracker_reporter.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@ws4charlie ws4charlie requested a review from kingpinXD February 25, 2026 21:36
@ws4charlie ws4charlie merged commit 84e6849 into release/zetaclient/v38 Feb 25, 2026
45 of 46 checks passed
@ws4charlie ws4charlie deleted the backport/4550-fix-solana-nil-meta-and-must-signature branch February 25, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Skip changelog CI check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants