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

Multi party, networked offline heads #1851

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

ch1bo
Copy link
Member

@ch1bo ch1bo commented Feb 12, 2025

This is a change I encountered when rebasing raft-network for #1720 and was useful back in the spike, but would have also been valuable in the hydra-doom use case.

Anyways, this is adding a --offline-head-seed argument to offline mode and fixes the "simulation" opened head to be deterministic across multiple instances, resulting that the nodes can and do talk to each other and consequently sign snapshots.


  • CHANGELOG updated
  • Documentation updated
  • Haddocks updated
  • No new TODOs introduced

@ch1bo ch1bo changed the title Multi party offline head Multi party, networked offline heads Feb 12, 2025
@ch1bo ch1bo requested a review from a team February 12, 2025 10:59
@ch1bo ch1bo force-pushed the multi-party-offline-head branch from 87ade0b to e21c830 Compare February 12, 2025 11:00
@ch1bo ch1bo self-assigned this Feb 12, 2025
Copy link

Transaction cost differences

Script summary

Name Size (Bytes)
νInitial -
νCommit -
νHead -
μHead -
νDeposit -

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
40 - - - -

Commit transaction costs

UTxO Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
54 - - - -

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 - - - - -
2 - - - - -
3 - - - - -
4 - - - - -
5 - - - - -
6 - - - - -
7 - - - - -
8 - - - - -

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - +0.39 +0.09 +0.01
37 - - - -

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
40 - - - -

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
34 - - - -

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 - - - -
2 - - - -
3 - - - -
5 - - - -
10 - - - -
27 - - - -

FanOut transaction costs

UTxO, Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
(0, 10) - - - - -
(1, 10) - - - - -
(5, 10) - - - - -
(10, 10) - - - - -
(20, 10) - - - - -
(37, 10) - - - - -

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 2025-02-12 11:05:46.808199469 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial c8a101a5c8ac4816b0dceb59ce31fc2258e387de828f02961d2f2045 2652
νCommit 61458bc2f297fff3cc5df6ac7ab57cefd87763b0b7bd722146a1035c 685
νHead 0e35115a2c7c13c68ecd8d74e4987c04d4539e337643be20bb3274bd 14756
μHead 57166715eadb8d3135964325c016eea546c21e1c0aae974ca67df9a5* 5541
νDeposit ae01dade3a9c346d5c93ae3ce339412b90a0b8f83f94ec6baa24e30c 1102
  • 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 6094 11.11 3.46 0.53
2 6294 13.44 4.18 0.57
3 6496 15.28 4.73 0.59
5 6897 20.19 6.25 0.66
10 7903 31.18 9.61 0.82
40 13937 98.27 30.17 1.77

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 558 2.44 1.16 0.20
2 740 3.38 1.73 0.22
3 919 4.36 2.33 0.24
5 1280 6.41 3.60 0.28
10 2176 12.13 7.25 0.40
54 10062 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 525 25.64 7.39 0.43
2 113 636 35.86 10.21 0.54
3 171 747 45.82 12.99 0.65
4 227 858 56.50 15.94 0.76
5 280 969 62.04 17.65 0.82
6 337 1085 78.97 22.13 1.00
7 395 1192 80.25 22.79 1.02
8 448 1303 91.27 25.81 1.13

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1793 25.50 8.33 0.50
2 1946 26.99 9.47 0.52
3 2107 29.48 10.98 0.56
5 2415 32.89 13.43 0.62
10 3190 44.54 20.52 0.80
38 7444 99.58 57.07 1.69

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 616 23.99 7.61 0.43
2 740 25.55 8.71 0.45
3 950 28.50 10.18 0.50
5 1302 34.24 13.09 0.58
10 2099 43.16 18.88 0.73
38 6156 96.44 52.24 1.58

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 712 29.19 9.23 0.48
2 812 30.98 10.43 0.51
3 970 32.86 11.67 0.54
5 1252 37.14 14.40 0.61
10 2056 51.08 22.19 0.81
35 5931 99.52 54.88 1.61

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 675 35.99 11.01 0.55
2 891 38.85 12.65 0.59
3 1035 41.02 13.97 0.63
5 1392 46.78 17.22 0.71
10 2105 58.83 24.34 0.89
27 4610 97.97 47.87 1.49

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 5968 28.20 9.30 0.71
2 6174 38.31 12.70 0.82
3 6172 43.26 14.21 0.87
4 6551 59.67 19.78 1.06
5 6585 67.84 22.42 1.15
6 6521 71.36 23.47 1.18
7 6679 81.83 26.92 1.30
8 6870 92.11 30.36 1.42

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 ₳
10 0 0 6091 19.20 6.31 0.62
10 1 57 6125 21.79 7.29 0.65
10 5 284 6261 29.85 10.44 0.74
10 10 568 6429 40.04 14.41 0.86
10 20 1139 6771 61.80 22.83 1.11
10 30 1710 7113 84.49 31.56 1.37
10 37 2105 7347 98.94 37.19 1.54

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 2025-02-12 11:08:07.654241493 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.921407156
P99 10.303321779999985ms
P95 6.278176950000001ms
P50 4.695902ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-02-12 11:06:42.705335918 UTC 954M 6123M
2025-02-12 11:06:47.705415431 UTC 1051M 5943M
2025-02-12 11:06:52.705263549 UTC 1054M 5939M
2025-02-12 11:06:57.705407252 UTC 1054M 5939M
2025-02-12 11:07:02.705295211 UTC 1056M 5938M
2025-02-12 11:07:07.705270071 UTC 1056M 5937M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 22.696860450
P99 42.7382105799994ms
P95 30.588754899999998ms
P50 20.605814ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-02-12 11:07:20.683230125 UTC 973M 6031M
2025-02-12 11:07:25.683378301 UTC 1145M 5859M
2025-02-12 11:07:30.683428839 UTC 1146M 5857M
2025-02-12 11:07:35.683357484 UTC 1150M 5853M
2025-02-12 11:07:40.683607107 UTC 1199M 5730M
2025-02-12 11:07:45.683408028 UTC 1229M 5627M
2025-02-12 11:07:50.683372941 UTC 1229M 5627M
2025-02-12 11:07:55.683396501 UTC 1237M 5618M
2025-02-12 11:08:00.683350137 UTC 1236M 5618M
2025-02-12 11:08:05.683270168 UTC 1242M 5612M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review 👀
Development

Successfully merging this pull request may close these issues.

1 participant