Skip to content

Partial fanout#2324

Draft
vrom911 wants to merge 63 commits intomasterfrom
vrom911/partial-fanout-SignableRepresentation
Draft

Partial fanout#2324
vrom911 wants to merge 63 commits intomasterfrom
vrom911/partial-fanout-SignableRepresentation

Conversation

@vrom911
Copy link
Contributor

@vrom911 vrom911 commented Oct 31, 2025

Part of #1468


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

@vrom911 vrom911 force-pushed the vrom911/partial-fanout-SignableRepresentation branch 3 times, most recently from 6cb5b08 to f6f7eab Compare November 3, 2025 22:42
@github-actions
Copy link

github-actions bot commented Nov 4, 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 2026-02-19 10:38:49.194657575 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 13037f2898c01805ce688b11b4c85e203156836f41f493426f927aa5 13801
μHead e345229dc8eacd102b643f6c130257598adae1bbf4f320840220c51b* 4451
νDeposit ae01dade3a9c346d5c93ae3ce339412b90a0b8f83f94ec6baa24e30c 1102
νCRS 3bcbff46edf56d5ef00892289ce9e81da5a4b911b7dc6e1eb8adfc8e 2214
  • 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 5004 12.63 3.94 0.50
2 5204 15.30 4.78 0.54
3 5406 17.75 5.55 0.57
5 5807 22.31 6.95 0.64
10 6811 34.77 10.85 0.81
35 11840 97.91 30.43 1.68

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 742 3.38 1.73 0.22
3 919 4.36 2.33 0.24
5 1283 6.41 3.60 0.28
10 2182 12.13 7.25 0.40
54 10066 98.61 68.52 1.88

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 57 525 22.52 6.60 0.40
2 113 636 28.15 8.29 0.47
3 170 747 33.76 9.97 0.53
4 228 858 39.43 11.66 0.59
5 282 969 45.74 13.52 0.66
6 338 1081 53.49 15.74 0.74
7 394 1192 56.95 16.84 0.78
8 450 1303 64.18 18.97 0.86
9 506 1414 69.89 20.73 0.93
10 560 1525 80.72 23.68 1.04

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 1925 22.39 7.22 0.47
2 2056 23.31 8.21 0.49
3 2200 24.00 9.14 0.51
5 2578 27.81 11.68 0.57
10 3379 35.09 17.41 0.71
50 9632 88.82 61.86 1.74

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 735 20.87 6.87 0.40
2 990 22.52 8.09 0.43
3 1117 22.58 8.89 0.45
5 1634 25.87 11.52 0.51
10 2581 29.87 17.51 0.63
50 11079 83.03 99.76 2.03

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 808 35.55 28.62 0.68
2 1068 37.86 30.01 0.72
3 1257 39.55 31.25 0.75
5 1844 44.25 34.35 0.84
10 2983 55.15 42.18 1.03
35 8524 98.19 92.81 1.99

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 2876 40.50 35.01 0.86
2 3086 43.09 37.01 0.90
3 3282 46.24 39.18 0.95
5 3594 49.95 42.73 1.02
10 4157 58.57 51.40 1.18
29 7085 99.56 86.80 1.89

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 5003 39.21 12.27 0.78
2 5159 52.38 16.54 0.92
3 5213 58.72 18.42 0.99
4 5430 75.35 23.77 1.17
5 5633 89.44 28.40 1.33
6 5540 89.94 28.33 1.32

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 5076 31.75 36.95 0.90
10 1 57 5111 36.04 39.29 0.95
10 5 285 5246 53.34 48.67 1.16
10 14 795 5550 95.42 70.43 1.67

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 2026-02-19 10:41:51.475429425 UTC

Baseline Scenario

Number of nodes 1
Number of txs 300
Avg. Confirmation Time (ms) 5.453143180
P99 7.459510139999998ms
P95 6.5492295ms
P50 5.2501750000000005ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 900
Avg. Confirmation Time (ms) 33.810942167
P99 52.82333476999999ms
P95 44.45214694999999ms
P50 32.574135999999996ms
Number of Invalid txs 0

@vrom911 vrom911 force-pushed the vrom911/partial-fanout-SignableRepresentation branch 6 times, most recently from 81114ad to e2bfe00 Compare November 5, 2025 21:13
@vrom911 vrom911 force-pushed the vrom911/partial-fanout-SignableRepresentation branch 2 times, most recently from 62433f4 to f4a792f Compare November 7, 2025 09:25
@vrom911 vrom911 requested review from ffakenz and v0d1ch November 7, 2025 09:25
@github-actions
Copy link

github-actions bot commented Nov 7, 2025

Transaction cost differences

Script summary

