Page MenuHomePhabricator

[new lokad] Add spec for onchain trollbox for tokens
Needs ReviewPublic

Authored by bytesofman on Wed, Oct 30, 13:50.

Details

Reviewers
tobias_ruck
Group Reviewers
Restricted Project
Summary

See trollbox.md for rationale. Would be a good way for token creators to communicate with their users and vice versa.

Test Plan

proofread

Diff Detail

Repository
rABC Bitcoin ABC
Branch
new-lokad
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 30937
Build 61377: Build Diff
Build 61376: arc lint + arc unit

Event Timeline

tobias_ruck added a subscriber: tobias_ruck.
tobias_ruck added inline comments.
doc/standards/trollbox.md
21 ↗(On Diff #50560)

Any reason not to use eMPP? Also I'd some add the following:

  1. A version byte (like a token type in SLP)
  2. A message type (either as string (like PARTIAL in Agora), or a single byte)

So simply change this to be:
OP_RETURN OP_RESERVED "<LOKAD ID:[u8;4]><version:u8><message type:u8><token ID:[u8;32]><utf8 message:[u8]>"

  • version is 0 for the first version
  • message type is 0 for just sending a message in chat
  • message is the leftover of that pushdata in utf8
This revision now requires changes to proceed.Wed, Oct 30, 16:19

EMPP for trollbox spec, add version byte, add msg type byte, update example

bytesofman added inline comments.
doc/standards/trollbox.md
21 ↗(On Diff #50560)

no reason, just didn't occur to me

EMPP is probably better. More extensible, fewer bytes.

We might also want to use Shammah's CashWeb, which is much more generic and powerful, but also creates much less data on-chain:

Code: https://github.com/givelotus/cashweb

Whitepaper: https://www.stampchat.io/whitepaper.pdf

OTOH, starting with a super simple version of this first and then switching to something more elaborate later IMO could make more sense.

doc/standards/trollbox.md
21–26 ↗(On Diff #50564)
36 ↗(On Diff #50564)

You might wanna spec a message type for these rules already, depending on how you want to identify token creators.

Trollbox devs can then query the display rules from the chain.

This revision now requires changes to proceed.Thu, Oct 31, 07:56

improve spec description in line with suggested comments, provide spec for Cashtab planned implementation