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

Remove --ledger-genesis hydra-node argument #863

Merged
merged 3 commits into from
May 18, 2023

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented May 11, 2023

Why

We don't really need to provide this file since values needed can be queried from cardano-node.

What

Issue a query to cardano-node to fetch the GenesisParameters and then convert those to ledger Globals used when applying transactions to L2 ledger.


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

@v0d1ch v0d1ch self-assigned this May 11, 2023
@v0d1ch v0d1ch requested review from ch1bo and pgrange May 11, 2023 13:25
@github-actions
Copy link

github-actions bot commented May 11, 2023

Test Results

318 tests  +10   312 ✔️ +10   19m 35s ⏱️ -51s
108 suites +  4       6 💤 ±  0 
    6 files   +  1       0 ±  0 

Results for commit 3c05590. ± Comparison against base commit c77d536.

This pull request removes 1 and adds 11 tests. Note that renamed tests count towards both.
Hydra.Options/Hydra Node RunOptions ‑ parses --ledger-genesis-file as a filepath
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.

@github-actions
Copy link

github-actions bot commented May 11, 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-05-17 17:51:34.459791348 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial e5cc20df4a2216e706b3d00b59fbb15a7cf12dbd28d271d4a8cf6d04 4336
νCommit 47c102d5f95a0648b4065f2b8bff59d3e34536a82ee7b0d42df73123 2124
νHead 9fe3a5c4d826f9475368e1e24c15bf22f4df19893cce2689d3c0564a 9492
μHead 7bec671467e923281c92e94257931913be106e217270a7b97076cb9b* 4148
  • 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 4742 13.22 5.18 0.50
2 4947 17.16 6.72 0.56
3 5149 16.62 6.42 0.56
5 5566 23.91 9.26 0.66
10 6584 33.57 12.82 0.80
37 12123 99.31 37.68 1.76

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.29 5.93 0.34

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 816 27.63 10.77 0.49
2 114 1138 43.42 17.06 0.67
3 170 1462 60.69 24.01 0.88
4 227 1783 82.13 32.63 1.13

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 640 18.58 8.31 0.39
2 679 17.76 7.45 0.38
3 969 21.67 10.94 0.45
5 1300 24.46 13.45 0.50
10 1463 25.68 11.14 0.50
50 8725 86.87 69.87 1.74

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 676 24.77 10.64 0.46
2 840 26.06 11.84 0.48
3 1005 28.20 13.38 0.52
5 1335 31.63 16.12 0.58
10 2160 39.77 22.80 0.73
45 7938 99.74 70.74 1.82

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 4856 22.19 9.33 0.61
2 5180 36.24 15.44 0.78
3 5503 52.87 22.72 0.98
4 5825 73.21 31.59 1.23
5 6005 89.78 38.67 1.42

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 4766 8.67 3.57 0.46
5 1 57 4805 10.06 4.39 0.47
5 5 285 4948 15.64 7.69 0.55
5 10 567 5122 22.61 11.82 0.64
5 20 1138 5478 36.57 20.08 0.83
5 30 1707 5841 50.53 28.34 1.02
5 40 2279 6206 64.49 36.60 1.21
5 50 2849 6567 78.46 44.87 1.40
5 65 3699 7101 99.42 57.28 1.68

@v0d1ch v0d1ch force-pushed the query-shelley-genesis-from-node branch 2 times, most recently from ed9f7e6 to f02a619 Compare May 12, 2023 12:17
Copy link
Collaborator

@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.

Overall looks good! Some minor things, but duplicated CHANGELOG entry and the computeStabilityWindow is something that must be changed or clarified.

CHANGELOG.md Outdated Show resolved Hide resolved
hydra-cluster/test/Test/GeneratorSpec.hs Outdated Show resolved Hide resolved
hydra-node/exe/hydra-node/Main.hs Outdated Show resolved Hide resolved
hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs Outdated Show resolved Hide resolved
hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs Outdated Show resolved Hide resolved
hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs Outdated Show resolved Hide resolved
hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs Outdated Show resolved Hide resolved
hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs Outdated Show resolved Hide resolved
@v0d1ch v0d1ch force-pushed the query-shelley-genesis-from-node branch 2 times, most recently from 1e4be55 to ac75c45 Compare May 15, 2023 13:31
@v0d1ch v0d1ch requested a review from ch1bo May 15, 2023 13:33
Copy link
Collaborator

@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.

Minor comments remaining

hydra-cluster/test/Test/GeneratorSpec.hs Outdated Show resolved Hide resolved
hydra-node/src/Hydra/Ledger/Cardano/Configuration.hs Outdated Show resolved Hide resolved
hydra-node/exe/hydra-node/Main.hs Outdated Show resolved Hide resolved
@v0d1ch v0d1ch force-pushed the query-shelley-genesis-from-node branch 2 times, most recently from 53ded6f to bdbd15a Compare May 17, 2023 10:36
@v0d1ch v0d1ch requested a review from ch1bo May 17, 2023 10:36
hydra-cluster/test/Test/GeneratorSpec.hs Outdated Show resolved Hide resolved
@v0d1ch v0d1ch force-pushed the query-shelley-genesis-from-node branch from bdbd15a to 76f6383 Compare May 17, 2023 15:57
@v0d1ch v0d1ch requested a review from ch1bo May 17, 2023 15:57
Remove duplicate entry in changelog

Use property in GeneratorSpec
@ch1bo ch1bo force-pushed the query-shelley-genesis-from-node branch from 76f6383 to 3ea7582 Compare May 17, 2023 17:34
@ch1bo ch1bo force-pushed the query-shelley-genesis-from-node branch from 3ea7582 to 3c05590 Compare May 17, 2023 17:36
Copy link
Collaborator

@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.

Addressed some minor things in a commit myself. Approved now.

@v0d1ch v0d1ch merged commit d1d4eec into master May 18, 2023
@v0d1ch v0d1ch deleted the query-shelley-genesis-from-node branch May 18, 2023 07:34
@ch1bo ch1bo added this to the 0.11.0 milestone Jun 27, 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