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

Make --fee mandatory in transaction build-raw #768

Merged

Conversation

carbolymer
Copy link
Contributor

Changelog

- description: |
    Make `--fee` mandatory in `transaction build-raw`. Remove `TxCmdTxFeeValidationError` type.
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
   - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  # - refactoring    # QoL changes
   - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Seems that fees should be mandatory for eras >= Shelley, but the CLI interface wasn't saying so and was defaulting to 0.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

@@ -636,7 +636,7 @@ constructTxBodyContent
-- ^ Withdrawals
-> [Hash PaymentKey]
-- ^ Required signers
-> Maybe L.Coin
-> L.Coin
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unsure about this bit. I guess it makes sense to say in the function signature, that the fee is required and let users specify 0 if needed.

@@ -175,7 +176,7 @@ runLegacyTransactionBuildRawCmd
runTransactionBuildRawCmd
( Cmd.TransactionBuildRawCmdArgs
sbe mScriptValidity txins readOnlyRefIns txinsc mReturnColl
mTotColl reqSigners txouts mValue mLowBound upperBound fee certs wdrls
mTotColl reqSigners txouts mValue mLowBound upperBound (fromMaybe 0 fee) certs wdrls
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I understand, in Byron the fee is still optional?

@carbolymer carbolymer added this pull request to the merge queue May 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 16, 2024
@carbolymer carbolymer added this pull request to the merge queue May 16, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 16, 2024
…tory-in-transaction-build-raw

Make `--fee` mandatory in `transaction build-raw`
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks May 16, 2024
@carbolymer carbolymer added this pull request to the merge queue May 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 16, 2024
@carbolymer carbolymer merged commit 8ebae88 into main May 17, 2024
21 checks passed
@carbolymer carbolymer deleted the mgalazyn/fix/make-fee-mandatory-in-transaction-build-raw branch May 17, 2024 11:14
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.

3 participants