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

Play with runners #775

Merged
merged 3 commits into from
Mar 20, 2023
Merged

Play with runners #775

merged 3 commits into from
Mar 20, 2023

Conversation

pgrange
Copy link
Contributor

@pgrange pgrange commented Mar 16, 2023

Contributes to #761

We want to run the smoke tests on mainnet but that means that we need way more resources than we used to need when only running them on preview or preprod. Just caching the cardano database between two runs will not work anymore or take forever as it's way bigger.

To solve that, we invest in a self-hosted GitHub runner dedicated to running the smoke tests and that will persistently keep the cardano-node database on disk between several runs.

This P.R. updates the C.I. so that the smoke tests use the runner. It also describes the procedure to install a GitHub runner for this. A runner has already been setup and smoke test do work on it:


  • Documentation updated

@github-actions
Copy link

github-actions bot commented Mar 16, 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-20 13:58:42.475877731 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 13.12 5.16 0.52
2 5259 17.06 6.70 0.57
3 5462 19.51 7.63 0.60
5 5875 25.08 9.77 0.68
10 6903 36.69 14.14 0.85
36 12229 97.25 36.96 1.74

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.75 6.19 0.35

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 824 24.50 9.95 0.46
2 114 1138 40.49 16.56 0.65
3 170 1462 59.09 24.32 0.87
4 226 1783 80.34 33.21 1.12

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 647 17.29 7.42 0.37
2 804 18.69 8.19 0.40
3 969 20.08 8.96 0.42
5 1299 22.65 10.42 0.47
10 2124 29.58 14.25 0.59
50 8725 86.35 45.44 1.56

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 675 21.73 9.11 0.42
2 840 23.45 9.99 0.45
3 1006 25.68 11.08 0.48
5 1327 28.63 12.66 0.53
10 2160 37.20 17.07 0.67
46 8093 99.28 49.01 1.66

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 5175 29.49 12.60 0.71
2 5493 48.00 20.73 0.93
3 5815 69.96 30.42 1.19
4 6137 95.38 41.62 1.49

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 5074 10.59 4.43 0.49
5 1 57 5109 12.12 5.31 0.51
5 5 284 5256 18.22 8.83 0.59
5 10 569 5441 25.85 13.24 0.69
5 20 1141 5803 41.11 22.05 0.90
5 30 1705 6154 56.37 30.86 1.10
5 40 2274 6518 71.64 39.68 1.30
5 50 2845 6878 86.92 48.50 1.50
5 58 3300 7166 99.14 55.56 1.67

@pgrange pgrange marked this pull request as ready for review March 16, 2023 16:38
@github-actions
Copy link

github-actions bot commented Mar 16, 2023

Test Results

296 tests   - 11   290 ✔️  - 11   20m 25s ⏱️ -44s
100 suites  -   4       6 💤 ±  0 
    5 files    -   1       0 ±  0 

Results for commit 66d07a4. ± Comparison against base commit 58b1631.

This pull request removes 11 tests.
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
…

♻️ This comment has been updated with latest results.

@ch1bo ch1bo force-pushed the play_with_runners branch from 24ff9e2 to a1e0aa3 Compare March 17, 2023 15:09

# Customize github runner for nix

So that the jobs can find nix later, you should customize the runner settings by adding some
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't we also install nix by hand here or was this done by the workflow?

@ch1bo ch1bo force-pushed the play_with_runners branch from a1e0aa3 to 76ecd90 Compare March 20, 2023 11:07
pgrange added 3 commits March 20, 2023 12:09
We remove the cachix step because:
1. we encounter a bunch of troubles with making it work on a self-hosted runner
2. we don't care about uploading built stuff to cachix from the smoke tests, there are other C.I. steps to do it
3. downloading from cachix works anyway

We remove the github cache because we're going to run the smoke tests several
times on the same self-hosted runner so no need for a cache as everything is
already available locally.

We use a shared absolute path to store the cardano database. We should maybe
move the hydra state to a more local and voltaile directory since we remove
it everytime but that's good enough for now.

We ensure that we do not share the same cardano databases storage between two
concurrent work with concurrency github parameter.
@ch1bo ch1bo force-pushed the play_with_runners branch from 76ecd90 to 66d07a4 Compare March 20, 2023 11:09
@ch1bo ch1bo merged commit c57b543 into master Mar 20, 2023
@ch1bo ch1bo deleted the play_with_runners branch March 20, 2023 15:20
@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.

2 participants