Name Size (Bytes)
μHead $${\color{green}-833.00}$$
νCommit -
νDeposit -
νHead $${\color{green}-798.00}$$
νInitial -

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 $${\color{green}-833.00}$$ 2.24 0.65 $${\color{green}-0.02}$$
2 $${\color{green}-833.00}$$ 2.66 0.78 $${\color{green}-0.01}$$
3 $${\color{green}-833.00}$$ 3.05 0.89 -
5 $${\color{green}-833.00}$$ 3.88 1.15 -
10 $${\color{green}-833.00}$$ 5.85 1.74 +0.02

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 - - $${\color{green}-2.50}$$ $${\color{green}-0.66}$$ $${\color{green}-0.03}$$
2 - - $${\color{green}-5.91}$$ $${\color{green}-1.53}$$ $${\color{green}-0.06}$$
3 - - $${\color{green}-8.25}$$ $${\color{green}-2.13}$$ $${\color{green}-0.09}$$
4 - - $${\color{green}-13.17}$$ $${\color{green}-3.36}$$ $${\color{green}-0.13}$$
5 - - $${\color{green}-9.94}$$ $${\color{green}-2.65}$$ $${\color{green}-0.10}$$
6 - - $${\color{green}-12.78}$$ $${\color{green}-3.36}$$ $${\color{green}-0.13}$$
7 - - $${\color{green}-30.43}$$ $${\color{green}-7.68}$$ $${\color{green}-0.31}$$
8 - - $${\color{green}-31.47}$$ $${\color{green}-7.99}$$ $${\color{green}-0.31}$$
9 - - $${\color{green}-16.01}$$ $${\color{green}-4.27}$$ $${\color{green}-0.16}$$

Cost of Increment Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 140 $${\color{green}-1.58}$$ $${\color{green}-0.40}$$ $${\color{green}-0.01}$$
2 140 $${\color{green}-2.56}$$ $${\color{green}-0.58}$$ $${\color{green}-0.01}$$
3 140 $${\color{green}-2.91}$$ $${\color{green}-0.62}$$ $${\color{green}-0.02}$$
5 140 $${\color{green}-4.76}$$ $${\color{green}-0.98}$$ $${\color{green}-0.04}$$
10 140 $${\color{green}-7.37}$$ $${\color{green}-1.38}$$ $${\color{green}-0.06}$$

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 72 $${\color{green}-1.67}$$ $${\color{green}-0.44}$$ $${\color{green}-0.01}$$
2 140 $${\color{green}-2.62}$$ $${\color{green}-0.60}$$ $${\color{green}-0.02}$$
3 140 $${\color{green}-3.25}$$ $${\color{green}-0.70}$$ $${\color{green}-0.02}$$
5 276 $${\color{green}-4.46}$$ $${\color{green}-0.72}$$ $${\color{green}-0.03}$$
10 616 $${\color{green}-7.93}$$ $${\color{green}-0.21}$$ $${\color{green}-0.04}$$

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 +957 7.06 18.62 0.24
2 +549 6.93 18.59 0.22
3 +480 6.77 18.62 0.21
5 +616 6.64 18.97 0.22
10 +1229 5.95 21.19 0.26
34 +2591 3.41 40.72 0.43

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 2251 7.31 25.06 0.34
2 2250 7.17 25.61 0.34
3 2250 7.06 26.17 0.34
5 2250 6.75 27.28 0.35
10 2250 5.95 30.03 0.37

FanOut transaction costs

UTxO, Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
(0, 10) - $${\color{green}-758.00}$$ 13.44 30.84 0.3
(1, 10) - $${\color{green}-758.00}$$ 15.24 32.22 0.32
(5, 10) - $${\color{green}-758.00}$$ 23.55 38.09 0.43
(10, 10) - $${\color{green}-758.00}$$ 36.19 46.03 0.59

@vrom911 vrom911 changed the title Initial work on SignableRepresentation instance of Snapshot [Partial fanout]: Add BLS accumulator to Snapshot Nov 7, 2025
@vrom911 vrom911 self-assigned this Nov 7, 2025
vrom911 added a commit to cardano-scaling/hydra-formal-specification that referenced this pull request Nov 7, 2025
Copy link
Contributor

@v0d1ch v0d1ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I think the main concern is that we want to have any UTxO to commit/decommit in there when building the accumulator and I gave the reason in one of the comments.

@noonio noonio linked an issue Nov 14, 2025 that may be closed by this pull request
1 task
@v0d1ch v0d1ch force-pushed the vrom911/partial-fanout-SignableRepresentation branch 3 times, most recently from 3f3c2f1 to 14152aa Compare December 2, 2025 15:19
@v0d1ch v0d1ch force-pushed the vrom911/partial-fanout-SignableRepresentation branch 6 times, most recently from 54b3e8f to 3d1952a Compare December 9, 2025 13:55
v0d1ch and others added 29 commits February 19, 2026 11:06
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
[BuiltinBLS12_381_G1_Element]

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
I need to investigate why execution units are blowing up.
It could be a bug also.

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Remove sha-256 since it causes nix-flake check to fail

Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
We need to not use bls multiplication rn
Apply blake2b_224 before scalar conversion
Compute commitments with the actual CRS used for proofs
Build the accumulator using fanout output order
Optimizations applied:
 * Single-pass serialization: each 'TxOut' is serialized once via
   @serialiseData . toBuiltinData@ and reused for both UTxO hash checks
   and accumulator scalar computation.
 * Combined CRS lookup: the reference input for the CRS is looked up once
   and decoded only when the membership check is actually reached.
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
Signed-off-by: Sasha Bogicevic <sasha.bogicevic@iohk.io>
@v0d1ch v0d1ch force-pushed the vrom911/partial-fanout-SignableRepresentation branch from dc59afd to 7bc8919 Compare February 19, 2026 10:32
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.

Partial fanout - Part 1

2 participants

Comments