Page MenuHomePhabricator

[Chronik] Add GRP0 protocol to assign groups to ALP tokens
DraftPublic

Authored by tobias_ruck on Mon, Apr 22, 06:27.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
Fabien
bytesofman
Group Reviewers
Restricted Project
Summary

Currently, there's no NFT spec for ALP, however, it would be useful to have something similar for ALP, e.g. to use for alias tokens.

The SLP spec groups tokens using two new token types, NFT1GROUP and NFT1CHILD, with the requirement that NFT1CHILD GENESIS txs must have quantity 1 and no MINT baton.

All this seems like unnecessary complexity to achieve a simple thing: Assign a "group" to a token ID. This spec simplifies things substantially:

  1. Any Standard ALP token can be both a group or a child, without needing to introduce a new token type
  2. All a GENESIS tx needs to do to assign a group is to have the bytestring "GRP0<group_token_id>..." in the data field of the GenesisInfo, and have at least 1 ALP token with the corresponding token ID at input index 0.

This implies that groups can form a tree, i.e. a child token can serve as parent for another token ID, which in turn can serve as another parent etc. Whether this is useful in any way remains to be seen.

Test Plan

./test/functional/test_runner.py chronik_token_alp_group