Skip to content

Comments

Do not bypass simulation result auth entries processing#501

Draft
aditya1702 wants to merge 3 commits intomainfrom
fix/soroban-auth-bypass-results-mapping
Draft

Do not bypass simulation result auth entries processing#501
aditya1702 wants to merge 3 commits intomainfrom
fix/soroban-auth-bypass-results-mapping

Conversation

@aditya1702
Copy link
Contributor

@aditya1702 aditya1702 commented Feb 10, 2026

What

  • Process the simulation result's Results array when building transaction.
  • Add a check for the case where operation is InvokeHostFunction and the simulationResult.Results field is empty.

Why

TODO

Known limitations

N/A

Issue that this PR addresses

Closes #502

@aditya1702 aditya1702 self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 17:56
@aditya1702 aditya1702 added the bug Something isn't working label Feb 10, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens Soroban transaction handling to prevent bypassing auth-entry verification when building/signing channel-account transactions, and extends the GraphQL simulation-result input conversion to carry through host function results.

Changes:

  • Reject Soroban InvokeHostFunction transactions when the simulation response has empty/nil results, ensuring auth entries cannot be skipped.
  • Extend GraphQL convertSimulationResult to parse and populate simulation results from JSON-encoded strings.
  • Add/extend unit tests covering the new validation and GraphQL conversion behavior.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/services/transaction_service.go Adds a new validation error and enforces non-empty simulation Results for InvokeHostFunction.
internal/services/transaction_service_test.go Adds test cases to confirm InvokeHostFunction rejects empty/nil results while other Soroban ops may allow it.
internal/serve/graphql/resolvers/resolver.go Parses SimulationResultInput.Results strings into entities.RPCSimulateHostFunctionResult.
internal/serve/graphql/resolvers/mutations.resolvers.go Maps the new Soroban validation error to INVALID_SOROBAN_TRANSACTION.
internal/serve/graphql/resolvers/mutations_resolvers_test.go Adds tests for GraphQL error mapping and for convertSimulationResult results parsing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aditya1702 aditya1702 requested a review from a team February 10, 2026 19:20
@aditya1702 aditya1702 marked this pull request as draft February 12, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not silently ignore the simulationResult.Results field when building transaction through GraphQL mutation

1 participant