Skip to content

SCORU: Proto: Refactor inbox api

Joel Bjornson requested to merge jobjo/tezos:refactor-inbox-api into master

Context

Currently , the module type Sc_rollup_inbox_repr.MerkelizedOperations exposes two functions:

(* Current version. *)
val add_external_messages :
  history ->
  t ->
  Raw_level_repr.t ->
  string list ->
  messages ->
  (messages * history * t) tzresult Lwt.t

val add_messages_no_history :
  t ->
  Raw_level_repr.t ->
  Sc_rollup_inbox_message_repr.serialized list ->
  messages ->
  (messages * t, error trace) result Lwt.t

To make it more consistent, this MR changes to:

(* New version *)
val add_messages :
  history ->
  t ->
  Raw_level_repr.t ->
  Sc_rollup_inbox_message_repr.serialized list ->
  messages ->
  (messages * history * t) tzresult Lwt.t

val add_messages_no_history :
  t ->
  Raw_level_repr.t ->
  Sc_rollup_inbox_message_repr.serialized list ->
  messages ->
  (messages * t, error trace) result Lwt.t

The responsibility for serializing to external messages is on the client side.

Manually testing the MR

CI.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Mehdi Bouaziz

Merge request reports