24

The Masked Authenticated Messaging Introduction doesn't talk about snapshotting as it relates to MAM data streams, so I am trying to work out in my head what happens during a snapshot. It's a forward only set of linked messages. If all of the messages have been culled from the tangle by a snapshot, then the stream is pretty difficult to read obviously. But can a new message be added? For a private root, I don't think that's possible, so that seems particularly bad.

Obviously a permanode would not be impacted by the snapshotting (it's got everything), so is the only use case for MAM streams that need to live for an extended period of time - or through a snapshot at all really - to use a permanode? Both the sender and receiver would need to use the permanode as well in the case of a private root, correct?

Am I misunderstanding what gets lost in a snapshot or will there be special considerations made in snapshotting to accommodate MAM in the future?

Helmar
  • 1,293
  • 1
  • 15
  • 28
theoretical
  • 393
  • 1
  • 6

1 Answers1

9

In a MAM stream, every message holds a reference to the next one. To follow the stream when there is a snapshot you must always keep the ref to the next message.

Currently, to read the beginning of the stream after a snapshot you have to connect to a permanode.

(Source : https://youtu.be/_ZO2ysgzKkM at 1h23)

ben75
  • 5,344
  • 11
  • 32
  • 1
    By "you must keep a reference to the next message", I assume you mean statefully. That makes sense. Thanks for the link to the vid! – theoretical Dec 20 '17 at 02:54