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

Return faucet funds #773

Merged
merged 7 commits into from
Mar 16, 2023
Merged

Return faucet funds #773

merged 7 commits into from
Mar 16, 2023

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Mar 15, 2023

Why

As part of the Mainnet compatibility issue #713 we would like to be able to return the funds back to our faucet.

  • CHANGELOG updated
  • Documentation updated
  • Added and/or updated haddocks
  • No new TODOs introduced or explained herafter

@v0d1ch v0d1ch self-assigned this Mar 15, 2023
@v0d1ch v0d1ch requested review from ch1bo, ffakenz and pgrange March 15, 2023 13:58
@github-actions
Copy link

github-actions bot commented Mar 15, 2023

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 2023-03-16 21:46:22.170331593 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 9492414f8f96e8483a0b8ee268fc06a954641cb2cbaa9a8b093c2c9b 4621
νCommit 5d3f107aaa56d06188cf231941cf8163e777236a9cfdc48fd4bbfa23 2422
νHead 82f16b51e2d81c6f4d42dd7398b4713a445464902f63dfd86ffe754e 8954
μHead 4083fa7081a0f4b4092fb02867c9ac594bb0e8bab8110ab242ba5a72* 4458
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per Head.

Cost of Init Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 5054 12.82 5.04 0.51
2 5259 16.76 6.58 0.56
3 5468 18.24 7.11 0.59
5 5874 22.96 8.89 0.66
10 6899 36.19 13.93 0.85
36 12231 97.88 37.22 1.75

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 603 15.83 6.22 0.35

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 816 24.76 10.05 0.46
2 114 1140 40.32 16.49 0.65
3 170 1468 58.94 24.25 0.87
4 227 1784 80.18 33.13 1.12

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 673 17.74 7.77 0.38
2 671 16.25 6.95 0.36
3 969 20.08 8.96 0.42
5 1299 22.87 10.50 0.47
10 2124 30.01 14.42 0.59
50 8721 85.93 45.27 1.55

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 675 21.78 9.12 0.42
2 840 23.88 10.16 0.45
3 1005 25.16 10.88 0.48
5 1336 28.68 12.68 0.53
10 2153 37.67 17.26 0.67
46 8101 99.75 49.20 1.67

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 5169 29.49 12.60 0.71
2 5492 47.99 20.73 0.93
3 5816 69.96 30.42 1.19
4 6142 95.74 41.76 1.50

Cost of FanOut Transaction

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

Parties UTxO UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
5 0 0 5077 10.59 4.43 0.49
5 1 57 5113 12.12 5.31 0.51
5 5 285 5262 18.22 8.83 0.59
5 10 570 5438 25.85 13.24 0.69
5 20 1136 5793 41.11 22.05 0.90
5 30 1708 6161 56.37 30.86 1.10
5 40 2277 6516 71.64 39.68 1.30
5 50 2845 6872 86.92 48.50 1.50
5 58 3305 7170 99.14 55.56 1.67

@github-actions
Copy link

github-actions bot commented Mar 15, 2023

Test Results

287 tests   - 10   281 ✔️  - 10   20m 24s ⏱️ -44s
  96 suites  -   3       6 💤 ±  0 
    4 files    -   1       0 ±  0 

Results for commit ba0b917. ± Comparison against base commit 439ee45.

This pull request removes 11 and adds 1 tests. Note that renamed tests count towards both.
Hydra.TUI.Options ‑ parses --cardano-signing-key option
Hydra.TUI.Options ‑ parses --connect option
Hydra.TUI.Options ‑ parses --node-socket option
Hydra.TUI.Options ‑ parses --testnet-magic option
Hydra.TUI/end-to-end smoke tests ‑ display feedback long enough
Hydra.TUI/end-to-end smoke tests ‑ doesn't allow multiple initializations
Hydra.TUI/end-to-end smoke tests ‑ starts & renders
Hydra.TUI/end-to-end smoke tests ‑ supports the full Head life cycle
Hydra.TUI/end-to-end smoke tests ‑ supports the init & abort Head life cycle
Hydra.TUI/text rendering errors ‑ should show not enough fuel message and suggestion
…
Test.Hydra.Cluster.Faucet/returnFundsToFaucet ‑ seedFromFaucet and returnFundsToFaucet work together

♻️ This comment has been updated with latest results.

Copy link
Member

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Only leaving a comment as I have been helping in doing this. Needs approval of others. Was the PR checklist met? I guess we can tick things off @v0d1ch

hydra-cluster/src/Hydra/Cluster/Faucet.hs Outdated Show resolved Hide resolved
ch1bo and others added 6 commits March 16, 2023 10:38
This is using a previously drafted prototype of this logic.
This way, the faucet will have all the funds.
This means a minimal as possible UTxO is created for the faucet.
- Check that faucet owns one utxo more after the test run

- Check if initial vs. final faucet funds are just what we paid for the
fees in the test
@v0d1ch v0d1ch force-pushed the ensemble/return-faucet-funds branch from 51c71c8 to f164cff Compare March 16, 2023 09:39
@v0d1ch v0d1ch merged commit 2f9df98 into master Mar 16, 2023
@v0d1ch v0d1ch deleted the ensemble/return-faucet-funds branch March 16, 2023 23:03
@ch1bo ch1bo mentioned this pull request Mar 20, 2023
4 tasks
@pgrange pgrange added this to the 0.10.0 milestone May 11, 2023
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