Credentials Dependency Graph
Analyze possible optimization
Credential reissuance
How Wasabi currently works
Wasabi implements a mechanism that allows to register outputs in parallel. That is, a ways to break/consolidate credentials in order to get the exact number of credentials with the exact value and vsize necessary to register the outputs.
Imagine we have two inputs {7; 3}
and want to split the
total amount in outputs {3; 3; 2; 1; 1;}
, then it needs
to:
- break the
3
btc credential by two new credential of2
btc and1
btc - break the new
2
btc credential is two new credentials of1
btc and1
btc - break the
7
btc credential in two new credencials of5
btc and2
btc - change the new
1
btc and5
btc in two new credentials of3
btc and3
btc
After this 4 steps we have all the credentials that we need to redister the 5 outputs in parallel. However, note that the credential reissuance process requires, many times, to finish one reissuance before starting others.
It worth to note that there are multiple ways to get the exact same set of credentials, for example this is equivalent but requires one less reissuance:
Alternative implementation for Wasabito
It could worth to explore an alternative system where there is not a credential reissuance concept nor mechanism for the only purpose of breaking/consolidating credentials but instead, have this as part of the output registration mechanism.