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 contestation period conversion in smoke test #1246

Merged
merged 2 commits into from Jan 11, 2024

Conversation

ch1bo
Copy link
Member

@ch1bo ch1bo commented Jan 10, 2024

We had been truncating the block time even after taking the 10 multiple. Preview network uses 0.05s and this * 10 does truncate to 0s.

Adds a fromDiffTime smart constructor to avoid usage of UnsafeContestationPeriod in this instance at least.

No changelog entry as this got broken since last release.


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

@ch1bo ch1bo requested a review from a team January 10, 2024 19:43
@ch1bo ch1bo force-pushed the fix-contestation-period-conversion branch from 2bd3ec8 to eac2af2 Compare January 11, 2024 09:36
Copy link

github-actions bot commented Jan 11, 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-01-11 13:54:04.451043228 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 985245919fcc6c0c5cd116023cd2c947c43e80dcbb5075fe12433fbb 4072
νCommit 7cb20fa71eb4c563ca283566ebe0aa65859d96c3f8cba35c52c181fd 2043
νHead 7a36661f5c15e9f1783aeaab890812c59b7286cbbc6de762d3110772 8816
μHead 8b111ac12274e46314769295a1c5dcab1d260096fc469fd698065463* 3851
  • 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 4374 10.35 3.99 0.46
2 4573 12.68 4.88 0.49
3 4776 14.79 5.67 0.52
5 5180 19.22 7.35 0.59
10 6184 30.20 11.51 0.75
41 12415 99.21 37.68 1.77

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 531 11.37 4.44 0.30
2 720 15.04 6.07 0.35
3 909 18.85 7.75 0.40
5 1280 26.90 11.27 0.51
10 2214 49.55 20.97 0.80
19 3904 99.43 41.75 1.43

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 480 21.07 8.25 0.40
2 113 590 32.25 12.75 0.53
3 169 700 47.29 18.79 0.70
4 227 810 62.64 25.03 0.87
5 282 920 75.92 30.63 1.02
6 339 1031 93.45 37.91 1.22

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 537 16.68 7.67 0.36
2 718 18.54 9.33 0.40
3 901 20.02 10.78 0.43
5 1261 23.77 14.19 0.50
10 2116 31.87 21.79 0.66
50 5703 84.25 44.06 1.40

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 580 20.18 8.94 0.40
2 760 22.30 10.70 0.44
3 914 23.79 12.06 0.47
5 1291 28.24 15.81 0.55
10 2196 37.94 24.16 0.73
44 7808 99.43 77.93 1.86

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 4340 18.85 8.12 0.55
2 4509 31.78 13.87 0.71
3 4596 41.98 18.21 0.82
4 4850 65.83 29.01 1.10
5 5002 87.60 38.64 1.36
6 4972 95.85 41.95 1.45

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 4206 8.13 3.41 0.43
5 1 57 4240 9.49 4.22 0.44
5 5 285 4375 14.40 7.27 0.51
5 10 568 4544 20.13 10.90 0.59
5 20 1140 4885 32.64 18.62 0.76
5 30 1703 5220 44.94 26.25 0.93
5 40 2278 5566 57.46 33.97 1.10
5 50 2843 5901 69.77 41.61 1.27
5 74 4213 6718 99.13 59.87 1.68

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-01-11 13:57:42.034954444 UTC

Baseline Scenario

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.719396230
P99 114.80836202000005ms
P95 33.76680894999999ms
P50 20.836286ms
Number of Invalid txs 0

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.488585883
P99 10.716186089999974ms
P95 5.325564649999998ms
P50 4.300479ms
Number of Invalid txs 0

Copy link
Contributor

@abailly-iohk abailly-iohk left a comment

Choose a reason for hiding this comment

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

Nice catch!

Copy link

github-actions bot commented Jan 11, 2024

Test Results

403 tests  +2   396 ✅ +2   15m 17s ⏱️ -32s
135 suites +1     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 2266fbc. ± Comparison against base commit b0b8563.

♻️ This comment has been updated with latest results.

@ch1bo ch1bo force-pushed the fix-contestation-period-conversion branch from eac2af2 to dbc79f6 Compare January 11, 2024 09:58
@ch1bo ch1bo added this to the 0.15.0 milestone Jan 11, 2024
The block time * 10 was resulting in 0.5s which truncates to 0.
Usage of UnsafeContestationPeriod should be kept to a minimum.
@ch1bo ch1bo force-pushed the fix-contestation-period-conversion branch from dbc79f6 to 2266fbc Compare January 11, 2024 13:49
@ch1bo ch1bo merged commit 9f44498 into master Jan 11, 2024
21 checks passed
@ch1bo ch1bo deleted the fix-contestation-period-conversion branch January 11, 2024 14:37
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.

None yet

3 participants