Profiling dbc performance

Following on from this benchmark result:

I wondered if 1 input to 100 outputs is a realistic scenario, so I had a look at bitcoin to get some idea of the range of inputs:outputs (not a perfect comparison but it’s a starting point).

I looked at bitcoin block 686201

Total txs: 2128
Size: 1288.673 KB
Virtual Size: 999 vKB
Weight Units: 3992.666 KWU

1614 txs (76%) were some combo of 1 or 2 inputs and 1 or 2 outputs. But there’s a few transactions that have a very large mismatch between inputs and outputs like in the dbc benchmark, so the benchmark is showing a situation that would happen fairly regularly but is probably not representative of most transactions.

The first row of the stats below shows there were 983 transactions in the block with 1 input and 2 outputs

An example of txs with a large difference is there were 2 transactions with 1 input and 501 outputs.

Might be interesting to try and recreate this set of transactions with sn dbcs and see how long it takes to process.

number_of_txs,inputs,outputs
983,1,2
360,1,1
176,2,2
95,2,1
60,1,3
58,3,2
36,3,1
27,4,1
24,5,1
18,1,4
18,4,2
13,2,3
12,1,6
12,5,2
12,6,1
9,1,7
9,1,8
8,1,5
8,6,2
7,7,1
7,8,2
6,1,11
5,1,9
5,1,28
5,8,1
4,2,4
4,3,3
4,10,1
3,1,10
3,1,46
3,5,6
3,9,1
3,11,1
3,19,2
3,50,2
2,1,13
2,1,15
2,1,16
2,1,20
2,1,23
2,1,31
2,1,32
2,1,34
2,1,48
2,1,401
2,1,501
2,3,4
2,3,12
2,4,6
2,6,3
2,7,2
2,9,2
2,10,2
2,12,1
2,13,2
2,24,2
2,25,2
2,34,2
1,1,12
1,1,14
1,1,19
1,1,24
1,1,26
1,1,27
1,1,29
1,1,33
1,1,36
1,1,39
1,1,42
1,1,44
1,1,45
1,1,52
1,1,54
1,1,62
1,1,85
1,1,91
1,1,93
1,1,99
1,1,101
1,1,104
1,1,179
1,2,6
1,2,7
1,2,8
1,2,13
1,3,9
1,3,30
1,3,39
1,3,44
1,3,49
1,4,3
1,4,7
1,4,77
1,5,31
1,5,47
1,6,5
1,6,8
1,8,3
1,8,5
1,9,10
1,10,9
1,11,2
1,11,4
1,12,2
1,13,1
1,14,1
1,16,1
1,16,60
1,17,2
1,20,1
1,21,2
1,22,1
1,23,19
1,23,74
1,24,1
1,26,1
1,26,2
1,27,1
1,30,1
1,31,1
1,51,2
1,52,1
1,52,2
1,58,2
1,61,1
1,86,2
1,89,2
1,90,1
1,95,2
1,118,2
1,142,1
1,200,34
1,240,1
1,348,1
8 Likes

I think it may even be 2 routes of thought here. Microtransactions such as pay for chunk are likely 1 → many. However, money as in folk pay for goods or to each other is probably much more likely 1->2 (1 output to them 1 for your change)

7 Likes

As every Bitcoin block is mined every 10 minutes, there is lot of transaction from exchanges accumulating all withdrawals to one transaction. With no blocks only some exchanges with approval withdrawals might have some bigger groups of withdrawals sending at ones.
The other groups of big transactions are the one sending rewards to miners/farmers from pools. But there will be nothing like this in Safe Network.

3 Likes

or 2 → x, 3 → x, 4 → x, etc. Because you may be combining several smaller inputs to make a larger one.

4 Likes