MixinNetwork / mips

Messenger Improvement Proposals
https://mixin.one/mm
Apache License 2.0
2 stars 0 forks source link

Return underlying transaction hash of a snapshot #23

Closed liusining closed 3 years ago

liusining commented 3 years ago

Users and bot developers currently cannot relate their snapshot objects returned by Mixin API to underlying transactions in the Mixin Kernels. However, knowing those undecorated data behind your somewhat centralized API service can give people more confidence about the integrity and consistency of Mixin software services as a whole.

So please return transaction hashes in /snapshots.

cedricfung commented 3 years ago

Good approach and the whole API should all be refactored to make the API and Kernel data more connected. Now we just added snapshot_hash and transaction_hash to the /snapshots/:ID API, this gives people some way to ensure the API is correctly based on the Kernel graph.

Those new fields should only be available for those assets enabled for Kernel graph, and they are not available until the snapshot confirmed by the Kernel graph.

liusining commented 3 years ago

Great. And I also found those new fields in /transfers/trace/:trace_ID.

However, by comparing an API snapshot with its Kernel data, I realized that memos of snapshots were not saved on-chain, or say, on-graph. But many future MTG (Mixin Trusted Group) services would probably be based on that, like 4swap. Making memos or at least hashed memos available in their Kernel snapshots may help those services be more trusted.

So please consider saving memos on-chain.

cedricfung commented 3 years ago

Transfers through Mixin Messenger now encodes memo in the mainnet extra.

type MixinExtraPack struct {
    T uuid.UUID
    M string `msgpack:",omitempty"`
}

M is the memo, and T is the trace id.