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 the observed contesters in Direct chain #1266

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Conversation

ch1bo
Copy link
Collaborator

@ch1bo ch1bo commented Jan 22, 2024

Stumbled over this when reviewing another observation function in the Hydra.Chain.Direct.Tx module and filed this PR as a "red bin" item.

Obviously the ContestObservation and related types were assuming the included contesters to be the new list, but the code was looking at the "old datum".

Did not find or write a test which would catch this (yet).


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

@ch1bo ch1bo added the red bin label Jan 22, 2024
Copy link

github-actions bot commented Jan 22, 2024

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 2024-03-21 15:51:52.445620361 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial bccf2a430c016bc960fbf31b02694011cd399d20da8882aac9d33611 4110
νCommit 56b0f0b597150e619c76bed60683f3b1e42d7bc0685ed951b882bfc5 1975
νHead 86bff95ba20e9d1d1b34899a56d86bbacc9fed999260b27dcc92d128 9351
μHead 88f533cf67cd0fc93d7d9ccf0a8b1d69ffd1208a825efbebbc1d36ba* 4213
  • 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 4795 8.78 3.35 0.46
2 4997 10.70 4.09 0.49
3 5197 12.70 4.86 0.52
5 5599 16.47 6.30 0.58
10 6604 26.22 10.05 0.73
48 14244 99.97 38.37 1.86

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 591 10.24 4.04 0.29
2 784 13.88 5.64 0.34
3 965 17.66 7.29 0.39
5 1342 25.66 10.74 0.49
10 2282 48.19 20.30 0.79
19 3972 97.83 40.79 1.41

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 56 543 16.52 6.53 0.35
2 114 654 27.53 10.95 0.48
3 170 768 38.53 15.50 0.61
4 226 874 53.26 21.50 0.77
5 282 984 66.24 26.99 0.92
6 336 1095 84.07 34.35 1.13

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 591 8.34 4.61 0.28
2 734 8.96 5.64 0.30
3 933 10.07 7.05 0.32
5 1285 12.42 9.88 0.38
10 1970 15.80 15.16 0.47
50 8344 53.05 64.99 1.41

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 655 8.65 4.75 0.28
2 746 9.42 5.82 0.30
3 846 9.62 6.51 0.31
5 1161 11.40 8.95 0.36
10 2013 16.55 15.53 0.48
50 7675 49.46 61.53 1.33

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 4670 17.09 7.39 0.55
2 4738 26.85 11.63 0.66
3 4855 39.73 17.32 0.81
4 5034 53.81 23.52 0.98
5 5130 74.22 32.60 1.21

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 4627 8.27 3.45 0.45
5 1 56 4660 9.00 3.99 0.46
5 5 284 4796 13.91 6.96 0.52
5 10 570 4968 19.37 10.40 0.60
5 20 1138 5305 31.11 17.62 0.76
5 30 1708 5648 42.22 24.58 0.92
5 40 2276 5986 54.17 31.89 1.08
5 50 2846 6326 65.50 38.95 1.24
5 79 4494 7307 98.79 59.60 1.70

End-To-End Benchmark Results

This page is intended to collect the latest end-to-end benchmarks results produced by Hydra's Continuous Integration system from the latest master code.

Please take those results with a grain of salt as they are currently produced from very limited cloud VMs and not controlled hardware. Instead of focusing on the absolute results, the emphasis should be on relative results, eg. how the timings for a scenario evolve as the code changes.

Generated at 2024-03-21 15:55:11.135727945 UTC

Baseline Scenario

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.265071846
P99 71.46281496000007ms
P95 32.1870791ms
P50 21.061037ms
Number of Invalid txs 0

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.580503621
P99 7.5908550399999735ms
P95 6.0561379ms
P50 4.355784ms
Number of Invalid txs 0

Copy link

Test Results

408 tests  ±0   401 ✅ ±0   15m 40s ⏱️ +37s
136 suites ±0     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 2a2f53f. ± Comparison against base commit 9c7d20f.

@ch1bo ch1bo removed their assignment Feb 2, 2024
@ch1bo ch1bo added bug 🐛 Something isn't working and removed red bin labels Mar 14, 2024
@ch1bo
Copy link
Collaborator Author

ch1bo commented Mar 18, 2024

Discussed in tactical today: We should fix this already (by rebasing and applying this fix), and add a follow-up 🔴 red bin item to eventually cover this with a test (later).

@ch1bo ch1bo added this to the 0.16.0 milestone Mar 18, 2024
Stumbled over this when reviewing another observation function in the
Hydra.Chain.Direct.Tx module.

Obviously the ContestObservation and related types were assuming the
included contesters to be the new list, but the code was looking at the
"old datum".

Did not find or write a test which would catch this (yet).
@v0d1ch
Copy link
Contributor

v0d1ch commented Mar 21, 2024

Follow up task to address the testing
#1370

@v0d1ch v0d1ch marked this pull request as ready for review March 21, 2024 15:50
@v0d1ch v0d1ch enabled auto-merge March 21, 2024 15:51
@v0d1ch v0d1ch merged commit 013ae99 into master Mar 21, 2024
20 checks passed
@v0d1ch v0d1ch deleted the fix-contest-observation branch March 21, 2024 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants