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

Change Era from BabbageEra to ConwayEra #1338

Merged
merged 1 commit into from
Sep 5, 2024
Merged

Conversation

locallycompact
Copy link
Contributor

@locallycompact locallycompact commented Mar 5, 2024

Switch hydra from BabbageEra to ConwayEra. A Conway compatible hydra-node can be built using

nix build .#hydra-node

or a docker image with

nix build .#docker-hydra-node

  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter

@locallycompact
Copy link
Contributor Author

@ch1bo ch1bo self-assigned this Mar 6, 2024
@ch1bo
Copy link
Collaborator

ch1bo commented Mar 6, 2024

@ch1bo Here is the withoutProtocolUpdates error. https://github.com/input-output-hk/hydra/actions/runs/8161289799/job/22309727685?pr=1338#step:5:2151

Protocol updates in the tx body seem to be bound only up to protocol version 8 (= babbage) as they (most likely) are done differently in conway (= protocol version 9)

image

Consequently, let's not clear that field (i.e. the updateTxBodyL) in the generator, but see whether the normal arbitrary transactions are fine within our tests. If not, we might need to tweak the generator to exclude any of the governance actions - the equivalents of protocol updates.

@locallycompact locallycompact force-pushed the lc/conway-support branch 3 times, most recently from b3c46c8 to e29ccc4 Compare March 13, 2024 13:48
@locallycompact locallycompact marked this pull request as draft March 13, 2024 14:06
Copy link

github-actions bot commented Mar 13, 2024

Transaction 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 2024-09-05 12:47:43.99006637 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2fac819a1f4f14e29639d1414220d2a18b6abd6b8e444d88d0dda8ff 3799
νCommit 2043a9f1a685bcf491413a5f139ee42e335157c8c6bc8d9e4018669d 1743
νHead bd9fad235c871fb7f837c767593018a84be3083ff80f9dab5f1c55f9 10194
μHead c8038945816586c4d38926ee63bba67821eb863794220ebbd0bf79ee* 4607
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per head.

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 5195 5.88 2.33 0.44
2 5394 6.99 2.76 0.46
3 5597 8.46 3.34 0.49
5 5998 11.21 4.43 0.54
10 7003 18.11 7.16 0.66
56 16254 81.43 32.21 1.76

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 569 10.52 4.15 0.29
2 754 13.86 5.65 0.34
3 947 17.33 7.20 0.38
5 1319 24.65 10.44 0.48
10 2256 45.22 19.36 0.75
20 4124 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 21.49 8.43 0.41
2 113 671 32.13 12.75 0.53
3 169 782 47.29 18.88 0.70
4 228 893 57.55 23.29 0.82
5 283 1004 75.51 30.71 1.03
6 340 1116 93.70 38.31 1.23

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 636 17.71 7.79 0.38
2 806 19.33 9.16 0.41
3 933 20.65 10.41 0.43
5 1365 27.26 14.37 0.53
10 2161 36.03 21.42 0.69
50 7930 97.77 74.58 1.83

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 664 20.98 9.41 0.42
2 792 22.41 10.79 0.44
3 986 24.30 12.54 0.48
5 1213 26.86 15.03 0.53
10 2128 36.08 23.76 0.71
49 8076 98.84 83.48 1.91

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 690 27.10 11.65 0.48
2 853 29.32 13.50 0.52
3 951 30.75 14.71 0.55
5 1416 35.86 19.06 0.64
10 2013 43.99 26.07 0.78
39 6521 99.59 73.88 1.77

Abort transaction costs

There is some variation due to the random mixture of initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 5105 17.43 7.59 0.57
2 5238 29.27 12.91 0.71
3 5461 44.01 19.55 0.89
4 5539 60.00 26.65 1.07
5 5579 71.40 31.59 1.20
6 5808 94.65 42.10 1.47

FanOut transaction costs

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 5033 7.36 3.11 0.45
5 1 57 5068 8.88 3.99 0.47
5 5 284 5202 13.60 6.92 0.54
5 10 570 5373 19.06 10.39 0.62
5 20 1139 5713 30.58 17.60 0.78
5 30 1711 6057 41.70 24.63 0.93
5 40 2278 6393 53.03 31.76 1.09
5 50 2842 6728 64.37 38.89 1.25
5 81 4616 7789 99.92 61.18 1.74

End-to-end benchmark results

This page is intended to collect the latest end-to-end benchmark results produced by Hydra's continuous integration (CI) system from the latest master code.

Please note that these results are approximate as they are currently produced from limited cloud VMs and not controlled hardware. Rather than focusing on the absolute results, the emphasis should be on relative results, such as how the timings for a scenario evolve as the code changes.

Generated at 2024-09-05 12:50:01.549962691 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.126726911
P99 7.703580429999997ms
P95 5.081546599999999ms
P50 3.9123945ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.007426874
P99 113.3222350300001ms
P95 31.42892225ms
P50 20.537886ms
Number of Invalid txs 0

Copy link

github-actions bot commented Mar 14, 2024

Test Results

