fix: add nil guards for Solana tx metadata and safe signature parsing (backport #4550)#4552
Conversation
- 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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…il-meta-and-must-signature
Summary
release/zetaclient/v38Meta != nilguard before accessingtxResult.Meta.Errin three locations to prevent potential nil pointer dereferenceMustSignatureFromBase58(panics on invalid input) withSignatureFromBase58(returns error) ininbound_tracker.goTest plan
🤖 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 != nilguards before checkingMeta.Errin 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
TxHashvalues by replacingMustSignatureFromBase58withSignatureFromBase58, logging the parse error, and skipping the bad tracker instead of panicking.Written by Cursor Bugbot for commit 2193592. Configure here.