Thanks for your answer. I’m creating a dapp. I don’t know how to rollback my business changes after receiving log with removed property set to true.
Suppose, I do following changes in mysql table:
field X: change from value 100 to value 101
field Y: change from value 200 to value 201
field X: change from value 101 to value 102
field Z: change from value 300 to value 102
field Y: change from value 201 to value 203
After log3/log4/log5 removed, I expect field X/Y/Z rollback to its original values(100/200/300).
I can record old value before make change. It’s useful when receive removed logs.
If I receive removed logs in following order:
log5(removed) -> log4(removed) -> log3(removed)
It easy to rollback field X/Y/Z to its original values, just undo it in sequence.
However, If I receive removed logs in following order:
log3(removed) -> log4(removed) -> log5(removed)
It hard to rollback field X/Y/Z to its original values (The value of field X may be rollback to 101 when rollback log4).
What the exact order of removed logs if log3/log4/log5 is removed when chain reorganization?