LNP-BP / LNPBPs

LNP/BP standards for bitcoin layer 2 & 3 protocols
https://standards.lnp-bp.org
202 stars 39 forks source link

Should RGB schema enforce lower bounds on meta fields? #89

Closed dr-orlovsky closed 3 years ago

dr-orlovsky commented 3 years ago

Right now RGB Schema enforces that metafield value length should not exceed certain number of chars/bytes. However the question is when we need to enforce that it must be also longer than a certain lower bound. W/o this feature it will be possible for instance to create "fake" genesis for assets with empty ticker or asset names.

rajarshimaitra commented 3 years ago

Question: Is the metadata value length being restricted by Occurrence here? https://github.com/LNP-BP/rust-lnpbp/blob/380807a81469a72f233c5dcc2129141280e3318a/src/rgb/schema/nodes.rs#L25

dr-orlovsky commented 3 years ago

Nope, occurences enforces how many times the field may appear, but not the internal field structure