Skip to content

Change retryable refund calculation#654

Merged
rachel-bousfield merged 26 commits intoredo-devnet-reinit-1from
retryable-refund-changes
Jun 23, 2022
Merged

Change retryable refund calculation#654
rachel-bousfield merged 26 commits intoredo-devnet-reinit-1from
retryable-refund-changes

Conversation

@PlasmaPower
Copy link
Contributor

@codecov
Copy link

codecov bot commented Jun 1, 2022

Codecov Report

Merging #654 (44c38da) into redo-devnet-reinit-1 (067883e) will increase coverage by 0.22%.
The diff coverage is 62.39%.

@@                   Coverage Diff                    @@
##           redo-devnet-reinit-1     #654      +/-   ##
========================================================
+ Coverage                 47.68%   47.90%   +0.22%     
========================================================
  Files                       212      212              
  Lines                     22422    22504      +82     
  Branches                    489      489              
========================================================
+ Hits                      10691    10780      +89     
+ Misses                    10277    10271       -6     
+ Partials                   1454     1453       -1     

}
submissionFeeRefund = arbmath.BigMin(submissionFeeRefund, availableRefund)
submissionFeeRefund = arbmath.BigMin(submissionFeeRefund, statedb.GetBalance(from))
availableRefund.Sub(availableRefund, submissionFeeRefund)
Copy link
Member

Choose a reason for hiding this comment

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

submissionFee is spent and submissionFeeRefund is refunded
so I think we should subtract by tx.MaxSubmissionFee instead

Suggested change
availableRefund.Sub(availableRefund, submissionFeeRefund)
availableRefund.Sub(availableRefund, tx.MaxSubmissionFee)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code has been changed to charge the submission fee against the max refund first if possible

@PlasmaPower PlasmaPower changed the base branch from master to devnet-reinit-1 June 2, 2022 18:34
@fredlacs
Copy link
Contributor

Not sure if this would be the appropriate PR but we also discussed 2 changes related to these codepaths:

  • refunding submission cost on a successful autoredeem
  • surfacing the redeemer of a retryable ticket through a precompile

@rachel-bousfield rachel-bousfield changed the base branch from devnet-reinit-1 to redo-devnet-reinit-1 June 17, 2022 18:17
@cla-bot cla-bot bot added the cla-signed label Jun 17, 2022
@PlasmaPower PlasmaPower force-pushed the retryable-refund-changes branch from bc80b6e to c96a6e0 Compare June 22, 2022 16:49
@rachel-bousfield rachel-bousfield merged commit 99ef8ee into redo-devnet-reinit-1 Jun 23, 2022
@rachel-bousfield rachel-bousfield deleted the retryable-refund-changes branch June 23, 2022 18:51
tsahee pushed a commit that referenced this pull request Jul 29, 2025
Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants