Skip to content

tx fetch fee miscalculating resource fees for fee bump txns that wrap soroban txns #2101

@elizabethengelman

Description

@elizabethengelman

What version are you using?

Using the cli built from main

What did you do?

❯ cargo run tx fetch fee --hash 9422e024c72184f61694bd1c043f51435ff1bba292be2cc729c5bc70b8a9fde8 --network main

What did you see?

┌────────────────────────────────────────────────────────────────────────────────────────────┐
│ Fee Proposed: 10208876                                                                     │
├────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 10208876 │ Resource Fee: 0                                                  │
├────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 10208876 │ Non-Refundable: 285226 │ Refundable: -285226                     │
│                         │                        │                                         │
│                         │ cpu instructions       │ return value                            │
│                         │ storage read/write     │ storage rent                            │
│                         │ tx size                │ events                                  │
├────────────────────────────────────────────────────────────────────────────────────────────┤
│                               👆 Proposed Fee  👇 Final Fee                                │
├────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 200      │ Non-Refundable: 285226 │ Refundable: 3317604 │ Refunded: 6605846 │
├────────────────────────────────────────────────────────────────────────────────────────────┤
│ Inclusion Fee: 200      │ Resource Fee: 3602830                        │ Refunded: 6605846 │
├────────────────────────────────────────────────────────────────────────────────────────────┤
│ Fee Charged: 3603030                                                   │ Refunded: 6605846 │
└────────────────────────────────────────────────────────────────────────────────────────────┘

What did you expect to see?

the refundable fee should not be negative

Shout out to @quietbits for finding this bug!

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions