Yes it’s the size of the Transaction. Since each cashnote contains the transaction it was created in:
batch 1
: means6 outputs
(1*5 payments + 1 change) in the Transaction, meaning small transaction, resulting in smaller cashnotesbatch 21
: means105 outputs
(21*5 payments + 1 change) in the Transaction, meaning bigger transaction, resulting in big cashnotes
We currently keep a local copy of the cashnotes we created for the nodes as payment. In both cases (any batch size) there will be the same amount of those as we ultimately pay the same nodes. The difference is that instead of having 105 small ones (with batch 1
) we will have 105 BIG ones (batch 21
)!
One transaction means 1 change output:
- so
batch 21
would mean we add 1 change cashnote to our wallet because all is settled with only one transaction. - and
batch 1
in means we need 21 transaction resulting in 21 change outputs.
safe files upload --batch-size 21 10MB.txt
Uploaded 21 chunks in 50 seconds
du -sh cash_notes
3.0M cash_notes
find cash_notes -type f | wc -l
107
All in one transaction:
- 105 cashnotes to pay notes each roughly
28K
- 1 change cashnote for us of roughly
28K
- 1 origin cashnote that you had before roughly
2k
105 * 28k + 1* 28k + 2k make roughly 3.0M
safe files upload --batch-size 1 10MB.txt
Uploaded 21 chunks in 7 minutes 47 seconds
du -sh cash_notes
528K cash_notes
find cash_notes -type f | wc -l
127
Divided in 21 transactions:
- 105 cashnotes to pay notes each roughly
4K
- 21 change cashnote for us of roughly
4K
- 1 origin cashnote that you had before roughly
2k
105 * 4k + 21* 4k + 2k make roughly 528K
Now intuitively I would want to end up with a smaller cashnote dir when batching payments! The reason it is not is because we currently keep the cashnotes we created for the node payments for debug purposes. Ultimately those will not be kept anymore as we don’t need them (we don’t own them), resulting in smaller cashnote dir when batching! Which is indeed the intended behaviour!
Hopefully this has helped clear some confusion!