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

SCP-821: Add a fixed transaction cost to the emulator #2943

Merged
merged 28 commits into from
Apr 15, 2021
Merged

Conversation

sjoerdvisscher
Copy link
Contributor

@sjoerdvisscher sjoerdvisscher commented Apr 2, 2021

Pre-submit checklist:

  • Branch
    • Commit sequence broadly makes sense
    • Key commits have useful messages
    • Relevant tickets are mentioned in commit messages
  • PR
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • If you changed any Haskell files:
    • nix-shell shell.nix --run fix-stylish-haskell to fix any formatting issues

Pre-merge checklist:

  • Someone approved it
  • Commits have useful messages
  • Review clarifications made it into the code
  • History is moderately tidy; or going to squash-merge

@sjoerdvisscher sjoerdvisscher changed the title Scp 821 Add a fixed transaction cost to the emulator Apr 6, 2021
@sjoerdvisscher sjoerdvisscher changed the title Add a fixed transaction cost to the emulator SCP-821: Add a fixed transaction cost to the emulator Apr 7, 2021
@sjoerdvisscher sjoerdvisscher requested a review from j-mueller April 7, 2021 10:53
@sjoerdvisscher sjoerdvisscher marked this pull request as ready for review April 7, 2021 11:26
# Conflicts:
#	plutus-use-cases/test/Spec/Auction.hs
#	plutus-use-cases/test/Spec/Prism.hs
#	plutus-use-cases/test/Spec/crowdfundingEmulatorTestOutput.txt
@sjoerdvisscher sjoerdvisscher marked this pull request as draft April 9, 2021 11:31
@sjoerdvisscher sjoerdvisscher marked this pull request as ready for review April 13, 2021 16:05
@sjoerdvisscher sjoerdvisscher requested review from j-mueller and removed request for j-mueller April 13, 2021 16:06
plutus-contract/src/Wallet/Emulator/NodeClient.hs Outdated Show resolved Hide resolved
walletFundsChange :: Wallet -> Value -> TracePredicate
walletFundsChange w dlt =
flip postMapM (L.generalize $ Folds.walletFunds w) $ \finalValue -> do
flip postMapM (L.generalize $ (,) <$> Folds.walletFunds w <*> Folds.walletFees w) $ \(finalValue, fees) -> do
Copy link
Contributor

Choose a reason for hiding this comment

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

This is very nice now!

sjoerdvisscher and others added 2 commits April 15, 2021 10:12
Co-authored-by: Jann Müller <j-mueller@users.noreply.github.com>
@sjoerdvisscher sjoerdvisscher merged commit 5efcd64 into master Apr 15, 2021
@sjoerdvisscher sjoerdvisscher deleted the SCP-821 branch April 15, 2021 14:34
@GeorgeFlerovsky
Copy link

GeorgeFlerovsky commented Apr 22, 2021

This "minimum fee" parameter should really be better documented. In particular, I didn't see it mentioned at all in the Plutus Playground, which led to some confusion when my actions did not go through because I didn't have an extra 10 ADA in the simulated wallets for every transaction.

Also, I'm assuming that 10 ADA won't be the actual minimum fee when Plutus hits mainnet? :)

Finally, I would have expected something like this to be contained in a config file, as opposed to hardcoded in Haskell source files...

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.

4 participants