Update Friday, April 24th 2020
Deep code mode for the past couple of weeks, which necessarily means I’m far less socially inclined, apologies. Very much trying to get the compact slate RFC + related work done and dusted, and I think it’s about 99% there definition-wise and about 85% there code-wise. It’s taken a few iterations, but I think the current state of the V4 Slate is about as minimal as it can be. And given it has become so minimal, it seemed a logical step to go ahead and make it even more minimal.
Here are the highlights:
-
Rather than continuing with the mega-PR, which was holding back development, I just decided to create a separate branch altogether then rapid-fire PR the changes into there. We can merge the whole thing once everything is ready and the RFC is accepted, and hopefully everything is a bit easier to review now that the changes are all broken up
-
As the minimized slate turned out quite flat, as seeing as we already have plenty of serialization code in the core, i decided it was an easy-enough step to allow slates to be serialized to a very-compact binary format This works well enough and maintenance/new versions should only require a single translation from the current slate version to binary and back.
For reference, here is a size comparison of a few slate files between json/binary, a collection of standard, standard with pament proof, and invoice transactions:
107 standard_S1.txbin
211 standard_S1.tx
942 standard_S2.txbin
1350 standard_S2.tx
1969 standard_S3.txbin
2821 standard_S3.tx
99 invoice_I1.txbin
193 invoice_I1.tx
1125 invoice_I2.txbin
1655 invoice_I2.tx
1899 invoice_I3.txbin
2697 invoice_I3.tx
172 standard_pp_S1.txbin
330 standard_pp_S1.tx
1071 standard_pp_S2.txbin
1658 standard_pp_S2.tx
2028 standard_pp_S3.txbin
2821 standard_pp_S3.tx
For reference the max that can fit in a standard QR code is 3k. Though we have yet to define standards for armoring or QR codes to go on top of this, the reasonable size of the S1/S2/I1/I2 parts of the journey gives us options we didn’t previously have.
- And all of this is of course defined (along with any confusing terminology I might have just used) in the compact slates RFC, which now includes the binary spec.
Still a bit more work to go, mostly updating the doctests with all of the slate changes as well as ensuring backwards compatibility with version 3 wallets. But should have this done over the next week and then I think we’ll have time to turn some attention to armoring possibilities.
That’s it for now. Enjoy what at one time was perceived as the weekend.