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

Fanout: Always rely on observed utxo #1916

Merged
merged 9 commits into from
Apr 2, 2025

Conversation

v0d1ch
Copy link
Contributor

@v0d1ch v0d1ch commented Mar 26, 2025

  • Instead of relying on the local state to display information on fanned out UTxO always display what we actually observed on-chain.

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

@v0d1ch v0d1ch added this to the 0.20.0 milestone Mar 26, 2025
@v0d1ch v0d1ch self-assigned this Mar 26, 2025
@v0d1ch v0d1ch requested a review from a team March 26, 2025 15:29
@v0d1ch v0d1ch linked an issue Mar 26, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Mar 26, 2025

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 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -
2 - - - -
3 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -
5 - - - -
10 - - - -
37 - $${\color{green}-0.39}$$ $${\color{green}-0.09}$$ -

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

github-actions bot commented Mar 26, 2025

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-04-02 08:23:33.957771618 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 6091 11.23 3.50 0.53
2 6294 13.56 4.22 0.57
3 6500 15.50 4.80 0.60
5 6897 20.56 6.38 0.67
10 7907 30.97 9.53 0.82
40 13935 98.88 30.39 1.78

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 561 2.44 1.16 0.20
2 738 3.38 1.73 0.22
3 919 4.36 2.33 0.24
5 1283 6.41 3.60 0.28
10 2177 12.13 7.25 0.40
54 10059 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 114 636 34.88 9.98 0.53
3 169 747 46.10 13.08 0.65
4 226 858 51.90 14.84 0.71
5 282 969 61.18 17.48 0.81
6 341 1085 67.80 19.50 0.89
7 393 1192 90.60 25.26 1.12
8 450 1303 96.32 27.07 1.18
9 506 1414 99.27 28.23 1.22

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1789 25.42 8.31 0.49
2 1886 25.59 8.99 0.50
3 2072 28.81 10.69 0.55
5 2380 32.93 13.37 0.62
10 3132 41.86 19.57 0.77
36 7138 94.40 53.92 1.62

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 623 23.71 7.55 0.42
2 730 24.89 8.50 0.44
3 873 27.26 9.84 0.48
5 1179 31.55 12.36 0.55
10 2186 46.23 19.71 0.76
38 6089 94.91 51.81 1.56

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 647 30.95 9.68 0.50
2 909 31.69 10.76 0.52
3 1011 33.48 11.96 0.55
5 1217 36.48 14.10 0.60
10 2106 48.16 21.43 0.79
32 5192 96.76 51.14 1.53

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 678 35.95 11.00 0.55
2 872 38.89 12.65 0.59
3 937 40.28 13.63 0.62
5 1285 45.17 16.54 0.69
10 1875 55.38 22.80 0.84
27 4557 97.73 47.73 1.48

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 5989 28.29 9.33 0.71
2 6090 37.31 12.30 0.81
3 6193 43.50 14.30 0.88
4 6389 56.76 18.78 1.03
5 6448 59.82 19.67 1.06
6 6697 77.36 25.60 1.25
7 6817 83.70 27.66 1.33
8 6768 90.01 29.62 1.39

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.66 6.46 0.62
10 1 57 6125 22.18 7.42 0.65
10 5 285 6261 31.69 11.06 0.76
10 10 569 6430 40.50 14.57 0.87
10 20 1139 6770 63.18 23.30 1.13
10 37 2104 7347 99.40 37.34 1.55

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-04-02 08:26:50.035122991 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 4.929723783
P99 15.320391379999995ms
P95 5.83018015ms
P50 4.399369ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-04-02 08:25:34.006161122 UTC 869M 3786M
2025-04-02 08:25:39.006266271 UTC 996M 3538M
2025-04-02 08:25:44.006159877 UTC 1027M 3506M
2025-04-02 08:25:49.006136283 UTC 1027M 3506M
2025-04-02 08:25:54.006086273 UTC 1026M 3506M
2025-04-02 08:25:59.006252727 UTC 1024M 3508M

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 31.885185432
P99 63.84329004999999ms
P95 49.61539439999999ms
P50 29.6065085ms
Number of Invalid txs 0

Memory data

Time Used Free
2025-04-02 08:26:12.710579346 UTC 933M 3608M
2025-04-02 08:26:17.710586359 UTC 1198M 3342M
2025-04-02 08:26:22.712521185 UTC 1242M 3243M
2025-04-02 08:26:27.71181769 UTC 1255M 3176M
2025-04-02 08:26:32.710569965 UTC 1261M 3168M
2025-04-02 08:26:37.710544837 UTC 1261M 3167M
2025-04-02 08:26:42.710552625 UTC 1263M 3165M
2025-04-02 08:26:47.710545241 UTC 1275M 3152M

@v0d1ch v0d1ch force-pushed the fanout-utxo-is-correct-after-incrementing branch 2 times, most recently from da9da66 to 3a746b2 Compare March 27, 2025 13:54
@noonio noonio modified the milestones: 0.20.0, 0.21.0 Mar 27, 2025
@v0d1ch v0d1ch force-pushed the fanout-utxo-is-correct-after-incrementing branch from 4140a4e to 11ee657 Compare March 31, 2025 08:27
@v0d1ch v0d1ch requested a review from ch1bo March 31, 2025 13:09
@noonio noonio force-pushed the fanout-utxo-is-correct-after-incrementing branch from 11ee657 to 5715167 Compare March 31, 2025 14:42
v0d1ch added 8 commits March 31, 2025 15:52
Signed-off-by: Sasha Bogicevic <[email protected]>
We need to be able to assert only participant outputs
but we also get a change output.

Signed-off-by: Sasha Bogicevic <[email protected]>
We need to grab all pub key outputs and then alter the tests
since we don't have exact match because of the extra change output

Also fix DirectChainSpec and Model tests.

Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
Signed-off-by: Sasha Bogicevic <[email protected]>
@noonio noonio force-pushed the fanout-utxo-is-correct-after-incrementing branch from 5715167 to c587e77 Compare March 31, 2025 14:52
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.

Looks good now. Only minor comments left

Signed-off-by: Sasha Bogicevic <[email protected]>
@v0d1ch v0d1ch force-pushed the fanout-utxo-is-correct-after-incrementing branch from 319011a to b0271c7 Compare April 2, 2025 08:18
@v0d1ch v0d1ch merged commit dc8e77b into master Apr 2, 2025
34 of 35 checks passed
@v0d1ch v0d1ch deleted the fanout-utxo-is-correct-after-incrementing branch April 2, 2025 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✔
Development

Successfully merging this pull request may close these issues.

HeadIsFinalised event not reporting the UTxOS as observed on L1
4 participants