lightninglabs / taproot-assets

A layer 1 daemon, for the Taproot Assets Protocol specification, written in Go (golang)
MIT License
463 stars 111 forks source link

[enhancement] Migrate `Decimal Display` into TLV to induce availability and protocol-level enforcement #956

Open dstadulis opened 4 months ago

dstadulis commented 4 months ago

Description:

To ensuring correct decimal display usage the daemon has recently added checks inside the planter (added in #952) this should catch inadvertent user errors (if a user is using a tapd daemon). This is substandard as the protocol-design need is to entwine the value with the endogenous properties of an asset -- e.g. inextricably link decimal_display into the asset.

Proposed Solution:

Move the decimal display value into the asset's TLV. This would make it an integral part of the asset's property and enforce on the protocol level consistency.

Benefits

  1. This will enforce consistency decimal display value across any taproot asset implementation (or hacky uses of tapd) and light client by making it inherent to the asset

Implementation Plan

To implement this solution, we will:

dstadulis commented 3 months ago

Moving this issues out of v0.4 milestone in favor of https://github.com/lightninglabs/taproot-assets/issues/997

dstadulis commented 2 months ago

Removing from Sprint 30 Available to be reassigned if others want to take it from @guggero