Skip to content

Refactor message passing [#3159]

Ethan Reesor requested to merge 3159-refactor-message-passing into main
  • Closes #3159 (closed).
  • Moves protocol.Envelope to pkg/types/messaging.
    • The protocol package is a monster and I want to avoid adding more, hence messaging being its own package.
    • To support message types other than user transaction and user signature, an envelope needs to contain arbitrary messages.
    • Thus Envelope has Message and UserTransaction has Transaction, leading to a circular dependency between the packages. The simplest way to resolve this (and not add to the protocol package bloat) is moving Envelope to messaging.
  • Eliminates NormalizeLegacy and LegacyMessage, instead always normalizing an envelope to UserTransaction and UserSignature messages, then leaving it up to the executor to reconstruct deliveries from those messages.

Changelog: refactor

Merge request reports