459 tests   - 5   454 ✅  - 3   20m 29s ⏱️ + 4m 5s
138 suites  - 1     5 💤  - 2 
  5 files   ±0     0 ❌ ±0 

Results for commit 25e7630. ± Comparison against base commit 0062556.

This pull request removes 23 and adds 18 tests. Note that renamed tests count towards both.
Hydra.API.ClientInput/JSON encoding of (ReasonablySized (ClientInput (Tx BabbageEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.ClientInput/JSON encoding of (ReasonablySized (ClientInput (Tx BabbageEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (ClientInput (Tx BabbageEra)).json
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxRequest (Tx BabbageEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxRequest (Tx BabbageEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (DraftCommitTxRequest (Tx BabbageEra)).json
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxResponse (Tx BabbageEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxResponse (Tx BabbageEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (DraftCommitTxResponse (Tx BabbageEra)).json
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (SubmitTxRequest (Tx BabbageEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (SubmitTxRequest (Tx BabbageEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (SubmitTxRequest (Tx BabbageEra)).json
Hydra.API.ServerOutput/JSON encoding of (ReasonablySized (ServerOutput (Tx BabbageEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.ServerOutput/JSON encoding of (ReasonablySized (ServerOutput (Tx BabbageEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (ServerOutput (Tx BabbageEra)).json
…
Hydra.API.ClientInput/JSON encoding of (ReasonablySized (ClientInput (Tx ConwayEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.ClientInput/JSON encoding of (ReasonablySized (ClientInput (Tx ConwayEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (ClientInput (Tx ConwayEra)).json
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxRequest (Tx ConwayEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxRequest (Tx ConwayEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (DraftCommitTxRequest (Tx ConwayEra)).json
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxResponse (Tx ConwayEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (DraftCommitTxResponse (Tx ConwayEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (DraftCommitTxResponse (Tx ConwayEra)).json
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (SubmitTxRequest (Tx ConwayEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.HTTPServer/JSON encoding of (ReasonablySized (SubmitTxRequest (Tx ConwayEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (SubmitTxRequest (Tx ConwayEra)).json
Hydra.API.ServerOutput/JSON encoding of (ReasonablySized (ServerOutput (Tx ConwayEra))) ‑ allows to encode values with aeson and read them back
Hydra.API.ServerOutput/JSON encoding of (ReasonablySized (ServerOutput (Tx ConwayEra))) ‑ produces the same JSON as is found in golden/ReasonablySized (ServerOutput (Tx ConwayEra)).json
…

♻️ This comment has been updated with latest results.

@ch1bo ch1bo linked an issue Mar 15, 2024 that may be closed by this pull request
2 tasks
@locallycompact locallycompact changed the title Era = ConwayEra Change Era from BabbageEra to ConwayEra May 13, 2024
@locallycompact locallycompact force-pushed the lc/conway-support branch 6 times, most recently from 4f54a45 to 25866ad Compare June 4, 2024 15:18
@locallycompact locallycompact force-pushed the lc/conway-support branch 5 times, most recently from 609d38c to 9578aed Compare July 12, 2024 06:25
Copy link
Contributor

@noonio noonio left a comment

Choose a reason for hiding this comment

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

Looks really good!

Main item is just the investigation to see if we can support the old Babbage transactions on our ledger still; if it's easy let's do it, if not let's at least file an issue and think about if we want to do it or explicitly not allow it.

Lovely work!

@locallycompact locallycompact force-pushed the lc/conway-support branch 3 times, most recently from c6cc8e1 to df12b9f Compare September 3, 2024 10:08
@locallycompact locallycompact marked this pull request as ready for review September 3, 2024 10:13
@locallycompact locallycompact force-pushed the lc/conway-support branch 7 times, most recently from 5de46cf to d251675 Compare September 4, 2024 16:02
locallycompact pushed a commit that referenced this pull request Sep 5, 2024
This is fix for a subtle bug brought up in #1338 ; namely, that version
1.6 of `jq` has a bug around integer handling:

```
> nix-shell -p jq -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/976fa3369d722e76f37c77493d99829540d43845.tar.gz
> jq -n '9223372036854775807'
9223372036854776000
```

jq 1.7+ doesn't have this issue. Unfortunately, `ubuntu-latest` ships
with jq 1.6. So we need to use a special devShell.

Happily, [there is this nice GitHub
action](https://github.com/marketplace/actions/nix-develop-action),
which makes it easy!

So, we introduce a devShell with the right version of jq, and run our CI
steps there.
Do filter protocol updates in Arbitrary Tx anymore

Those are now represented differently in Conway and we'll see how the
fully random transactions (including governance actions that supersede
protocol updates) behave in situations where we use this generator.
@locallycompact locallycompact enabled auto-merge (squash) September 5, 2024 12:51
@locallycompact locallycompact merged commit 1fdcb86 into master Sep 5, 2024
36 of 37 checks passed
@locallycompact locallycompact deleted the lc/conway-support branch September 5, 2024 12:54
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.

Switch L2 ledger to Conway
4 participants