MWC Slatepacks implementation is in the progress, currently it is at the final stage. Slatepack feature is implemented by grin and it works great. Unfortunately slatepacks comes with other features that make grin abandon old code and stop supporting anything except slatepacks.
For MWC we need to keep backward compatibility with old wallets because we want keep our users happy. Because of that our slatepack implementaiton is very different from what grin has. We kept all features that wallet already has and kept backward compatibility.
Currently the changes at the branch, soon they will be moved to the master branch, mwc713 command will be adopted and QT wallet will adopt that feature as well.
Looks like you would need use dedicated serialization code with this definition, why not use Rust standard serialization? I guess you want to have a most compact data format?
Backward compatibility is absolutely making users happy, but the code maintaining will be painful and more buggy, and hard to upgrade in the future. I suppose this is why Grin throw the old slate versions and facilitate the hard fork to get beautiful and easy-to-maintain source code, to make futureâs life easy.
I donât find the kernel part in the new V4 slate. Do you understand why it has been removed? I suppose thatâs only useful in the final step and normally the wallet donât need to send to remote party, instead it just merge it locally and post to network.
Yes, it is a dedicated serialization functionality. One of advantages that it allow to maintain compatibility easier. The rust standard serialization requires new data format for another new version and conversion of structures form one to another. In order to use rust to perform the same, complexity will not be eaiser.
Also, normally save/load operations are independent form data. Rust make serialization convenient for data structures, but it doesnât mean that we should never use alternatives.
Backward compatibility we should maintain if we can. So far it is not so bad from the code perspective. Implementation is working. Of course it will be much better to have one implementation, but idea of compact slates comes only and we want to have it. The most confusing - it is how those slated build, the kernel offset calculated differently. But fortunately it is solvable with a single flag and we have good enough test coverage to validate that.
V4 has offset (pub off: BlindingFactor) - it is kernel offset and it has the kernel features (pub feat_args: Option). Together it is what you need to build the kernel. So the data is here but it is not named as a kernel. I think the reason in new grin âSlateâ implementation. The Transaction data is optional, but offset BlindingFactor is always exist. Such separation make sense for âcompact slateâ workflow. Initial send data is Kernel offset and Participant data only, no transaction is needed.
Looks fine for me. Non encrypted data contain encrypted. Probably it is better use Binary data instead of not encrypted. Encryption result is a binary data.
Check update version (please note, it is in the master branch)