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

FIX some code format with fourmolu #539

Closed
wants to merge 1 commit into from

Conversation

pgrange
Copy link
Contributor

@pgrange pgrange commented Oct 6, 2022

Just ran the following command to fix some formating issues:

find . -name dist-newstyle -prune -o -type f -name '*.hs' | grep -v dist-newstyle | xargs fourmolu -i

To check before merging:

  • CHANGELOG is up to date
  • Up to date with master

Just ran the following command to fix some formating issues:

```bash
find . -name dist-newstyle -prune -o -type f -name '*.hs' | grep -v dist-newstyle | xargs fourmolu -i
```
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

Transactions Costs

Sizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using arbitrary values and results are not fully deterministic and comparable to previous runs.

Metadata
Generated at 2022-10-06 13:21:12.522666602 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 4833 10.03 3.97 0.47
2 5038 13.58 5.38 0.52
3 5243 14.71 5.79 0.54
5 5656 17.85 6.98 0.59
10 6681 29.95 11.70 0.77
45 13855 98.83 38.23 1.83

Cost of Commit Transaction

Currently only one UTxO per commit allowed (this is about to change soon)

UTxO Tx size % max Mem % max CPU Min fee ₳
1 5771 19.83 8.01 0.62

Cost of CollectCom Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 13057 20.60 8.25 0.95
2 13378 36.37 14.73 1.14
3 13779 56.02 22.87 1.37
4 14173 79.13 32.46 1.65

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 9327 8.19 3.36 0.65
2 9355 8.05 3.16 0.65
3 9659 9.75 4.27 0.68
5 9989 11.31 5.17 0.72
10 10877 16.22 7.82 0.82
30 12244 22.93 8.76 0.94
70 16203 41.21 15.60 1.31

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 9328 8.16 3.34 0.65
2 9493 8.94 3.79 0.67
3 9694 10.16 4.42 0.69
5 10021 11.68 5.30 0.72
10 10885 16.25 7.82 0.82
30 14219 32.42 17.07 1.16
43 16367 42.74 23.01 1.38

Cost of Abort Transaction

Some variation because of random mixture of still initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 13498 22.50 9.35 0.99
2 14100 44.12 19.52 1.27
3 13926 52.63 22.47 1.35
4 14250 75.81 33.05 1.63
5 14432 97.27 42.48 1.88

Cost of FanOut Transaction

Involves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 13420 9.88 4.31 0.85
2 13585 12.41 5.59 0.89
3 13488 12.92 6.07 0.89
5 13695 16.72 8.12 0.95
10 13743 23.57 12.23 1.03
50 15310 85.56 47.86 1.86
59 15639 99.28 55.80 2.04

@pgrange
Copy link
Contributor Author

pgrange commented Oct 6, 2022

This P.R. used fourmolu 0.6.0 but our nix shell is locked to 0.4.0 and it wants to change all our haddock to trailing dock according to this change in version 0.5.0: fourmolu/fourmolu#124
So rejecting this P.R. for now.

@pgrange pgrange marked this pull request as draft October 6, 2022 15:27
@pgrange
Copy link
Contributor Author

pgrange commented Oct 6, 2022

Also, I observed discrepencies between what fourmolu does in vscode and what it does from outside vscode. I opened an issue to get more information about that.

Here is how to reproduce:

git switch pascal/fourmolu-all-the-things
sed -i -e '77 a\
       -- | This is some doc
' hydra-node/src/Hydra/Snapshot.hs

So now you have a documentation from above.

Open the file in vscode, make a dummy change and save. It will do some stuff but it will not change it to doc from below.

Now if you run fourmolu from command line, it will replace this above doc with a below doc:

fourmolu -i hydra-node/src/Hydra/Snapshot.hs
Loaded config from: /Users/pascal/git/github.com/input-output-hk/hydra-poc/fourmolu.yaml

@pgrange pgrange closed this Oct 6, 2022
@pgrange pgrange deleted the pascal/fourmolu-all-the-things branch October 10, 2022 12:11
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