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

Add estimateMinFeeTx #3962

Merged
merged 6 commits into from Jan 4, 2024
Merged

Add estimateMinFeeTx #3962

merged 6 commits into from Jan 4, 2024

Conversation

lehins
Copy link
Contributor

@lehins lehins commented Jan 2, 2024

Description

Current version of the function evaluateTransactionFee does not handle Byron witnesses and it is not recursive, so it cannot account for the fact that occasionally the change to the fee will affects the size of the transaction and thus the minimum fee. New estomateMinFeeTx improves this logic

Besides adding this new functionality to ledger API there are a few minor additions:

  • Addition of forceDRepPulsingState, which can be used to memoize the result of a premature completion of DRep pulser
  • Addition of Arbitrary instances for bootstrap addresses and ByronKeyPair type that can be used to test functionality related to Byron addresses and witnesses
  • Adds Enc/DecCBOR instances for SignedDSIGN

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@lehins lehins changed the title Add calcMinFeeTx Add estimateMinFeeTx Jan 3, 2024
@lehins lehins force-pushed the lehins/calcMinFeeTx branch 2 times, most recently from a4d2117 to 51d5b6f Compare January 3, 2024 09:37
@lehins lehins requested a review from teodanciu January 3, 2024 09:42
Copy link
Contributor

@Soupstraw Soupstraw left a comment

Choose a reason for hiding this comment

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

LGTM

@Soupstraw
Copy link
Contributor

We should also use this in the fixup function of ImpTest

Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Looks good to me

@lehins lehins merged commit a596eef into master Jan 4, 2024
9 of 11 checks passed
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.

None yet

3 participants