opentimestamps / python-opentimestamps

Other
85 stars 39 forks source link

OpReverse allows the creation of cycles in a timestmap graph #5

Open petertodd opened 8 years ago

petertodd commented 8 years ago

Suppose we create a timestamp on 'abcd' with the following operations:

OpReverse -> 'dcba' -> OpReverse -> 'abcd'

...and we're back where we started.

Now granted, this will work just fine in the opentimestamps client, just it's an unexpected property that adds complexity in some cases. For instance, the current calendar implementation in the opentimestamps server would probably fail if you ever added a timestamp containing two reverses in a row to it.

Thoughts? Might be enough to just put a warning on it and provide mechanisms to prevent OpReverse being used in places where it can cause issues, like the server.

CC: @RCasatta

RCasatta commented 8 years ago

Okay, if OpReverse add complexity it's better to remove it completely in the new version. I'll point old version timestamp file to the previous implementation

petertodd commented 8 years ago

I marked it as pending depreciation so any user of it will be adequately warned: https://github.com/opentimestamps/python-opentimestamps/commit/ff2ab8a6510e6a6cfe6c5333c41474e9e05ebdb1