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 asset quantity for CollectCom mutation #1192

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Dec 1, 2023

Our mutation tests for CollectCom were failing because valueFromList excludes the element if the Quantity is zero. I didn't check but probably the api has changed since we didn't observe this before.

valueFromList :: [(AssetId, Quantity)] -> Value
valueFromList = Value
              . Map.filter (/= 0)
              . Map.fromListWith (<>)


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

@v0d1ch v0d1ch self-assigned this Dec 1, 2023
Copy link

github-actions bot commented Dec 1, 2023

Test Results

373 tests  ±0   368 ✔️ ±0   22m 17s ⏱️ +55s
127 suites ±0       5 💤 ±0 
    5 files   ±0       0 ±0 

Results for commit aa8b19e. ± Comparison against base commit 6d9163d.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Dec 1, 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-12-01 16:59:50.144654994 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 4868d5365af5120ae0b3c93b819d3452a3cbdcc98595da2a7ae765b5 4069
νCommit 171a1e6bdbc8aa96d957a65b3f505517386af06ba265e3f784741f67 2050
νHead e89b0c4a6155bac2434d1e500bd49c155b2b56744ccf5a0efa72a82e 9092
μHead 6849328242b5912ad218f134378e6baff11f3e74f7e36dcf8e13d53e* 4062
  • 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 4585 10.75 4.26 0.47
2 4786 13.07 5.15 0.50
3 4985 15.24 5.98 0.54
5 5388 19.88 7.76 0.60
10 6393 30.71 11.88 0.77
41 12626 99.70 38.22 1.79

Cost of Commit Transaction

This is using ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 534 12.22 4.81 0.31
2 723 15.93 6.48 0.36
3 904 19.77 8.20 0.41
5 1282 27.87 11.80 0.52
10 2226 50.58 21.69 0.81
18 3724 94.20 40.16 1.36

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 480 22.20 8.87 0.41
2 114 590 33.97 13.71 0.55
3 171 700 49.53 20.07 0.73
4 227 814 64.19 26.20 0.89
5 283 924 77.34 31.89 1.05
6 337 1031 96.38 39.89 1.26

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 477 16.11 7.01 0.35
2 744 19.56 10.00 0.41
3 909 21.01 11.43 0.44
5 1278 24.68 14.83 0.51
10 1540 28.79 14.12 0.55
50 8940 97.27 83.91 1.93

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 565 21.29 9.68 0.42
2 707 22.76 11.02 0.44
3 874 24.73 12.72 0.48
5 1307 28.46 16.11 0.55
10 2220 38.02 24.61 0.73
45 8006 99.43 79.61 1.88

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 4528 20.10 8.75 0.57
2 4597 28.83 12.45 0.68
3 4760 44.73 19.57 0.86
4 4844 57.04 24.89 1.00
5 5013 78.50 34.48 1.25

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 4416 9.08 3.82 0.45
5 1 57 4453 10.51 4.67 0.46
5 5 284 4596 15.46 7.75 0.53
5 10 570 4776 22.18 11.81 0.62
5 20 1137 5133 34.92 19.66 0.80
5 30 1707 5496 48.13 27.70 0.98
5 40 2276 5855 61.12 35.65 1.16
5 50 2844 6212 73.98 43.55 1.34
5 69 3926 6895 98.57 58.63 1.67

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 2023-12-01 16:52:37.912864634 UTC

3-nodes Scenario

A rather typical setup, with 3 nodes forming a Hydra head.

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.936267310
P99 116.72838193ms
P95 32.24306685ms
P50 20.4916735ms
Number of Invalid txs 0

Baseline Scenario

This scenario represents a minimal case and as such is a good baseline against which to assess the overhead introduced by more complex setups. There is a single hydra-node d with a single client submitting single input and single output transactions with a constant UTxO set of 1.

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.283233146
P99 5.798725619999999ms
P95 5.076861950000001ms
P50 4.1657435ms
Number of Invalid txs 0

Copy link
Member

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

Good catch. Having a 0 quantity would definitely make the validator not fail.

Perhaps something changed in the api but valueFromList excludes the
element if the Quantity is zero
@ch1bo ch1bo merged commit d6ef7a0 into master Dec 1, 2023
21 of 24 checks passed
@ch1bo ch1bo deleted the fix-collect-com-mutation branch December 1, 2023 17:05
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

2 participants