Require Stellar enum presence in proto responses - #2376
Open
Krish-vemula wants to merge 1 commit into
Open
Conversation
Contributor
|
Krish-vemula
marked this pull request as ready for review
September 10, 2026 16:26
product-security-plaid-production
Bot
requested a review
from DylanTinianov
September 10, 2026 16:26
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
It changes proto wire/API semantics and introduces stricter validation that may break older clients that previously omitted these enum fields.
Pull request overview
This PR updates the Stellar gRPC/proto surface so event_type (in EventInfo) and tx_status (in SubmitTransactionResponse) have explicit presence semantics, and tightens proto→domain conversions to reject responses that omit these enums.
Changes:
- Mark
EventInfo.event_typeandSubmitTransactionResponse.tx_statusasoptionalinstellar.proto(and regenerate Go bindings accordingly). - Update outbound domain→proto conversions to always set these enum pointers.
- Update inbound proto→domain conversions to error when the enum fields are omitted, while still rejecting unknown/unsupported enum numeric values; add tests for the new “missing enum” cases.
File summaries
| File | Description |
|---|---|
| pkg/chains/stellar/stellar.proto | Makes event_type and tx_status optional to enable presence detection. |
| pkg/chains/stellar/stellar.pb.go | Regenerated Go protobufs reflecting optional enum presence (pointer fields + presence-aware getters). |
| pkg/chains/stellar/proto_helpers.go | Enforces required presence on proto→domain conversion; ensures domain→proto sets enum pointers. |
| pkg/chains/stellar/proto_helpers_test.go | Adds/updates tests for missing enum presence and pointer-based enum fields. |
Review details
Files not reviewed (1)
- pkg/chains/stellar/stellar.pb.go: Generated file
- Files reviewed: 3/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
event_typeandtx_statusproto fields optional