Only use protobuf structs for serialization #512
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the advent of Mir codegen and DSL modules, most events are created and handled as Mir-specific structs. However, these structs must be serialized into their protobuf counterparts to pass through the event loop and deserialized again to be fed into DSL machinery.
This (big) PR changes nearly all usages of protobuf structs into Mir-specific structs, apart from the two instances where (de)serialization is required: communicating over the network and recording/replaying events.
While integration tests using simulated/fake transports could technically forego serialization, I opted to keep the serialization and deserialization step, in order to not miss any weird corner cases related to serialization.
The PR also removes the handcrafted DSL for threshcrypto: it's not used here, I personally dropped it in favor of the autogenerated one on my work, and it's one less file to update :)