Open yubing744 opened 1 month ago
@jolestar In order to ensure that metaprotocol does not lose data when processing inscriptions, metaprotocol needs to return a snapshot of the current inscription status when registering EventQueue.
@jolestar In order to ensure that metaprotocol does not lose data when processing inscriptions, metaprotocol needs to return a snapshot of the current inscription status when registering EventQueue.
Since the inscription is immutable, only the ownership of the inscription changes. In order to realize the snapshot function of the inscription, I thought of a solution: define a global inscription ownership version number, when the inscription ownership changes, the version number +1, and record the ownership relationship of this inscription in this version. In this way, the inscription snapshot can be represented by the self-incrementing serial number of the inscription and the current global inscription ownership version number.
In order to prevent the inscription ownership relationship from taking up too much space, we can provide a function to merge historical ownership. The logic of the merge is to merge the inscription ownership before the smallest inscription ownership version number in the snapshot.
@jolestar Do you think this snapshot solution is feasible?
Problem description: Based on the inscription metaprotocol, all historical inscriptions need to be consumed.
Solution: Register an EventQueue for each metaprotocol to store inscription changes. Metaprotocol deletes events after consumption to reduce storage pressure.