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

Spike / not-merge: Raft-based network using etcd #1632

Draft
wants to merge 19 commits into
base: master
Choose a base branch
from
Draft

Conversation

ch1bo
Copy link
Collaborator

@ch1bo ch1bo commented Sep 13, 2024

Experiment that (mis-)uses etcd as a NetworkComponent alternative.


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

@ch1bo ch1bo linked an issue Sep 13, 2024 that may be closed by this pull request
@ch1bo ch1bo force-pushed the raft-network branch 2 times, most recently from eace126 to 26bc95a Compare September 17, 2024 12:02
This simulates the corresponding initTx and commitTx transactions
This was done for hydra-doom, but to have networked offline heads (used
for etcd testing) we need to use the same head id for consistent snapshots.
The etcd network component does not provide this information (yet)
This is quite fragile and requires all --host --port and --peer
arguments to be consistent across the cluster. See the HydraNode.hs
change for example.
This does not work reliably of course. However, we would need to deal
with the situation when we are not connected to the majority anyways.
Copy link

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-17 15:58:46.202812694 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 2ee477c60839936be49a50030690865b5bed4db8cd2f05bf255ac680 10068
μHead a1610f6e64843161f4a88229c0286176f5325de3e2f773eec2b1d818* 4508
νDeposit c2117fd9ebdee3e96b81fd67ff7092d638926415c10f1f7e5a267ad0 2791
  • 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 5094 5.75 2.27 0.44
2 5298 6.99 2.76 0.46
3 5496 8.37 3.30 0.48
5 5899 11.12 4.39 0.53
10 6907 18.10 7.16 0.65
57 16356 83.00 32.84 1.78

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 756 13.86 5.65 0.34
3 947 17.33 7.20 0.38
5 1320 24.65 10.44 0.48
10 2257 45.22 19.36 0.75
20 4120 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 560 22.17 8.68 0.42
2 114 675 32.28 12.81 0.53
3 170 782 47.22 18.85 0.70
4 227 893 62.62 25.18 0.88
5 284 1004 72.62 29.63 0.99
6 338 1116 92.48 37.86 1.22

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 651 17.91 7.88 0.38
2 772 19.27 9.12 0.41
3 859 19.17 9.78 0.41
5 1180 22.72 12.61 0.48
10 2076 33.21 20.38 0.66
50 7929 97.69 74.60 1.83

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 641 20.07 9.01 0.41
2 791 21.53 10.42 0.43
3 1022 23.58 12.33 0.47
5 1251 26.18 14.91 0.52
10 1964 34.32 22.56 0.68
50 7983 98.28 83.30 1.90

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 679 25.86 11.13 0.47
2 891 28.10 13.02 0.51
3 1023 29.83 14.50 0.54
5 1383 34.12 18.19 0.62
10 2276 44.62 27.12 0.81
40 6354 97.84 73.07 1.75

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 4980 17.43 7.58 0.56
2 5053 24.94 10.80 0.65
3 5239 41.39 18.25 0.85
4 5373 57.94 25.70 1.04
5 5551 76.75 34.18 1.26
6 5569 93.60 41.60 1.45

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 4934 7.30 3.08 0.45
5 1 57 4968 9.02 4.05 0.47
5 5 284 5103 13.35 6.81 0.53
5 10 568 5272 19.01 10.37 0.61
5 20 1139 5614 30.72 17.65 0.77
5 30 1706 5953 41.84 24.69 0.93
5 40 2277 6293 53.17 31.82 1.09
5 50 2849 6635 64.31 38.86 1.24
5 81 4612 7686 99.87 61.16 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-17 16:07:03.085798854 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 40.816779016
P99 49.73530665999997ms
P95 44.70260529999999ms
P50 40.4678155ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 104.136916785
P99 129.42889042000002ms
P95 118.0341712ms
P50 103.4786515ms
Number of Invalid txs 0

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.

Spike: Use raft consensus for networking
1 participant