Skip to content

Conversation

@mootz12
Copy link
Contributor

@mootz12 mootz12 commented Jan 12, 2026

What

We were overriding inclusion fee and not applying resource fee inputs to the simulated transaction

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Jan 12, 2026
Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

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

👋🏻 Little concerned we're working around and covering a bug, take a look inline.

Copilot AI review requested due to automatic review settings January 19, 2026 14:55
Copy link
Contributor

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 fixes a bug in how transaction fees are calculated when simulating and assembling Stellar transactions. Previously, the code was overriding the inclusion fee instead of properly adding it to the resource fee.

Changes:

  • Changed resource_fee parameter type from u64 to i64 to match XDR spec, with validation to ensure non-negative values
  • Fixed fee calculation to sum inclusion fee and resource fee instead of taking the maximum
  • Applied user-specified resource fee to the transaction_data structure when provided

Reviewed changes

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

File Description
cmd/soroban-cli/src/resources.rs Changed resource_fee type to i64 with range validation, matching XDR specification
cmd/soroban-cli/src/assembled.rs Fixed fee calculation logic, removed DEFAULT_TRANSACTION_FEES constant, properly applies resource_fee to transaction_data, added comprehensive tests for edge cases

@mootz12 mootz12 merged commit f62c04d into main Jan 20, 2026
29 of 30 checks passed
@mootz12 mootz12 deleted the fix-fee-override branch January 20, 2026 17:13
@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Done in DevX Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants