Skip to content

Add Stellar get transaction status fields - #2369

Open
Krish-vemula wants to merge 3 commits into
mainfrom
fix/stellar-get-transaction-status
Open

Add Stellar get transaction status fields#2369
Krish-vemula wants to merge 3 commits into
mainfrom
fix/stellar-get-transaction-status

Conversation

@Krish-vemula

Copy link
Copy Markdown
Contributor

Summary

  • add explicit getTransaction status, tx hash, and result XDR fields
  • make fee and ledger fields presence-aware
  • reject unknown or status-inconsistent responses in converters

Tests

  • go test ./pkg/chains/stellar ./pkg/loop/internal/relayer ./pkg/loop/internal/relayerset

@Krish-vemula
Krish-vemula added this pull request to stack #2370 September 9, 2026 05:28
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (7)

pkg/chains/stellar (1)
  • ConvertGetTransactionResponseToProto — Type changed:
func(
  github.com/smartcontractkit/chainlink-common/pkg/types/chains/stellar.GetTransactionResponse
)
- *GetTransactionResponse
+ (*GetTransactionResponse, error)
pkg/chains/stellar.GetTransactionResponse (3)
  • FeeStroops — Type changed:
  - uint64
  + *uint64
)
  • LedgerCloseTime — Type changed:
  - int64
  + *int64
)
  • LedgerSequence — Type changed:
  - uint32
  + *uint32
)
pkg/types/chains/stellar.GetTransactionResponse (3)
  • FeeStroops — Type changed:
  - uint64
  + *uint64
)
  • LedgerCloseTime — Type changed:
  - int64
  + *int64
)
  • LedgerSequence — Type changed:
  - uint32
  + *uint32
)

✅ Compatible Changes (24)

pkg/chains/stellar (7)
  • GetTransactionStatus — ➕ Added

  • GetTransactionStatus_GET_TRANSACTION_STATUS_FAILED — ➕ Added

  • GetTransactionStatus_GET_TRANSACTION_STATUS_NOT_FOUND — ➕ Added

  • GetTransactionStatus_GET_TRANSACTION_STATUS_SUCCESS — ➕ Added

  • GetTransactionStatus_GET_TRANSACTION_STATUS_UNSPECIFIED — ➕ Added

  • GetTransactionStatus_name — ➕ Added

  • GetTransactionStatus_value — ➕ Added

pkg/chains/stellar.(*GetTransactionResponse) (4)
  • GetResultMetaXdr — ➕ Added

  • GetResultXdr — ➕ Added

  • GetStatus — ➕ Added

  • GetTxHash — ➕ Added

pkg/chains/stellar.GetTransactionResponse (4)
  • ResultMetaXdr — ➕ Added

  • ResultXdr — ➕ Added

  • Status — ➕ Added

  • TxHash — ➕ Added

pkg/types/chains/stellar (5)
  • GetTransactionStatus — ➕ Added

  • GetTransactionStatusFailed — ➕ Added

  • GetTransactionStatusNotFound — ➕ Added

  • GetTransactionStatusSuccess — ➕ Added

  • GetTransactionStatusUnspecified — ➕ Added

pkg/types/chains/stellar.GetTransactionResponse (4)
  • ResultMetaXDR — ➕ Added

  • ResultXDR — ➕ Added

  • Status — ➕ Added

  • TxHash — ➕ Added


📄 View full apidiff report

Base automatically changed from fix/stellar-ledger-key-validation to main September 10, 2026 12:52
@Krish-vemula
Krish-vemula marked this pull request as ready for review September 10, 2026 16:27
@Krish-vemula
Krish-vemula requested review from a team as code owners September 10, 2026 16:27
Copilot AI lite review requested due to automatic review settings September 10, 2026 16:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

It changes a protobuf/gRPC contract and tightens conversion semantics, which is high-impact and benefits from final human review for compatibility and rollout considerations.

Pull request overview

Adds richer, presence-aware Stellar GetTransaction response modeling and enforces stricter (status- and type-consistent) protobuf/domain conversions for Stellar RPC-related types.

Changes:

  • Expanded domain + protobuf GetTransactionResponse to include explicit status, tx hash, result XDR/meta XDR, and optional fee/ledger metadata.
  • Hardened Stellar proto helper converters: validate ledger key XDR inputs and reject status-inconsistent GetTransaction responses; updated relayer servers to surface conversion errors.
  • Updated tests and module dependencies to support the new validation and fields.
File summaries
File Description
pkg/types/chains/stellar/stellar.go Introduces GetTransactionStatus and expands GetTransactionResponse with status/hash/XDR fields and presence-aware fee/ledger metadata.
pkg/loop/internal/relayerset/stellar.go Propagates conversion/validation errors when converting GetTransaction responses to proto.
pkg/loop/internal/relayerset/relayerset_test.go Updates Stellar service tests for new key fixtures and the expanded GetTransactionResponse.
pkg/loop/internal/relayer/stellar.go Propagates conversion/validation errors when converting GetTransaction responses to proto.
pkg/loop/internal/relayer/stellar_test.go Updates round-trip gRPC tests for new key fixtures and expanded GetTransactionResponse.
pkg/chains/stellar/stellar.proto Adds GetTransactionStatus enum; makes fee/ledger fields optional; adds tx hash and result XDR fields.
pkg/chains/stellar/stellar.pb.go Regenerated protobuf Go bindings for the updated Stellar proto definitions.
pkg/chains/stellar/proto_helpers.go Adds LedgerKey XDR validation; makes GetTransaction converters status-aware and validates response consistency.
pkg/chains/stellar/proto_helpers_test.go Adds coverage for LedgerKey XDR validation and the expanded GetTransaction conversion logic.
go.mod Adds Stellar XDR dependency required by new validation logic.
go.sum Updates sums for newly added/indirect dependencies.
Review details

Files not reviewed (1)

  • pkg/chains/stellar/stellar.pb.go: Generated file

Suppressed comments (1)

pkg/chains/stellar/proto_helpers.go:990

  • convertGetTransactionStatusFromProto treats GET_TRANSACTION_STATUS_UNSPECIFIED (0) as an "unsupported" proto enum value, even though it's the defined default when the field is unset. Handling it explicitly makes the validation failure clearer and avoids implying the sender used an unknown enum.
func convertGetTransactionStatusFromProto(s GetTransactionStatus) (stellar.GetTransactionStatus, error) {
	switch s {
	case GetTransactionStatus_GET_TRANSACTION_STATUS_NOT_FOUND:
		return stellar.GetTransactionStatusNotFound, nil
	case GetTransactionStatus_GET_TRANSACTION_STATUS_FAILED:
		return stellar.GetTransactionStatusFailed, nil
	case GetTransactionStatus_GET_TRANSACTION_STATUS_SUCCESS:
		return stellar.GetTransactionStatusSuccess, nil
	default:
		return 0, fmt.Errorf("unsupported proto get transaction status: %d", s)
	}
  • Files reviewed: 9/11 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pkg/chains/stellar/proto_helpers.go
@Krish-vemula
Krish-vemula force-pushed the fix/stellar-get-transaction-status branch from 00aa331 to 4cab41b Compare September 10, 2026 16:47
Comment thread pkg/chains/stellar/proto_helpers.go Outdated
Comment thread pkg/chains/stellar/proto_helpers.go
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.

3 participants