taproot-assets icon indicating copy to clipboard operation
taproot-assets copied to clipboard

assets: decide on if genesis asset details serialization should be explicit or implicit

Open Roasbeef opened this issue 2 years ago • 6 comments

Our current serialization actually writes all the genesis asset details (genesis point, name, tag, etc) out to the TLV serialization. In contrast, the BIP only writes the "core" asset information, and sort of assumes that the genesis information "is known".

The current state of https://github.com/lightninglabs/taro/pull/49 puts us somewhere in the middle: the genesis information now holds the type, and we continue to write the type out in the main asset body as well.

In short, we should decide on one or the other. I'm somewhat in favor of just going all the way and making things fully explicit. This would mean all the base genesis information is transmitted along side the core asset, and also will be a part of the asset TLV leaf. This is sort of already there implicitly, since we have an explicit field for the asset_id.

Roasbeef avatar Jul 13 '22 23:07 Roasbeef

Thinking @halseth could be assigned this. If people have thoughts if it'll be possible, let's chat about it

dstadulis avatar Nov 01 '22 18:11 dstadulis

@dstadulis Yeah, can pick it up.

@Roasbeef Let's just go with the full thing?

halseth avatar Nov 03 '22 13:11 halseth

@halseth so there's a bit of background needed here, and this is also related to changes to the addr scheme and universe proof bootstrap. Along the way, we realized that in order to do the on chain send properly, the sender needs to transmit more information that's in the address rn. Thus the "genesis bootstrap" was born. This'll actually go away as soon as the gRPC/HTTP stuff for the base universe boostrap is done, as you'll first "clone/sync" the issuance proofs of the assets you care about. Afterwards, just given the asset ID you know everything you need to send/recv (genesis point, tag, meta, etc, etc).

This issue was also made before we had the realization I mentioned above. Now I think maybe we should go the other direction and just put the "core" information, since the genesis info would be obtained once you bootstrap the first issuance proof.

Roasbeef avatar Nov 04 '22 02:11 Roasbeef

Ok, will defer this until the addr scheme and universe boostrap changes you mention are done then.

halseth avatar Nov 04 '22 10:11 halseth

Will be breaking change so push to v0.3

dstadulis avatar Jun 13 '23 18:06 dstadulis

only need assetID rather than carrying genesis with everything so fixing #62 will simplify serialization

dstadulis avatar Sep 05 '23 19:09 dstadulis