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

Rename Event -> Input #1348

Merged
merged 16 commits into from
Mar 12, 2024
Merged

Rename Event -> Input #1348

merged 16 commits into from
Mar 12, 2024

Conversation

ch1bo
Copy link
Member

@ch1bo ch1bo commented Mar 11, 2024

As outlined in the consequences of ADR29, many things are currently called "Event" in the hydra code base. To improve

💫 Rename Event -> Input in code, tests, documentation and specification. While Input is not that much more descriptive, it is specific that these things are inputs to our system. Hence, sometimes these entities are also referred to as input events still.

💫 Rename EventQueue -> InputQueue and make it even less specific of what it queues (while the name still indicates it is Input tx entities)

💫 Remove golden JSON tests of Event SimpleTx and HeadState SimpleTx because these types are not used on any interface and higher-level ClientInput tx or StateChanged tx tests would capture regressions.

💫 Remove log-filter as this would have needed an update and nobody is seemingly using it? (TBD)


  • CHANGELOG updated or not needed
  • Documentation updated or not needed
  • Haddocks updated or not needed
  • No new TODOs introduced or explained herafter
    • Made an XXX a TODO as we really should remove chainState from the actual HeadState

@ch1bo ch1bo requested a review from a team March 11, 2024 12:06
Copy link

github-actions bot commented Mar 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-03-12 14:25:26.871009425 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 4794 8.95 3.43 0.46
2 4995 10.61 4.05 0.49
3 5196 12.85 4.92 0.52
5 5603 16.64 6.37 0.58
10 6604 26.12 10.01 0.72
47 14044 97.83 37.53 1.83

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 777 13.88 5.64 0.34
3 971 17.66 7.29 0.39
5 1345 25.66 10.74 0.49
10 2274 48.19 20.30 0.79
19 3964 97.83 40.79 1.41

Cost of CollectCom Transaction

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 544 16.52 6.53 0.35
2 114 654 27.38 10.90 0.48
3 170 764 38.23 15.38 0.60
4 227 874 52.91 21.37 0.77
5 283 984 66.55 27.10 0.93
6 339 1095 82.92 33.94 1.11

Cost of Close Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 599 8.29 4.59 0.28
2 668 9.01 4.48 0.28
3 815 9.30 6.38 0.31
5 1209 12.01 9.53 0.37
10 1983 16.06 15.40 0.48
50 7879 48.38 61.68 1.33

Cost of Contest Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 625 8.65 4.73 0.28
2 758 9.38 5.80 0.30
3 977 10.97 7.55 0.34
5 1177 11.52 9.02 0.36
10 2026 16.54 15.54 0.49
50 8382 55.16 66.04 1.44

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 4692 17.04 7.38 0.55
2 4803 27.80 12.12 0.67
3 4912 41.13 18.00 0.83
4 5130 59.69 26.27 1.05
5 5184 75.45 33.20 1.23
6 5166 87.57 38.29 1.36

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 7.64 3.19 0.44
5 1 57 4661 9.00 3.99 0.46
5 5 283 4795 13.40 6.75 0.52
5 10 570 4967 19.16 10.31 0.60
5 20 1139 5307 31.11 17.62 0.76
5 30 1707 5647 42.85 24.84 0.92
5 40 2277 5986 54.17 31.89 1.08
5 50 2847 6326 65.71 39.04 1.24
5 79 4495 7307 98.79 59.59 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-12 14:29:31.040463892 UTC

Baseline Scenario

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.372776353
P99 57.38138013000012ms
P95 33.11974024999998ms
P50 21.4949115ms
Number of Invalid txs 0

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 6.793291712
P99 13.472070689999988ms
P95 11.2600841ms
P50 6.3232025ms
Number of Invalid txs 0

Copy link

github-actions bot commented Mar 11, 2024

Test Results

413 tests   - 4   405 ✅  - 4   14m 31s ⏱️ +17s
136 suites  - 2     8 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit a04997a. ± Comparison against base commit 34d2890.

This pull request removes 5 and adds 1 tests. Note that renamed tests count towards both.
Hydra.HeadLogic/Types/JSON encoding of (Event SimpleTx) ‑ allows to encode values with aeson and read them back
Hydra.HeadLogic/Types/JSON encoding of (Event SimpleTx) ‑ produces the same JSON as is found in golden/Event SimpleTx.json
Hydra.HeadLogic/Types/JSON encoding of (HeadState SimpleTx) ‑ allows to encode values with aeson and read them back
Hydra.HeadLogic/Types/JSON encoding of (HeadState SimpleTx) ‑ produces the same JSON as is found in golden/HeadState SimpleTx.json
Hydra.Node.EventQueue ‑ adds sequential id to all events enqueued
Hydra.Node.InputQueue ‑ adds sequential id to all enqueued items

♻️ This comment has been updated with latest results.

@v0d1ch v0d1ch merged commit aebba20 into master Mar 12, 2024
21 checks passed
@v0d1ch v0d1ch deleted the rename-events branch March 12, 2024 16:03
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