Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update soroban fees #231

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Update soroban fees #231

merged 2 commits into from
Mar 12, 2024

Conversation

chowbao
Copy link
Contributor

@chowbao chowbao commented Mar 11, 2024

  • Added inclusion_fee_bid, inclusion_fee_charged, and resource_fee_refund
  • Updated fee_charged to be the correct amount (current fee_charged value from core is incorrect due to a bug in protocol 20)

@chowbao chowbao requested a review from a team as a code owner March 11, 2024 19:05
Copy link
Contributor

@sydneynotthecity sydneynotthecity left a comment

Choose a reason for hiding this comment

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

Changes look good, I have a question about fee bump transactions and will approve once answered

internal/transform/transaction.go Outdated Show resolved Hide resolved
Comment on lines +251 to +261
if accountEntry.AccountId.Address() == sourceAccountAddress {
accountBalanceEnd = int64(accountEntry.Balance)
}
case xdr.LedgerEntryChangeTypeLedgerEntryState:
accountEntry, ok := change.State.Data.GetAccount()
if !ok {
continue
}

if accountEntry.AccountId.Address() == sourceAccountAddress {
accountBalanceStart = int64(accountEntry.Balance)
Copy link
Contributor

Choose a reason for hiding this comment

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

will this logic work with fee bump transactions as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None of the above logic runs for a fee bump transaction. Right now it only looks at V1 transactions which can have sorobanData

Right now the fee for fee bump transactions is saved in max_fee. Do these fees need some breakdown as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to handle fee bump transactions as well. Although there aren't any in mainnet nor testnet so far

Copy link
Contributor

@sydneynotthecity sydneynotthecity left a comment

Choose a reason for hiding this comment

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

LGTM

@chowbao chowbao merged commit 4874b6b into master Mar 12, 2024
4 checks passed
@sydneynotthecity sydneynotthecity deleted the update-soroban-fees branch July 15, 2024 13:02
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.

2 participants